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

English (UK) language not auto-correcting correct spellings #439

Open
Daniel-Myers opened this issue Sep 23, 2021 · 30 comments · May be fixed by #528
Open

English (UK) language not auto-correcting correct spellings #439

Daniel-Myers opened this issue Sep 23, 2021 · 30 comments · May be fixed by #528
Labels
bug Something isn't working

Comments

@Daniel-Myers
Copy link

Daniel-Myers commented Sep 23, 2021

Describe the bug
When selecting the English (UK) language, words are auto-corrected to the American spelling.

To Reproduce
Steps to reproduce the behavior:

  1. Select English (UK) as language
  2. Type "colour" and space
  3. It will auto-correct to "color"

Expected behavior
English (UK) spellings should not be auto-corrected to the American spelling and should remain as entered. Or if misspelled, should auto-correct to the English (UK) spelling.

Smartphones:

  • Device: Xiaomi Mi Mix 3
  • OS: Android 11
    and also,
  • Device: Oneplus 3
  • OS: Android 9
@Daniel-Myers Daniel-Myers added the bug Something isn't working label Sep 23, 2021
@jnnkB
Copy link
Collaborator

jnnkB commented Sep 25, 2021

I've tested this and can confirm this.

@halfurness
Copy link

Also happening for me!

@jnnkB
Copy link
Collaborator

jnnkB commented Oct 2, 2021

I looked in to the dictionary for britisch english and the reason simply seems to be that the frequency for color is set to a higher value:

word=color,f=138,flags=,originalFreq=138
word=colour,f=127,flags=,originalFreq=127

@Wils1907
Copy link

I'm having this problem too. E.g. UK English words with an "s" - e.g. maximise, organise - get changed to the US spelling with a "z".

@jnnkB
Copy link
Collaborator

jnnkB commented Feb 5, 2022

I just checked the lineage os dictionary and the google dictionary and it seems both have the same problem as OpenBoard. (They're probably even using the same dictionary.) And since the source of FrequencyWords, OpenSubtitles doesn't distinguish between en_US and en_GB its not that easy to generate them myself.

@jnnkB jnnkB linked a pull request Feb 6, 2022 that will close this issue
@jnnkB
Copy link
Collaborator

jnnkB commented Feb 6, 2022

After seeing this commit: wordmage@566ad21, I investigated this issue a bit further and it seems that the color/colour issue is a bit different to other auto-correction issues. In the color/colour case the dictionaries in /dictionaries have the same information. But this isn't the case for other words. For example regarding finalized/finalised:
en_US and en only contain finalized while en_GB only contains finalised. Nevertheless auto correction isn't working. This is the case because we only have one dictionary (en) in app/src/main/res/raw. So we could just merge them from that commit but I thought I'd probably be even better add all the new dictionaries in the lineage os commit here: LineageOS/android_vendor_lineage@7036106. So I created PR #528

@Mateus109
Copy link

Bug still outstanding. With language set to UK, autocorrect always suggests the US spelling. (e.g. authorized, color, labor.)

@jnnkB
Copy link
Collaborator

jnnkB commented Mar 1, 2022

@Mateus109 With the current release or did you use the changes in #528?

@artfulrobot
Copy link

I'd be happy to test a beta package but I can't do building from source.

@Mateus109
Copy link

@jnnkB I was using the current F-Droid build but, having manually imported main_en_gb.dict and built OpenBoard from source, this has fixed the problem. I assume main_en_gb.dict will be included in future releases. Now I just need to get a Finnish dictionary added! :)

@jnnkB
Copy link
Collaborator

jnnkB commented Mar 2, 2022

@Mateus109 That sounds good.
@artfulrobot You can download the build of the CI run here: https://github.com/openboard-team/openboard/suites/5194723508/artifacts/176141947

@LinuxOnTheDesktop
Copy link

I'd be happy to test a beta package

That sounds good.

Testing complete?

@artfulrobot
Copy link

artfulrobot commented May 26, 2022

@LinuxOnTheDesktop I was unable to install it (the unsigned apk linked above) on my phone. I confirmed the install and then it just said "App not installed".

@Knusper
Copy link

Knusper commented Jun 29, 2022

I can confirm this issue. Even the suggestions I receive are based on US spelling (I type "autori" and it suggests "authorize")

@artfulrobot
Copy link

@Knusper I think they've fixed it, but it seems they're not publishing releases to fdroid (last one 5 months ago) so you need some clever developer set up to test the newer builds. I assume it takes time to publish releases and the project is short on that.

@drysoupp
Copy link

Still happens as of v1.4.5

@jnnkB
Copy link
Collaborator

jnnkB commented Aug 18, 2022

I created PR #528 for this a while ago that should fix this issue, but it hasn't been merged yet, because, as @MajeurAndroid pointed out on that PR, @dslul doesn't want to include every dictionaries for package size reasons for now. So we'll have to wait for @dslul to merge PR #528 or for PR #569 (currently available only on feature-external-dicts branch) to be included in the next release.

@jnnkB I think @dslul does not want to include every dictionnaries for package size reasons, I'll let him decide wether we merge dict PRs.
IMO a 60Mo package is ok nowadays, but we have to all agree on this.

@techno156
Copy link

This seems to be true for the other English variants as well.

En_AU suffers from the same issue, for example.


^ Would it not be possible to download the dictionary on demand, rather than packaging them all in? (Although, you'd expect that the same dictionaries would have already been loaded into the keyboard).

@jnnkB
Copy link
Collaborator

jnnkB commented Dec 9, 2022

^ Would it not be possible to download the dictionary on demand, rather than packaging them all in? (Although, you'd expect that the same dictionaries would have already been loaded into the keyboard).

There has already been quite a discussion about this in #47. TLDR: The simplest solution would require internet access for the app, which was rejected due to privacy concerns. There are proposals for different methods of importing dictionaries, but none have been implemented so far.

@Helium314
Copy link
Contributor

Loading external dictionaries is possible in the feature-external-dicts branch, but it looks like there was no work / testing done for quite a while now

@unaszplodr
Copy link

It is frankly ridiculous that a keyboard would only include US English because devs refuse to either bundle other dictionaries or provide means of importing others. It's absurd that this issue could remain open for over two years.

@artfulrobot
Copy link

@unaszplodr I feel your frustration, as I'm in UK, but it is worth remembering that the devs here are doing their work for free, and that an app like this is complex and takes a lot of work. I still prefer this keyboard to others that are available, though I'd dearly love to colourise my prose rather than colorize it! But there are, of course, no shortage of keyboard apps that you pay for with your data, or through intrusive ads, and others with different featuresets in the F-droid repos

@HarryHelsing
Copy link

Is there a temporary fix until the fix is implemented?

@Helium314
Copy link
Contributor

If you want to try, you can use https://github.com/Helium314/openboard/releases/tag/v1.4.5_compress
This is the feature-external-dicts branch with fix #578, plus later OpenBoard changes.
Note that if you install this version, you will need to uninstall OpenBoard first, and thus lose your settings. Or use root privileges to backup and restore settings, or install an update without matching keys.

The feature has been quietly sitting around for a year now, not sure why. Latest comment was #569 (comment)

@HarryHelsing
Copy link

So I just tried to install it and the UK dictionary was not preinstalled though there is now the option to add dictionaries. I have looked at https://github.com/openboard-team/openboard/tree/master/app/src/main/res/raw
and I could not find a UK dictionary, is there somewhere else where I could find one? Or will one be needed to be created via the guide in the link below?

https://github.com/remi0s/aosp-dictionary-tools

@unaszplodr
Copy link

@artfulrobot Here's the thing: I can actually select British English in the preferences. If you're going to omit English English, don't pretend it is installed by having it default to US English instead! We're talking about a keyboard application with limited language support and no means of extending it. A keyboard application.

@Helium314 Why on earth that that would sit around unmerged for a year in an active project?! Thanks for your work. My problem is that Openboard came installed with the IodeOS firmware I'm using. I can't revert to an AOSP package that isn't there, so unless I do complete Android builds myself for the sake of a dictionary, I'm locked into a keyboard developed by people who only seem to give a crap about those who speak American English.

@Helium314
Copy link
Contributor

Helium314 commented Mar 3, 2023

You can find some files for https://github.com/remi0s/aosp-dictionary-tools in https://github.com/LineageOS/android_packages_inputmethods_LatinIME/tree/lineage-20.0/dictionaries.

But I remember I had found some already compiled dictionaries somewhere a while ago...

Edit: you can use the one from a PR here: https://github.com/openboard-team/openboard/pull/528/files

@Helium314
Copy link
Contributor

Helium314 commented Mar 3, 2023

@unaszplodr I tried to change the package name, so it could be installed along normal OpenBoard, but still it didn't work... looks like further changes are required. If you have root privileges (or access to system folder from TWRP), you could remove the openboard APK, which should allow you to install the changed version. But I never tried this, and in worst case it might break your system so you'd need to re-flash the OS.
If you try it, definitley do a full system backup before.

Why on earth that that would sit around unmerged for a year in an active project?

Properly reviewing these changes takes some time, as no one wants a buggy keyboard. And it looks like the devs can't or don't want to spend a lot of time working on OpenBoard.

@HarryHelsing
Copy link

@Helium314
With this version
https://github.com/Helium314/openboard/releases/tag/v1.4.5_compress
and a dictionary from
https://github.com/openboard-team/openboard/pull/528/files
it has solved my problem. I wanted to way thanks and leave a solution for anyone who looks through this thread in one comment.
Thanks Helium!

@unaszplodr
Copy link

unaszplodr commented Mar 4, 2023

@Helium314 Altering the manifest didn't work? Oh well, worth a try. Thanks. Yeah, I guess I could switch the packages via the superuser, but I rather suspect it will break OTA updates. I'm probably going to end up having to do full builds myself... And here I was thinking I'd finally found a distribution I wouldn't have to mess about with.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.