Examples of LFVertex


Examples of opennlp.ccg.hylo.graph.LFVertex

      }
    }
  }
 
  private Element createDisjunctiveElement(DLFContext context) {
    LFVertex alias = vertexAliases.get(context.vertex);
   
    String vertexName = nameFor(context.vertex);
    boolean imported = importedVertices.contains(context.vertex);
   
    Element newNode = document.createElement(NODE_TAG);
    context.parent.appendChild(newNode);
   
    DLFContext localContext = context.copy();
    localContext.parent = newNode;
    Set<LFVertex> locals = localContext.getVertices(LOCAL_ANCESTOR),
        visited = localContext.getVertices(VISITED);
   
    if(locals.contains(localContext.vertex)
        || (alias != null && visited.contains(localContext.vertex))) {
      LFVertex v = (alias == null) ? localContext.vertex : alias;
      localContext.parent.setAttribute(IDREF_ATTR, nameFor(v));
     
      if(visited.contains(localContext.vertex)
          && localContext.getVertices(SHARED).contains(v) && !locals.contains(v)) {
        localContext.parent.setAttribute(SHARED_ATTR, "true");
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFVertex

      doInsertDelete(ctxt.copy(), del);
    }
  }
 
  private void doInsertDelete(DLFContext context, LFEdge edge) {
    LFVertex trg = edge.getTarget();
    DLFContext ctxt = context.copy();
    ctxt.vertex = trg;
    ctxt.parent = addRelation(ctxt, edge.getLabel());
    ctxt.addVertex(trg, OPTIONAL);
   
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFVertex

  private void processNonsubstitutedEdge(DLFContext context, LFEdge outgoing) {
    if(!context.getVertices(PREDICATES).contains(context.vertex)) {
      setPredicateName(context);
    }
   
    LFVertex trg = outgoing.getTarget();
    Set<LFVertex> similarTargets = new FilteredSet<LFVertex>(context.getVertices(OPTIONAL),
        new SimilarTargetVertexFilter(trg));
   
    if(similarTargets.isEmpty()) {
      DLFContext ctxt = context.copy();
View Full Code Here

Examples of opennlp.ccg.hylo.graph.LFVertex

   
    boolean aliased = false;
    context.parent = toAppendTo;
   
    for(LFEdge s : substituedEdges) {
      LFVertex t = s.getTarget();
      String vPred = context.vertex.getPredicate(), tPred = t.getPredicate();
      LFEdgeLabel l = s.getLabel();
     
      context.parent = addRelation(context, l);
     
      // shared?
      if(vPred != null && vPred.equals(tPred) && !label.equals(l)) {
        Element subNode = addElement(context, NODE_TAG);
        subNode.setAttribute(IDREF_ATTR, nameFor(context.vertex));
       
        LFVertex sAlias = vertexAliases.get(context.vertex);
        if(context.getVertices(VISITED).contains(sAlias)
            && context.getVertices(SHARED).contains(sAlias)
            && !context.getVertices(LOCAL_ANCESTOR).contains(sAlias)) {
          subNode.setAttribute(SHARED_ATTR, "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.