Repeated capitalization should be learned
When we are repeatedly typing certain words with first letter capital or all caps, regardless of their position in the sentence, it should be learned by the keyboard. Especially, with contact names and certain nouns. Otherwise we need to capitalize these words every time.
Discussion
Sign in to comment or vote.
@ilikered this is in the next build (407). the keyboard now watches how you type a word in the middle of a sentence. type a name like Peter with a capital a few times and it starts capitalizing it for you, even when you type it lowercase. it only looks at capitals mid-sentence, not at the start of a sentence, so those don't teach it anything.
if it gets one wrong, hit backspace right after and it takes the hint. a couple of those and it drops the word for good. there's also a switch for it in settings (Learn word capitalization) if you'd rather leave it off.
thanks for the suggestion.
This could be interesting for the German case of nominalisation as well, that I am still keeping in my backpocket for future improvement suggestions.
How does this work, if some words are sometimes typed lowercase and sometimes uppercase?
Are lowercase occurances of what I type just ignored for the learning of uppercase corrections? Or do lowercase and uppercase occurrences compete against each other based on the frequency they are encountered?
@muleluku they compete by frequency, lowercase isn't ignored. every time you type the word in the middle of a sentence it counts, whether you cap it or not. i only start auto-capitalizing once the capital clearly wins, roughly when you've capitalized it a couple times more often than you've typed it lowercase. so a word you write both ways stays as you type it.
if it ever caps one you didn't want, backspace right after pulls it back and counts against the capital, so mixed habits sort themselves out.
german nominalisation is a different beast. that's grammar (capitals after der/die/das and friends), not "you keep writing this one word with a capital", so this won't cover it. still on my list separately.
Yes, but that's good news, still. That means that when I occasionally capitalize nominalized words myself, they won't just suddenly trump the lowercase dictionary entry version of the word, which is used much more frequently in lowercase.
Been testing this with my home town Dunfermline and can’t seem to get it to stick even when I use it in the middle of a sentence.
@Unmutual the bar was too high for that. it needed the capitalized version three times mid-sentence, and the first word of a sentence doesn't count (that capital is just auto-shift), so "Dunfermline Dunfermline Dunfermline" really only logged one or two. lowered it to two for names that aren't dictionary words, next build (408), so a place name like Dunfermline sticks faster.
I must have typed EFKey a lot already. Doesn't come up with that casing though.
@muleluku figured out why. i only handled Title case and ALL CAPS, so a name like EFKey with capitals in the middle got flattened to Efkey instead of kept as EFKey. fixed for the next build (408) — mixed-case names like EFKey, iPhone or McDonald now keep their exact shape once you've typed them a couple of times.
This doesn’t seem to be fixed. I typed several sentences with (Arby’s) a restaurant and (New Lothrop) a small town. new lothrop and arby’s still don’t get capitalized in the sentences.
Yes. This isn’t fixed yet. Tried repeatedly with the below words.
Ok
Gupta
They keep getting suggested in lowercase in the middle of the sentence.
If a word is being capitalized in a certain way by the user at least twice, then the keyboard should follow that the next time. Currently even when we capitalize the words in a certain way, even for 10 times, it doesn’t learn.
Which words are you testing with? Were they in your learned words before?
I just tried with a made up word and a dictionary word that I haven't typed before, it worked as expected for me.
After typing it three times uppercase, I got upercase suggestions. After that, after typing it three times lowercase, I got a lowercase suggestion.
Then I switched back and forth typing it lowercase and uppercase and the suggestions would come up with the casing I typed more.
ok
gupta
pranav
ravi
siva
mahesh
ok is a dictionary word and the others are learned words. Those are just a few examples. None of the names show up in first letter capital despite me repeatedly making them so in the middle of the sentence.
I just tried with a brand new made up word
najabhajajajara
I have capitalized the first letter of it almost 10 times till now, yet it comes up in all lowercase.
Steps I’m following
Add the word to learned words by tapping on the quoted suggestion
Type or swipe it in the middle of the sentence and capitalize it as needed using the up arrow
Repeat this a few times
Expectation is for that word to show up with the required casing
It always shows up in lowercase
I see, I think I know what's going on. I committed the words by simply typing them out in uppercase and adding a space, whereas you explicitly tapped the suggestion chip. I guess with the chip it goes some other route internally to learn and rank the word all lowercase.
Even that doesn’t work for me.
I explicitly typed out the below words in all caps and hit space bar to commit and repeated this thrice. They continue to show up in lowercase when swiping or typing in the middle of the sentence.
JARAD
BHIMA
In some cases if I type the learned capitalised word it autocorrects with the capital. But if I swipe it, it stays in lower case. The middle suggestion is also lower case.
@ilikered found it. adding a word by tapping the quoted chip was throwing the casing away — it filed the word but never recorded the capital, so no matter how many times you tapped it capitalized, nothing built up. that's why ok, gupta, pranav never took. build 422: tapping your own typed word now counts its casing exactly like typing it out and hitting space does.
swipe was a separate hole. even after a name was learned, swiping it came out lowercase, middle suggestion included. that's wired up now too, swipe applies the learned capital like typing.
on the all-caps ones: if JARAD went in with caps lock on, that won't teach it, caps lock is a mode not the word's identity so it's skipped on purpose. shift per letter counts. once it's learned, typing it lowercase or tapping the chip brings the caps back.
I wonder how does it work for muleluku. He mentioned "I committed the words by simply typing them out in uppercase and adding a space, whereas you explicitly tapped the suggestion chip."
Your current explanation says it doesn't work that way.
Although this works as expected, the suggestion bar still shows the word in lowercase. The suggestion bar should match the casing that’s getting inserted.
@ilikered want to make sure I fix the right thing. is this after swiping the word? I found that one: the swipe puts in Gupta but the middle of the bar keeps showing gupta, because the bar gets filled before the learned capital is applied. and if you tap that lowercase middle word to confirm it, the keyboard reads it as "undo", switches the word back to lowercase and counts it against the capital. three of those and it stops capitalizing that word, so that might explain some of the earlier "it never learns".
here's the change I have in mind: after a swipe the middle shows exactly what went in (Gupta), and the lowercase gupta moves to the left slot so going back is still one tap. would that work for you?
or did you see it somewhere else, like while typing the first few letters (gupt) or in the next-word predictions after something like "Mr"? those show lowercase too, so tell me which one you meant.
While swiping
The inserted word is in right capitalization Gupta, however the suggestion bar displays gupta
While typing
The typed word shows in lowercase, and the suggestion bar displays Gupta
What I'm thinking is, for swiping, the middle suggestion should be the same as what’s inserted and the other two suggestions should be the normal closest matches to the swipe, if someone needs to change the word back to lowercase, they can do that through shift cycle. In my opinion the left side slot shouldn’t be wasted for the same word, just for changing the capitalization.
@ilikered went with your version, it's in build 425 (and 2.1.3 on the App Store). after a swipe the middle shows exactly what went in, Gupta, and the other two are the normal swipe matches, no lowercase copy. tapping the middle no longer flips the word back to lowercase or counts against the capital.
to get lowercase back: shift cycles Gupta → GUPTA → gupta, so two taps, just not too quick, two taps within about 0.3s turn on caps lock instead. one backspace right after the swipe also gives you gupta. both now count as a no for that word, and after three of those it stops capitalizing it.
I also found that swipe, shift to Gupta, then space never counted as a capital vote at all, only swipe, shift, next swipe did. fixed that too, so that route learns now.
typing stays as it is: the bar shows what space will put in, so gupta in the text with Gupta in the middle means space turns it into Gupta.
Swipe is fine now. The middle word shows what's going to be inserted. However, type seems to be broken for all caps. For instance, I made a couple of words to be all caps
SR
OAC
These words swipe in all caps and also show all caps in the middle. However, for typing they remain in small letters. Video attached.
@ilikered found it. swipe and typing were reading the capitals from two different places. swipe uses the form the word is saved in (SR), typing only counted how many times you'd typed it in caps in the middle of a sentence. a word edited to caps in Learned words, or typed as SR at the start of a sentence, never got those counts, so swipe gave SR and typing gave sr.
typing now falls back to the saved form too, for words that aren't in the dictionary, same as swipe does. sr and oac come out as SR and OAC, in the middle of the bar and after space. one backspace right after still gives you sr, and after three of those it stops capitalizing that word.
it's in build 426, and in 2.1.3 on the App Store.
Works partially. OAC comes out in capitals, SR still comes out as first letter capital.
@ilikered found why SR didn't take. the keyboard keeps two things per word: how often you've typed it with capitals mid-sentence, and the shape saved in Learned words. typing checks the counts first. sr already had a few "Sr" counts from earlier, so those beat the SR you saved, while swipe goes straight to the saved shape. that's why OAC worked (no earlier counts) and SR didn't.
in build 427 (and 2.1.3 on the App Store), changing a word's shape in Learned words wipes those old counts, so what you save there is what typing uses. sr comes out as SR, same as swipe.
one thing I need to know: did you set SR by editing it in Learned words, or did you just type it in caps a few times? if it was typing, this fix won't cover it yet and I'll handle that separately.
I didn't edit anything in the learned words. Everything is capitalized as per my need while typing/swiping.Both SR and OAC are in the learned words imported from SwiftKey.
SR still doesn’t work with typing. It continues to result in first letter capital. Diagnostics attached.
This seems to have regressed with swiping.
I have already capitalized the first letter for pamela many times. However, it is back to only working with typing. See the video.
just allow the option to intentionally save words instead of Automatically save words. Problem solved! And all future problems caused by automatic learning avoided. If you can long Press to delete a word then there should be a facility to INTENTIONALLY save a word in the suggestions bar without going into the settings. Quick and easy.
Another finding. Words that are alphanumeric doesn’t seem to honor the capitalization. For example, q1 or q2, I capitalized it multiple times, but it keeps showing up in lowercase.
Additional finding. I have capitalized the first letter for the name Prasad many times. Yet, when it isn’t the primary suggestion and on the left, it comes shows up in lowercase. And also it shows up in lowercase even in the middle in some sentences. See the videos attached.
Tested all these issues on the new engine, and they persist.
Word pamela doesn’t capitalize the initial letter
Word q1 doesn’t capitalize the first letter.
Word prasad doesn’t capitalize first letter when shown as a left suggestion and also in the middle sometimes.
@ilikered deleting a swiped word was counted as "don't capitalize this", so after a few swipe-and-delete tests pamela and prasad got switched off for good. Fixed for build 438 (and 2.2 on the App Store): backspace after a swipe now just deletes it, typing the word with a capital again switches it back on, and the side suggestions after a swipe show the capital too. SR and q1 are separate, I'll come back to those.
Yes, looks good for Prasad and Pamela. Backspace doesn’t seem to remove the learned capitalization anymore.
Keeping this open for the other items, q1 and sr
@ilikered SR lost to the dictionary's "Sr": the keyboard treated an all-caps version of a dictionary word as caps lock and threw it away, and q1 never got counted at all because the digit cut the word off before the capital was recorded. Fixed for build 439 (and 2.2 on the App Store): sr and q1 come out as SR and Q1 once you've typed them that way mid-sentence, and if your imported SR got dropped, typing it once is enough to bring it back.
Test Q1 - works
Test sr - doesn’t work
@ilikered before I touch SR again I need to check what the keyboard has stored for it. In Settings, Learned words, how is sr listed: SR, Sr or sr? And when you type sr mid-sentence now, what comes out, Sr or plain sr? Also, do you type SR with shift before each letter or with caps lock on? Caps lock doesn't teach the keyboard anything, so that matters here.
@ilikered every time sr stayed lowercase, the new engine counted it as one more vote for lowercase, so your saved SR never got a chance again. It also treated sr as a dictionary word because the dictionary has "Sr". Fixed for build 441 (and 2.2 on the App Store): your saved SR now wins over those old lowercase counts, so sr comes out as SR again, and tapping the dictionary's "Sr" no longer counts as you choosing Sr.
Still not working.
Test sr test sr test sr test sr test sr test sr
And it looks like the count keeps increasing for the lowercase sr despite capitalizing it.
@ilikered every sr that stayed lowercase counted as a vote for lowercase, and SR needed twice as many votes to win, so the more you tested, the further away it got (the 111× is just how often you've used the word). Fixed for build 443 (and 2.2 on the App Store): for a word the dictionary doesn't have in lowercase, like sr, typing it as SR mid-sentence once is enough, and going back with backspace to shift-cycle it no longer counts the lowercase sr first.
I'm not sure I understand the fix. "for a word the dictionary doesn't have in lowercase, like sr,"
This word does exist in the learned words in lowercase right?
@ilikered I meant the built-in English dictionary, not your learned words. It only has "Sr" (as in senior), never lowercase sr, so the keyboard now treats sr as your own word. Learned words shows sr because that's how the keyboard would write it today; after you type SR once mid-sentence in build 443, it'll show SR there.
This is still the same, sr is getting inserted in lowercase even after capitalizing it multiple times.
One thing I noted is that now the sr word exists under learned words under all category and the count doesn’t increase even though it keeps getting inserted in lowercase.
@ilikered the Telugu dictionary has sr in lowercase, so with English + Telugu the keyboard took SR for caps lock on a dictionary word and threw it away. That's also why sr sat under All instead of Custom. Fixed for build 444 (and 2.2 on the App Store): a word only Telugu knows counts as your own word now, so typing SR mid-sentence once or twice is enough, and SR set in Learned words always wins.
sr is not a talugu dictionary word.
I should have never posted feed back on this 🤣
Yes, this is now working as expected.
Capitalizing the word through shift cycle, even if it is present in the dictionary, puts it into the custom words in the case that we used.
To revert, typing it and hitting the space, clicking on the revert button puts it back into the original case and the word goes back into the "all" section of the learned words.
This is a terrible suggestion that will only compound errors into the future. It makes far more sense to have the OPTION to save a regularly used Non standard format word like EFKey. Automaticaly learned words instead of intentionally saved words will create many issues in the future.
This is already offered by the likes of SwiftKey. And yes, it is an option, not mandatory. Keyboard will learn repeated capitalization, not accidental ones. So you need to type a particular word in particular capitalization multiple times for it to be learnt. One off instances are not learnt.
You can lead a horse to water but you can’t make it drink. You’ll understand what I’m saying eventually.
These comments are not helping
That was passive aggressive I’ll admit, but I’ve been trying to help in detail and you’re dismissing me so I give up.
You should provide diagnostic logs on the bug you raised for the issue you are facing. That will help more.