public class Taxonomy extends Object
Constructor and Description |
---|
Taxonomy()
Constructor.
|
Taxonomy(String rootConcept)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Concept |
getConcept(String keyword)
Returns a concept node which synset contains the keyword.
|
List<String> |
getConcepts()
Returns all named concepts from this taxonomy
|
Concept |
getRoot()
Returns the root node of taxonomy tree.
|
Concept |
lowestCommonAncestor(Concept v,
Concept w)
Returns the lowest common ancestor (LCA) of concepts v and w.
|
Concept |
lowestCommonAncestor(String v,
String w)
Returns the lowest common ancestor (LCA) of concepts v and w.
|
public Taxonomy()
public Taxonomy(String rootConcept)
rootConcept
- the keyword of root concept.public Concept getRoot()
public Concept getConcept(String keyword)
public Concept lowestCommonAncestor(String v, String w)
public Concept lowestCommonAncestor(Concept v, Concept w)
Copyright © 2015. All rights reserved.