Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reject common phrases like "guten morgen" #729

Open
emlautarom1 opened this issue Jan 26, 2024 · 0 comments
Open

Reject common phrases like "guten morgen" #729

emlautarom1 opened this issue Jan 26, 2024 · 0 comments

Comments

@emlautarom1
Copy link
Contributor

In German, "morgen" is used for "tomorrow" and there is a rule for that:

, ( "tomorrow" , TG.Day , 1, "morgen" )

Unfortunately, this means that phrases like "guten morgen" are interpreted as "tomorrow", despite it being a common phrase that has nothing to do with time. I would like to add some kind of rule that detects this pattern and always rejects it.

My initial attempt used negative lookbehinds like (?<!guten\s+)morgen, but this is not supported by the engine. A second approach was to create a rule that matched on the guten\s+morgen regex and has a production of const Nothing, but this does not work either because the morgen rule gets used instead.

How can I force Duckling to always ignore this phrase?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant