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

Class Concept



  • public class Concept
    extends java.lang.Object
    Concept is a set of synonyms, i.e. group of words that are roughly synonymous in a given context.
    • Constructor Summary

      Constructors 
      Constructor and Description
      Concept(Concept parent)
      Constructor.
      Concept(Concept parent, java.util.List<java.lang.String> keywords)
      Constructor.
      Concept(Concept parent, java.lang.String keyword)
      Constructor.
      Concept(Concept parent, java.lang.String[] keywords)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      void addChild(Concept concept)
      Add a child to this node
      Concept addChild(java.lang.String concept)
      Add a child to this node
      void addKeyword(java.lang.String keyword)
      Add a keyword to the concept synset.
      void addKeywords(java.util.List<java.lang.String> keywords)
      Add a list of synomym to the concept synset.
      void addKeywords(java.lang.String[] keywords)
      Add a list of synomym to the concept synset.
      java.util.List<Concept> getChildren()
      Get all children concepts.
      java.util.Set<java.lang.String> getKeywords()
      Returns the concept synonym set.
      java.util.List<Concept> getPathFromRoot()
      Returns the path from root to the given node.
      java.util.List<Concept> getPathToRoot()
      Returns the path from the given node to the root.
      boolean isAncestorOf(Concept concept)
      Returns true if this concept is an ancestor of the given concept.
      boolean isLeaf()
      Check if a node is a leaf in the taxonomy tree.
      boolean removeChild(Concept concept)
      Remove a child to this node
      void removeKeyword(java.lang.String keyword)
      Remove a keyword from the concept synset.
      java.lang.String toString() 
      • Methods inherited from class java.lang.Object

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

      • Concept

        public Concept(Concept parent)
        Constructor. Create a concept with an empty set of synonyms.
        Parameters:
        parent - the parent concept
      • Concept

        public Concept(Concept parent,
                       java.lang.String keyword)
        Constructor.
        Parameters:
        keyword - a keyword of this concept
        parent - the parent concept
      • Concept

        public Concept(Concept parent,
                       java.lang.String[] keywords)
        Constructor.
        Parameters:
        keywords - a list of keywords of this concept
        parent - the parent concept
      • Concept

        public Concept(Concept parent,
                       java.util.List<java.lang.String> keywords)
        Constructor.
        Parameters:
        keywords - a list of keywords of this concept
        parent - the parent concept
    • Method Detail

      • isLeaf

        public boolean isLeaf()
        Check if a node is a leaf in the taxonomy tree.
      • getKeywords

        public java.util.Set<java.lang.String> getKeywords()
        Returns the concept synonym set.
        Returns:
        concept synomym set.
      • addKeyword

        public void addKeyword(java.lang.String keyword)
        Add a keyword to the concept synset.
      • addKeywords

        public void addKeywords(java.lang.String[] keywords)
        Add a list of synomym to the concept synset.
      • addKeywords

        public void addKeywords(java.util.List<java.lang.String> keywords)
        Add a list of synomym to the concept synset.
      • removeKeyword

        public void removeKeyword(java.lang.String keyword)
        Remove a keyword from the concept synset.
      • getChildren

        public java.util.List<Concept> getChildren()
        Get all children concepts.
        Returns:
        a vector of children concepts.
      • addChild

        public Concept addChild(java.lang.String concept)
        Add a child to this node
      • addChild

        public void addChild(Concept concept)
        Add a child to this node
      • removeChild

        public boolean removeChild(Concept concept)
        Remove a child to this node
      • isAncestorOf

        public boolean isAncestorOf(Concept concept)
        Returns true if this concept is an ancestor of the given concept.
      • getPathFromRoot

        public java.util.List<Concept> getPathFromRoot()
        Returns the path from root to the given node.
      • getPathToRoot

        public java.util.List<Concept> getPathToRoot()
        Returns the path from the given node to the root.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.