List of usage examples for edu.stanford.nlp.semgraph SemanticGraphEdge toString
@Override
public String toString()
From source file:edu.cmu.geolocator.nlp.StanfordCoreTools.StanfordNLP.java
License:Apache License
public void createEdgeMap(SemanticGraph tree, Map<String, String> edgeMap, Map<String, ArrayList<String>> childMap) { Set<SemanticGraphEdge> tmp = tree.getEdgeSet(); // = new HashMap<String,String>(); for (SemanticGraphEdge edge : tmp) { //System.out.println(edge.toString()+"("+edge.getSource().toString()+","+edge.getTarget().word()+")"); edgeMap.put(edge.getTarget().word(), edge.toString()); if (!childMap.containsKey(edge.getSource().word())) childMap.put(edge.getSource().word(), new ArrayList<String>()); childMap.get(edge.getSource().word()).add(edge.getTarget().tag()); }//from ww w . j a va2 s . c o m //System.out.println(); }