List of usage examples for edu.stanford.nlp.trees GrammaticalRelation getLongName
public String getLongName()
From source file:be.fivebyfive.lingua.stanfordcorenlp.PipelineDependency.java
License:Open Source License
public PipelineDependency(PipelineToken governor, PipelineToken dependent, int govIndex, int depIndex, GrammaticalRelation relation) { this.governor = governor; this.dependent = dependent; this.govIndex = govIndex; this.depIndex = depIndex; this.relation = relation.toString(); this.longRelation = relation.getLongName(); }
From source file:opendial.bn.values.RelationalVal.java
License:Open Source License
public void addGraph(SemanticGraph newGraph) { int oldGraphSize = graph.size(); for (IndexedWord iw : newGraph.vertexListSorted()) { IndexedWord copy = new IndexedWord(iw); copy.setIndex(graph.size());/*from ww w . j av a 2 s. co m*/ graph.addVertex(copy); } for (SemanticGraphEdge edge : newGraph.edgeListSorted()) { int dep = edge.getDependent().index() + oldGraphSize; int gov = edge.getGovernor().index() + oldGraphSize; GrammaticalRelation rel = edge.getRelation(); addEdge(gov, dep, rel.getLongName()); } cachedHashCode = 0; }