Description
This is an Entity Resolution / Entity Linking model, which is able to provide Company Names given their Ticker / Trading Symbols. You can use any NER which extracts Tickersto then send the output to this Entity Linking model and get the Company Name.
Predicted Entities
How to use
documentAssembler = nlp.DocumentAssembler()\
.setInputCol("text")\
.setOutputCol("ner_chunk")
embeddings = nlp.UniversalSentenceEncoder.pretrained("tfhub_use", "en") \
.setInputCols("ner_chunk") \
.setOutputCol("sentence_embeddings")
resolver = finance.SentenceEntityResolverModel.pretrained("finel_tickers2names", "en", "finance/models") \
.setInputCols(["ner_chunk", "sentence_embeddings"]) \
.setOutputCol("name")\
.setDistanceFunction("EUCLIDEAN")
pipelineModel = nlp.Pipeline(
stages = [
documentAssembler,
embeddings,
resolver])
lp = LightPipeline(pipelineModel)
lp.fullAnnotate("unit")
Results
+-------+--------------------+-----------------------------------------------------------------+----------------------------------------------------------------+---------------------------+
| chunk| code | all_codes| resolutions | all_distances|
+-------+--------------------+-----------------------------------------------------------------+----------------------------------------------------------------+---------------------------+
| unit | UNITI GROUP INC. | [UNITI GROUP INC., Uniti Group INC. , Uniti Group Incorporated] |[UNITI GROUP INC., Uniti Group INC. , Uniti Group Incorporated] | [0.0000, 0.0000, 0.0000] |
+-------+--------------------+-----------------------------------------------------------------+----------------------------------------------------------------+---------------------------+
Model Information
Model Name: | finel_tickers2names |
Type: | finance |
Compatibility: | Finance NLP 1.0.0+ |
License: | Licensed |
Edition: | Official |
Input Labels: | [sentence_embeddings] |
Output Labels: | [org_company_name] |
Language: | en |
Size: | 8.5 MB |
Case sensitive: | false |
References
https://data.world/johnsnowlabs/list-of-companies-in-nasdaq-exchanges