Documentation of 'smile.taxonomy.Taxonomy' Java class
Taxonomy
smile.taxonomy

Class Taxonomy



  • public class Taxonomy
    extends java.lang.Object
    A taxonomy is a tree of terms (aka concept) where leaves must be named but intermediary nodes can be anonymous.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Taxonomy()
      Constructor.
      Taxonomy(java.lang.String rootConcept)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      Concept getConcept(java.lang.String keyword)
      Returns a concept node which synset contains the keyword.
      java.util.List<java.lang.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(java.lang.String v, java.lang.String w)
      Returns the lowest common ancestor (LCA) of concepts v and w.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Taxonomy

        public Taxonomy()
        Constructor.
      • Taxonomy

        public Taxonomy(java.lang.String rootConcept)
        Constructor.
        Parameters:
        rootConcept - the keyword of root concept.
    • Method Detail

      • getRoot

        public Concept getRoot()
        Returns the root node of taxonomy tree.
        Returns:
        root node.
      • getConcept

        public Concept getConcept(java.lang.String keyword)
        Returns a concept node which synset contains the keyword.
      • getConcepts

        public java.util.List<java.lang.String> getConcepts()
        Returns all named concepts from this taxonomy
      • lowestCommonAncestor

        public Concept lowestCommonAncestor(java.lang.String v,
                                            java.lang.String w)
        Returns the lowest common ancestor (LCA) of concepts v and w. The lowest common ancestor is defined between two nodes v and w as the lowest node that has both v and w as descendants (where we allow a node to be a descendant of itself).
      • lowestCommonAncestor

        public Concept lowestCommonAncestor(Concept v,
                                            Concept w)
        Returns the lowest common ancestor (LCA) of concepts v and w. The lowest common ancestor is defined between two nodes v and w as the lowest node that has both v and w as descendants (where we allow a node to be a descendant of itself).

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.