NLP tasks supported by the pipeline module in the Transformers library

NLP tasks supported by the pipeline module in the Transformers library

The pipeline module in the Transformers library supports the following NLP tasks:

  • Text Classification: Text classification tasks, such as sentiment analysis, toxicity detection, etc.
  • Token Classification: Sequence tagging tasks, such as named entity recognition, partial extraction, etc.
  • Question Answering (question answering): question answering task, which can answer the answer to a given question.
  • Fill Mask: Use the model to predict the masked words.
  • Summarization: Text summarization task, which can automatically generate text summaries.
  • Translation: Machine translation task, which can translate different languages.
  • Feature Extraction: Extract semantic feature vectors from text.
  • Conversational (dialogue): used for task-based dialogue, which can be used for questions and answers.
  • Text Generation: Automatically generate text.
  • Sentiment Analysis: Sentiment analysis, determining the emotional polarity of text.
  • Named Entity Recognition (NER): Named entity recognition, finding entities in text.
  • Etc.
    Using pipeline, you can easily complete these NLP downstream tasks without training the model. You can use it by specifying the task type and model name. It encapsulates models and tokenization, allowing you to quickly get started with NLP projects.

In September 2023, the full list of product pipeline codes is as follows:

  • "audio-classification": will return a [AudioClassificationPipeline].
  • "automatic-speech-recognition": will return a [AutomaticSpeechRecognitionPipeline].
  • "conversational": will return a [ConversationalPipeline].
  • "depth-estimation": will return a [DepthEstimationPipeline].
  • "document-question-answering": will return a [DocumentQuestionAnsweringPipeline].
  • "feature-extraction": will return a [FeatureExtractionPipeline].
  • "fill-mask": will return a [FillMaskPipeline]:.
  • "image-classification": will return a [ImageClassificationPipeline].
  • "image-segmentation": will return a [ImageSegmentationPipeline].
  • "image-to-text": will return a [ImageToTextPipeline].
  • "mask-generation": will return a [MaskGenerationPipeline].
  • "object-detection": will return a [ObjectDetectionPipeline].
  • "question-answering": will return a [QuestionAnsweringPipeline].
  • "summarization": will return a [SummarizationPipeline].
  • "table-question-answering": will return a [TableQuestionAnsweringPipeline].
  • "text2text-generation": will return a [Text2TextGenerationPipeline].
  • "text-classification" (alias "sentiment-analysis" available): will return a
    [TextClassificationPipeline].
  • "text-generation": will return a [TextGenerationPipeline]:.
  • "token-classification" (alias "ner" available): will return a [TokenClassificationPipeline].
  • "translation": will return a [TranslationPipeline].
  • "translation_xx_to_yy": will return a [TranslationPipeline].
  • "video-classification": will return a [VideoClassificationPipeline].
  • "visual-question-answering": will return a [VisualQuestionAnsweringPipeline].
  • "zero-shot-classification": will return a [ZeroShotClassificationPipeline].
  • "zero-shot-image-classification": will return a [ZeroShotImageClassificationPipeline].
  • "zero-shot-audio-classification": will return a [ZeroShotAudioClassificationPipeline].
  • "zero-shot-object-detection": will return a [ZeroShotObjectDetectionPipeline].

end!

Guess you like

Origin blog.csdn.net/engchina/article/details/132816324