Class DocumentSample

    • Constructor Detail

      • DocumentSample

        public DocumentSample​(String category,
                              String[] text)
        Initializes a instance.
        Parameters:
        category - The category to be used. Must not be null.
        text - The plain text in a tokenized form. Must not be null.
      • DocumentSample

        public DocumentSample​(String category,
                              String[] text,
                              Map<String,​Object> extraInformation)
        Initializes a instance.
        Parameters:
        category - The category to be used.Must not be null.
        text - The plain text in a tokenized form. Must not be null.
        extraInformation - Additional information for context.
    • Method Detail

      • getCategory

        public String getCategory()
        Returns:
        Retrieves the category.
      • getText

        public String[] getText()
        Returns:
        Retrieves the text in a tokenized form.
      • getExtraInformation

        public Map<String,​Object> getExtraInformation()
        Returns:
        Retrieves contextual extra information.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object