How can I make spaCy case insensitive when finding the entity name?
Is there any code snippet that i should add or something because the questions could mention entities that are not in uppercase?
def analyseQuestion(question):
doc = nlp(question)
entity=doc.ents
return entity
print(analyseQuestion("what is the best seller of Nicholas Sparks "))
print(analyseQuestion("what is the best seller of nicholas sparks "))
which gives
(Nicholas Sparks,)
()
(Nicholas Sparks,)
detected even when the sentence (and the potential entities) are in lowercase. – Elver