I would like to extract bank names from a given text like wells Fargo, chase....is there a python library for this? I know there is entity tagger in space and flair but they only identify the entity (org/person)
As mentioned in the comment you can use regex but you would need to define a set of rules for it. You can try with LexNLP which is trained on legal documents and use it to extract data type like address, companies and persons.
It might be solved with Name Entity Recognition
There you go an example using spacy. I highly recommend you to check its documentation.
The disadvantage of this approach is that it might be computationally expensive and time-consuming
import spacy nlp = spacy.load("en_core_web_sm") doc = nlp("Apple is looking at buying U.K. startup for $1 billion") for ent in doc.ents: print(ent.text, ent.start_char, ent.end_char, ent.label_)