Description
Classify open-domain, fact-based questions into one of the following broad semantic categories: Abbreviation, Description, Entities, Human Beings, Locations or Numeric Values.
Live Demo Open in Colab Download Copy S3 URI
How to use
from sparknlp.pretrained import PretrainedPipeline
pipeline = PretrainedPipeline("classifierdl_use_trec50_pipeline", lang = "en")
import com.johnsnowlabs.nlp.pretrained.PretrainedPipeline
val pipeline = new PretrainedPipeline("classifierdl_use_trec50_pipeline", lang = "en")
import nlu
nlu.load("en.classify.trec50.component_list").predict("""Put your text here.""")
Results
+------------------------------------------------------------------------------------------------+------------+
|document |class |
+------------------------------------------------------------------------------------------------+------------+
|When did the construction of stone circles begin in the UK? | NUM_date |
+------------------------------------------------------------------------------------------------+------------+
Model Information
Model Name: | classifierdl_use_trec50_pipeline |
Type: | pipeline |
Compatibility: | Spark NLP 2.7.1+ |
Edition: | Official |
Language: | en |