python - Can a Named Entity Recognition (NER) spaCy model or any code like an entity ruler around it catch my new further date patterns also as DATE entities? - Stack Overflow
[D] Named Entity Recognition (NER) Libraries
python - Person Name Detection using SpaCy in English Lang. Looking for Answer - Stack Overflow
Named Entity Recognition (NER) Libraries
Videos
Factsheet
Hi everyone, I have to cluster a large chunk of textual conversational business data to find relevant topics in it.
Since there is lot of abstract info in every text like phone, url, numbers, email, name, etc., I have done some basic NER using regex and spacy NER to tag such info and make the texts more generic and canonicalized.
But there are some things like product names, raw materials, brand/model, company, etc. which couldn't be tagged. Also, the accuracy of regex and spacy NER isn't high enough.
Can anyone suggest a good python NER library, which is accurate and fast enough, preferably has pre-trained models and can tag diverse fields.
Thanks.
spacy has an label_ called person. you have several options for the model: small, medium or large. large uses more resources to run
def find_persons(text):
# Create Doc object
doc2 = nlp(text)
# Identify the persons
persons = [ent.text for ent in doc2.ents if ent.label_ == 'PERSON']
# Return persons
return persons
Try nltk to find the Nouns and then pattern match the nouns for valid names:
tokenized_sent = nltk.word_tokenize(sentence)
tagged_sent = nltk.pos_tag(tokenized_sent)
nouns
pronouns
adjectives
verbs
NNP - proper noun singular
PRP - proper noun
VB - verb
DT - determinant
NNP - proper noun singular
PRP - proper noun
VB - verb
DT - determinant
This is a typical Named Entity Recognition problem. Spacy has a pre-trained model to enable this, which should be accurate to detect person names.
Take a look at this code sample.
According to Spacy's annotation scheme, names are marked as PERSON.

