Examples of LFGraph


Examples of opennlp.ccg.hylo.graph.LFGraph

   
    alignment.add(new Mapping(0, 0));
    alignment.add(new Mapping(1, 0));
    alignment.add(new Mapping(2, 1));
   
    aGraph = new LFGraph();
   
    LFVertex aw0 = new LFVertex(new NominalAtom("w0"), new Proposition("a")),
      aw1 = new LFVertex(new NominalAtom("w1"), new Proposition("boy")),
      aw2 = new LFVertex(new NominalAtom("w2"), new Proposition("walk")),
      aw3 = new LFVertex(new NominalAtom("w3"), new Proposition("quickly"));
   
    aGraph.addVertex(aw0);
    aGraph.addVertex(aw1);
    aGraph.addVertex(aw2);
    aGraph.addVertex(aw3);
       
    aDet = aGraph.addLabeledEdge(aw1, aw0, LFEdgeLabel.forMode(new ModeLabel("Det")));
    aArg0 = aGraph.addLabeledEdge(aw2, aw1, LFEdgeLabel.forMode(new ModeLabel("Arg0")));
    aMod = aGraph.addLabeledEdge(aw2, aw3, LFEdgeLabel.forMode(new ModeLabel("Mod")));
   
    bGraph = new LFGraph();
   
    LFVertex bw0 = new LFVertex(new NominalAtom("w0"), new Proposition("he")),
      bw1 = new LFVertex(new NominalAtom("w1"), new Proposition("move"));
   
    bGraph.addVertex(bw0);
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFGraph

      }
      if(!imported && processingDeletes) { // deletes
        processDeletes(localContext);
      }
     
      LFGraph graph = localContext.getGraph();
     
      @SuppressWarnings("unchecked")
      Set<LFEdge> outgoingEdges = graph.containsVertex(localContext.vertex)
          ? graph.outgoingEdgesOf(localContext.vertex) : Collections.EMPTY_SET;
     
      if(outgoingEdges.isEmpty()) { // leaf?
        setPredicateName(localContext);
      }
      else {
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.