public static PartOfSpeech getThesaurusReaderPOSMapping(POS wordnetPOS) { if (wordnetPOS.getKey().equalsIgnoreCase("NOUN_KEY")) { return PartOfSpeech.NOUN; } if (wordnetPOS.getKey().equalsIgnoreCase("VERB_KEY")) { return PartOfSpeech.VERB; } if (wordnetPOS.getKey().equalsIgnoreCase("ADJECTIVE_KEY")) { return PartOfSpeech.ADJECTIVE; } if (wordnetPOS.getKey().equalsIgnoreCase("ADVERB_KEY")) { return PartOfSpeech.ADVERB; } return PartOfSpeech.NOUN; }
protected boolean isHypernym(String term1, String term2) { List<POS> pts = POS.getAllPOS(); for (POS pt : pts) if (isHypernym(term1, term2, pt)) return true; return false; }