Hi,
I am looking for a way to identify entity based on one keyword. This keyword could be either text or numeric or aplhanumeric. How can i define my entity so that it could extract that value.
Thanks,
Dheeraj
Hi @dheeraj.k,
We infer from your post that you would like to extract the entity value from the user utterance.
You can use NER tagging while defining ML utterances for that dialog task.
Please refer to the following document for further information on NER tagging:
https://developer.kore.ai/docs/bots/nlp/user-utterances/#Exporting_and_Importing_Machine_Learning_Utterances
https://developer.kore.ai/docs/bots/nlp/user-utterances/#Named_Entity_Recognition
Let us know if your requirement is other than above.
Regards,
Yoga Ramya
If the domain of keywords is known then you can use either a List of Items entity or a Custom entity with a concept.
The latter option is perhaps not well known but it is possible for the “regex expression” to actually be the name of a concept. The entity will then find and extract any word that is in that concept. The difference to a List of Items is that there is no subsequent mapping of keyword synonym to a (internal) value.
Hi Andy,
Not sure if list of items entity will be a fit in this requirement. Do you have any document/tutorial for custom entity with a concept?
Also, if i have a sentence which contains 2 keywords which i want to extract using entities. How can i do it using NLP?
Sentence criteria:
- keyword 1 : could be alpha/numeric/alphanumeric
- keyword 2 : will be numeric
- no ordering of these keywords in a sentence.
Thanks,
Dheeraj
Hi Yoga Ramya,
I didn’t see any named entity which can extract value (alpha/numeric/alphanumeric). It is possible only through regex based entity or is thr any other way to extract such values?
Also, if i have a sentence which contains 2 keywords which i want to extract using entities. How can i do it using NLP?
Sentence criteria:
- keyword 1 : could be alpha/numeric/alphanumeric
- keyword 2 : will be numeric
- no ordering of these keywords in a sentence.
Thanks,
Dheeraj
If the value that you want to extract is a combination of alphas and/or numerics, is an infinite set of values and the applicable set in this context cannot be predetermined and the value could be said on the initial utterance (i.e. no explicit prompt) the need to a regex in a Custom entity.
If you were prompting then you could use a string entity, but beware that string entities are greedy and unruly, they don’t care what they extract so always possible to extract too much, too little or the wrong thing. Also string entities will not extract anything from the initial utterance unless you use entity patterns.
If the set of possible values is static and known, e.g. product names, then you can put them into a concept and use that concept name as the expression in a Custom entity.
If the set of possible values is dynamic, but there are only a certain set applicable to a user at that point in time, e.g. current open tickets, then you can use a service to get the data and use it in a dynamic enumerated List of Items entity.
Thanks Andy. I will try this out.