Finance Capital Call Notices Document Classifier (Bert Sentence Embeddings)

Description

The finclf_capital_call_notices model is a Bert Sentence Embeddings Document Classifier used to classify if the document belongs to the class capital_call_notices or not (Binary Classification).

Predicted Entities

capital_call_notices, other

Copy S3 URI

How to use

document_assembler = nlp.DocumentAssembler()\
    .setInputCol("text")\
    .setOutputCol("document")
  
embeddings = nlp.BertSentenceEmbeddings.pretrained("sent_bert_base_cased", "en")\
    .setInputCols("document")\
    .setOutputCol("sentence_embeddings")
    
doc_classifier = finance.ClassifierDLModel.pretrained("finclf_capital_call_notices", "en", "finance/models")\
    .setInputCols(["sentence_embeddings"])\
    .setOutputCol("category")
    
nlpPipeline = nlp.Pipeline(stages=[
    document_assembler, 
    embeddings,
    doc_classifier])
 
df = spark.createDataFrame([["YOUR TEXT HERE"]]).toDF("text")

model = nlpPipeline.fit(df)

result = model.transform(df)

Results

+-------+
|result|
+-------+
|[capital_call_notices]|
|[other]|
|[other]|
|[capital_call_notices]|

Model Information

Model Name: finclf_capital_call_notices
Compatibility: Finance NLP 1.0.0+
License: Licensed
Edition: Official
Input Labels: [sentence_embeddings]
Output Labels: [class]
Language: en
Size: 22.4 MB

References

Financial documents and classified in-house + SEC documents

Benchmarking

label                 precision  recall  f1-score  support 
capital_call_notices  1.00       1.00    1.00      12      
other                 1.00       1.00    1.00      23      
accuracy              -          -       1.00      35      
macro-avg             1.00       1.00    1.00      35      
weighted-avg          1.00       1.00    1.00      35