@@ -24,30 +24,29 @@ public static function getSingular(): iterable
2424 yield new Transformation (new Pattern ('gie$ ' ), 'gia ' );
2525
2626 // Reverse of -ce → -cia (arance → arancia)
27- yield new Transformation (new Pattern ('([^ aeiou])ce$ ' ), '\1cia ' );
27+ yield new Transformation (new Pattern ('([aeiou])ce$ ' ), '\1cia ' );
2828
2929 // Reverse of -ge → -gia (valige → valigia)
30- yield new Transformation (new Pattern ('([^ aeiou])ge$ ' ), '\1gia ' );
30+ yield new Transformation (new Pattern ('([aeiou])ge$ ' ), '\1gia ' );
3131
3232 // Reverse of -chi → -co (bachi → baco)
3333 yield new Transformation (new Pattern ('([bcdfghjklmnpqrstvwxyz][aeiou])chi$ ' ), '\1co ' );
3434
35+ // Reverse of -chi → -co (fotografiche → fotografica)
36+ yield new Transformation (new Pattern ('([bcdfghjklmnpqrstvwxyz][aeiou])che$ ' ), '\1ca ' );
37+
3538 // Reverse of -ghi → -go (laghi → lago)
3639 yield new Transformation (new Pattern ('([bcdfghjklmnpqrstvwxyz][aeiou])ghi$ ' ), '\1go ' );
3740
3841 // Reverse of -ci → -co (medici → medico)
39- yield new Transformation (new Pattern ('([aeiou][bcdfghjklmnpqrstvwxyz])ci$ ' ), '\1co ' );
40-
41- // Reverse of -gi → -go (psicologi → psicologo)
42- yield new Transformation (new Pattern ('([aeiou][bcdfghjklmnpqrstvwxyz])gi$ ' ), '\1go ' );
42+ yield new Transformation (new Pattern ('([aeiou][bcdfghjklmnpqrstvwxyz])ci$ ' ), '\1o ' );
4343
4444 // Reverse of -i → -io (zii → zio, negozi → negozio)
4545 // This is more complex due to Italian's stress patterns, but we'll handle the basic case
46- yield new Transformation (new Pattern ('([^ aeiou])i$ ' ), '\1io ' );
46+ yield new Transformation (new Pattern ('([aeiou])i$ ' ), '\1io ' );
4747
4848 // Handle words that end with -i but should go to -co/-go (amici → amico, not amice)
49- yield new Transformation (new Pattern ('([^aeiou])ci$ ' ), '\1co ' );
50- yield new Transformation (new Pattern ('([^aeiou])gi$ ' ), '\1go ' );
49+ yield new Transformation (new Pattern ('([cgmrt])i$ ' ), '\1o ' );
5150
5251 // Reverse of -a → -e
5352 yield new Transformation (new Pattern ('e$ ' ), 'a ' );
@@ -70,19 +69,20 @@ public static function getPlural(): iterable
7069 yield new Transformation (new Pattern ('gia$ ' ), 'gie ' ); // e.g. bugia → bugie
7170
7271 // Words ending in -cia/gia without stress on 'i' lose the 'i' in plural
73- yield new Transformation (new Pattern ('([^ aeiou])cia$ ' ), '\\1ce ' ); // e.g. arancia → arance
74- yield new Transformation (new Pattern ('([^ aeiou])gia$ ' ), '\\1ge ' ); // e.g. valigia → valige
72+ yield new Transformation (new Pattern ('([aeiou])cia$ ' ), '\\1ce ' ); // e.g. arancia → arance
73+ yield new Transformation (new Pattern ('([aeiou])gia$ ' ), '\\1ge ' ); // e.g. valigia → valige
7574
7675 // Words ending in -co/-go with stress on 'o' become -chi/-ghi
7776 yield new Transformation (new Pattern ('([bcdfghjklmnpqrstvwxyz][aeiou])co$ ' ), '\\1chi ' ); // e.g. baco → bachi
77+ yield new Transformation (new Pattern ('([bcdfghjklmnpqrstvwxyz][aeiou])ca$ ' ), '\\1che ' ); // e.g. fotografica → fotografiche
7878 yield new Transformation (new Pattern ('([bcdfghjklmnpqrstvwxyz][aeiou])go$ ' ), '\\1ghi ' ); // e.g. lago → laghi
7979
8080 // Words ending in -co/-go with stress on the penultimate syllable become -ci/-gi
8181 yield new Transformation (new Pattern ('([aeiou][bcdfghjklmnpqrstvwxyz])co$ ' ), '\\1ci ' ); // e.g. medico → medici
8282 yield new Transformation (new Pattern ('([aeiou][bcdfghjklmnpqrstvwxyz])go$ ' ), '\\1gi ' ); // e.g. psicologo → psicologi
8383
8484 // Words ending in -io with stress on 'i' keep the 'i' in plural
85- yield new Transformation (new Pattern ('([^ aeiou])io$ ' ), '\\1i ' ); // e.g. zio → zii
85+ yield new Transformation (new Pattern ('([aeiou])io$ ' ), '\\1i ' ); // e.g. zio → zii
8686
8787 // Words ending in -io with stress on 'o' lose the 'i' in plural
8888 yield new Transformation (new Pattern ('([aeiou])io$ ' ), '\\1i ' ); // e.g. negozio → negozi
@@ -137,6 +137,7 @@ public static function getIrregular(): iterable
137137 'fratello ' => 'fratelli ' ,
138138 'fuoco ' => 'fuochi ' ,
139139 'gamba ' => 'gambe ' ,
140+ 'giallo ' => 'gialli ' ,
140141 'ginocchio ' => 'ginocchia ' ,
141142 'gioco ' => 'giochi ' ,
142143 'giornale ' => 'giornali ' ,
@@ -188,6 +189,7 @@ public static function getIrregular(): iterable
188189 'scuola ' => 'scuole ' ,
189190 'serie ' => 'serie ' ,
190191 'serramento ' => 'serramenta ' ,
192+ 'sistema ' => 'sistemi ' ,
191193 'sorella ' => 'sorelle ' ,
192194 'specie ' => 'specie ' ,
193195 'staio ' => 'staia ' ,
@@ -198,6 +200,7 @@ public static function getIrregular(): iterable
198200 'suo ' => 'suoi ' ,
199201 'superficie ' => 'superfici ' ,
200202 'tavolo ' => 'tavoli ' ,
203+ 'tema ' => 'temi ' ,
201204 'tempio ' => 'templi ' ,
202205 'treno ' => 'treni ' ,
203206 'tuo ' => 'tuoi ' ,
0 commit comments