0
$\begingroup$

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)

$\endgroup$
1
  • 2
    $\begingroup$ Have you tried creating a list of bank names and using the regex python module to extract the bank names from the text $\endgroup$ – Anoop A Nair Dec 14 '20 at 14:47
1
$\begingroup$

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.

$\endgroup$
0
$\begingroup$

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_)

enter image description here

$\endgroup$
1
  • $\begingroup$ I tried lg model as well. Too many false positives. Try this give Xxxx xxx, this will be classified as person. Not sure what exactly the algo logic is $\endgroup$ – Quantum Dreamer Dec 16 '20 at 15:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.