Italian Grammar

Needs testing Typing & autocorrect Italian fixed in 2.2.2

ItalianoDoc TESTER ·

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 è felice
  • Lui e mio amico → Lui è mio amico
  • Oggi e una bella giornata → Oggi è una bella giornata
  • Si, va bene → Sì, va bene
  • Si, certo → Sì, certo
  • Marco da una mano a Luca → Marco dà una mano a Luca
  • La mamma da una mano → La mamma dà una mano
  • Mettilo li vicino → Mettilo lì vicino

Apostrophes — not corrected:

  • un amica → un'amica
  • Ho visto un amica ieri → Ho visto un'amica ieri
  • Ho comprato un auto nuova → Ho comprato un'auto nuova
  • un po → un po'
  • Ho un po di fame → Ho un po' di fame
  • Aspetta un po → Aspetta un po'
  • qual'è → qual è
  • Qual'è il problema? → Qual è il problema?

Things that worked correctly:

  • Ce un problema → C'è un problema
  • Ce ancora tempo → C'è ancora tempo
  • Non lo so, pero ci provo → Non lo so, però ci provo
  • Si puo fare → Si può fare

I also tested some sentences that were already grammatically correct, and EFKey correctly left them unchanged:

  • Anna e Marco arrivano
  • Vengo da Milano
  • Ce la possiamo fare
  • Ce ne sono tanti
  • Ho 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 / è = is
  • si = reflexive pronoun / sì = yes
  • da = from or by / dà = gives
  • li = them / lì = there

For example:

  • Marco e Luca = Marco and Luca
  • Marco è Luca = Marco is Luca
  • Vengo da Roma = I come from Rome
  • Marco dà una mano = Marco helps out
  • Si vede bene = It can be seen clearly
  • Sì, 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 acqua
  • aspetta 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 problem
  • Ce ne sono tanti = There are many of them
  • Ce 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

efko DEV ·

@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.

efko DEV ·
status → Needs testing
ItalianoDoc TESTER ·

I’m on 453 and still not correcting "Mettilo li vicino"

Ed MOD ·

By the way: excellent bug report and trust cases @ItalianoDoc 🇮🇹

efko DEV ·
status → Reopened
efko DEV ·

@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 DEV ·
status → Needs info
ItalianoDoc TESTER ·

@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. 👍🏼

efko DEV ·

@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.

efko DEV ·
status → Needs testing
efko DEV ·
ItalianoDoc TESTER ·

@efko Ok that’s good, working now

efko DEV ·
status → Done
ItalianoDoc TESTER ·

comment deleted

ItalianoDoc TESTER ·

comment deleted

ItalianoDoc TESTER · · edited

@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 DEV ·

ItalianoDoc TESTER ·

@efko Here I attach it as txt

efko DEV ·
status → Reopened
efko DEV ·

@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.

efko DEV ·
status → Needs testing

Sign in to comment or vote.