Examples of DependencyPath


Examples of org.apache.ctakes.dependency.parser.util.DependencyPath

     
      if ( isDonorTerm(tok) ) {
        vfeat.put(DONOR_TOKEN, true);
       
        // check if there are one-removed dependencies on the dependency path
        DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
            DependencyUtility.getNominalHeadNode(jCas,mention));
        int commonInd = path.indexOf(path.getCommonNode());
        if (commonInd==1 || commonInd==path.size()-2) {
          vfeat.put(DONOR_DEPTOK, true);
        }
      }
      if ( isFamilyTerm(tok) ) {
        vfeat.put(FAMILY_TOKEN, true);

        // check if there are one-removed dependencies on the dependency path
        DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
            DependencyUtility.getNominalHeadNode(jCas,mention));
       
        // 6/28/13 srh fixing for null pointer exception
        if (path != null) {
          int commonInd = path.indexOf(path.getCommonNode());
          if (commonInd==1 || commonInd==path.size()-2) {
            vfeat.put(FAMILY_DEPTOK, true);
          }
        }
      }
     
      if ( isOtherTerm(tok) ) {
        vfeat.put(OTHER_TOKEN, true);

        // check if there are one-removed dependencies on the dependency path
        DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
            DependencyUtility.getNominalHeadNode(jCas,mention));
        int commonInd = path.indexOf(path.getCommonNode());
        if (commonInd==1 || commonInd==path.size()-2) {
          vfeat.put(OTHER_DEPTOK, true);
        }
      }
    }
    return vfeat;
View Full Code Here

Examples of org.apache.ctakes.dependency.parser.util.DependencyPath

     
      if ( isDonorTerm(tok) ) {
        vfeat.put(DONOR_TOKEN, true);
       
        // check if there are one-removed dependencies on the dependency path
        DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
            DependencyUtility.getNominalHeadNode(jCas,mention));
        int commonInd = path.indexOf(path.getCommonNode());
        if (commonInd==1 || commonInd==path.size()-2) {
          vfeat.put(DONOR_DEPTOK, true);
        }
      }
      if ( isFamilyTerm(tok) ) {
        vfeat.put(FAMILY_TOKEN, true);

        // check if there are one-removed dependencies on the dependency path
        DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
            DependencyUtility.getNominalHeadNode(jCas,mention));
        int commonInd = path.indexOf(path.getCommonNode());
        if (commonInd==1 || commonInd==path.size()-2) {
          vfeat.put(FAMILY_DEPTOK, true);
        }
      }
     
      if ( isOtherTerm(tok) ) {
        vfeat.put(OTHER_TOKEN, true);

        // check if there are one-removed dependencies on the dependency path
        DependencyPath path = DependencyUtility.getPath(jCas, DependencyUtility.getNominalHeadNode(jCas,tok),
            DependencyUtility.getNominalHeadNode(jCas,mention));
        int commonInd = path.indexOf(path.getCommonNode());
        if (commonInd==1 || commonInd==path.size()-2) {
          vfeat.put(OTHER_DEPTOK, true);
        }
      }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.