List of usage examples for edu.stanford.nlp.trees EnglishGrammaticalRelations NUMERIC_MODIFIER
GrammaticalRelation NUMERIC_MODIFIER
To view the source code for edu.stanford.nlp.trees EnglishGrammaticalRelations NUMERIC_MODIFIER.
Click Source Link
From source file:knu.univ.lingvo.coref.Mention.java
License:Open Source License
public String getQuantification(Dictionaries dict) { if (headIndexedWord == null) return null; if (!nerString.equals("O")) return "definite"; List<IndexedWord> quant = dependency.getChildrenWithReln(headIndexedWord, EnglishGrammaticalRelations.DETERMINER); List<IndexedWord> poss = dependency.getChildrenWithReln(headIndexedWord, EnglishGrammaticalRelations.POSSESSION_MODIFIER); String det = ""; if (!quant.isEmpty()) { det = quant.get(0).lemma();/*from w w w .java2s . c o m*/ if (dict.determiners.contains(det)) { return "definite"; } } else if (!poss.isEmpty()) { return "definite"; } else { quant = dependency.getChildrenWithReln(headIndexedWord, EnglishGrammaticalRelations.NUMERIC_MODIFIER); if (dict.quantifiers2.contains(det) || !quant.isEmpty()) { return "quantified"; } } return "indefinite"; }