tuskyapp / Tusky

An Android client for the microblogging server Mastodon
https://tusky.app
GNU General Public License v3.0
2.45k stars 387 forks source link

Feature request: Language detection for smart language presets #2827

Open novoid opened 1 year ago

novoid commented 1 year ago

2459 introduces a language select button/dropdown (haven't seen it yet).

I write in German and English. At least in my case, it would be possible to determine the language of the current message by searching for stopwords like "der", "die", "das" (Artikel), and so forth and switching to the associated language. I have implemented such a feature in lazyblorg which works perfectly fine for my blog articles. They do have more words than typical Mastodon messages which might be an issue.

The tedious and error-prone task of manually selecting the correct language for multi-language users might be improved by (a) either a built-in dictionary with stopwords of various languages or (b) by allowing the user to define a short list of words that automatically switch the default language of the current message to the assigned language. This can be overridden by the user before sending the message.

qgustavor commented 1 year ago

One small idea: people say "Don't Reinvent the Wheel", well, there is already a lot of libraries focused on detecting languages, like this one, which project page includes comparisons of it with another libraries.

guerda commented 6 months ago

I would like that feature as well. I think the footprint of such a detection is very low, as only a few words are enough to be quite accurate.

What is more difficult is the UX: how and when should Tusky change the post language? During typing? Before posting?

I would suggest that at least an indication is shown that Tusky changed the post language based on the text. Otherwise it might be confusing or difficult to spot false positives.

Jasdemi commented 1 month ago

As a fellow user with 2 languages, I would really like this feature. This is how Bluesky is doing it and it also works pretty good: bafkreia3pkycb6fzllp6rqh4qb4uoaqhrwtvxfhgdtcedobshrypoxbfzy