private String posOfInfo(I info) switch(SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(info)))
private boolean posIsContent(S node) { SimplerCanonicalPosTag pos = SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(node.getInfo())); switch(pos) { case NOUN: return true; case VERB: return true; case ADJECTIVE: return true; case ADVERB: return true; default: return false; } }
private boolean isContentNode(S node) { boolean ret = false; SimplerCanonicalPosTag pos = SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(node.getInfo())); switch (pos) { case NOUN: case VERB: case ADJECTIVE: case ADVERB: ret=true; break; default: ret = false; break; } return ret; }
private List<S> findEndpoints() { List<S> ret = new LinkedList<>(); for (S node : TreeIterator.iterableTree(tree)) { SimplerCanonicalPosTag pos = SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(node.getInfo())); if ( (pos.equals(SimplerCanonicalPosTag.NOUN)) || (pos.equals(SimplerCanonicalPosTag.PRONOUN)) ) { ret.add(node); } } return ret; }
SimplerCanonicalPosTag posParent = SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(parent.getInfo())); if (SimplerCanonicalPosTag.VERB.equals(posParent))
for (S childNode : node.getChildren()) if (SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(childNode.getInfo())).equals(SimplerCanonicalPosTag.NOUN))
/** * Finds the nominal predicates in the parse tree. */ public void identify() { predicateHeads = new LinkedHashSet<S>(); for (S node : TreeIterator.iterableTree(tree.getTree())) { if (SimplerCanonicalPosTag.NOUN.equals(SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(node.getInfo())))) { if (nomlexMap.keySet().contains(InfoGetFields.getLemma(node.getInfo()).trim().toLowerCase(Locale.ENGLISH))) { predicateHeads.add(node); } } } }
private Set<S> findVerbPredicateHeads() { Set<S> verbPredicateHeads = new LinkedHashSet<S>(); for (S node : TreeIterator.iterableTree(tree.getTree())) { if (SimplerCanonicalPosTag.VERB.equals(SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(node.getInfo())))) { String relation = InfoGetFields.getRelation(node.getInfo()); if (!RelationTypes.getSemanticAuxiliaryVerbRelations().contains(relation)) { verbPredicateHeads.add(node); } } } return verbPredicateHeads; }
while ( (argumentNode!=null) && (SimplerCanonicalPosTag.PREPOSITION.equals(SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(argumentNode.getInfo())))) )
SimplerCanonicalPosTag pos = SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(lhsNode.getInfo())); if (pos!=null){ if (pos.equals(SimplerCanonicalPosTag.NOUN))
if (SimplerCanonicalPosTag.PREPOSITION.equals(SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(child.getInfo())))) // if this child is a preposition if (current!=null) if (!SimplerCanonicalPosTag.PREPOSITION.equals(SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(current.getInfo()))))
pos = SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(node.getInfo())); String lemma = InfoGetFields.getLemma(node.getInfo()).trim().toLowerCase(); if (
(InfoGetFields.getLemma(pathFromPredicateToArgument.get(0).getInfo()).equals("by")) && (SimplerPosTagConvertor.simplerPos(InfoGetFields.getCanonicalPartOfSpeech(predicate.getHead().getInfo())).equals(SimplerCanonicalPosTag.VERB)) && (ArgumentType.OBJECT.equals(argumentType))