Italian Grammar
Hey! I've been testing the Italian autocorrect in EFKey and found a few things that could use some improvement.
I tested 25 cases so far. 9 worked correctly, while 16 didn't.
Accents — not corrected:
Lui e felice→Lui è feliceLui e mio amico→Lui è mio amicoOggi e una bella giornata→Oggi è una bella giornataSi, va bene→Sì, va beneSi, certo→Sì, certoMarco da una mano a Luca→Marco dà una mano a LucaLa mamma da una mano→La mamma dà una manoMettilo li vicino→Mettilo lì vicino
Apostrophes — not corrected:
un amica→un'amicaHo visto un amica ieri→Ho visto un'amica ieriHo comprato un auto nuova→Ho comprato un'auto nuovaun po→un po'Ho un po di fame→Ho un po' di fameAspetta un po→Aspetta un po'qual'è→qual èQual'è il problema?→Qual è il problema?
Things that worked correctly:
Ce un problema→C'è un problemaCe ancora tempo→C'è ancora tempoNon lo so, pero ci provo→Non lo so, però ci provoSi puo fare→Si può fare
I also tested some sentences that were already grammatically correct, and EFKey correctly left them unchanged:
Anna e Marco arrivanoVengo da MilanoCe la possiamo fareCe ne sono tantiHo visto un amico ieri
A bit of Italian grammar that might help with the autocorrect:
1. Apostrophes with masculine and feminine words
In Italian, the indefinite article behaves differently depending on the gender of the noun.
For feminine singular nouns starting with a vowel, una becomes un':
una amica→un'amica(female friend)una auto→un'auto(car)una idea→un'idea(idea)
However, masculine nouns starting with a vowel use un without an apostrophe:
un amico(male friend)un uomo(man)un albero(tree)
So EFKey needs to recognise the gender of the following noun. It shouldn't automatically add an apostrophe after every un.
2. Words that change meaning with an accent
Several common Italian words are valid both with and without an accent, but their meanings are completely different:
e= and /è= issi= reflexive pronoun /sì= yesda= from or by /dà= givesli= them /lì= there
For example:
Marco e Luca= Marco and LucaMarco è Luca= Marco is LucaVengo da Roma= I come from RomeMarco dà una mano= Marco helps outSi vede bene= It can be seen clearlySì, va bene= Yes, that's fine
These can't be fixed by simply replacing one word with another, since both versions are valid. The autocorrect needs to understand the sentence to choose the right one.
3. Other common apostrophe rules
po' is a shortened form of poco (a little), so it requires an apostrophe:
un po di acqua→un po' di acquaaspetta un po→aspetta un po'
qual è is always written without an apostrophe in standard Italian because qual is a shortened form of quale, rather than an elision.
c'è and ce are also different:
C'è un problema= There is a problemCe ne sono tanti= There are many of themCe la possiamo fare= We can do it
c'è comes from ci è, while ce is a different grammatical form. Both are correct depending on the sentence.
Overall, the biggest issue seems to be contextual grammar. EFKey already handles some cases correctly, like c'è, però and può, but it misses other very common ones.
I think improving how it handles accents, noun gender and apostrophes would make a noticeable difference for Italian users.
I'll keep testing and send over anything else I find. Hope this helps!
Discussion
Sign in to comment or vote.
@ItalianoDoc one-letter words like "e" were skipped by the context check, and there was nothing handling "si,", "un po", "un amica" or "qual'è". Fixed for build 452 and 2.2.1 on the App Store: you get è, sì before punctuation, un po', un'amica / un'auto and qual è, while "Anna e Marco" and "un amico" stay as typed. "da una mano" → dà isn't in this one yet, and "Mettilo li vicino" already turns into lì on my side, so if it doesn't for you on 452, send me a diagnostics export.
I’m on 453 and still not correcting "Mettilo li vicino"
By the way: excellent bug report and trust cases @ItalianoDoc 🇮🇹
@ItalianoDoc I can't reproduce it: on the current build "Mettilo li vicino" turns into lì with Italian alone and with Italian + English (UK), typed key by key. It only becomes lì when the keyboard can read "Mettilo" before it, so which app were you typing in, and does "Lui e felice" get its è in that same app? If you swiped "li" instead of tapping it, tell me that too.
@efko on the latest build 460 - Mettilo lì vicino: when swiping it gets corrected, when typing no.
Lui è felice: when swiping it doesn’t get corrected, when tapping it does get corrected.
In the following days I will send you a new report on new Italian grammar errors in this same thread. 👍🏼
@ItalianoDoc you type "li" (them) often enough that the keyboard learned it, and a learned word was never corrected again, which is why "Mettilo li" worked on my phone and not on yours. Separately, a one-letter word tapped right before a swipe went in uncorrected. Fixed for build 461 and 2.2.1 on the App Store: "Mettilo li vicino" gets lì when typed, and "Lui" + "e" + swiped "felice" gets è, but if you tap "li" and then swipe the next word, it still stays as typed.
@ItalianoDoc ?
@efko Ok that’s good, working now
comment deleted
comment deleted
@efko hello, I attach my latest tests since it doesn’t let me post it fully here.
<https://www.icloud.com/notes/01aJBsqMRbo_DF1Hz8U4aqHgw>
@efko Here I attach it as txt
@ItalianoDoc "là/lì" before a place word, "né…né" and "d accordo" typed with a space weren't readable from the words alone, and the accent check on a word needed a stronger push from the next word than "felice" gives. Fixed for build 468 and the next App Store update: "la fuori", "la borsa la vicino", "d accordo", "c era", "ne lui ne lei", "vabbe" and "Anna e felice" now come out right, and "li." or "a se." get the accent when the sentence ends with punctuation. Still open: È at the start of a sentence, "Questa e quella sono…", "mi da una mano", and "sono li" or "penso di si" at the end of a message without a period, because the keyboard can't tell the message has ended.