. "A me piacerebbe farmi quattro chiacchiere con l'inventore del T9, un giorno. Me lo metterei davanti. Gli offrirei un t\u00E8. Lui \u00E8 sicuramente uno che non beve alcolici, sar\u00E0 per forza uno che beve t\u00E8 e un sacco di caff\u00E8. Gli offrirei dei pasticcini, anche. Aspetterei di vederlo addentare la ciliegia verde della frolla per bloccargli il polso e chiedergli: E quando lui tossir\u00E0, si ingolfer\u00E0, si batter\u00E0 il petto e cercher\u00E0 di arrivare con quella sua mano pallida alla tazzina di t\u00E8, io stringerei ancora di pi\u00F9 la morsa e gli chiederei: A questo punto mi risiederei e lo fisserei negli occhi."@it . . "The T9 section of the Technician test contains information on antennas, feedlines."@en . "\u041F\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 (gromozeka, 15.10.2007) \u0414\u0443\u043C\u0430\u044E, \u0432\u0441\u0435 \u0437\u0434\u0435\u0441\u044C \u043F\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0437\u043D\u0430\u043A\u043E\u043C\u044B \u0441 \u0441\u0438\u0441\u0442\u0435\u043C\u043E\u0439 \u04229 ( ), \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0446\u0438\u0444\u0440 \u0438 \u0431\u0443\u043A\u0432 \u043A\u0438\u0440\u0438\u043B\u043B\u0438\u0446\u044B \u0432 \u044D\u0442\u043E\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435: 2 - \u0430,\u0431,\u0432,\u0433 3 - \u0434,\u0435,\u0436,\u0437 4 - \u0438,\u0439,\u043A,\u043B 5 - \u043C,\u043D,\u043E,\u043F 6 - \u0440,\u0441,\u0442,\u0443 7 - \u0444,\u0445,\u0446,\u0447 8 - \u0448,\u0449,\u044A,\u044B 9 - \u044C,\u044D,\u044E,\u044F \u0422\u0430\u043A\u0438\u043C \u043E\u0431\u0440\u0430\u0437\u043E\u043C, \u043A\u0430\u0436\u0434\u043E\u0439 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438 \u0431\u0443\u043A\u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043E\u0434\u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0446\u0438\u0444\u0440, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0441\u043B\u043E\u0432\u0443 \"\u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\" \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \"556433522634955669\". \u0421\u043A\u0430\u0447\u0438\u0432\u0430\u0435\u043C \u0441\u043B\u043E\u0432\u0430\u0440\u044C \u0441\u043B\u043E\u0432\u043E\u0444\u043E\u0440\u043C \u0440\u0443\u0441\u0441\u043A\u043E\u0433\u043E \u044F\u0437\u044B\u043A\u0430 \u043E\u0442\u0441\u044E\u0434\u0430: 1) \u041A\u0430\u043A\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u043D\u0442 \u0441\u043B\u043E\u0432 \u0432 \u0441\u043B\u043E\u0432\u0430\u0440\u0435 \"\u0443\u043D\u0438\u043A\u0430\u043B\u0435\u043D\" (\u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0446\u0438\u0444\u0440, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0430\u044F \u0441\u043B\u043E\u0432\u0443 \u0438\u0437 \u0441\u043B\u043E\u0432\u0430\u0440\u044F, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u044D\u0442\u043E\u043C\u0443 \u0441\u043B\u043E\u0432\u0443)? 2) \u0412\u044B\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0446\u0438\u0444\u0440, \u043A\u043E\u0442\u043E\u0440\u043E\u0439 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043D\u0430\u0438\u0431\u043E\u043B\u044C\u0448\u0435\u0435 \u043A\u043E\u043B-\u0432\u043E \u0441\u043B\u043E\u0432 \u0438\u0437 \u0441\u043B\u043E\u0432\u0430\u0440\u044F, \u0432\u044B\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0441\u043B\u043E\u0432\u0430. 3) \u0412\u044B\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0430\u043C\u0443\u044E \u0434\u043B\u0438"@en . . . . . "T9"@en . "T9"@cs . "[[Soubor:20-mobil.jpg|thumb|V\u00E1\u0161 mobil v\u00ED, co chcete napsat. Narozd\u00EDl od v\u00E1s.]] T9 odboji ve devitka ke vynalez, kufry tam usnadnuje prani pop. Spocita u ton, we var mocil mobil vhodne skoto, kdy bicete naprav jeste predtim, mez in napisete, a uz val nemusite volil namahav ste prsty. Poslu val muzete nit hotovou trikrat frite, mez cez T9. Vo je tekla pomoc, srn vsechny, jen krov zavisli ma sten mobilu a bez prani pop si ty nedovedou stul zivou cni predstavit. Nevine prepne, jen ptal v zrodu T9, vysada vo, ze vo byka nejaka valna sluzba, nejspis rana lic. Inteligentni ve devitka zob slota x monic jazyku, takze muzete rh prav i s vasini zahranicnimi janosi. Umi anglicky, nemecky, vlivprky, zvladne i gamuda. Pravec, nacas vedla nekalou najmu chybu, cle uv snadno napravite. Kdyby od, atenas pozna, cm vam mdlo byt. Chyb ke urcite mim, new kolik byste pani udelali. Jedinou nevyhnemt ke, ze nevni sprosta slota (mars. kolot, shan, air). Vo ke v nejmin tendr sum % jeho vyrazita. Neco naopak tam mocil touti sproste skoto, kdyz hm uvada nechcete souzit. Treba u porce nastude seda. Nave-ji nekaje zajimate zkusenosti s T9, muzete re s mini zed sverit. center|150px"@cs . . . . . "T9 (czasem i s\u0142ownik T9) \u2013 rewolucyjny system, pozwalaj\u0105cy w rekordowo szybkim tempie napisa\u0107 SMS i spali\u0107 si\u0119 ze wstydu po przeczytaniu wys\u0142anej wiadomo\u015Bci."@pl . . . "NOT MADE YET"@en . "T9"@it . . . "T9"@pl . "NOT MADE YET"@en . "T9 (czasem i s\u0142ownik T9) \u2013 rewolucyjny system, pozwalaj\u0105cy w rekordowo szybkim tempie napisa\u0107 SMS i spali\u0107 si\u0119 ze wstydu po przeczytaniu wys\u0142anej wiadomo\u015Bci."@pl . . "A me piacerebbe farmi quattro chiacchiere con l'inventore del T9, un giorno. Me lo metterei davanti. Gli offrirei un t\u00E8. Lui \u00E8 sicuramente uno che non beve alcolici, sar\u00E0 per forza uno che beve t\u00E8 e un sacco di caff\u00E8. Gli offrirei dei pasticcini, anche. Aspetterei di vederlo addentare la ciliegia verde della frolla per bloccargli il polso e chiedergli: E quando lui tossir\u00E0, si ingolfer\u00E0, si batter\u00E0 il petto e cercher\u00E0 di arrivare con quella sua mano pallida alla tazzina di t\u00E8, io stringerei ancora di pi\u00F9 la morsa e gli chiederei: A questo punto gli toglierei la tazza davanti, mi alzerei e la metterei nel lavandino. Cos\u00EC, per fare massaia. Con voce ferma gli direi (magari strofinandomi le mani sul grembiule): A questo punto mi risiederei e lo fisserei negli occhi. E a questo punto lo porterei al lavandino e gli farei lavare la tazzina."@it . . "\u041F\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0430 (gromozeka, 15.10.2007) \u0414\u0443\u043C\u0430\u044E, \u0432\u0441\u0435 \u0437\u0434\u0435\u0441\u044C \u043F\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0437\u043D\u0430\u043A\u043E\u043C\u044B \u0441 \u0441\u0438\u0441\u0442\u0435\u043C\u043E\u0439 \u04229 ( ), \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435 \u0446\u0438\u0444\u0440 \u0438 \u0431\u0443\u043A\u0432 \u043A\u0438\u0440\u0438\u043B\u043B\u0438\u0446\u044B \u0432 \u044D\u0442\u043E\u0439 \u0441\u0438\u0441\u0442\u0435\u043C\u0435 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0435: 2 - \u0430,\u0431,\u0432,\u0433 3 - \u0434,\u0435,\u0436,\u0437 4 - \u0438,\u0439,\u043A,\u043B 5 - \u043C,\u043D,\u043E,\u043F 6 - \u0440,\u0441,\u0442,\u0443 7 - \u0444,\u0445,\u0446,\u0447 8 - \u0448,\u0449,\u044A,\u044B 9 - \u044C,\u044D,\u044E,\u044F \u0422\u0430\u043A\u0438\u043C \u043E\u0431\u0440\u0430\u0437\u043E\u043C, \u043A\u0430\u0436\u0434\u043E\u0439 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0438 \u0431\u0443\u043A\u0432 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043E\u0434\u043D\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0446\u0438\u0444\u0440, \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u0441\u043B\u043E\u0432\u0443 \"\u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C\" \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \"556433522634955669\". \u0421\u043A\u0430\u0447\u0438\u0432\u0430\u0435\u043C \u0441\u043B\u043E\u0432\u0430\u0440\u044C \u0441\u043B\u043E\u0432\u043E\u0444\u043E\u0440\u043C \u0440\u0443\u0441\u0441\u043A\u043E\u0433\u043E \u044F\u0437\u044B\u043A\u0430 \u043E\u0442\u0441\u044E\u0434\u0430: 1) \u041A\u0430\u043A\u043E\u0439 \u043F\u0440\u043E\u0446\u0435\u043D\u0442 \u0441\u043B\u043E\u0432 \u0432 \u0441\u043B\u043E\u0432\u0430\u0440\u0435 \"\u0443\u043D\u0438\u043A\u0430\u043B\u0435\u043D\" (\u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0446\u0438\u0444\u0440, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0430\u044F \u0441\u043B\u043E\u0432\u0443 \u0438\u0437 \u0441\u043B\u043E\u0432\u0430\u0440\u044F, \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u043E\u043B\u044C\u043A\u043E \u044D\u0442\u043E\u043C\u0443 \u0441\u043B\u043E\u0432\u0443)? 2) \u0412\u044B\u0432\u0435\u0434\u0438\u0442\u0435 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0446\u0438\u0444\u0440, \u043A\u043E\u0442\u043E\u0440\u043E\u0439 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043D\u0430\u0438\u0431\u043E\u043B\u044C\u0448\u0435\u0435 \u043A\u043E\u043B-\u0432\u043E \u0441\u043B\u043E\u0432 \u0438\u0437 \u0441\u043B\u043E\u0432\u0430\u0440\u044F, \u0432\u044B\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0441\u043B\u043E\u0432\u0430. 3) \u0412\u044B\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u0430\u043C\u0443\u044E \u0434\u043B\u0438\u043D\u043D\u0443\u044E \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C, \u043A\u043E\u0442\u043E\u0440\u043E\u0439 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0431\u043E\u043B\u0435\u0435 \u043E\u0434\u043D\u043E\u0433\u043E \u0441\u043B\u043E\u0432\u0430 \u0438\u0437 \u0441\u043B\u043E\u0432\u0430\u0440\u044F, \u0432\u044B\u0432\u0435\u0434\u0438\u0442\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0441\u043B\u043E\u0432\u0430. 4) \u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u0441\u043B\u043E\u0432\u0430\u0440\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u0435\u0439: \u0412 \u043A\u0430\u0436\u0434\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u0435 \u0444\u0430\u0439\u043B\u0430 \u043F\u043E\u0441\u043B\u0435\u0434\u043E\u0432\u0430\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C \u0446\u0438\u0444\u0440, \u0437\u0430 \u043D\u0435\u0439 \u0432\u0441\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044E\u0449\u0438\u0435 \u0435\u0439 \u0441\u043B\u043E\u0432\u0430 \u043E\u0442\u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u043B\u0435\u043A\u0441\u0438\u043A\u043E\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043A\u0438. \u0421\u0430\u043C\u0438 \u0441\u0442\u0440\u043E\u043A\u0438, \u0440\u0430\u0437\u0443\u043C\u0435\u0435\u0442\u0441\u044F, \u0442\u043E\u0436\u0435 \u043E\u0442\u0441\u043E\u0440\u0442\u0438\u0440\u043E\u0432\u0430\u043D\u044B. \"\u0441\u043B\u043E\u0432\u0430\u0440\u043D\u0430\u044F \u0441\u0442\u0430\u0442\u044C\u044F\" \u043C\u043E\u0436\u0435\u0442 \u0432\u044B\u0433\u043B\u044F\u0434\u0435\u0442\u044C \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440 \u0442\u0430\u043A: 6329 - \u0441\u0434\u0430\u044E, \u0441\u0435\u0431\u044F, \u0442\u0435\u0431\u044F Python, Vladimir the Red Sunny, 17.10.2007, link \u0418\u0441\u043F\u043E\u043B\u044C\u0437\u0443\u0435\u0442\u0441\u044F \u0432\u0441\u043F\u043E\u043C\u043E\u0433\u0430\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0444\u0430\u0439\u043B \"t9_dict.txt\", \u0441\u043E\u0441\u0442\u043E\u044F\u0449\u0438\u0439 \u0438\u0437 8 \u0441\u0442\u0440\u043E\u043A \u0432\u0438\u0434\u0430 \"2 \u0430 \u0431 \u0432 \u0433\" \u0438 \u0442. \u0434. \u0417\u0430\u0431\u044B\u043B \u0441\u043A\u0430\u0437\u0430\u0442\u044C - \u0442\u043E\u0442 \u0444\u0430\u0439\u043B \u044F \u043F\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043B\u044C\u043D\u043E \u043F\u0435\u0440\u0435\u0434\u0440\u0430\u043A\u043E\u043D\u0438\u043B, \u0447\u0442\u043E\u0431\u044B \u043E\u0441\u0442\u0430\u043B\u0438\u0441\u044C \u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0430\u043C\u0438 \u0441\u043B\u043E\u0432\u0430, \u043F\u043E 1 \u043D\u0430 \u0441\u0442\u0440\u043E\u043A\u0443. \t\t from collections import defaultdict def word_to_t9(w, d): return ''.join([d[l] for l in w]) def unique_percent(dict): total = len(dict) unique = 0 for el in dict.values(): if len(el) == 1: unique+=1 return 100*unique/total def max_words(dict): max_len = 0 max_elem = -1 for el in dict.keys(): if len(dict[el]) > max_len: max_len = len(dict[el]) max_elem = el return (max_elem, max_len) def max_non_unique(dict): max_len = 0 max_elem = -1 for el in dict.keys(): if len(dict[el]) < 2: continue if len(el) > max_len: max_len = len(el) max_elem = el return (max_elem, max_len) fi = open(\"t9_dict.txt\", \"rb\") dict = {} for line in fi: lst = line.strip().split(' ') n, s = lst[0], lst[1:] for i in s: dict[i] = n fi.close() f_dict = defaultdict(list) fi = open(\"words.txt\", \"rb\") for word in fi: f_dict[word_to_t9(word.strip(), dict)] += [word.strip()] fi.close() str_list = [i[0]+' - '+', '.join(i[1]) for i in f_dict.items()] str_list.sort() fo = open(\"result.txt\", \"wb\") for s in str_list: fo.write(s + '\n') fo.close() up = unique_percent(f_dict) mw = max_words(f_dict) mnu = max_non_unique(f_dict) report = open(\"report.txt\", \"wb\") report.write(\"Unique words: \" + `up` + \" %\n\") report.write(\"Max. words: \" + mw[0] + \", \" + `mw[1]` + \" words\n\") report.write(\"The words are: \" + \", \".join(f_dict[mw[0]]) + \"\n\") report.write(\"The longest non-unique: \" + mnu[0] + \", \" + `mnu[1]` + \" symbols\n\") report.write(\"The words are: \" + \", \".join(f_dict[mnu[0]]) + \"\n\") report.close() \t Python, gromozeka, 18.10.2007, link \u041D\u0430\u0447\u0430\u043B \u043F\u043E\u0434\u0432\u0435\u0440\u0433\u0430\u0442\u044C \u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0443 \u0412\u043B\u0430\u0434\u0438\u043C\u0438\u0440\u0430 \u0436\u0435\u0441\u0442\u043A\u043E\u0439 \u043E\u0431\u0444\u0443\u0441\u043A\u0430\u0446\u0438\u0438 \u043D\u0430 \u0441\u043B\u0443\u0447\u0430\u0439, \u0435\u0441\u043B\u0438 \u043A\u043E\u043C\u0443-\u043D\u0438\u0431\u0443\u0434\u044C \u0432\u0437\u0434\u0443\u043C\u0430\u0435\u0442\u0441\u044F \u043C\u0435\u0440\u044F\u0442\u044C\u0441\u044F \u0434\u043B\u0438\u043D\u043E\u0439 \u043A\u043E\u0434\u0430 (\u043F\u0440\u043E\u0433\u0440\u0430\u043C\u043C\u0430 \u043A\u043B\u0430\u0441\u0441\u043D\u043E \u043D\u0430\u043F\u0438\u0441\u0430\u043D\u043D\u0430, \u0434\u0430\u0436\u0435 \u0436\u0430\u043B\u043A\u043E \u0441 \u043D\u0435\u0439 \u0442\u0430\u043A \u043F\u043E\u0441\u0442\u0443\u043F\u0430\u0442\u044C icon_smile.gif ): \t\t # -*- coding: cp1251 -*- from collections import defaultdict dct,rus={},\"\u0430\u0431\u0432\u0433\u0434\u0435\u0436\u0437\u0438\u0439\u043A\u043B\u043C\u043D\u043E\u043F\u0440\u0441\u0442\u0443\u0444\u0445\u0446\u0447\u0448\u0449\u044A\u044B\u044C\u044D\u044E\u044F\" for i in xrange(len(rus)): dct[rus[i]]=`i/4+2` fd = defaultdict(list) for w in open(\"words.txt\", \"r\"): fd[''.join([dct[l] for l in w.strip()])] += [w.strip()] open(\"result.txt\", \"w\").writelines([s+\"\n\" for s in sorted([i[0]+' - '+', '.join(i[1]) for i in fd.items()])]) up = 100*len([el for el in fd.values() if len(el)==1])/len(fd) mw = max([(len(fd[el]),el) for el in fd.keys()]) mnu = max([(len(el),el) for el in fd.keys() if len(fd[el])>=2]) report = open(\"report.txt\", \"w\") report.write(\"Unique words: \" + `up` + \" %\n\") report.write(\"Max. words: \" + mw[1] + \", \" + `mw[0]` + \" words\n\") report.write(\"The words are: \" + \", \".join(fd[mw[1]]) + \"\n\") report.write(\"The longest non-unique: \" + mnu[1] + \", \" + `mnu[0]` + \" symbols\n\") report.write(\"The words are: \" + \", \".join(fd[mnu[1]]) + \"\n\") report.close() \t J, danio, 19.10.2007, link \t\t load 'files' lz =: ' abc def ghi jkl mno pqrs tuv wxyz ' fw=: #~ [:>([:*/e.&lz)&.> in=: fw 'b' fread '/usr/share/dict/british-english' dgt=: ([:<.5%~lz&i.){'23456789'\"1 dgtK=: dgt&.>in ch=: <@:/:~;~[:dgt(0&{::) dict=: /:~dgtK ch/. in unPerc=: (100*#%~[:#~.) dgtK lwChap=: {.(\\:[:(#&.>)}.\"1) dict mChap=: (#~[:>[:(1<#)&.>{:\"1) dict lkChp=: {.(\\: [:(#&.>){.\"1) mChap fmt=: [:([,', ',])/[:>[:>{: 't9dict.txt' fwrites~ (([:>{.),' - ',fmt)\"1 dict \t K, zevun, 20.10.2007, link \t\t t9: {:[(x<\"\u0430\") | (x>\"\u044F\"); \"\\0\"; *$2+(x>/:(\"\u0433\";\"\u0437\";\"\u043B\";\"\u043F\";\"\u0443\";\"\u0447\";\"\u044B\";\"\u044F\"))?0]}' trim: {(-+/&\\|\" \"=x)_ x} split: {1_'(&x=y)_ x:y,x} nfltr: {y@&~|/'x=y . z} join: {(#x)_ ,/x,/:y} d: ,/(nfltr[\"\\0\";;(;0)]@{+(t9'x;x)}@split[;\" \"]@trim@)'0:\"words.num\" g: =d[;0] g: g[n] r,: ,\"Max words: \",d[*m;0],\", \",($#m),\" word(s)\" r,: ,\"The words are: \",join[\", \"]d[m;1] m: &1#:'d[g[m;0];0] r,: ,\"The longest non-unique: \",d[*m;0],\", \",($#d[*m;0]),\" symbol(s)\" r,: ,\"The words are: \",join[\", \"]d[m;1] \"report.txt\" 0:r \"t9dict.txt\" 0:{d[*x;0],\"\t-\t\",join[\", \"]{x@ C++, Narwal, 21.10.2007, link \t\t #include #include \"fstream\" #include #include #include #include #include #include typedef std::multimap< std::string, std::string > MultiMap; struct DictTrait { int total; int unique; std::pair< size_t, std::vector< MultiMap::const_iterator > > maxLength; std::pair< size_t, std::vector< MultiMap::const_iterator > > maxRange; DictTrait() : total( 0 ) , unique( 0 ) , maxLength( std::make_pair( 0, std::vector< MultiMap::const_iterator >() ) ) , maxRange( std::make_pair( 0, std::vector< MultiMap::const_iterator >() ) ) { } void ProcessUnique( MultiMap::const_iterator b, MultiMap::const_iterator e, size_t rangeLen ) { ++total; if ( rangeLen == 1 ) { ++unique; } } void ProcessMaxRange( MultiMap::const_iterator b, MultiMap::const_iterator e, size_t rangeLen ) { if ( rangeLen > maxRange.first ) { maxRange.first = rangeLen; maxRange.second.clear(); maxRange.second.push_back( b ); } else if ( rangeLen == maxRange.first ) maxRange.second.push_back( b ); } void ProcessMaxLength( MultiMap::const_iterator b, MultiMap::const_iterator e, size_t rangeLen, size_t wordLength ) { if ( wordLength > maxLength.first && rangeLen > 1 ) { maxLength.first = wordLength; maxLength.second.clear(); maxLength.second.push_back( b ); } else if ( wordLength == maxLength.first && rangeLen > 1 ) { maxLength.second.push_back( b ); } } }; struct ConverterToT9 { private: typedef std::map< char, std::string > Map; Map map_; public: ConverterToT9() { std::ifstream file( \"D:\\\\programming\\\tasks\\\t9\\\t9_dict.txt\" ); char num; std::string tmp, str; while( !file.eof() ) { file >> num >> tmp >> str; map_.insert( std::make_pair( num, str ) ); } file.close(); } std::string Execute( const std::string& str ) const { std::string res; for ( std::string::const_iterator i = str.begin(); i != str.end(); ++i ) { res.push_back( CharToT9( *i ) ); } return res; } private: struct CmpChar { char s_; CmpChar( char s ) { s_ = s; } bool operator()( const std::pair< const char, std::string >& i ) const { return i.second.find( s_ ) != std::string::npos; } }; char CharToT9( char s ) const { Map::const_iterator i = std::find_if( map_.begin(), map_.end(), CmpChar( s ) ); if ( i == map_.end() ) throw std::out_of_range( \"Char wasn't found\" ); return i->first; } }; void LoadDict( MultiMap& res, const ConverterToT9& conv ) { int num; float freq; std::string str; std::ifstream in( \"D:\\\\programming\\\tasks\\\t9\\\\words.num\" ); if ( !in.is_open() ) throw std::invalid_argument( \"Can't open file\" ); while( !in.eof() ) { in >> num >> freq >> str; res.insert( std::make_pair( conv.Execute( str ), str ) ); } in.close(); } int _tmain( int argc, TCHAR* argv[] ) { //* ConverterToT9 conv; MultiMap res; DictTrait trait; size_t rangeLen; size_t wordLength; LoadDict( res, conv ); std::pair< MultiMap::iterator, MultiMap::iterator > range = std::make_pair( res.begin(), res.begin() ); range = res.equal_range( range.first->first ); std::ofstream out( \"D:\\\\programming\\\tasks\\\t9\\esult.txt\" ); while ( ( range.first != res.end() ) && ( range.second != res.end() ) ) { rangeLen = std::distance( range.first, range.second ); wordLength = range.first->first.size(); trait.ProcessUnique( range.first, range.second, rangeLen ); trait.ProcessMaxRange( range.first, range.second, rangeLen ); trait.ProcessMaxLength( range.first, range.second, rangeLen, wordLength ); out << range.first->first << \" - \"; while ( range.first != range.second ) { out << range.first->second << \", \"; ++range.first; } out << \"\n\"; range = res.equal_range( range.first->first ); } out << \"Unique percent: \" << 100 * trait.unique / trait.total << \"%\" << \"\n\"; out << \"Max range: \" << trait.maxRange.first << \" words\n\"; out << \"Words are: \n\"; for ( size_t i = 0; i < trait.maxRange.second.size(); ++i ) { out << \" \" << ( *( ( trait.maxRange.second )[ i ] ) ).second << \"\n\"; } out << \"Max length: \" << trait.maxLength.first << \" symbols\n\"; out << \"Words are: \n\"; for ( size_t i = 0; i < trait.maxLength.second.size(); ++i ) { out << \" \" << ( *trait.maxLength.second[ i ] ).second << \"\n\"; } out.close(); getchar(); return 0; }"@en . "The T9 section of the Technician test contains information on antennas, feedlines."@en . "[[Soubor:20-mobil.jpg|thumb|V\u00E1\u0161 mobil v\u00ED, co chcete napsat. Narozd\u00EDl od v\u00E1s.]] T9 odboji ve devitka ke vynalez, kufry tam usnadnuje prani pop. Spocita u ton, we var mocil mobil vhodne skoto, kdy bicete naprav jeste predtim, mez in napisete, a uz val nemusite volil namahav ste prsty. Poslu val muzete nit hotovou trikrat frite, mez cez T9. Vo je tekla pomoc, srn vsechny, jen krov zavisli ma sten mobilu a bez prani pop si ty nedovedou stul zivou cni predstavit. Nevine prepne, jen ptal v zrodu T9, vysada vo, ze vo byka nejaka valna sluzba, nejspis rana lic. Inteligentni ve devitka zob slota x monic jazyku, takze muzete rh prav i s vasini zahranicnimi janosi. Umi anglicky, nemecky, vlivprky, zvladne i gamuda. Pravec, nacas vedla nekalou najmu chybu, cle uv snadno napravite. Kdyby od, atenas poz"@cs .