Package net.didion.jwnl.data
Class PointerUtils
- java.lang.Object
-
- net.didion.jwnl.data.PointerUtils
-
public final class PointerUtils extends java.lang.ObjectThis class constains static methods for performing various pointer operations. A pointer from one synset/word to another connotes a relationship between those words. The type of the relationship is specified by the type of pointer. See the WordNet documentation for information on pointer types. To avoid confusion with theRelationshipclass, these relationships will be referred to as links.
-
-
Field Summary
Fields Modifier and Type Field Description static intINFINITYRepresentation of infinite depth.private static PointerUtilsINSTANCE
-
Constructor Summary
Constructors Modifier Constructor Description privatePointerUtils()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PointerTargetNodeListgetAlsoSees(Synset synset)Find what words are related tosynsetPointerTargetTreegetAlsoSeeTree(Synset synset, int depth)Find all See Also relations to depthdepth.PointerTargetNodeListgetAntonyms(Synset synset)Get the words that mean the opposite ofsynsetPointerTargetNodeListgetAttributes(Synset synset)Get the attributes ofsynsetPointerTargetNodeListgetCauses(Synset synset)Find direct cause links ofsynsetPointerTargetTreegetCauseTree(Synset synset)Find all cause links forsynset.PointerTargetTreegetCauseTree(Synset synset, int depth)Find all cause links forsynsetto depthdepth.PointerTargetNodeListgetCoordinateTerms(Synset synset)Getsynset's siblings (the hyponyms of its hypernyms)PointerTargetNodeListgetDerived(Synset synset)Find derrived links ofsynsetPointerTargetNodeListgetDirectHypernyms(Synset synset)Get the immediate parents ofsynsetPointerTargetNodeListgetDirectHyponyms(Synset synset)Get the immediate children ofsynsetPointerTargetNodeListgetEntailedBy(Synset synset)Find direct entailed bys ofsynsetPointerTargetTreegetEntailedByTree(Synset synset)Find all entailed bys ofsynset.PointerTargetTreegetEntailedByTree(Synset synset, int depth)Find all entailed bys ofsynsetto depthdepth.PointerTargetNodeListgetEntailments(Synset synset)Find direct entailments ofsynsetPointerTargetTreegetEntailmentTree(Synset synset)Find all entailments forsynsetPointerTargetTreegetEntailmentTree(Synset synset, int depth)Find all entailments forsynsetto depthdepthPointerTargetTreegetExtendedAntonyms(Synset synset)Get the words that mean the opposite ofsynsetand the immediate synonyms of those wordsPointerTargetTreegetExtendedAntonyms(Synset synset, int depth)Find all antonyms ofsynset, and all synonyms of those antonyms to depthdepth.PointerTargetNodeListgetHolonyms(Synset synset)Get holonyms ofsynsetPointerTargetTreegetHypernymTree(Synset synset)Get all of the ancestors ofsynsetPointerTargetTreegetHypernymTree(Synset synset, int depth)Get all of the ancestors ofsynsetto depthdepthPointerTargetTreegetHyponymTree(Synset synset)Get all of the children ofsynsetPointerTargetTreegetHyponymTree(Synset synset, int depth)Get all of the children ofsynsetto depthdepthPointerTargetTreegetIndirectAntonyms(Synset synset)Get the immediate antonyms of all words that mean the same assynset.PointerTargetTreegetIndirectAntonyms(Synset synset, int depth)Get the antonyms of all words that mean the same assynsetto depthdepth.PointerTargetTreegetInheritedHolonyms(Synset synset)Get holonyms ofsynsetand of all its ancestorsPointerTargetTreegetInheritedHolonyms(Synset synset, int pointerDepth, int ancestorDepth)Get holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.PointerTargetTreegetInheritedMemberHolonyms(Synset synset)Get member holonyms ofsynsetand of all its ancestorsPointerTargetTreegetInheritedMemberHolonyms(Synset synset, int pointerDepth, int ancestorDepth)Get member holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.PointerTargetTreegetInheritedMemberMeronyms(Synset synset)Get member meronyms of synset and of its ancestorsPointerTargetTreegetInheritedMemberMeronyms(Synset synset, int pointerDepth, int ancestorDepth)Get member meronyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.PointerTargetTreegetInheritedMeronyms(Synset synset, int pointerDepth, int ancestorDepth)Get meronyms of each synset, to depthpointerDepthstarting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.PointerTargetTreegetInheritedPartHolonyms(Synset synset)Get part holonyms ofsynsetand of all its ancestorsPointerTargetTreegetInheritedPartHolonyms(Synset synset, int pointerDepth, int ancestorDepth)Get part holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.PointerTargetTreegetInheritedPartMeronyms(Synset synset)Get part meronyms ofsynsetand of all its ancestorsPointerTargetTreegetInheritedPartMeronyms(Synset synset, int pointerDepth, int ancestorDepth)Get part meronyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.PointerTargetTreegetInheritedSubstanceHolonyms(Synset synset)Get substance holonyms ofsynsetand of all its ancestorsPointerTargetTreegetInheritedSubstanceHolonyms(Synset synset, int pointerDepth, int ancestorDepth)Get substance holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.PointerTargetTreegetInheritedSubstanceMeronyms(Synset synset)Get substance meronyms ofsynsetand of its ancestorsPointerTargetTreegetInheritedSubstanceMeronyms(Synset synset, int pointerDepth, int ancestorDepth)Get substance meronyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.static PointerUtilsgetInstance()PointerTargetTreegetInteritedMeronyms(Synset synset)Get meronyms ofsynsetand of all its ancestorsPointerTargetNodeListgetMemberHolonyms(Synset synset)Get member holonyms ofsynsetPointerTargetNodeListgetMemberMeronyms(Synset synset)Get member meronyms ofsynsetPointerTargetNodeListgetMeronyms(Synset synset)Get meronyms ofsynset.PointerTargetNodeListgetPartHolonyms(Synset synset)Get part holonyms ofsynsetPointerTargetNodeListgetParticipleOf(Synset synset)Find participle of links ofsynsetPointerTargetNodeListgetPartMeronyms(Synset synset)Get part meronyms ofsynsetprivate PointerTargetNodeListgetPointerTargets(Synset synset, PointerType type)Get all the pointer targets of synset of type type.PointerTargetNodeListgetSubstanceHolonyms(Synset synset)Get substance holonyms ofsynsetPointerTargetNodeListgetSubstanceMeronyms(Synset synset)Get substance meronyms ofsynsetPointerTargetNodeListgetSynonyms(Synset synset)Get the synonyms forsynset.PointerTargetTreegetSynonymTree(Synset synset, int depth)Get all the synonyms ofsynsetto depthdepth.PointerTargetNodeListgetVerbGroup(Synset synset)Get the group that this verb belongs to.PointerTargetTreemakeInheritedTree(PointerTargetTree tree, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies)Turn an existing tree into an inheritance tree.PointerTargetTreemakeInheritedTree(Synset synset, PointerType searchType)Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of type searchType, starting at the node's pointer target.PointerTargetTreemakeInheritedTree(Synset synset, PointerType[] searchTypes)Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of the types specified in searchTypes, starting at the node's pointer target.PointerTargetTreemakeInheritedTree(Synset synset, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth)Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of the types specified in searchTypes, starting at the node's pointer target.PointerTargetTreemakeInheritedTree(Synset synset, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies)Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of the types specified in searchTypes, starting at the node's pointer target.PointerTargetTreemakeInheritedTree(Synset synset, PointerType searchType, PointerType labelType, int pointerDepth, int ancestorDepth)Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of type searchType, starting at the node's pointer target.PointerTargetTreemakeInheritedTree(Synset synset, PointerType searchType, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies)Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of type searchType, starting at the node's pointer target.PointerTargetTreeNodeListmakeInheritedTreeList(PointerTargetTreeNodeList list, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies)Turn an existing tree list into an inheritance tree list.PointerTargetTreeNodeListmakePointerTargetTreeList(PointerTargetNodeList list, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies)Make a nested list of pointer targets to depth depth, starting at eachsynsetin list.PointerTargetTreeNodeListmakePointerTargetTreeList(PointerTargetNodeList list, PointerType searchType, PointerType labelType, int depth, boolean allowRedundancies)Make a nested list of pointer targets to depth depth, starting at eachsynsetin list.PointerTargetTreeNodeListmakePointerTargetTreeList(Synset set, PointerType searchType)Make a nested list of pointer targets to the default depth, starting atsynset.PointerTargetTreeNodeListmakePointerTargetTreeList(Synset set, PointerType[] searchTypes)Make a nested list of pointer targets to the default depth, starting atsynset.PointerTargetTreeNodeListmakePointerTargetTreeList(Synset set, PointerType[] searchTypes, int depth)Make a nested list of pointer targets to depth depth, starting atsynset.PointerTargetTreeNodeListmakePointerTargetTreeList(Synset synset, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies)Make a nested list of pointer targets to depth depth, starting atsynset.private PointerTargetTreeNodeListmakePointerTargetTreeList(Synset synset, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies, PointerTargetTreeNode parent)PointerTargetTreeNodeListmakePointerTargetTreeList(Synset set, PointerType searchType, int depth)Make a nested list of pointer targets to depth depth, starting atsynset.PointerTargetTreeNodeListmakePointerTargetTreeList(Synset set, PointerType searchType, PointerType labelType, int depth, boolean allowRedundancies)Make a nested list of pointer targets to depth depth, starting atsynset.
-
-
-
Field Detail
-
INFINITY
public static final int INFINITY
Representation of infinite depth. Used to tell the pointer operations to return all links to an infinite depth.- See Also:
- Constant Field Values
-
INSTANCE
private static final PointerUtils INSTANCE
-
-
Method Detail
-
getInstance
public static PointerUtils getInstance()
-
getDirectHypernyms
public PointerTargetNodeList getDirectHypernyms(Synset synset) throws JWNLException
Get the immediate parents ofsynset- Throws:
JWNLException
-
getHypernymTree
public PointerTargetTree getHypernymTree(Synset synset) throws JWNLException
Get all of the ancestors ofsynset- Throws:
JWNLException
-
getHypernymTree
public PointerTargetTree getHypernymTree(Synset synset, int depth) throws JWNLException
Get all of the ancestors ofsynsetto depthdepth- Throws:
JWNLException
-
getDirectHyponyms
public PointerTargetNodeList getDirectHyponyms(Synset synset) throws JWNLException
Get the immediate children ofsynset- Throws:
JWNLException
-
getHyponymTree
public PointerTargetTree getHyponymTree(Synset synset) throws JWNLException
Get all of the children ofsynset- Throws:
JWNLException
-
getHyponymTree
public PointerTargetTree getHyponymTree(Synset synset, int depth) throws JWNLException
Get all of the children ofsynsetto depthdepth- Throws:
JWNLException
-
getCoordinateTerms
public PointerTargetNodeList getCoordinateTerms(Synset synset) throws JWNLException
Getsynset's siblings (the hyponyms of its hypernyms)- Throws:
JWNLException
-
getAntonyms
public PointerTargetNodeList getAntonyms(Synset synset) throws JWNLException
Get the words that mean the opposite ofsynset- Throws:
JWNLException
-
getExtendedAntonyms
public PointerTargetTree getExtendedAntonyms(Synset synset) throws JWNLException
Get the words that mean the opposite ofsynsetand the immediate synonyms of those words- Throws:
JWNLException
-
getExtendedAntonyms
public PointerTargetTree getExtendedAntonyms(Synset synset, int depth) throws JWNLException
Find all antonyms ofsynset, and all synonyms of those antonyms to depthdepth.- Throws:
JWNLException
-
getIndirectAntonyms
public PointerTargetTree getIndirectAntonyms(Synset synset) throws JWNLException
Get the immediate antonyms of all words that mean the same assynset.- Throws:
JWNLException
-
getIndirectAntonyms
public PointerTargetTree getIndirectAntonyms(Synset synset, int depth) throws JWNLException
Get the antonyms of all words that mean the same assynsetto depthdepth.- Throws:
JWNLException
-
getAttributes
public PointerTargetNodeList getAttributes(Synset synset) throws JWNLException
Get the attributes ofsynset- Throws:
JWNLException
-
getAlsoSees
public PointerTargetNodeList getAlsoSees(Synset synset) throws JWNLException
Find what words are related tosynset- Throws:
JWNLException
-
getAlsoSeeTree
public PointerTargetTree getAlsoSeeTree(Synset synset, int depth) throws JWNLException
Find all See Also relations to depthdepth.- Throws:
JWNLException
-
getMeronyms
public PointerTargetNodeList getMeronyms(Synset synset) throws JWNLException
Get meronyms ofsynset.- Throws:
JWNLException
-
getPartMeronyms
public PointerTargetNodeList getPartMeronyms(Synset synset) throws JWNLException
Get part meronyms ofsynset- Throws:
JWNLException
-
getMemberMeronyms
public PointerTargetNodeList getMemberMeronyms(Synset synset) throws JWNLException
Get member meronyms ofsynset- Throws:
JWNLException
-
getSubstanceMeronyms
public PointerTargetNodeList getSubstanceMeronyms(Synset synset) throws JWNLException
Get substance meronyms ofsynset- Throws:
JWNLException
-
getInteritedMeronyms
public PointerTargetTree getInteritedMeronyms(Synset synset) throws JWNLException
Get meronyms ofsynsetand of all its ancestors- Throws:
JWNLException
-
getInheritedMeronyms
public PointerTargetTree getInheritedMeronyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get meronyms of each synset, to depthpointerDepthstarting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getInheritedPartMeronyms
public PointerTargetTree getInheritedPartMeronyms(Synset synset) throws JWNLException
Get part meronyms ofsynsetand of all its ancestors- Throws:
JWNLException
-
getInheritedPartMeronyms
public PointerTargetTree getInheritedPartMeronyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get part meronyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getInheritedMemberMeronyms
public PointerTargetTree getInheritedMemberMeronyms(Synset synset) throws JWNLException
Get member meronyms of synset and of its ancestors- Throws:
JWNLException
-
getInheritedMemberMeronyms
public PointerTargetTree getInheritedMemberMeronyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get member meronyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getInheritedSubstanceMeronyms
public PointerTargetTree getInheritedSubstanceMeronyms(Synset synset) throws JWNLException
Get substance meronyms ofsynsetand of its ancestors- Throws:
JWNLException
-
getInheritedSubstanceMeronyms
public PointerTargetTree getInheritedSubstanceMeronyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get substance meronyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getHolonyms
public PointerTargetNodeList getHolonyms(Synset synset) throws JWNLException
Get holonyms ofsynset- Throws:
JWNLException
-
getPartHolonyms
public PointerTargetNodeList getPartHolonyms(Synset synset) throws JWNLException
Get part holonyms ofsynset- Throws:
JWNLException
-
getMemberHolonyms
public PointerTargetNodeList getMemberHolonyms(Synset synset) throws JWNLException
Get member holonyms ofsynset- Throws:
JWNLException
-
getSubstanceHolonyms
public PointerTargetNodeList getSubstanceHolonyms(Synset synset) throws JWNLException
Get substance holonyms ofsynset- Throws:
JWNLException
-
getInheritedHolonyms
public PointerTargetTree getInheritedHolonyms(Synset synset) throws JWNLException
Get holonyms ofsynsetand of all its ancestors- Throws:
JWNLException
-
getInheritedHolonyms
public PointerTargetTree getInheritedHolonyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getInheritedPartHolonyms
public PointerTargetTree getInheritedPartHolonyms(Synset synset) throws JWNLException
Get part holonyms ofsynsetand of all its ancestors- Throws:
JWNLException
-
getInheritedPartHolonyms
public PointerTargetTree getInheritedPartHolonyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get part holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getInheritedMemberHolonyms
public PointerTargetTree getInheritedMemberHolonyms(Synset synset) throws JWNLException
Get member holonyms ofsynsetand of all its ancestors- Throws:
JWNLException
-
getInheritedMemberHolonyms
public PointerTargetTree getInheritedMemberHolonyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get member holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getInheritedSubstanceHolonyms
public PointerTargetTree getInheritedSubstanceHolonyms(Synset synset) throws JWNLException
Get substance holonyms ofsynsetand of all its ancestors- Throws:
JWNLException
-
getInheritedSubstanceHolonyms
public PointerTargetTree getInheritedSubstanceHolonyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get substance holonyms of each synset, to depthpointerDepth, starting atsynsetand going for all ofsynset's ancestors to depthancestorDepth.- Throws:
JWNLException
-
getEntailments
public PointerTargetNodeList getEntailments(Synset synset) throws JWNLException
Find direct entailments ofsynset- Throws:
JWNLException
-
getEntailmentTree
public PointerTargetTree getEntailmentTree(Synset synset) throws JWNLException
Find all entailments forsynset- Throws:
JWNLException
-
getEntailmentTree
public PointerTargetTree getEntailmentTree(Synset synset, int depth) throws JWNLException
Find all entailments forsynsetto depthdepth- Throws:
JWNLException
-
getEntailedBy
public PointerTargetNodeList getEntailedBy(Synset synset) throws JWNLException
Find direct entailed bys ofsynset- Throws:
JWNLException
-
getEntailedByTree
public PointerTargetTree getEntailedByTree(Synset synset) throws JWNLException
Find all entailed bys ofsynset.- Throws:
JWNLException
-
getEntailedByTree
public PointerTargetTree getEntailedByTree(Synset synset, int depth) throws JWNLException
Find all entailed bys ofsynsetto depthdepth.- Throws:
JWNLException
-
getCauses
public PointerTargetNodeList getCauses(Synset synset) throws JWNLException
Find direct cause links ofsynset- Throws:
JWNLException
-
getCauseTree
public PointerTargetTree getCauseTree(Synset synset) throws JWNLException
Find all cause links forsynset.- Throws:
JWNLException
-
getCauseTree
public PointerTargetTree getCauseTree(Synset synset, int depth) throws JWNLException
Find all cause links forsynsetto depthdepth.- Throws:
JWNLException
-
getVerbGroup
public PointerTargetNodeList getVerbGroup(Synset synset) throws JWNLException
Get the group that this verb belongs to.- Throws:
JWNLException
-
getParticipleOf
public PointerTargetNodeList getParticipleOf(Synset synset) throws JWNLException
Find participle of links ofsynset- Throws:
JWNLException
-
getDerived
public PointerTargetNodeList getDerived(Synset synset) throws JWNLException
Find derrived links ofsynset- Throws:
JWNLException
-
getSynonyms
public PointerTargetNodeList getSynonyms(Synset synset) throws JWNLException
Get the synonyms forsynset. This is meant for adjectives. Synonyms to nouns and verbs are just their hypernyms.- Throws:
JWNLException
-
getSynonymTree
public PointerTargetTree getSynonymTree(Synset synset, int depth) throws JWNLException
Get all the synonyms ofsynsetto depthdepth.- Throws:
JWNLException
-
getPointerTargets
private PointerTargetNodeList getPointerTargets(Synset synset, PointerType type) throws JWNLException
Get all the pointer targets of synset of type type.- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(Synset set, PointerType searchType) throws JWNLException
Make a nested list of pointer targets to the default depth, starting atsynset. Each level of the list is related to the previous level by a pointer of type searchType.- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(Synset set, PointerType searchType, int depth) throws JWNLException
Make a nested list of pointer targets to depth depth, starting atsynset. Each level of the list is related to the previous level by a pointer of type searchType.- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(Synset set, PointerType searchType, PointerType labelType, int depth, boolean allowRedundancies) throws JWNLException
Make a nested list of pointer targets to depth depth, starting atsynset. Each level of the list is related to the previous level by a pointer of type searchType.- Parameters:
labelType- the type used to label each pointer target in the treeallowRedundancies- if true, duplicate items will be included in the tree- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(Synset set, PointerType[] searchTypes) throws JWNLException
Make a nested list of pointer targets to the default depth, starting atsynset. Each level of the list is related to the previous level by one of the pointer types specified by searchTypes.- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(Synset set, PointerType[] searchTypes, int depth) throws JWNLException
Make a nested list of pointer targets to depth depth, starting atsynset. Each level of the list is related to the previous level by one of the pointer types specified by searchTypes.- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(Synset synset, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies) throws JWNLException
Make a nested list of pointer targets to depth depth, starting atsynset. Each level of the list is related to the previous level by one of the pointer types specified by searchTypes.- Parameters:
labelType- the type used to label each pointer target in the treeallowRedundancies- if true, duplicate items will be included in the tree- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(PointerTargetNodeList list, PointerType searchType, PointerType labelType, int depth, boolean allowRedundancies) throws JWNLException
Make a nested list of pointer targets to depth depth, starting at eachsynsetin list. Each level of the list is related to the previous level by a pointer of type searchType.- Parameters:
labelType- the type used to label each pointer target in the treeallowRedundancies- if true, duplicate items will be included in the tree- Throws:
JWNLException
-
makePointerTargetTreeList
public PointerTargetTreeNodeList makePointerTargetTreeList(PointerTargetNodeList list, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies) throws JWNLException
Make a nested list of pointer targets to depth depth, starting at eachsynsetin list. Each level of the list is related to the previous level by one of the pointer types specified by searchTypes.- Parameters:
labelType- the type used to label each pointer target in the treeallowRedundancies- if true, duplicate items will be included in the tree- Throws:
JWNLException
-
makePointerTargetTreeList
private PointerTargetTreeNodeList makePointerTargetTreeList(Synset synset, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies, PointerTargetTreeNode parent) throws JWNLException
- Throws:
JWNLException
-
makeInheritedTree
public PointerTargetTree makeInheritedTree(Synset synset, PointerType searchType) throws JWNLException
Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of type searchType, starting at the node's pointer target. This method uses the default depths.- Throws:
JWNLException
-
makeInheritedTree
public PointerTargetTree makeInheritedTree(Synset synset, PointerType searchType, PointerType labelType, int pointerDepth, int ancestorDepth) throws JWNLException
Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of type searchType, starting at the node's pointer target.- Parameters:
pointerDepth- the depth to which to search for each pointer listancestorDepth- the depth to which to go to in the hypernym list- Throws:
JWNLException
-
makeInheritedTree
public PointerTargetTree makeInheritedTree(Synset synset, PointerType searchType, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies) throws JWNLException
Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of type searchType, starting at the node's pointer target.- Parameters:
pointerDepth- the depth to which to search for each pointer listancestorDepth- the depth to which to go to in the hypernym listallowRedundancies- if true, duplicate items are allowed in the list- Throws:
JWNLException
-
makeInheritedTree
public PointerTargetTree makeInheritedTree(Synset synset, PointerType[] searchTypes) throws JWNLException
Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of the types specified in searchTypes, starting at the node's pointer target. This method uses the default depths.- Throws:
JWNLException
-
makeInheritedTree
public PointerTargetTree makeInheritedTree(Synset synset, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth) throws JWNLException
Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of the types specified in searchTypes, starting at the node's pointer target.- Parameters:
pointerDepth- the depth to which to search for each pointer listancestorDepth- the depth to which to go to in the hypernym list- Throws:
JWNLException
-
makeInheritedTree
public PointerTargetTree makeInheritedTree(Synset synset, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies) throws JWNLException
Create a hypernym tree starting at synset, and add to each node a nested list pointer targets of the types specified in searchTypes, starting at the node's pointer target.- Parameters:
pointerDepth- the depth to which to search for each pointer listancestorDepth- the depth to which to go to in the hypernym listallowRedundancies- if true, duplicate items are allowed in the list- Throws:
JWNLException
-
makeInheritedTree
public PointerTargetTree makeInheritedTree(PointerTargetTree tree, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies) throws JWNLException
Turn an existing tree into an inheritance tree.- Parameters:
tree- the tree to convertsearchTypes- the pointer types to include in the pointer listslabelType- thePointerTypewith which to label each pointerpointerDepth- the depth to which to search for each pointer listancestorDepth- the depth to which to go to intreeallowRedundancies- if true, duplicate items are allowed in the list- Throws:
JWNLException
-
makeInheritedTreeList
public PointerTargetTreeNodeList makeInheritedTreeList(PointerTargetTreeNodeList list, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies) throws JWNLException
Turn an existing tree list into an inheritance tree list.- Parameters:
list- the tree list to convertsearchTypes- the pointer types to include in the pointer listslabelType- thePointerTypewith which to label each pointerpointerDepth- the depth to which to search for each pointer listancestorDepth- the depth to which to go to intreeallowRedundancies- if true, duplicate items are allowed in the list- Throws:
JWNLException
-
-