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

Feature request: Custom Synonyms for App names and Places #81

Open
stefangrotz opened this issue May 18, 2022 · 4 comments
Open

Feature request: Custom Synonyms for App names and Places #81

stefangrotz opened this issue May 18, 2022 · 4 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@stefangrotz
Copy link
Contributor

stefangrotz commented May 18, 2022

Many non-english models have problems with opening apps that have a english name, because the name does not appear in the Vosk dictionary. Also, a lot of places and cities are not recognized correctly by the models. A relatively easy workaround would be a feature that makes it possible to define synonyms for App names. This could also be useful for English speakers who have problems remembering some App names or for unknown Names that are not part of the Vosk dictionary.

Some examples:

  • Semantic synonymes: Whatsapp -> Text Messenger
  • Adding wrong transcriptions that often happen: WhatsApp -> what's app, Wort Sepp (German),...
  • Switching the Alphabet: WhatsApp -> WхатсАпп

I don't think that a predefined list of Synonyms should be part of the App, just a list that every user can define for themselves.

What do you think?

@stefangrotz stefangrotz changed the title Feature request: Synonyms for App names Feature request: Custom Synonyms for App names and Places May 19, 2022
@Stypox
Copy link
Owner

Stypox commented May 22, 2022

There has already been some discussion about this in #10 (comment). But thank you for opening a new issue, I will point to it there. I agree this should be done :-)

If anyone wants to solve this issue, they can refer to #10 (comment) for some information.

@Stypox
Copy link
Owner

Stypox commented Jan 11, 2023

Comment by @RokeJulianLockhart in #142:

To verbally initialize applications, obviously, Dicio must convert whatever weirdness that the human states into the identifier of the application.

Currently, the best method appears to be to match the word to a database of synonyms when Dicio recognizes that the command is a command to invoke an application, after which those synonyms are matched to the human names of the correct application in a list of installed applications.

However, I want to suggest some important details of implementation: I want Dicio to be able to match package names. This means that if I state "[wake word], invoke/launch/initialize com.styxpox.dicio", it should recognize the application. This may appear obvious, but it does not work with some assistants.

Additionally, the database of synonyms should be automatically acquired, because manual maintenance is insane. More specifically, this means that the terminology should be acquired from an external origin and cached for offline usage.

To achieve this, the 1st few results of https://github.com/topics/synonyms?l=python&o=desc&s=updated appear promising, because when https://github.com/agmmnn/syn is queried for “telephone”, it provides:

~ $ syn phone
┌──────────────────────────────────────────────────────┐
│ ❯ telephone (verb)                                   │
├──────────────────────────────────────────────────────┤
│ 🔵synonyms: call up, contact, dial, buzz, call,      │
│ ring, get back to, get on the horn, get on the line, │
│ get someone on the horn, give a call, give a jingle, │
│ give a ring, make a call, pick up, put a call        │
│ through, ring up, touch base with                    │
└──────────────────────────────────────────────────────┘
                                          thesaurus.com↗
~ $ syn telephone
┌──────────────────────────────────────────────────────┐
│ ❯ communicate through telephone system (verb)        │
├──────────────────────────────────────────────────────┤
│ 🔵synonyms: call up, contact, dial, phone, buzz,     │
│ call, ring, get back to, get on the horn, get on the │
│ line, give a call, give a jingle, give a ring, make  │
│ a call, pick up, put a call through, ring up, touch  │
│ base with                                            │
└──────────────────────────────────────────────────────┘
                                          thesaurus.com↗
~ $

I believe that #81 supplements this last point well, although it obviously should be unnecessary if decent origins exist and are chosen.

@Stypox
Copy link
Owner

Stypox commented Jan 11, 2023

At the moment the open skill just takes the name of the application pronounced by the user and finds the closest match within the installed apps according to a custom string distance metric based on Levenshtein.

I agree that maintaining a list of synonyms would be insane, but I don't think what we are looking for are really synonyms, but rather aliases. As explained in #81, whatsapp might be pronounced as what's app, Wort Sepp (German), messenger... whatsapp is not really a word, and it does not have real synonyms. Also, we need to map to "Whatsapp" even things that have nothing to do with it except for a similar sound (e.g. what's app). So I don't think there is a valid database we could query synonyms from.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants
@stefangrotz @Stypox and others