0

I would like Dialogflow to detect a in a sentence and give it a number = 1.

Example: I would like to have a chicken rice.

Dialogflow should detect as:

'a' = @sys.number, Resolved value : one or 1

"chicken rice" = @delivery-product, resolved value : chicken rice

I already have an entity to detect the product, a intent to detect single order or multiple order,

i.e. "I want 2 chicken rice and 2 coffee" . this would return me both numbers and products.

However I just can't get Dialogflow to detect: I want a coffee I want 2 chicken rice and a coffee.

Anyone have any recommendation to tackle this issue?

Thank you!

Milad Bahmanabadi
  • 946
  • 11
  • 27
Cybertaxi
  • 3
  • 1
  • Have you tried creating a seperate entity for recognizing 'a' and mapping it to 1 by using synonyms? If you have an entity with value 1 and 'a' as a synonym. I think it could recognize it. – Jordi Aug 05 '19 at 07:27
  • @Jordi Hi thanks for the suggestion, but this still did not solve my issue. I would need to extract the value and use in fulfillment. However I have solve the issue by creating a developer enum. – Cybertaxi Aug 07 '19 at 02:08

1 Answers1

1

Create a new custom entity with the synonym of "1" as "a" and then add that custom entity in a new custom entity with "@sys.number". Do not add synonyms for this entity. Use the second custom entity in your intent training phrases. custom-entity custom-number intent

Satish Pandey
  • 335
  • 2
  • 8