bartekplus / FluentTyper

FluentTyper auto completes while you typing. FluentTyper attempts to improve the ease and speed of textual input by predicting words.
Other
32 stars 7 forks source link

Automatically detecting language is only partially functional. #89

Closed gotonickpappas closed 7 months ago

gotonickpappas commented 8 months ago

The auto detection sometimes works but most of the time it does not. I was not able to understand why sometimes it does work... I am attaching some pics that illustrate the issue. Basically, if you are typing in English and you switch to Greek (whether that is in the middle of a sentence or you start a new sentence) then if you are using space for filling suggestions, it results in a bunch of Α Α Α Α, (Αλφά) if you had started with Greek and switched to English, or a bunch of W W W W if you had started typing in English and you switched to Greek.

Often the entire thing stops working for reasons that I could not firmly establish. Reloading a page seems to resolve the issue. If you start with English this happens if you switch to Greek: Screenshot 2024-02-18 110750

If you start with Greek this is what happens if you switch to English: Screenshot 2024-02-18 111450

When sometimes the entire thing stops working:

image

After you reload the page: Screenshot 2024-02-18 112158

bartekplus commented 8 months ago

The language detection works in the following way:

Switching language mid-sentence is not well supported by the API (e.g., if the API suggests with 90% probability that the language is English and with 20% it's Greek, the extension will use the most probable option, which aligns with what 99% of users would expect). In the past, I experimented with limiting the text passed to the API to switch earlier, but the results were not very stable and not predictable(much worse then it is now ).

Therefore, unless language detection improves in browsers, I do not plan to implement language detection in the extension itself.

Regarding the issue where FF stops working, please open a separate issue for it with clear steps to reproduce