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

Improve expansion rules for french intents #1819

Merged
merged 4 commits into from
Dec 21, 2023
Merged

Conversation

piitaya
Copy link
Member

@piitaya piitaya commented Dec 21, 2023

Co-worked with @jlpouffier to improve expansions rules

1. Remove variable names from every expansion rules to have better readability of each sentence

Before

sentences: 
  - allume la lumière dans <area>

Area variable is hidden in the expansion rule
After

sentences: 
  - allume la lumière dans [<le>]{area}

Area variable is now explicit in the sentence

2. Remove the fully optional expansion rules, so that we have more flexibility and readability

Before

sentences: 
  - allume la lumière dans <le>{area}

We don't know that "le" is optional because it's hidden in the expansion rule

After

sentences: 
  - allume la lumière dans [<le>]{area}

We know that "le" is optional because it's explicit in the sentence

3. Disambiguate words with accent

Before

expansion_rules:
  fenetre: "(fen(e|ê)tre[s]|baie[s]|v(e|é)lux|lucarne[s])"

After

expansion_rules:
  fenetre: "(fenetre[s]|fenêtre[s]|baie[s]|velux|vélux|lucarne[s])"

@piitaya piitaya marked this pull request as ready for review December 21, 2023 11:30
@jlpouffier
Copy link
Contributor

👍🏻

@flexy2dd flexy2dd merged commit 2381a44 into main Dec 21, 2023
2 checks passed
@flexy2dd flexy2dd deleted the expansion_rules_variables branch December 21, 2023 14:56
schizza pushed a commit to schizza/intents that referenced this pull request Mar 16, 2024
* Remove variable from brightness expansion rule
* Remove variable from temperature expansion rule
* Remove area and name expansion rule
* Disambiguate words with accent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants