Description
Financial Bert-based Question Answering model, trained on squad-v2, finetuned on proprietary Financial questions and answers.
Predicted Entities
How to use
documentAssembler = nlp.MultiDocumentAssembler()\
.setInputCols(["question", "context"])\
.setOutputCols(["document_question", "document_context"])
spanClassifier = nlp.BertForQuestionAnswering.pretrained("finqa_bert","en", "finance/models") \
.setInputCols(["document_question", "document_context"]) \
.setOutputCol("answer") \
.setCaseSensitive(True)
pipeline = nlp.Pipeline().setStages([
documentAssembler,
spanClassifier
])
example = spark.createDataFrame([["On which market is their common stock traded?", "Our common stock is traded on the Nasdaq Global Select Market under the symbol CDNS."]]).toDF("question", "context")
result = pipeline.fit(example).transform(example)
result.select('answer.result').show()
Results
`Nasdaq Global Select Market under the symbol CDNS`
Model Information
Model Name: | finqa_bert |
Compatibility: | Finance NLP 1.0.0+ |
License: | Licensed |
Edition: | Official |
Input Labels: | [document_question, document_context] |
Output Labels: | [answer] |
Language: | en |
Size: | 407.9 MB |
Case sensitive: | true |
Max sentence length: | 512 |
References
Trained on squad-v2, finetuned on proprietary Financial questions and answers.