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

Case-folding ß becomes ss #37

Open
synesthesiam opened this issue Mar 6, 2023 · 2 comments
Open

Case-folding ß becomes ss #37

synesthesiam opened this issue Mar 6, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@synesthesiam
Copy link
Contributor

Issue for home-assistant/intents#1133

Hassil normalizes text before matching with casefold, but this will expand "ß" to "ss" in German.

A copy of the original text should be kept, and some method for tracking the correspondence between the original and normalized texts is needed.

@mib1185
Copy link

mib1185 commented Mar 6, 2023

it seems that only the response text is normlized, because the slot.name is correct 🤔

$ python3 -m script.intentfest parse --language de --sentence 'wie ist die Außentemperatur?'
{
  "text": "wie ist die Außentemperatur?",
  "match": true,
  "intent": "HassGetState",
  "slots": {
    "name": "Außentemperatur"
  },
  "context": {
    "domain": "sensor",
    "unit_of_measurement": "°C"
  },
  "response_key": "einzeln",
  "response": "Aussentemperatur ist 21 °C"
}

@mib1185
Copy link

mib1185 commented Mar 6, 2023

or is the slot.name evaluated before any matching occur?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants