caikit.interfaces.nlp.tasks
This module holds the Task definitions for all common NLP tasks
Classes
The Text Generation Task is responsible for taking input prompting text |
|
The text classification task is responsible for assigning a label or class to text. |
|
The token classification task is responsible for assigning a label to individual |
|
The tokenization task is responsible for splitting a document into tokens. |
|
The classification with text generation task is responsible for taking |
|
Return a text embedding for the input text string |
|
Return a text embedding for each text string in the input list |
|
Returns an ordered list ranking the most relevant documents for the query |
|
Returns an ordered list for each query ranking the most relevant documents for the query |
|
Compare the source_sentence to each of the sentences. |
|
Compare each of the source_sentences to each of the sentences. |
|
The Chunk tokenization task is responsible for taking input text |
Module Contents
- class caikit.interfaces.nlp.tasks.TextGenerationTask[source]
Bases:
caikit.core.TaskBaseThe Text Generation Task is responsible for taking input prompting text and generating additional text from that prompt.
- class caikit.interfaces.nlp.tasks.TextClassificationTask[source]
Bases:
caikit.core.TaskBaseThe text classification task is responsible for assigning a label or class to text.
- class caikit.interfaces.nlp.tasks.TokenClassificationTask[source]
Bases:
caikit.core.TaskBaseThe token classification task is responsible for assigning a label to individual tokens in a document.
- class caikit.interfaces.nlp.tasks.TokenizationTask[source]
Bases:
caikit.core.TaskBaseThe tokenization task is responsible for splitting a document into tokens.
- class caikit.interfaces.nlp.tasks.ClassificationWithTextGenerationTask[source]
Bases:
caikit.core.TaskBaseThe classification with text generation task is responsible for taking input prompting text, generating additional text from that prompt and classifying the generated text based on detectors.
- class caikit.interfaces.nlp.tasks.EmbeddingTask[source]
Bases:
caikit.core.TaskBaseReturn a text embedding for the input text string
- class caikit.interfaces.nlp.tasks.EmbeddingTasks[source]
Bases:
caikit.core.TaskBaseReturn a text embedding for each text string in the input list
- class caikit.interfaces.nlp.tasks.RerankTask[source]
Bases:
caikit.core.TaskBaseReturns an ordered list ranking the most relevant documents for the query
- Required parameters:
query: The search query documents: JSON documents containing “text” or alternative “_text” to search
- Returns:
The top_n documents in order of relevance (most relevant first). For each, a score and document index (position in input) is returned. The original document JSON is returned depending on optional args. The top_n optional parameter limits the results when used.
- class caikit.interfaces.nlp.tasks.RerankTasks[source]
Bases:
caikit.core.TaskBaseReturns an ordered list for each query ranking the most relevant documents for the query
- Required parameters:
queries: The search queries documents: JSON documents containing “text” or alternative “_text” to search
- Returns:
Results in order of the queries. In each query result:
The query text is optionally included for visual convenience. The top_n documents in order of relevance (most relevant first). For each, a score and document index (position in input) is returned. The original document JSON is returned depending on optional args. The top_n optional parameter limits the results when used.
- class caikit.interfaces.nlp.tasks.SentenceSimilarityTask[source]
Bases:
caikit.core.TaskBaseCompare the source_sentence to each of the sentences. Result contains a list of scores in the order of the input sentences.
- class caikit.interfaces.nlp.tasks.SentenceSimilarityTasks[source]
Bases:
caikit.core.TaskBaseCompare each of the source_sentences to each of the sentences. Returns a list of results in the order of the source_sentences. Each result contains a list of scores in the order of the input sentences.
- class caikit.interfaces.nlp.tasks.ChunkerTokenizationTask[source]
Bases:
caikit.core.TaskBaseThe Chunk tokenization task is responsible for taking input text and giving out chunks of pre-configured type, like sentences.