This is great suggestion. If I go with this approach, do I need to run spacy model and find the entities? May be build a pipeline to run Rasa NLU intent extraction and Spacy to merge the results?
Is there a way, I can tell the Rasa NLU pipeline to use spacy models and give me the expected SLOT value? Please clarify.
Yes you can do that. First add ner_spacy to your pipeline in your config file.
Then declare CARDINAL as a slot in the domain and then provide a few examples in the nlu this way I am looking for [two](CARDINAL) pizzas.
Hi, thank you for your reply. I have been trying your solution. But results are not consistent.
Here is my NLU data
- I have around [six](CARDINAL) years of experience on java development.
- I have around [two](CARDINAL) years of experience on java development.
- I have around [three](CARDINAL) years of experience on SAP development.
- I have around [four](CARDINAL) years of experience as business analyst.
in actions.py , have code as
cardinal_Val = next(tracker.get_latest_entity_values('CARDINAL'), None)
print("cardinal_Val entity value -->", cardinal_Val)
if tracker.get_slot('CARDINAL') is not None:
input_data["CARDINAL"] = tracker.get_slot('CARDINAL')
All the times Iâm not getting slot value.
Some times its coming as entity as pure number and other times its coming as number text.
Few times Iâm not getting any value at all even though I trained the same number
Output:
cardinal_Val entity value --> 7
cardinal_Val entity value --> two
Can you please suggest me what could have gone wrong ??
## intent:about_exp1
- I have around [8](CARDINAL) years of experience on web development.
- i have [16](CARDINAL) years experience in [html](technology),[css](technology), and [javascript](technology),and [jquery](technology)
- i worked for [10](CARDINAL) plus years
- Have been working around [20](CARDINAL) plus years in technology
- in last [5](CARDINAL) years worked in [html](technology),[css](technology), and [javascript](technology),and [jquery](technology)
- I started my career with [compindia](company)
- I worked in [IBM](company)
- I worked in [Apple](company)
- worked for [facebook](company)
- worked in [tirupati](location)
- I have I had started as a [php developer](skill) initially
- I worked there for [two](CARDINAL) years,so ahhh
- worked on [web technologies](skill) like [html](technology),[css](technology), and [javascript](technology),and [jquery](technology) library and also worked on [php frameworks](technology) like [Mojavi](technology) and [Codeigniter](technology)
- have been working for [ten](CARDINAL)
- have been working for [10](CARDINAL)
- have been working for [ten](CARDINAL)
- I was working for [ten](CARDINAL) years
- worked for [fifteen](CARDINAL) years
- I have around [seven](CARDINAL) years of experience on web development.
- I have around [six](CARDINAL) years of experience on java development.
- I have around [two](CARDINAL) years of experience on java development.
- I have around [three](CARDINAL) years of experience on SAP development.
- I have around [four](CARDINAL) years of experience as business analyst.
I would suggest using ner_duckling_http for this as it would extract numbers in a text and numeric format and return both as numbers. I can see you have ner_duckling_http in your pipeline already - thatâs great. Are you including number as entity into your domain?
Thank you Juste for your quick response. Appreciate your support on this. I changed the pipeline for number as seen below
## intent:about_exp1
- I have around [8](number) years of experience on web development.
- i have [16](number) years experience in [html](technology),[css](technology), and [javascript](technology),and [jquery](technology)
- i worked for [10](number) plus years
- Have been working around [20](number) plus years in technology
- in last [5](number) years worked in [html](technology),[css](technology), and [javascript](technology),and [jquery](technology)
- I started my career with [compindia](company)
- I worked in [IBM](company)
- I worked in [Apple](company)
- worked for [facebook](company)
- worked in [tirupati](location)
- I have I had started as a [php developer](skill) initially
- I worked there for [two](number) years,so ahhh
- worked on [web technologies](skill) like [html](technology),[css](technology), and [javascript](technology),and [jquery](technology) library and also worked on [php frameworks](technology) like [Mojavi](technology) and [Codeigniter](technology)
- have been working for [ten](number)
- have been working for [10](number)
- have been working for [ten](number)
- I was working for [ten](number) years
- worked for [fifteen](number) years
- I have around [seven](number) years of experience on web development.
- I have around [six](number) years of experience on java development.
- I have around [two](number) years of experience on java development.
- I have around [three](number) years of experience on SAP development.
- I have around [four](number) years of experience as business analyst.
still getting same response(s) as show belowâŚ
number entity value --> 7
number entity value --> two
When using duckling you donât really have to label the numbers in your sentences. After looking more closely in you pipeline I have noticed that you are using two ner components (ner_crf and ner_spacy). Is there a specific reason for that?
I have run an example on my machine and I can see that you should get the output similar to this:
Take a look at the component which was extracted with âner_dcukling_httpâ extractor - I think it give the result you are looking for (entity is ânumberâ, âtextâ is five, but the value is â5â)
@Juste Srikarâs point about Spacy seems to imply that ner_spacy exposes the regular Spacy NER types it is trained on. Is that correct? Or is it only working because of using a training example of âCARDINALâ?