Stypox / dicio-android

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

Automatically acquire synonyms from multiple origins. #142

Closed RokeJulianLockhart closed 1 year ago

RokeJulianLockhart commented 1 year ago

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 https://github.com/Stypox/dicio-android/issues/81 supplements this last point well, although it obviously should be unnecessary if decent origins exist and are chosen.

Stypox commented 1 year ago

I moved your comment in #81 to keep everything in one place

RokeJulianLockhart commented 1 year ago

But this is rather the opposite of that request, @Stypox.

Stypox commented 1 year ago

Yeah but they are both trying to solve the same problem. Issues should be opened on a per-problem basis, not per-solution, otherwise the discussion gets split.