Package dev.langchain4j.classification
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 Summary
-
Method Details
-
classify
Classify the given text.- Parameters:
text
- Text to classify.- Returns:
- A list of classification categories.
-
classify
Classify the givenTextSegment
.- Parameters:
textSegment
-TextSegment
to classify.- Returns:
- A list of classification categories.
-
classify
Classify the givenDocument
.- Parameters:
document
-Document
to classify.- Returns:
- A list of classification categories.
-