What if I have some unusual names then? I made a .txt file and added lot of names in that and linked a lookup table in nlu data. Seemed to be working but is this a good way of doing it? I also want to add respective Id with the names. What kind of format we can add in lookup table file?
Can we link other type of files in lookup table like excel or maybe something else?
Yes, lookup table is another option. It works well if you have unusual names. Names are difficult to extract in general so look-up table is a good way to do that.
Look up tables can only be in form of list in the code or new line seperated .txt files. I don’t think adding the ID here would work.
So I have to use associated Id for the name as when a user says “How is John doing” I need to call multiple API’s to get information on John.
So when NLU detects John as a named entity then I need to pass a user_id to my database server (basically pass user_id as a parameter in API call) where i get a json response of data on john! So how can I map an id to a name! Do you have any idea for this?
Maybe you could use store the names and corresponding IDs in a database and once you extract the name, use it to get the ID and in-turn use that for your API calls?
Use the approach described here Providing conversation context to the NLU using microervices
For our NLU model for the name microservice we used NER_Spacy and NER_CRF and the combination worked for all the cases with pretty basic nlu training data. Spacy would sometimes understand things as ORG and such instead of PERSON, but since we knew from the context of the conversation (that’s the whole point of using microservices) that we’re dealing with a user giving us a name, we could just ignore Spacy’s entity definition and use whatever entity value it gave, regardless of whether Spacy thought it was PERSON or ORG or ENTITY.
Hope this helps.