Stypox / dicio-android

Dicio assistant app for Android
GNU General Public License v3.0
652 stars 64 forks source link

No follow up conversation in French? #118

Closed Phyks closed 1 year ago

Phyks commented 1 year ago

Hi,

I am trying to get Dicio to call a specific contact in my address book, but cannot get it to do so.

First, it is not picking the correct contact (seems it is matching by last name, while I would expect it to look by first name, since these are more probably spelled correctly by the STT). Additionally, the contact I'm trying to call has a "star" in my addressbook and therefore looks like a better candidate than anyone else.

My conversation with Dicio looks like (in French, I made translations in parenthesis) :

Saying "no" with Dicio in English does work and it then says "ok, i'm not calling anyone". It does not work in French.

Additionally, I did not find how to go on with a different conversation to try calling the next best match in addressbook.

Thanks,

Stypox commented 1 year ago

I think the problem is that "non" does not match the negative sentence here. "Non suffit" would match, for example, while "non" does not at the moment. You could try to edit that file to add a ? on the last OR-word of the sentence, that is in between retour and ;, then it should be able to interpret "non" as a negative response, too.

Phyks commented 1 year ago

If I'm understanding the file syntax correctly, I guess this is a typo of a missing parenthesis. It should read:

util_yes_no: high
[yes] oui|(pour sûr)|certainement|ok|okay|(Vas y)|affirmatif|procéder|continue|absolument|(fais le)|confirmation;
[no] non|stop|nope|arrête|(ça suffit)|assez|négatif|(ne le fais pas)|arrêt|retour;

"ça suffit" is a French expression as a whole (English would be "that's enough"), it should not be considered as two groups of words.

Stypox commented 1 year ago

Oh ok, makes sense. Feel free to open a PR or just create a suggestion in #123

Phyks commented 1 year ago

I can confirm that "Non suffit" works, and that the first part of the issue ("no" not being handled in French) will likely be solved by #123.

However, I still cannot get Dicio to call another contact that the one it is picking by default. My conversation now looks like:

I would have expected Dicio to be able to pick contact by first name (not only by last name) and/or offer alternatives (I have multiple contacts matching the pattern "XXX Morgan", it is however only offering me to call the first one).

Stypox commented 1 year ago

Yeah, the logic had a flaw in case of ties. I pushed a commit fixing this, can you confirm if what I did is correct by testing this APK? app-debug.zip

Phyks commented 1 year ago

It is better but not yet fully working now. It does provide me multiple alternatives although:

Thanks

Stypox commented 1 year ago

I pushed another commit, 67c99563ceada178f9bbf9d92045e5c39b772a87. I hope I have implemented the second part of your suggestion well, see the screenshots. As for the first part, I don't think there is consensus on whether to give more priority to the name rather than the surname, so I'd not make changes for now. Here is a testing APK: app-debug.zip.

image image
Referencing a contact by index in the list Referencing a contact by name
Phyks commented 1 year ago

Thanks a lot for the work on this, this is indeed much better!

Regarding the first part, I understand there might not be consensus on whether first or last name should be prioritized. In my case, however, the filtering seems to be too aggressive.

My addressbook looks like (redacted names / surnames):

With the latest apk-debug.apk from this thread:

I can provide more details privately, with excerpt from the addressbook, if this can be useful.

Also, there might be a consensus to prioritize "Favorite contacts" (the one which are starred in the addressbook)?

Stypox commented 1 year ago

What about this? I made it so that the string matching score only depends on number of matched characters and number of subsequent matched characters, so now "X Morgan" and "YYYYY Morgan" have the same distance to "Morgan". I also made the filtering a bit less aggressive at deciding whether to call one contact right away. app-debug.zip

Phyks commented 1 year ago

Thanks, this works great!