Examples of SRLArc


Examples of com.clearnlp.dependency.srl.SRLArc

 
  void extractVerbPPAux(DEPTree tree, Prob2DMap map)
  {
    int i, size = tree.size();
    DEPNode verb;
    SRLArc arc;
   
    tree.setDependents();
   
    for (i=1; i<size; i++)
    {
      verb = tree.get(i);
     
      if (MPLibEn.isVerb(verb.pos))
      {
        for (DEPNode arg : verb.getDependentNodeList())
        {
          if (!arg.isLabel(DEPLibEn.DEP_AGENT) && (arc = arg.getSHead(verb)) != null)
          {
            if (arg.isPos(CTLibEn.POS_IN) && PBLib.isCoreNumberedArgument(arc.getLabel()))
              map.add(verb.lemma, arg.lemma);
          }
        }
      }
    }
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

  }
 
  @Deprecated
  private boolean matchPassive(SRLTree qsTree, SRLTree rsTree, String label)
  {
    SRLArc arc = rsTree.getFirstArgument(label);
    return matchPassive(qsTree.getFirstArgument(SRLLib.PREFIX_REFERENT+label), arc) || matchPassive(qsTree.getFirstArgument(label), arc);
  }
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

  }
 
  @Deprecated
  private DEPNode findPredicateInQuestion(SRLTree qsTree, String label, String lemma)
  {
    SRLArc qArc = qsTree.getFirstArgument(label);
   
    if (qArc != null && qArc.getNode().getFeat(DEPLibEn.FEAT_PB) != null)
    {
      return qArc.getNode();
    }
    else
    {
      DEPNode arg;
     
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

      build.append(LGLibEn.getForms(arc.getNode(), USE_COREF, delim));
    }
   
    String s = getAnswerPost(build, delim);
   
    SRLArc arc = arcs.get(0);
   
    if (arc.getNode().isLabel(DEPLibEn.DEP_AGENT) && s.startsWith("By"))
      s = s.substring(2).trim();
   
    return s;
  }
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

  private void relabelLightVerb(DEPTree tree)
  {
    int i, j, size = tree.size();
    DEPNode noun, head, arg;
    Set<DEPNode> verbs;
    SRLArc arc;
   
    for (i=1; i<size; i++)
    {
      noun = tree.get(i);
     
      if (MPLibEn.isNoun(noun.pos) && noun.getFeat(DEPLib.FEAT_PB) != null)
      {
        verbs = new HashSet<DEPNode>();
       
        for (DEPArc verb : noun.getSHeadsByLabel(SRLLib.ARGM_PRR))
          verbs.add(verb.getNode());
       
        for (j=1; j<size; j++)
        {
          if (i == jcontinue;
          arg = tree.get(j);
         
          if ((arc = arg.getSHead(noun)) != null)
          {
            head = arg.getHead();
         
            if (verbs.contains(head))
              arc.setNode(head);
            else
              arg.removeSHead(arc);
          }
        }
       
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.