public synchronized String getLemma(String word, POS pos) throws JWNLException { IndexWord iw = getIndexWord(pos, word); if (iw == null) return word; else return iw.getLemma(); }
public synchronized String getLemma(String word, POS pos) throws JWNLException { IndexWord iw = getIndexWord(pos, word); if (iw == null) return word; else return iw.getLemma(); }
public String toString() { if (_cachedToString == null) { _cachedToString = JWNL.resolveMessage("DATA_TOSTRING_002", new Object[]{getLemma(), getPOS()}); } return _cachedToString; }
private void demonstrateSymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // find all synonyms that <var>start</var> and <var>end</var> have in common RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.SIMILAR_TO); System.out.println("Synonym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); } }
private void demonstrateSymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // find all synonyms that <var>start</var> and <var>end</var> have in common RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.SIMILAR_TO); System.out.println("Synonym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); } }
private void demonstrateSymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // find all synonyms that <var>start</var> and <var>end</var> have in common RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.SIMILAR_TO); System.out.println("Synonym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); } }
private void demonstrateSymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // find all synonyms that <var>start</var> and <var>end</var> have in common RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.SIMILAR_TO); System.out.println("Synonym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); } }
private void demonstrateListOperation(IndexWord word) throws JWNLException { // Get all of the hypernyms (parents) of the first sense of <var>word</var> PointerTargetNodeList hypernyms = PointerUtils.getInstance().getDirectHypernyms(word.getSense(1)); System.out.println("Direct hypernyms of \"" + word.getLemma() + "\":"); hypernyms.print(); }
private void demonstrateTreeOperation(IndexWord word) throws JWNLException { // Get all the hyponyms (children) of the first sense of <var>word</var> PointerTargetTree hyponyms = PointerUtils.getInstance().getHyponymTree(word.getSense(1)); System.out.println("Hyponyms of \"" + word.getLemma() + "\":"); hyponyms.print(); }
private void demonstrateAsymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // Try to find a relationship between the first sense of <var>start</var> and the first sense of <var>end</var> RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.HYPERNYM); System.out.println("Hypernym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Common Parent Index: " + ((AsymmetricRelationship) list.get(0)).getCommonParentIndex()); System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); }
private void demonstrateTreeOperation(IndexWord word) throws JWNLException { // Get all the hyponyms (children) of the first sense of <var>word</var> PointerTargetTree hyponyms = PointerUtils.getInstance().getHyponymTree(word.getSense(1)); System.out.println("Hyponyms of \"" + word.getLemma() + "\":"); hyponyms.print(); }
private void demonstrateAsymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // Try to find a relationship between the first sense of <var>start</var> and the first sense of <var>end</var> RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.HYPERNYM); System.out.println("Hypernym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Common Parent Index: " + ((AsymmetricRelationship) list.get(0)).getCommonParentIndex()); System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); }
private void demonstrateAsymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // Try to find a relationship between the first sense of <var>start</var> and the first sense of <var>end</var> RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.HYPERNYM); System.out.println("Hypernym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Common Parent Index: " + ((AsymmetricRelationship) list.get(0)).getCommonParentIndex()); System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); }
private void demonstrateListOperation(IndexWord word) throws JWNLException { // Get all of the hypernyms (parents) of the first sense of <var>word</var> PointerTargetNodeList hypernyms = PointerUtils.getInstance().getDirectHypernyms(word.getSense(1)); System.out.println("Direct hypernyms of \"" + word.getLemma() + "\":"); hypernyms.print(); }
private void demonstrateTreeOperation(IndexWord word) throws JWNLException { // Get all the hyponyms (children) of the first sense of <var>word</var> PointerTargetTree hyponyms = PointerUtils.getInstance().getHyponymTree(word.getSense(1)); System.out.println("Hyponyms of \"" + word.getLemma() + "\":"); hyponyms.print(); }
private void demonstrateListOperation(IndexWord word) throws JWNLException { // Get all of the hypernyms (parents) of the first sense of <var>word</var> PointerTargetNodeList hypernyms = PointerUtils.getInstance().getDirectHypernyms(word.getSense(1)); System.out.println("Direct hypernyms of \"" + word.getLemma() + "\":"); hypernyms.print(); }
private void demonstrateAsymmetricRelationshipOperation(IndexWord start, IndexWord end) throws JWNLException { // Try to find a relationship between the first sense of <var>start</var> and the first sense of <var>end</var> RelationshipList list = RelationshipFinder.getInstance().findRelationships(start.getSense(1), end.getSense(1), PointerType.HYPERNYM); System.out.println("Hypernym relationship between \"" + start.getLemma() + "\" and \"" + end.getLemma() + "\":"); for (Iterator itr = list.iterator(); itr.hasNext();) { ((Relationship) itr.next()).getNodeList().print(); } System.out.println("Common Parent Index: " + ((AsymmetricRelationship) list.get(0)).getCommonParentIndex()); System.out.println("Depth: " + ((Relationship) list.get(0)).getDepth()); }
private void demonstrateTreeOperation(IndexWord word) throws JWNLException { // Get all the hyponyms (children) of the first sense of <var>word</var> PointerTargetTree hyponyms = PointerUtils.getInstance().getHyponymTree(word.getSense(1)); System.out.println("Hyponyms of \"" + word.getLemma() + "\":"); hyponyms.print(); }
public void cacheObject(DictionaryElementType fileType, Object key, Object value) { if (value instanceof IndexWord) { IndexWord word = (IndexWord) value; getMap(DictionaryElementType.INDEX_WORD).put(new POSKey(word.getPOS(), word.getLemma()), key); } else if (value instanceof Exc) { Exc exc = (Exc) value; getMap(DictionaryElementType.EXCEPTION).put(new POSKey(exc.getPOS(), exc.getLemma()), key); } super.cacheObject(fileType, key, value); }
public void update(Observable obs, Object obj) { if (obj instanceof IndexWord) { IndexWord word = (IndexWord) obj; removeLemma(DictionaryElementType.INDEX_WORD, word.getLemma(), word.getPOS()); } else if (obj instanceof Exc) { Exc exc = (Exc) obj; removeLemma(DictionaryElementType.EXCEPTION, exc.getLemma(), exc.getPOS()); } }