Examples of SRLArc


Examples of com.clearnlp.dependency.srl.SRLArc

    s_heads.add(new SRLArc(head, label));
  }
 
  public void addSHead(DEPNode head, String label, String functionTag)
  {
    s_heads.add(new SRLArc(head, label, functionTag));
  }
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

    s_heads.add(arc);
  }
 
  public void addSHead(DEPNode head, String label)
  {
    s_heads.add(new SRLArc(head, label));
  }
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

    s_heads.add(new SRLArc(head, label));
  }
 
  public void addSHead(DEPNode head, String label, String functionTag)
  {
    s_heads.add(new SRLArc(head, label, functionTag));
  }
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

  private StringIntPair[][] getSHeadsAux()
  {
    int i, j, len, size = size();
    StringIntPair[] heads;
    List<SRLArc> arcs;
    SRLArc arc;
   
    StringIntPair[][] sHeads = new StringIntPair[size][];
    sHeads[0] = new StringIntPair[0];
   
    for (i=1; i<size; i++)
    {
      arcs  = get(i).getSHeads();
      len   = arcs.size();
      heads = new StringIntPair[len];
     
      for (j=0; j<len; j++)
      {
        arc = arcs.get(j);
        heads[j] = new StringIntPair(arc.label, arc.getNode().id);
      }
     
      sHeads[i] = heads;
    }
   
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

      head = head.getHead();
   
    if (MPLibEn.isNoun(head.pos) || head.isPos(CTLibEn.POS_IN) || head.isPos(CTLibEn.POS_RP))
    {
      DEPNode gHead = head.getHead();
      SRLArc  sp, sh;
     
      if (gHead != null && (sp = prep.getSHead(gHead)) != null)
      {
        if ((sh = head.getSHead(gHead)) != null)
        {
          if (head.isPos(CTLibEn.POS_IN) && sh.isLabel(SRLLib.C_V))
          {
            head.pos = CTLibEn.POS_RP;
            head.setLabel(DEP_PRT);
          }
         
          prep.setHead(gHead);
        }
        else
        {
          prep.removeSHead(sp);
          head.addSHead(gHead, sp.getLabel());
        }
      }
     
//      if (gHead != null && (sp = prep.getSHead(gHead)) != null && (sh = head.getSHead(gHead)) != null)
//        prep.setHead(gHead);
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

  }
 
  /** Called by {@link DEPLibEn#relinkReferent(DEPNode)}. */
  static private Pair<DEPNode,SRLArc> getFirstRelativizer(DEPNode verb)
  {
    SRLArc  sHead;
    DEPNode dep;
   
    for (DEPArc arc : verb.getDependents())
    {
      dep = arc.getNode();
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

  static private Pair<DEPNode,SRLArc> getLastPrepositionWithoutDependent(DEPNode verb)
  {
    List<DEPArc> arcs = verb.getDependents();
    DEPNode dep;
    DEPArc arc;
    SRLArc sHead;
    int i;
   
    for (i=arcs.size()-1; i>=0; i--)
    {
      arc = arcs.get(i);
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

 
  /** Called by {@link DEPLibEn#postLabel(DEPTree)}. */
  static private void relabelPrepositionWithReferent(DEPNode verb)
  {
    DEPNode dep, pobj;
    SRLArc sHead;
   
    for (DEPArc arc : verb.getDependents())
    {
      dep = arc.getNode();
     
      if (dep.isPos(CTLibEn.POS_IN) && (sHead = dep.getSHead(verb)) != null && !sHead.isLabel(SRLLib.P_ARG_REF))
      {
        pobj = dep.getFirstDependentByLabel(DEPLibEn.DEP_POBJ);
       
        if (pobj != null && getRefDependentNode(pobj) != null)
        {
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

   
    if (arcsStr.equals(AbstractColumnReader.BLANK_COLUMN))
      return arcs;
   
    for (String arc : arcsStr.split(DELIM_HEADS))
      arcs.add(new SRLArc(tree, arc));
   
    return arcs;
  }
View Full Code Here

Examples of com.clearnlp.dependency.srl.SRLArc

    {
      idx    = head.indexOf(DEPLib.DELIM_HEADS_KEY);
      headId = Integer.parseInt(head.substring(0, idx));
      label  = head.substring(idx+1);
     
      sHeads.add(new SRLArc(tree.get(headId), label));
    }
   
    return sHeads;
  }
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.