List of usage examples for edu.stanford.nlp.trees UniversalEnglishGrammaticalRelations PHRASAL_VERB_PARTICLE
GrammaticalRelation PHRASAL_VERB_PARTICLE
To view the source code for edu.stanford.nlp.trees UniversalEnglishGrammaticalRelations PHRASAL_VERB_PARTICLE.
Click Source Link
From source file:edu.anu.spice.SpiceParser.java
License:Open Source License
/** * Attaches particles to the main predicate. *///w w w. j a v a 2 s . com protected String getPredicate(SemanticGraph sg, IndexedWord mainPred) { if (sg.hasChildWithReln(mainPred, UniversalEnglishGrammaticalRelations.PHRASAL_VERB_PARTICLE)) { IndexedWord part = sg.getChildWithReln(mainPred, UniversalEnglishGrammaticalRelations.PHRASAL_VERB_PARTICLE); return String.format("%s %s", mainPred.lemma().equals("be") ? "" : mainPred.lemma(), part.value()); } return mainPred.lemma(); }