Interface TextClassifier<E extends Enum<E>>

Type Parameters:
E - Enum that is the result of classification.
All Known Implementing Classes:
EmbeddingModelTextClassifier

public interface TextClassifier<E extends Enum<E>>
Classifies given text according to specified enum.
  • Method Details

    • classify

      List<E> classify(String text)
      Classify the given text.
      Parameters:
      text - Text to classify.
      Returns:
      A list of classification categories.
    • classify

      default List<E> classify(TextSegment textSegment)
      Classify the given TextSegment.
      Parameters:
      textSegment - TextSegment to classify.
      Returns:
      A list of classification categories.
    • classify

      default List<E> classify(Document document)
      Classify the given Document.
      Parameters:
      document - Document to classify.
      Returns:
      A list of classification categories.