Closed Bug 850256 Opened 12 years ago Closed 11 years ago

Add text prediction to Polish keyboard layout

Categories

(Firefox OS Graveyard :: Gaia::Keyboard, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(blocking-b2g:tef+, b2g18 verified, b2g18-v1.0.1 verified)

VERIFIED FIXED
blocking-b2g tef+
Tracking Status
b2g18 --- verified
b2g18-v1.0.1 --- verified

People

(Reporter: stas, Assigned: stas)

References

Details

(Keywords: l12y)

Attachments

(2 files)

In bug 849226 we're enabling the Polish keyboard layout.

We don't have text prediction on for it right now, but I wonder if we could use the ranked dictionary from Android:

https://android.googlesource.com/platform/packages/inputmethods/LatinIME/+/master/dictionaries/pl_wordlist.xml.gz

..unzip it and put here to turn it on?

https://github.com/mozilla-b2g/gaia/tree/master/dictionaries
Rudy, is this how I'm supposed to do it?
Attachment #724012 - Flags: feedback?(rlu)
(I based this patch on the work from bug 849226.)
(In reply to Staś Małolepszy :stas from comment #1)
> Created attachment 724012 [details]
> Add Polish prediction (not a pull request yet)
> 
> Rudy, is this how I'm supposed to do it?

Yes, that is what we need to do, AFAIK.
However, I am sure where we got those xx_wordlist.xml from?
If there any license issue here?

I'll ping Christoph on this.
Flags: needinfo?(mozilla)
That is correct, take the *.xml from Android, add it to:
https://github.com/mozilla-b2g/gaia/tree/master/dictionaries

create a new *.dict file using 'xml2dict.py' in 
https://github.com/mozilla-b2g/gaia/tree/master/apps/keyboard/js/imes/latin/dictionaries

Currently, our system only supports predictions for: de, en_us, es, fr, pt_br.

Before creating the new *.dict, please wait till:
https://github.com/mozilla-b2g/gaia/pull/8605
is landed (should happen in the next couple days), because the encoding of dictionaries has changed.
Flags: needinfo?(mozilla)
OS: Linux → Gonk (Firefox OS)
Hardware: x86_64 → ARM
(In reply to Christoph Kerschbaumer from comment #4)
> That is correct, take the *.xml from Android, add it to:
> https://github.com/mozilla-b2g/gaia/tree/master/dictionaries
> 
> create a new *.dict file using 'xml2dict.py' in 
> https://github.com/mozilla-b2g/gaia/tree/master/apps/keyboard/js/imes/latin/
> dictionaries

That's what I did, thanks for confirming.

> 
> Currently, our system only supports predictions for: de, en_us, es, fr,
> pt_br.

I added pl.dict to the Makefile so it's generated with other dictionaries.


> Before creating the new *.dict, please wait till:
> https://github.com/mozilla-b2g/gaia/pull/8605
> is landed (should happen in the next couple days), because the encoding of
> dictionaries has changed.

Is there a bug for this so I can set a dependency?
> > Before creating the new *.dict, please wait till:
> > https://github.com/mozilla-b2g/gaia/pull/8605
> > is landed (should happen in the next couple days), because the encoding of
> > dictionaries has changed.
> 
> Is there a bug for this so I can set a dependency?

Should be Bug 838227.
Depends on: 838227
The patch already landed:

https://bugzilla.mozilla.org/show_bug.cgi?id=838227

you are good to go!
Depends on: 851314
Attached file Pull request (deleted) —
I updated pl.dict with the new encoding engine from bug 838227.
Attachment #725486 - Flags: review?(rlu)
(re: shira?, this bug currently depends on two bugs that have not landed on v1.0.1 and I don't think we want to risk uplifting them at this point.  Can this bug be fixed without those two bugs?)
Comment on attachment 725486 [details]
Pull request

Looks good.

Please help to make sure the commits will be squashed.
Thanks for your work.
Attachment #725486 - Flags: review?(rlu) → review+
shira? -> tef?
blocking-b2g: shira? → tef?
(In reply to Michael Vines [:m1] [:evilmachines] from comment #9)
> (re: shira?, this bug currently depends on two bugs that have not landed on
> v1.0.1 and I don't think we want to risk uplifting them at this point.  Can
> this bug be fixed without those two bugs?)

I can create a patch using the dict format from before bug 838227 landed on master.  This patch will be good to land on v1.0.1.
I think this not my call, but I think this should be a blocker
Flags: needinfo?(mvines)
I have a patch which is the same as the one for master reviewed by Rudy, except that the pl.dict file has been created by the old dict encoder.  I can land this on v1.0.1 when I get an approval.

For master I'll land the full patch.  For v1-train, I need to wait for the decision about bug 838227 and see if it gets uplifted.
(I agree that this should likely be a blocker, but I'm out of the tef+ biz so we need a call from downstream partners now for v1.0.1)
Flags: needinfo?(mvines) → needinfo?
Flags: needinfo? → needinfo?(ffos-product)
Flags: needinfo?(ffos-product) → needinfo?(kev)
We obviously can't ship without this.
blocking-b2g: tef? → tef+
Flags: needinfo?(kev)
You're OK to land now that you have tef+ Stas.
Assignee: nobody → stas
What's the status here?  Ready to land?
Just realized that we slightly changed the xml2dict so that dictionaries also include one characters words like 'a', 'i', etc. in english. I don't know how important that is for polish - but you might consider recompiling the *.dict file.

See bug: https://bugzilla.mozilla.org/show_bug.cgi?id=857239
(In reply to Andrew Overholt [:overholt] from comment #18)
> What's the status here?  Ready to land?

I'll recompile pl.dict as per comment 19 and land on v1.0.1 tomorrow.  Sorry, I was busy at a l10n sprint during past few days.

For master and v1-train, it looks like I should compile pl.dict using these branches' xml2dict which has fixes from bug 838227 and bug 851314.
"Can you please provide steps to verify this fix - as we will blackbox test from the UI?"
(In reply to Jeni from comment #23)
> "Can you please provide steps to verify this fix - as we will blackbox test
> from the UI?"

In Settings > Language, switch the current language to Polish.
In Settings > Keyboard, turn Word Suggestion on.

Launch the SMS app and create a new text message.  Tap on the content area, the keyboard should appear.

  1. The keyboard should have the suggestion bar visible above it.

When you start typing in the message, the suggestion bar should show Polish words as suggestions.  The exact word may vary depending on the branch and probably other factors.  What would be the best way of testing this?
Verified fixed on 

Unagi Build ID: 20130411070205
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18_v1_0_1/rev/f83d169babee
Gaia: 81cab0e96c0064b03db46a5248047fed617c2f26

and on 

Unagi Build ID: 20130411070205
Kernel Date: Dec 5
Gecko: http://hg.mozilla.org/releases/mozilla-b2g18/rev/f671fa539473
Gaia: e7e338a765e22334b40ced41489a785941382c66

Per comment 11 you now are able to see the suggested Polish words when typing a message.
Status: RESOLVED → VERIFIED
Do you think it is a good idea to turn this on by default in Polish build?
We are about to change the encoding of the dictionary again - please follow:
https://bugzilla.mozilla.org/show_bug.cgi?id=860624
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: