Pipeline to Classify Texts into TREC-6 Classes

Description

This pretrained pipeline is built on the top of bert_sequence_classifier_trec_coarse_en.

The TREC dataset for question classification consists of open-domain, fact-based questions divided into broad semantic categories. You can check the official documentation of the dataset, entities, etc. here.

Predicted Entities

Download Copy S3 URI

How to use

trec_pipeline = PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en")

trec_pipeline.annotate("Germany is the largest country in Europe economically.")
val trec_pipeline = new PretrainedPipeline("bert_sequence_classifier_trec_coarse_pipeline", lang = "en")

trec_pipeline.annotate("Germany is the largest country in Europe economically.")

Results

Results




['LOC']


{:.model-param}

Model Information

Model Name: bert_sequence_classifier_trec_coarse_pipeline
Type: pipeline
Compatibility: Spark NLP 4.4.2+
License: Open Source
Edition: Official
Language: en
Size: 406.6 MB

Included Models

  • DocumentAssembler
  • TokenizerModel
  • BertForSequenceClassification