Package net.didion.jwnl.data
Class PointerUtils
- java.lang.Object
-
- net.didion.jwnl.data.PointerUtils
-
public final class PointerUtils extends Object
This 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 theRelationship
class, these relationships will be referred to as links.
-
-
Field Summary
Fields Modifier and Type Field Description static int
INFINITY
Representation of infinite depth.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description PointerTargetNodeList
getAlsoSees(Synset synset)
Find what words are related tosynset
PointerTargetTree
getAlsoSeeTree(Synset synset, int depth)
Find all See Also relations to depthdepth
.PointerTargetNodeList
getAntonyms(Synset synset)
Get the words that mean the opposite ofsynset
PointerTargetNodeList
getAttributes(Synset synset)
Get the attributes ofsynset
PointerTargetNodeList
getCauses(Synset synset)
Find direct cause links ofsynset
PointerTargetTree
getCauseTree(Synset synset)
Find all cause links forsynset
.PointerTargetTree
getCauseTree(Synset synset, int depth)
Find all cause links forsynset
to depthdepth
.PointerTargetNodeList
getCoordinateTerms(Synset synset)
Getsynset
's siblings (the hyponyms of its hypernyms)PointerTargetNodeList
getDerived(Synset synset)
Find derrived links ofsynset
PointerTargetNodeList
getDirectHypernyms(Synset synset)
Get the immediate parents ofsynset
PointerTargetNodeList
getDirectHyponyms(Synset synset)
Get the immediate children ofsynset
PointerTargetNodeList
getEntailedBy(Synset synset)
Find direct entailed bys ofsynset
PointerTargetTree
getEntailedByTree(Synset synset)
Find all entailed bys ofsynset
.PointerTargetTree
getEntailedByTree(Synset synset, int depth)
Find all entailed bys ofsynset
to depthdepth
.PointerTargetNodeList
getEntailments(Synset synset)
Find direct entailments ofsynset
PointerTargetTree
getEntailmentTree(Synset synset)
Find all entailments forsynset
PointerTargetTree
getEntailmentTree(Synset synset, int depth)
Find all entailments forsynset
to depthdepth
PointerTargetTree
getExtendedAntonyms(Synset synset)
Get the words that mean the opposite ofsynset
and the immediate synonyms of those wordsPointerTargetTree
getExtendedAntonyms(Synset synset, int depth)
Find all antonyms ofsynset
, and all synonyms of those antonyms to depthdepth
.PointerTargetNodeList
getHolonyms(Synset synset)
Get holonyms ofsynset
PointerTargetTree
getHypernymTree(Synset synset)
Get all of the ancestors ofsynset
PointerTargetTree
getHypernymTree(Synset synset, int depth)
Get all of the ancestors ofsynset
to depthdepth
PointerTargetTree
getHyponymTree(Synset synset)
Get all of the children ofsynset
PointerTargetTree
getHyponymTree(Synset synset, int depth)
Get all of the children ofsynset
to depthdepth
PointerTargetTree
getIndirectAntonyms(Synset synset)
Get the immediate antonyms of all words that mean the same assynset
.PointerTargetTree
getIndirectAntonyms(Synset synset, int depth)
Get the antonyms of all words that mean the same assynset
to depthdepth
.PointerTargetTree
getInheritedHolonyms(Synset synset)
Get holonyms ofsynset
and of all its ancestorsPointerTargetTree
getInheritedHolonyms(Synset synset, int pointerDepth, int ancestorDepth)
Get holonyms of each synset, to depthpointerDepth
, starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.PointerTargetTree
getInheritedMemberHolonyms(Synset synset)
Get member holonyms ofsynset
and of all its ancestorsPointerTargetTree
getInheritedMemberHolonyms(Synset synset, int pointerDepth, int ancestorDepth)
Get member holonyms of each synset, to depthpointerDepth
, starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.PointerTargetTree
getInheritedMemberMeronyms(Synset synset)
Get member meronyms of synset and of its ancestorsPointerTargetTree
getInheritedMemberMeronyms(Synset synset, int pointerDepth, int ancestorDepth)
Get member meronyms of each synset, to depthpointerDepth
, starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.PointerTargetTree
getInheritedMeronyms(Synset synset, int pointerDepth, int ancestorDepth)
Get meronyms of each synset, to depthpointerDepth
starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.PointerTargetTree
getInheritedPartHolonyms(Synset synset)
Get part holonyms ofsynset
and of all its ancestorsPointerTargetTree
getInheritedPartHolonyms(Synset synset, int pointerDepth, int ancestorDepth)
Get part holonyms of each synset, to depthpointerDepth
, starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.PointerTargetTree
getInheritedPartMeronyms(Synset synset)
Get part meronyms ofsynset
and of all its ancestorsPointerTargetTree
getInheritedPartMeronyms(Synset synset, int pointerDepth, int ancestorDepth)
Get part meronyms of each synset, to depthpointerDepth
, starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.PointerTargetTree
getInheritedSubstanceHolonyms(Synset synset)
Get substance holonyms ofsynset
and of all its ancestorsPointerTargetTree
getInheritedSubstanceHolonyms(Synset synset, int pointerDepth, int ancestorDepth)
Get substance holonyms of each synset, to depthpointerDepth
, starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.PointerTargetTree
getInheritedSubstanceMeronyms(Synset synset)
Get substance meronyms ofsynset
and of its ancestorsPointerTargetTree
getInheritedSubstanceMeronyms(Synset synset, int pointerDepth, int ancestorDepth)
Get substance meronyms of each synset, to depthpointerDepth
, starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.static PointerUtils
getInstance()
PointerTargetTree
getInteritedMeronyms(Synset synset)
Get meronyms ofsynset
and of all its ancestorsPointerTargetNodeList
getMemberHolonyms(Synset synset)
Get member holonyms ofsynset
PointerTargetNodeList
getMemberMeronyms(Synset synset)
Get member meronyms ofsynset
PointerTargetNodeList
getMeronyms(Synset synset)
Get meronyms ofsynset
.PointerTargetNodeList
getPartHolonyms(Synset synset)
Get part holonyms ofsynset
PointerTargetNodeList
getParticipleOf(Synset synset)
Find participle of links ofsynset
PointerTargetNodeList
getPartMeronyms(Synset synset)
Get part meronyms ofsynset
PointerTargetNodeList
getSubstanceHolonyms(Synset synset)
Get substance holonyms ofsynset
PointerTargetNodeList
getSubstanceMeronyms(Synset synset)
Get substance meronyms ofsynset
PointerTargetNodeList
getSynonyms(Synset synset)
Get the synonyms forsynset
.PointerTargetTree
getSynonymTree(Synset synset, int depth)
Get all the synonyms ofsynset
to depthdepth
.PointerTargetNodeList
getVerbGroup(Synset synset)
Get the group that this verb belongs to.PointerTargetTree
makeInheritedTree(PointerTargetTree tree, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies)
Turn an existing tree into an inheritance tree.PointerTargetTree
makeInheritedTree(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.PointerTargetTree
makeInheritedTree(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.PointerTargetTree
makeInheritedTree(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.PointerTargetTree
makeInheritedTree(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.PointerTargetTree
makeInheritedTree(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.PointerTargetTree
makeInheritedTree(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.PointerTargetTreeNodeList
makeInheritedTreeList(PointerTargetTreeNodeList list, PointerType[] searchTypes, PointerType labelType, int pointerDepth, int ancestorDepth, boolean allowRedundancies)
Turn an existing tree list into an inheritance tree list.PointerTargetTreeNodeList
makePointerTargetTreeList(PointerTargetNodeList list, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies)
Make a nested list of pointer targets to depth depth, starting at eachsynset
in list.PointerTargetTreeNodeList
makePointerTargetTreeList(PointerTargetNodeList list, PointerType searchType, PointerType labelType, int depth, boolean allowRedundancies)
Make a nested list of pointer targets to depth depth, starting at eachsynset
in list.PointerTargetTreeNodeList
makePointerTargetTreeList(Synset set, PointerType searchType)
Make a nested list of pointer targets to the default depth, starting atsynset
.PointerTargetTreeNodeList
makePointerTargetTreeList(Synset set, PointerType[] searchTypes)
Make a nested list of pointer targets to the default depth, starting atsynset
.PointerTargetTreeNodeList
makePointerTargetTreeList(Synset set, PointerType[] searchTypes, int depth)
Make a nested list of pointer targets to depth depth, starting atsynset
.PointerTargetTreeNodeList
makePointerTargetTreeList(Synset synset, PointerType[] searchTypes, PointerType labelType, int depth, boolean allowRedundancies)
Make a nested list of pointer targets to depth depth, starting atsynset
.PointerTargetTreeNodeList
makePointerTargetTreeList(Synset set, PointerType searchType, int depth)
Make a nested list of pointer targets to depth depth, starting atsynset
.PointerTargetTreeNodeList
makePointerTargetTreeList(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
-
-
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 ofsynset
to 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 ofsynset
to 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 ofsynset
and 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 assynset
to 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 ofsynset
and of all its ancestors- Throws:
JWNLException
-
getInheritedMeronyms
public PointerTargetTree getInheritedMeronyms(Synset synset, int pointerDepth, int ancestorDepth) throws JWNLException
Get meronyms of each synset, to depthpointerDepth
starting atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.- Throws:
JWNLException
-
getInheritedPartMeronyms
public PointerTargetTree getInheritedPartMeronyms(Synset synset) throws JWNLException
Get part meronyms ofsynset
and 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 atsynset
and 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 atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.- Throws:
JWNLException
-
getInheritedSubstanceMeronyms
public PointerTargetTree getInheritedSubstanceMeronyms(Synset synset) throws JWNLException
Get substance meronyms ofsynset
and 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 atsynset
and 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 ofsynset
and 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 atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.- Throws:
JWNLException
-
getInheritedPartHolonyms
public PointerTargetTree getInheritedPartHolonyms(Synset synset) throws JWNLException
Get part holonyms ofsynset
and 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 atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.- Throws:
JWNLException
-
getInheritedMemberHolonyms
public PointerTargetTree getInheritedMemberHolonyms(Synset synset) throws JWNLException
Get member holonyms ofsynset
and 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 atsynset
and going for all ofsynset
's ancestors to depthancestorDepth
.- Throws:
JWNLException
-
getInheritedSubstanceHolonyms
public PointerTargetTree getInheritedSubstanceHolonyms(Synset synset) throws JWNLException
Get substance holonyms ofsynset
and 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 atsynset
and 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 forsynset
to 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 ofsynset
to 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 forsynset
to 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 ofsynset
to depthdepth
.- 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 eachsynset
in 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 eachsynset
in 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
-
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
- thePointerType
with which to label each pointerpointerDepth
- the depth to which to search for each pointer listancestorDepth
- the depth to which to go to intree
allowRedundancies
- 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
- thePointerType
with which to label each pointerpointerDepth
- the depth to which to search for each pointer listancestorDepth
- the depth to which to go to intree
allowRedundancies
- if true, duplicate items are allowed in the list- Throws:
JWNLException
-
-