Package | Description |
---|---|
smile.taxonomy |
A taxonomy is a tree of terms (concepts) where leaves
must be named but intermediary nodes can be anonymous.
|
Modifier and Type | Method and Description |
---|---|
Concept |
Concept.addChild(String concept)
Add a child to this node
|
Concept |
Taxonomy.getConcept(String keyword)
Returns a concept node which synset contains the keyword.
|
Concept |
Taxonomy.getRoot()
Returns the root node of taxonomy tree.
|
Concept |
Taxonomy.lowestCommonAncestor(Concept v,
Concept w)
Returns the lowest common ancestor (LCA) of concepts v and w.
|
Concept |
Taxonomy.lowestCommonAncestor(String v,
String w)
Returns the lowest common ancestor (LCA) of concepts v and w.
|
Modifier and Type | Method and Description |
---|---|
List<Concept> |
Concept.getChildren()
Get all children concepts.
|
List<Concept> |
Concept.getPathFromRoot()
Returns the path from root to the given node.
|
List<Concept> |
Concept.getPathToRoot()
Returns the path from the given node to the root.
|
Modifier and Type | Method and Description |
---|---|
void |
Concept.addChild(Concept concept)
Add a child to this node
|
double |
TaxonomicDistance.d(Concept x,
Concept y)
Compute the distance between two concepts in a taxonomy.
|
boolean |
Concept.isAncestorOf(Concept concept)
Returns true if this concept is an ancestor of the given concept.
|
Concept |
Taxonomy.lowestCommonAncestor(Concept v,
Concept w)
Returns the lowest common ancestor (LCA) of concepts v and w.
|
boolean |
Concept.removeChild(Concept concept)
Remove a child to this node
|
Constructor and Description |
---|
Concept(Concept parent)
Constructor.
|
Concept(Concept parent,
List<String> keywords)
Constructor.
|
Concept(Concept parent,
String keyword)
Constructor.
|
Concept(Concept parent,
String[] keywords)
Constructor.
|
Copyright © 2015. All rights reserved.