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

[FI] Areas rework part 1 of many #2501

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

salleq
Copy link
Contributor

@salleq salleq commented Nov 11, 2024

  • Added conjugations for areas

  • simplified home_assistant_HassTurnOn

  • made some other changes to common and fixtures

@Arkkimaagi
Copy link
Contributor

I've been thinking this approach. I think it's quite problematic and we need to consider it more.

You've added support for two special rooms, ullakko and eteinen, but what if the people have "kura-eteinen" or something similar? I mean, we really can not anticipate all the rooms and names people give to their areas.

@v1k70rk4
Copy link
Member

v1k70rk4 commented Nov 17, 2024

Hi, since we’re part of the same language family, I ran a test, and as I see, it works in Finnish too :)

In Hungarian, there are some words where the root changes, so I added "filler words" after the area. For example: room, space, and it works.

So, for cases where the word cannot be conjugated, you can still use these. In your case, it might look something like this: Sytytä ullakko huoneen lamppu. Of course, words that can be conjugated without altering the root can still be supported.

This is precisely why I suggested creating a guide in everyone’s native language to explain usage. But until we can modify word roots, I’ve been solving it in Hungarian in this way.

Consider whether this works in all special cases.

example from Hungarian:

  area: "[a |az ]{area}[<area_suffixes>|<area_words>]"
  area_suffixes : "(b(a|e)[n]|(o|e|ö)n|t|i)"
  area_words: "([ ](szob(a|á)[ba[n]|t|i]|hely[i]ség[be[n]|en|et]))"

@Arkkimaagi
Copy link
Contributor

Yep, that's the option salleq is changing with this pr away from.

And the words fo not behave nicely, for eteinen, the extra word does not work as well.

It's also kinda difficult to remember what filler words to add.

@salleq
Copy link
Contributor Author

salleq commented Nov 18, 2024

This PR adds the option for conjugated room names, I'm not taking away the possibility to say "laita huoneen olohuone valo päälle" ("put the light on in the room living room"). You can see that I have added some tests, but not removed any.

We can't possibly take into account every room name there is (like "kura-eteinen") and what people will use, but the most common ones we can + some rooms that aren't conjugated nicely (ullakko and eteinen for example).

I don't see how this could be better implemented unless we get Arkkimaagi's lemmatization idea go through or something similar.

It's more for us to maintain (having both conjugations and area {area} ) but I can't agree on talking to the voice assistant using filler words, it's not natural.

@v1k70rk4
Copy link
Member

In Hungarian, there’s just one word type that’s extremely frustrating in room names. I try to avoid it in every possible way, but if it’s entered, there’s nothing I can do about it. :(

That’s why a language tutorial would be helpful. To use the Voice Assistant, unless everything is set up very precisely according to all the rules (switches, names, aliases), modifications are needed.

For example, it would be ideal (for the Hungarian language) if the last character of room names could be trimmed off :) and only match up to the n-1 characters. Although, as I see, for Finnish, n-2 would be needed.

e.g.: Konyh* = Konyha, Konyhában, Konyhai, Konyhát, etc...

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