rhasspy / rhasspy-nlu

Natural language understanding library for Rhasspy
MIT License
11 stars 10 forks source link

wrong intent recognition #14

Open Marcin-st opened 3 years ago

Marcin-st commented 3 years ago

[Rules] name = EMMA radio_station = (SMOOTH JAZZ:RMF_SMOOTH_JAZZ| JAZZ:RMF_SMOOTH_JAZZ)

[SWITCH_TO_RADIO]

(PRZEŁĄCZ){item:RADIO_STATION} NA {value} PROSZĘ Sentance: EMMA PRZEŁĄCZ NA SMOOTH JAZZ PROSZĘ Should give "entity": "value", "value": "RMF_SMOOTH_JAZZ" it is giving: "entity": "value", "value": "SMOOTH RMF_SMOOTH_JAZZ"
h4de5 commented 3 years ago

you are replacing SMOOTH JAZZ as well as JAZZ with RMF_SMOOTH_JAZZ in the rules definition.

try:

[Rules]
name = EMMA
radio_station = ((SMOOTH JAZZ):(SMOOTH RMF_SMOOTH_JAZZ)|(JAZZ):(RMF_SMOOTH_JAZZ))