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 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 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 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 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()); }