/** * POS tag this term, and return a determiner, or "to", according to the POS tag * @param term * @param gloss * @return * @throws JwktlException */ private String determineFirstWord(String term, String gloss) throws JwktlException { String prefixWord = ""; { // if the last word is a noun-singular. it's a noun phrase, and needs an 'a' // must pos tag the term even though wiki already has, cos the wiki POS don't tell us if the noun is singular List<PosTaggedToken> tags = posTag(term); // note that term may have several words. if (tags.get(tags.size()-1).getPartOfSpeech().getStringRepresentation().equals(PennPosTag.NN.name())) prefixWord = "a"; } return prefixWord; }
ExtendedInfoGetFields.getPartOfSpeechObject(siblingInfo).getStringRepresentation().equals(PennPosTag.EX.name()) && ExtendedInfoGetFields.getRelation(siblingInfo).equals(StanfordDepedencyRelationType.expl.name())) isExplative = true;