Package smile.nlp

Class Text

java.lang.Object
smile.nlp.Text
Direct Known Subclasses:
SimpleText

public class Text extends Object
A minimal interface of text in the corpus.
  • Field Details

    • id

      public final String id
      The id of document in the corpus.
    • title

      public final String title
      The title of document;
    • body

      public final String body
      The text body.
  • Constructor Details

    • Text

      public Text(String body)
      Constructor.
      Parameters:
      body - the text body of document.
    • Text

      public Text(String title, String body)
      Constructor.
      Parameters:
      title - the title of document.
      body - the text body of document.
    • Text

      public Text(String id, String title, String body)
      Constructor.
      Parameters:
      id - the id of document.
      title - the title of document.
      body - the text body of document.