Examples of groupNodes()


Examples of edu.stanford.nlp.ling.tokensregex.TokenSequenceMatcher.groupNodes()

    TokenSequenceMatcher m3 = p3.getMatcher(annotation.get(CoreAnnotations.TokensAnnotation.class));
    if(m3.find())
      return new VerbSemClassMatch(extractMatch(m3.groupNodes(2)), extractMatch(m3.groupNodes(1)), true);
    TokenSequenceMatcher m4 = p3.getMatcher(annotation.get(CoreAnnotations.TokensAnnotation.class));
    if(m4.find())
      return new VerbSemClassMatch(extractMatch(m4.groupNodes(2)), extractMatch(m4.groupNodes(1)), true);
    return null;
  }

  public String extractMatch(List<? extends CoreMap> maps) {
    List<String> res = new LinkedList<String>();
View Full Code Here

Examples of edu.stanford.nlp.ling.tokensregex.TokenSequenceMatcher.groupNodes()

    TokenSequenceMatcher m3 = p3.getMatcher(annotation.get(CoreAnnotations.TokensAnnotation.class));
    if(m3.find())
      return new VerbSemClassMatch(extractMatch(m3.groupNodes(2)), extractMatch(m3.groupNodes(1)), true);
    TokenSequenceMatcher m4 = p3.getMatcher(annotation.get(CoreAnnotations.TokensAnnotation.class));
    if(m4.find())
      return new VerbSemClassMatch(extractMatch(m4.groupNodes(2)), extractMatch(m4.groupNodes(1)), true);
    return null;
  }

  public String extractMatch(List<? extends CoreMap> maps) {
    List<String> res = new LinkedList<String>();
View Full Code Here

Examples of org.gephi.datalab.api.GraphElementsController.groupNodes()

        this.nodes=nodes;
    }

    public void execute() {
        GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
        gec.groupNodes(nodes);
    }

    public String getName() {
        return NbBundle.getMessage(Group.class, "Group.name");
    }
View Full Code Here

Examples of org.gephi.datalab.api.GraphElementsController.groupNodes()

@ServiceProvider(service=GraphContextMenuItem.class)
public class Group extends BasicItem {

    public void execute() {
        GraphElementsController gec=Lookup.getDefault().lookup(GraphElementsController.class);
        gec.groupNodes(nodes);
    }

    public String getName() {
        return NbBundle.getMessage(Group.class, "GraphContextMenu_Group");
    }
View Full Code Here

Examples of org.gephi.datalab.api.GraphElementsController.groupNodes()

        this.nodes=nodes;
    }

    public void execute() {
        GraphElementsController gec = Lookup.getDefault().lookup(GraphElementsController.class);
        gec.groupNodes(nodes);
    }

    public String getName() {
        return NbBundle.getMessage(Group.class, "Group.name");
    }
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.groupNodes()

                    r += n.getNodeData().r();
                    g += n.getNodeData().g();
                    b += n.getNodeData().b();
                    len++;
                }
                Node metaNode = graph.groupNodes(validNodes.toArray(new Node[0]));
                metaNode.getNodeData().setX(centroidX / len);
                metaNode.getNodeData().setY(centroidY / len);
                metaNode.getNodeData().setLabel(p.getDisplayName());
                metaNode.getNodeData().setSize(sizes / graph.getNodeCount() * 5f);
                metaNode.getNodeData().setColor(r / len, g / len, b / len);
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.groupNodes()

                int len = 0;
                float sizes = 0;
                float r = 0;
                float g = 0;
                float b = 0;
                Node group = graph.groupNodes(nodes);
                group.getNodeData().setLabel(NbBundle.getMessage(GraphElementsControllerImpl.class, "Group.nodeCount.label", nodes.length));
                group.getNodeData().setSize(10f);
                for (Node child : nodes) {
                    centroidX += child.getNodeData().x();
                    centroidY += child.getNodeData().y();
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.groupNodes()

            count++;
            if (graph.getParent(a) == graph.getParent(b) && graph.getLevel(a) == 0) {
                float x = (a.getNodeData().x() + b.getNodeData().x()) / 2;
                float y = (a.getNodeData().y() + b.getNodeData().y()) / 2;

                Node parent = graph.groupNodes(new Node[]{a, b});
                parent.getNodeData().setX(x);
                parent.getNodeData().setY(y);
                graph.retract(parent);
                retract++;
            }
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.groupNodes()

            HierarchicalGraph graph = gm.getHierarchicalGraphVisible();
            Node[] newGroup = cluster.getNodes();
            float centroidX = 0;
            float centroidY = 0;
            int len = 0;
            Node group = graph.groupNodes(newGroup);
            cluster.setMetaNode(group);

            group.getNodeData().setLabel("Group");
            group.getNodeData().setSize(10f);
            for (Node child : newGroup) {
View Full Code Here

Examples of org.gephi.graph.api.HierarchicalGraph.groupNodes()

                int len = 0;
                float sizes = 0;
                float r = 0;
                float g = 0;
                float b = 0;
                Node group = graph.groupNodes(nodes);
                group.getNodeData().setLabel(NbBundle.getMessage(GraphElementsControllerImpl.class, "Group.nodeCount.label", nodes.length));
                group.getNodeData().setSize(10f);
                for (Node child : nodes) {
                    centroidX += child.getNodeData().x();
                    centroidY += child.getNodeData().y();
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.