Package smile.nlp

Interface TextTerms

All Known Implementing Classes:
SimpleText

public interface TextTerms
The terms in a text.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the maximum term frequency over all terms in the document.
    int
    Returns the number of words.
    int
    tf(String term)
    Returns the term frequency.
    Returns the iterator of unique words.
    Returns the iterator of the words of the document.
  • Method Details

    • size

      int size()
      Returns the number of words.
      Returns:
      the number of words.
    • words

      Iterable<String> words()
      Returns the iterator of the words of the document. The stop words and punctuations may be removed.
      Returns:
      the iterator of the words of the document.
    • unique

      Iterable<String> unique()
      Returns the iterator of unique words.
      Returns:
      the iterator of unique words.
    • tf

      int tf(String term)
      Returns the term frequency.
      Parameters:
      term - the term.
      Returns:
      the term frequency.
    • maxtf

      int maxtf()
      Returns the maximum term frequency over all terms in the document.
      Returns:
      the maximum term frequency.