#!/usr/bin/perl
# Greedy stemmer for Serbian language as described in 2008 paper:
#   Vlado Keselj and Danko Sipka. A Suffix Subsumption-based Approach
#   to Building Stemmers and Lemmatizers for Highly Inflectional
#    Languages with Sparse Resources.  In INFOTHECA, Journal of
#    Informatics and Librarianship, No 1-2, Volume IX, May 2008.
# Resources available at: http://www.cs.dal.ca/~vlado/nlp/2007-sr/
# stemmer-greedy.pl
# Version 1.0, 2009-04-29, written by Vlado Keselj
# Reads standard input and produces stemmed output.
# The used algorithm is not efficient.

while (<>) {
    # Stem words longer than 3 letters and not shorter than 31
    while (/\b[a-zA-Z-]{4,30}\b/)
    { print $`.&stem($&); $_ = $'; }
    print;
}

sub stem {
    my $w = shift;
    my $s = "\L$w";
    while ($s>$MaxSuffixLen or (!exists($Rules{$s}) and $s ne ''))
    { $s = substr($s,1) }
    return $w if $s eq '';
    return substr($w,0,length($w) - $Rules{$s});
}

# 1000 Greedy rules, form: 'suffix' => 'removed suffix'
# BestAccuracy = 72.4589448093139
BEGIN {
%Rules = (
 'e' => 'e',
 'u' => 'u',
 'i' => 'i',
 'a' => 'a',
 'om' => 'om',
 'o' => 'o',
 'im' => 'im',
 'ama' => 'ama',
 'ih' => 'ih',
 'te' => 'te',
 'ima' => 'ima',
 'mo' => 'mo',
 'oj' => 'oj',
 'omu' => 'omu',
 'oga' => 'oga',
 'og' => 'og',
 'ti' => 'ti',
 't' => 't',
 'h' => 'h',
 'm' => 'm',
 'cyesx' => 'cyesx',
 'cyu' => 'cyu',
 'le' => 'le',
 'la' => 'la',
 'li' => 'li',
 'cye' => 'cye',
 'lo' => 'lo',
 'cyete' => 'cyete',
 'cyemo' => 'cyemo',
 'ne' => 'ne',
 'ni' => 'ni',
 'sxe' => 'sxe',
 'na' => 'na',
 'no' => 'no',
 'ste' => 'ste',
 'vsxi' => 'vsxi',
 'smo' => 'smo',
 'n' => 'n',
 'ju' => 'ju',
 'jte' => 'jte',
 'jmo' => 'jmo',
 'j' => 'j',
 'sx' => 'sx',
 'ci' => 'ci',
 'ite' => 'ite',
 'imo' => 'imo',
 'ka' => 'ka',
 'ku' => 'ku',
 'kom' => 'kom',
 'ke' => 'ke',
 'hu' => 'hu',
 'em' => 'em',
 'io' => 'io',
 'isx' => 'isx',
 'icyu' => 'icyu',
 'icyete' => 'icyete',
 'icyesx' => 'icyesx',
 'icyemo' => 'icyemo',
 'icye' => 'icye',
 'iti' => 'iti',
 'it' => 'it',
 'ilo' => 'ilo',
 'ili' => 'ili',
 'ile' => 'ile',
 'ila' => 'ila',
 'cxe' => 'cxe',
 'cima' => 'cima',
 'ivsxi' => 'ivsxi',
 'isxe' => 'isxe',
 'iste' => 'iste',
 'ismo' => 'ismo',
 'k' => 'k',
 'tima' => 'tima',
 'ujete' => 'ujete',
 'ujesx' => 'ujesx',
 'ujemo' => 'ujemo',
 'ujem' => 'ujem',
 'uje' => 'uje',
 'uju' => 'uju',
 'xcyu' => 'xcyu',
 'kama' => 'kama',
 'ene' => 'ene',
 'ena' => 'ena',
 'en' => 'en',
 'eno' => 'eno',
 'eni' => 'eni',
 'jucyi' => 'jucyi',
 'aka' => 'aka',
 'ute' => 'ute',
 'uji' => 'uji',
 'ujite' => 'ujite',
 'ujimo' => 'ujimo',
 'ova' => 'ova',
 'ivavsxi' => 'ivavsxi',
 'ivati' => 'ivati',
 'ivat' => 'ivat',
 'ivasxe' => 'ivasxe',
 'ivaste' => 'ivaste',
 'ivasmo' => 'ivasmo',
 'ivao' => 'ivao',
 'ivano' => 'ivano',
 'ivani' => 'ivani',
 'ivane' => 'ivane',
 'ivana' => 'ivana',
 'ivan' => 'ivan',
 'ivalo' => 'ivalo',
 'ivali' => 'ivali',
 'ivale' => 'ivale',
 'ivala' => 'ivala',
 'ivah' => 'ivah',
 'ivacyu' => 'ivacyu',
 'ivacyete' => 'ivacyete',
 'ivacyesx' => 'ivacyesx',
 'ivacyemo' => 'ivacyemo',
 'ivacye' => 'ivacye',
 'ivahu' => 'ivahu',
 'yeno' => 'yeno',
 'yeni' => 'yeni',
 'yene' => 'yene',
 'yena' => 'yena',
 'yen' => 'yen',
 'ete' => 'ete',
 'emo' => 'emo',
 'esx' => 'esx',
 'lyeno' => 'lyeno',
 'lyeni' => 'lyeni',
 'lyene' => 'lyene',
 'lyena' => 'lyena',
 'lyen' => 'lyen',
 'ava' => 'ava',
 'ucyu' => 'ucyu',
 'ucyete' => 'ucyete',
 'ucyesx' => 'ucyesx',
 'ucyemo' => 'ucyemo',
 'ucye' => 'ucye',
 'uo' => 'uo',
 'ulo' => 'ulo',
 'uli' => 'uli',
 'ule' => 'ule',
 'ula' => 'ula',
 'uti' => 'uti',
 'ut' => 'ut',
 'usxe' => 'usxe',
 'uste' => 'uste',
 'usmo' => 'usmo',
 'uvsxi' => 'uvsxi',
 'uh' => 'uh',
 'aca' => 'aca',
 'uto' => 'uto',
 'uta' => 'uta',
 'ujte' => 'ujte',
 'ovavsxi' => 'ovavsxi',
 'ovati' => 'ovati',
 'ovat' => 'ovat',
 'ovasxe' => 'ovasxe',
 'ovaste' => 'ovaste',
 'ovasmo' => 'ovasmo',
 'ovao' => 'ovao',
 'ovano' => 'ovano',
 'ovani' => 'ovani',
 'ovane' => 'ovane',
 'ovana' => 'ovana',
 'ovan' => 'ovan',
 'ovalo' => 'ovalo',
 'ovali' => 'ovali',
 'ovale' => 'ovale',
 'ovala' => 'ovala',
 'ovah' => 'ovah',
 'ovacyu' => 'ovacyu',
 'ovacyete' => 'ovacyete',
 'ovacyesx' => 'ovacyesx',
 'ovacyemo' => 'ovacyemo',
 'ovacye' => 'ovacye',
 'ujmo' => 'ujmo',
 'uj' => 'uj',
 'cem' => 'cem',
 'ujucyi' => 'ujucyi',
 'umo' => 'umo',
 'ac' => 'ac',
 'ovahu' => 'ovahu',
 'ove' => 'ove',
 'ovi' => 'ovi',
 'ovima' => 'ovima',
 'ma' => 'ma',
 'vima' => 'vima',
 'timo' => 'timo',
 'tite' => 'tite',
 'tisx' => 'tisx',
 'eg' => 'eg',
 'ga' => 'ga',
 'ega' => 'ega',
 'ata' => 'ata',
 'emu' => 'emu',
 'tio' => 'tio',
 'xete' => 'xete',
 'xemo' => 'xemo',
 'gu' => 'gu',
 'gom' => 'gom',
 'xesx' => 'xesx',
 'ticyu' => 'ticyu',
 'ticyete' => 'ticyete',
 'ticyesx' => 'ticyesx',
 'ticyemo' => 'ticyemo',
 'ticye' => 'ticye',
 'titi' => 'titi',
 'tit' => 'tit',
 'tilo' => 'tilo',
 'tili' => 'tili',
 'tile' => 'tile',
 'tila' => 'tila',
 'mima' => 'mima',
 'ge' => 'ge',
 'ecyu' => 'ecyu',
 'ecyete' => 'ecyete',
 'ecyesx' => 'ecyesx',
 'ecyemo' => 'ecyemo',
 'ecye' => 'ecye',
 'zxe' => 'zxe',
 'iju' => 'iju',
 'cyeno' => 'cyeno',
 'cyeni' => 'cyeni',
 'cyene' => 'cyene',
 'cyena' => 'cyena',
 'cyen' => 'cyen',
 'eti' => 'eti',
 'ijem' => 'ijem',
 'et' => 'et',
 'eo' => 'eo',
 'elo' => 'elo',
 'eli' => 'eli',
 'ele' => 'ele',
 'ela' => 'ela',
 'tisxe' => 'tisxe',
 'tiste' => 'tiste',
 'tismo' => 'tismo',
 'g' => 'g',
 'tem' => 'tem',
 'tivsxi' => 'tivsxi',
 'yahu' => 'yahu',
 'tmo' => 'tmo',
 'esxe' => 'esxe',
 'xucyi' => 'xucyi',
 'este' => 'este',
 'esmo' => 'esmo',
 'zima' => 'zima',
 'ad' => 'ad',
 'adi' => 'adi',
 'adima' => 'adima',
 'lyasxe' => 'lyasxe',
 'lyaste' => 'lyaste',
 'lyasmo' => 'lyasmo',
 'lyahu' => 'lyahu',
 'lyah' => 'lyah',
 'eh' => 'eh',
 'ijomu' => 'ijomu',
 'ijoj' => 'ijoj',
 'ijim' => 'ijim',
 'ijih' => 'ijih',
 'ijemu' => 'ijemu',
 'ijega' => 'ijega',
 'ijeg' => 'ijeg',
 'evsxi' => 'evsxi',
 'ecyi' => 'ecyi',
 'go' => 'go',
 'ocxe' => 'ocxe',
 'ocu' => 'ocu',
 'ocima' => 'ocima',
 'oci' => 'oci',
 'ocem' => 'ocem',
 'oce' => 'oce',
 'oca' => 'oca',
 'laca' => 'laca',
 'lac' => 'lac',
 'jima' => 'jima',
 'cyem' => 'cyem',
 'jem' => 'jem',
 'jeli' => 'jeli',
 'jele' => 'jele',
 'jela' => 'jela',
 'jelo' => 'jelo',
 'sxcyete' => 'sxcyete',
 'sxcyesx' => 'sxcyesx',
 'sxcyemo' => 'sxcyemo',
 'sxcye' => 'sxcye',
 'jecyu' => 'jecyu',
 'jecyete' => 'jecyete',
 'jecyesx' => 'jecyesx',
 'jecyemo' => 'jecyemo',
 'jecye' => 'jecye',
 'jeti' => 'jeti',
 'jet' => 'jet',
 'cyite' => 'cyite',
 'cyimo' => 'cyimo',
 'tahu' => 'tahu',
 'eva' => 'eva',
 'taka' => 'taka',
 'lima' => 'lima',
 'cxete' => 'cxete',
 'tku' => 'tku',
 'tkom' => 'tkom',
 'tke' => 'tke',
 'tka' => 'tka',
 'cxemo' => 'cxemo',
 'evi' => 'evi',
 'eve' => 'eve',
 'evima' => 'evima',
 'gama' => 'gama',
 'kova' => 'kova',
 'bo' => 'bo',
 'bama' => 'bama',
 'ovanye' => 'ovanye',
 'aba' => 'aba',
 'lyem' => 'lyem',
 'alya' => 'alya',
 'ha' => 'ha',
 'aja' => 'aja',
 'hom' => 'hom',
 'xcyeno' => 'xcyeno',
 'xcyeni' => 'xcyeni',
 'xcyene' => 'xcyene',
 'xcyena' => 'xcyena',
 'xcyen' => 'xcyen',
 'kovi' => 'kovi',
 'jesxe' => 'jesxe',
 'xahu' => 'xahu',
 'kovima' => 'kovima',
 'kove' => 'kove',
 'jevsxi' => 'jevsxi',
 'jeste' => 'jeste',
 'jesmo' => 'jesmo',
 'jeh' => 'jeh',
 'ij' => 'ij',
 'ijete' => 'ijete',
 'ijesx' => 'ijesx',
 'tak' => 'tak',
 'ijemo' => 'ijemo',
 'xcxe' => 'xcxe',
 'he' => 'he',
 'ijte' => 'ijte',
 'ijmo' => 'ijmo',
 'iveno' => 'iveno',
 'iveni' => 'iveni',
 'ivene' => 'ivene',
 'ivena' => 'ivena',
 'iven' => 'iven',
 'gavsxi' => 'gavsxi',
 'cxisx' => 'cxisx',
 'cyasxe' => 'cyasxe',
 'cyaste' => 'cyaste',
 'cyasmo' => 'cyasmo',
 'cyahu' => 'cyahu',
 'cyah' => 'cyah',
 'komu' => 'komu',
 'jesx' => 'jesx',
 'gosxe' => 'gosxe',
 'goste' => 'goste',
 'gosmo' => 'gosmo',
 'goh' => 'goh',
 'cxicyesx' => 'cxicyesx',
 'cxicye' => 'cxicye',
 'cxasxe' => 'cxasxe',
 'cxaste' => 'cxaste',
 'cxasmo' => 'cxasmo',
 'cxah' => 'cxah',
 'yeti' => 'yeti',
 'yet' => 'yet',
 'yelo' => 'yelo',
 'yeli' => 'yeli',
 'yele' => 'yele',
 'yela' => 'yela',
 'yecyu' => 'yecyu',
 'yecyete' => 'yecyete',
 'yecyesx' => 'yecyesx',
 'yecyemo' => 'yecyemo',
 'yecye' => 'yecye',
 'cxahu' => 'cxahu',
 'ajucyi' => 'ajucyi',
 'tko' => 'tko',
 'nesx' => 'nesx',
 'xevima' => 'xevima',
 'xevi' => 'xevi',
 'xeve' => 'xeve',
 'xeva' => 'xeva',
 'ivomu' => 'ivomu',
 'klo' => 'klo',
 'kli' => 'kli',
 'kle' => 'kle',
 'kla' => 'kla',
 'dosxe' => 'dosxe',
 'doste' => 'doste',
 'dosmo' => 'dosmo',
 'doh' => 'doh',
 'dem' => 'dem',
 'tecyu' => 'tecyu',
 'tecyete' => 'tecyete',
 'tecyesx' => 'tecyesx',
 'tecyemo' => 'tecyemo',
 'tecye' => 'tecye',
 'oama' => 'oama',
 'gova' => 'gova',
 'xnyeno' => 'xnyeno',
 'xnyeni' => 'xnyeni',
 'xnyene' => 'xnyene',
 'xnyena' => 'xnyena',
 'xnyen' => 'xnyen',
 'tomu' => 'tomu',
 'lisx' => 'lisx',
 'tjeti' => 'tjeti',
 'nicyesx' => 'nicyesx',
 'nicye' => 'nicye',
 'licyesx' => 'licyesx',
 'licye' => 'licye',
 'kanye' => 'kanye',
 'tkama' => 'tkama',
 'tjeli' => 'tjeli',
 'teti' => 'teti',
 'tet' => 'tet',
 'teo' => 'teo',
 'telo' => 'telo',
 'teli' => 'teli',
 'tele' => 'tele',
 'tela' => 'tela',
 'tjet' => 'tjet',
 'tjelo' => 'tjelo',
 'tjele' => 'tjele',
 'tjela' => 'tjela',
 'tjecyu' => 'tjecyu',
 'tjecyete' => 'tjecyete',
 'tjecyesx' => 'tjecyesx',
 'tjecyemo' => 'tjecyemo',
 'tjecye' => 'tjecye',
 'govima' => 'govima',
 'govi' => 'govi',
 'gove' => 'gove',
 'ecy' => 'ecy',
 'zxem' => 'zxem',
 'utim' => 'utim',
 'nisx' => 'nisx',
 'egavsxi' => 'egavsxi',
 'zxesx' => 'zxesx',
 'utomu' => 'utomu',
 'utoj' => 'utoj',
 'utoga' => 'utoga',
 'utog' => 'utog',
 'utih' => 'utih',
 'dete' => 'dete',
 'desx' => 'desx',
 'demo' => 'demo',
 'zak' => 'zak',
 'yesx' => 'yesx',
 'tova' => 'tova',
 'ssxe' => 'ssxe',
 'cxivsxi' => 'cxivsxi',
 'tesxe' => 'tesxe',
 'teste' => 'teste',
 'tesmo' => 'tesmo',
 'slo' => 'slo',
 'sli' => 'sli',
 'sle' => 'sle',
 'sla' => 'sla',
 'deni' => 'deni',
 'dene' => 'dene',
 'ilima' => 'ilima',
 'ijesxe' => 'ijesxe',
 'deno' => 'deno',
 'dena' => 'dena',
 'den' => 'den',
 'yevsxi' => 'yevsxi',
 'yesxe' => 'yesxe',
 'yeste' => 'yeste',
 'yesmo' => 'yesmo',
 'yeh' => 'yeh',
 'tovi' => 'tovi',
 'tove' => 'tove',
 'ikinyu' => 'ikinyu',
 'ikinyom' => 'ikinyom',
 'ikinyo' => 'ikinyo',
 'ikinyi' => 'ikinyi',
 'ikinye' => 'ikinye',
 'ikinyama' => 'ikinyama',
 'ikinya' => 'ikinya',
 'tevsxi' => 'tevsxi',
 'teh' => 'teh',
 'sao' => 'sao',
 'ivenyu' => 'ivenyu',
 'ijecyesx' => 'ijecyesx',
 'nisxe' => 'nisxe',
 'livsxi' => 'livsxi',
 'kima' => 'kima',
 'ijecyu' => 'ijecyu',
 'ijecyete' => 'ijecyete',
 'ijecyemo' => 'ijecyemo',
 'ijecye' => 'ijecye',
 'zaka' => 'zaka',
 'tjevsxi' => 'tjevsxi',
 'tjesxe' => 'tjesxe',
 'tjeste' => 'tjeste',
 'tjesmo' => 'tjesmo',
 'tjeh' => 'tjeh',
 'tje' => 'tje',
 'nivsxi' => 'nivsxi',
 'lisxe' => 'lisxe',
 'ijeti' => 'ijeti',
 'dyem' => 'dyem',
 'cxetu' => 'cxetu',
 'cxetom' => 'cxetom',
 'cxeta' => 'cxeta',
 'ucyima' => 'ucyima',
 'ucyem' => 'ucyem',
 'sxem' => 'sxem',
 'pcxe' => 'pcxe',
 'ijet' => 'ijet',
 'ijelo' => 'ijelo',
 'ijeli' => 'ijeli',
 'ijele' => 'ijele',
 'ijela' => 'ijela',
 'ho' => 'ho',
 'cxadi' => 'cxadi',
 'pcu' => 'pcu',
 'pce' => 'pce',
 'pca' => 'pca',
 'kne' => 'kne',
 'ijen' => 'ijen',
 'baca' => 'baca',
 'bac' => 'bac',
 'zxisx' => 'zxisx',
 'sxesx' => 'sxesx',
 'nomu' => 'nomu',
 'ijeno' => 'ijeno',
 'ijeni' => 'ijeni',
 'ijene' => 'ijene',
 'ijena' => 'ijena',
 'dujete' => 'dujete',
 'dujesx' => 'dujesx',
 'dujemo' => 'dujemo',
 'duje' => 'duje',
 'dne' => 'dne',
 'xcyasxe' => 'xcyasxe',
 'xcyaste' => 'xcyaste',
 'xcyasmo' => 'xcyasmo',
 'xcyahu' => 'xcyahu',
 'xcyah' => 'xcyah',
 'hama' => 'hama',
 'ekao' => 'ekao',
 'zxicyesx' => 'zxicyesx',
 'zxicye' => 'zxicye',
 'zgo' => 'zgo',
 'nucyesx' => 'nucyesx',
 'nucye' => 'nucye',
 'ijeste' => 'ijeste',
 'ijesmo' => 'ijesmo',
 'dni' => 'dni',
 'dnem' => 'dnem',
 'astomu' => 'astomu',
 'ast' => 'ast',
 'zgosxe' => 'zgosxe',
 'zgoste' => 'zgoste',
 'zgosmo' => 'zgosmo',
 'zgoh' => 'zgoh',
 'zgavsxi' => 'zgavsxi',
 'zem' => 'zem',
 'kujete' => 'kujete',
 'kujesx' => 'kujesx',
 'kujemo' => 'kujemo',
 'kuje' => 'kuje',
 'ijeh' => 'ijeh',
 'erete' => 'erete',
 'eresx' => 'eresx',
 'eremo' => 'eremo',
 'erem' => 'erem',
 'kujucyi' => 'kujucyi',
 'kovavsxi' => 'kovavsxi',
 'kovati' => 'kovati',
 'kovat' => 'kovat',
 'kovasxe' => 'kovasxe',
 'kovaste' => 'kovaste',
 'kovasmo' => 'kovasmo',
 'kovao' => 'kovao',
 'kovano' => 'kovano',
 'kovani' => 'kovani',
 'kovane' => 'kovane',
 'kovana' => 'kovana',
 'kovan' => 'kovan',
 'kovalo' => 'kovalo',
 'kovali' => 'kovali',
 'kovale' => 'kovale',
 'kovala' => 'kovala',
 'kovah' => 'kovah',
 'kovacyu' => 'kovacyu',
 'kovacyete' => 'kovacyete',
 'kovacyesx' => 'kovacyesx',
 'kovacyemo' => 'kovacyemo',
 'kovacye' => 'kovacye',
 'ijevsxi' => 'ijevsxi',
 'acya' => 'acya',
 'kusx' => 'kusx',
 'knumo' => 'knumo',
 'isxesx' => 'isxesx',
 'isxem' => 'isxem',
 'isavsxi' => 'isavsxi',
 'isati' => 'isati',
 'isat' => 'isat',
 'isasxe' => 'isasxe',
 'isaste' => 'isaste',
 'isasmo' => 'isasmo',
 'isao' => 'isao',
 'isalo' => 'isalo',
 'isali' => 'isali',
 'isale' => 'isale',
 'isala' => 'isala',
 'isah' => 'isah',
 'isacyu' => 'isacyu',
 'isacyete' => 'isacyete',
 'isacyesx' => 'isacyesx',
 'isacyemo' => 'isacyemo',
 'isacye' => 'isacye',
 'dnute' => 'dnute',
 'disx' => 'disx',
 'zesx' => 'zesx',
 'temo' => 'temo',
 'knesx' => 'knesx',
 'kmo' => 'kmo',
 'hovima' => 'hovima',
 'hovi' => 'hovi',
 'hove' => 'hove',
 'hova' => 'hova',
 'dujucyi' => 'dujucyi',
 'zete' => 'zete',
 'zemo' => 'zemo',
 'tete' => 'tete',
 'tesx' => 'tesx',
 'lyemu' => 'lyemu',
 'lyega' => 'lyega',
 'lyeg' => 'lyeg',
 'koste' => 'koste',
 'kosmo' => 'kosmo',
 'knusx' => 'knusx',
 'knte' => 'knte',
 'knmo' => 'knmo',
 'jucyim' => 'jucyim',
 'egnusx' => 'egnusx',
 'egnumo' => 'egnumo',
 'egnte' => 'egnte',
 'egnmo' => 'egnmo',
 'egne' => 'egne',
 'egn' => 'egn',
 'egao' => 'egao',
 'dnuto' => 'dnuto',
 'dnuti' => 'dnuti',
 'dnuta' => 'dnuta',
 'dnut' => 'dnut',
 'dnete' => 'dnete',
 'dnesx' => 'dnesx',
 'dnemo' => 'dnemo',
 'zosxe' => 'zosxe',
 'zoste' => 'zoste',
 'zosmo' => 'zosmo',
 'zoh' => 'zoh',
 'zeno' => 'zeno',
 'zeni' => 'zeni',
 'zene' => 'zene',
 'zena' => 'zena',
 'zen' => 'zen',
 'zaca' => 'zaca',
 'zac' => 'zac',
 'scu' => 'scu',
 'sce' => 'sce',
 'sca' => 'sca',
 'lyomu' => 'lyomu',
 'kosxe' => 'kosxe',
 'jucyih' => 'jucyih',
 'eglo' => 'eglo',
 'egli' => 'egli',
 'egle' => 'egle',
 'egla' => 'egla',
 'dicyesx' => 'dicyesx',
 'dicye' => 'dicye',
 'koh' => 'koh',
 'kni' => 'kni',
 'jucyiomu' => 'jucyiomu',
 'ucxem' => 'ucxem',
 'sxlo' => 'sxlo',
 'knuvsxi' => 'knuvsxi',
 'knuto' => 'knuto',
 'knusxe' => 'knusxe',
 'knucyesx' => 'knucyesx',
 'knucye' => 'knucye',
 'cxisxe' => 'cxisxe',
 'ukao' => 'ukao',
 'sxli' => 'sxli',
 'sxle' => 'sxle',
 'sxla' => 'sxla',
 'oste' => 'oste',
 'osmo' => 'osmo',
 'esete' => 'esete',
 'esesx' => 'esesx',
 'esemo' => 'esemo',
 'esem' => 'esem',
 'elomu' => 'elomu',
 'egnuvsxi' => 'egnuvsxi',
 'egnuto' => 'egnuto',
 'egnusxe' => 'egnusxe',
 'egnucyesx' => 'egnucyesx',
 'egnucye' => 'egnucye',
 'egni' => 'egni',
 'egnesx' => 'egnesx',
 'risx' => 'risx',
 'lyisx' => 'lyisx',
 'kn' => 'kn',
 'itomu' => 'itomu',
 'iomu' => 'iomu',
 'ekute' => 'ekute',
 'ekumo' => 'ekumo',
 'ekte' => 'ekte',
 'xnyasxe' => 'xnyasxe',
 'xnyaste' => 'xnyaste',
 'xnyasmo' => 'xnyasmo',
 'xnyahu' => 'xnyahu',
 'xnyah' => 'xnyah',
 'tosxe' => 'tosxe',
 'toste' => 'toste',
 'tosmo' => 'tosmo',
 'toh' => 'toh',
 'teno' => 'teno',
 'teni' => 'teni',
 'tene' => 'tene',
 'tena' => 'tena',
 'ten' => 'ten',
 'svsxi' => 'svsxi',
 'psxcyu' => 'psxcyu',
 'psxcyete' => 'psxcyete',
 'psxcyesx' => 'psxcyesx',
 'psxcyemo' => 'psxcyemo',
 'psxcye' => 'psxcye',
 'psti' => 'psti',
 'mete' => 'mete',
 'mesx' => 'mesx',
 'memo' => 'memo',
 'mem' => 'mem',
 'isxite' => 'isxite',
 'isximo' => 'isximo',
 'isano' => 'isano',
 'isani' => 'isani',
 'isane' => 'isane',
 'isana' => 'isana',
 'isan' => 'isan',
 'igavsxi' => 'igavsxi',
 'etomu' => 'etomu',
 'cxemu' => 'cxemu',
 'cxega' => 'cxega',
 'xlyeno' => 'xlyeno',
 'xlyeni' => 'xlyeni',
 'xlyene' => 'xlyene',
 'xlyena' => 'xlyena',
 'xlyen' => 'xlyen',
 'ukte' => 'ukte',
 'ukmo' => 'ukmo',
 'uih' => 'uih',
 'stem' => 'stem',
 'sisx' => 'sisx',
 'sicyu' => 'sicyu',
 'sicyesx' => 'sicyesx',
 'sicye' => 'sicye',
 'sh' => 'sh',
 'ricyu' => 'ricyu',
 'ricye' => 'ricye',
 'isxeno' => 'isxeno',
 'isxeni' => 'isxeni',
 'isxene' => 'isxene',
 'isxena' => 'isxena',
 'isxen' => 'isxen',
 'isahu' => 'isahu',
 'igosxe' => 'igosxe',
 'disxe' => 'disxe',
 'bem' => 'bem',
 'ugosxe' => 'ugosxe',
 'ugoste' => 'ugoste',
 'ugosmo' => 'ugosmo',
 'ugoh' => 'ugoh',
 'ugavsxi' => 'ugavsxi',
 'toro' => 'toro',
 'sxcyi' => 'sxcyi',
 'stete' => 'stete',
 'stesx' => 'stesx',
 'stemo' => 'stemo',
 'pesx' => 'pesx',
 'dga' => 'dga',
 'bete' => 'bete',
 'besx' => 'besx',
 'bemo' => 'bemo',
 'zxivsxi' => 'zxivsxi',
 'zxisxe' => 'zxisxe',
 'ukute' => 'ukute',
 'ukusx' => 'ukusx',
 'ukumo' => 'ukumo',
 'skomu' => 'skomu',
 'ruk' => 'ruk',
 'ovomu' => 'ovomu',
 'nuvsxi' => 'nuvsxi',
 'nusxe' => 'nusxe',
 'lovima' => 'lovima',
 'iruku' => 'iruku',
 'irukomu' => 'irukomu',
 'irukom' => 'irukom',
 'irukoj' => 'irukoj',
 'irukoga' => 'irukoga',
 'irukog' => 'irukog',
 'iruko' => 'iruko',
 'irukim' => 'irukim',
 'irukih' => 'irukih',
 'iruki' => 'iruki',
 'iruke' => 'iruke',
 'iruka' => 'iruka',
 'iruk' => 'iruk',
 'irucxte' => 'irucxte',
 'irucxmo' => 'irucxmo',
 'irucxiti' => 'irucxiti',
 'irucxite' => 'irucxite',
 'irucxit' => 'irucxit',
 'irucxisx' => 'irucxisx',
 'irucxio' => 'irucxio',
 'irucximo' => 'irucximo',
 'irucxim' => 'irucxim',
 'irucxilo' => 'irucxilo',
 'irucxili' => 'irucxili',
 'irucxile' => 'irucxile',
 'irucxila' => 'irucxila',
 'irucxicyu' => 'irucxicyu',
 'irucxicyete' => 'irucxicyete',
 'irucxicyesx' => 'irucxicyesx',
 'irucxicyemo' => 'irucxicyemo',
 'irucxicye' => 'irucxicye',
 'irucxi' => 'irucxi',
 'irucxeno' => 'irucxeno',
 'irucxeni' => 'irucxeni',
 'irucxene' => 'irucxene',
 'irucxena' => 'irucxena',
 'irucxen' => 'irucxen',
 'irucxe' => 'irucxe',
 'irucx' => 'irucx',
 'dyusx' => 'dyusx',
 'dyte' => 'dyte',
 'dymo' => 'dymo',
 'divsxi' => 'divsxi',
 'cetu' => 'cetu',
 'cetom' => 'cetom',
 'ceta' => 'ceta',
 'cadi' => 'cadi',
 'cad' => 'cad',
 'beno' => 'beno',
 'bena' => 'bena',
 'ben' => 'ben',
 'sxicyu' => 'sxicyu',
 'sxicyesx' => 'sxicyesx',
 'sxicye' => 'sxicye',
 'ovete' => 'ovete',
 'ovesx' => 'ovesx',
 'ovemo' => 'ovemo',
 'ovem' => 'ovem',
 'ocyesx' => 'ocyesx',
 'kovomu' => 'kovomu',
 'irucxivsxi' => 'irucxivsxi',
 'irucxisxe' => 'irucxisxe',
 'irucxiste' => 'irucxiste',
 'irucxismo' => 'irucxismo',
 'irucxih' => 'irucxih',
 'bosxe' => 'bosxe',
 'boste' => 'boste',
 'bosmo' => 'bosmo',
 'boh' => 'boh',
 'beni' => 'beni',
 'bene' => 'bene',
 'tujucyi' => 'tujucyi',
 'tujete' => 'tujete',
 'tujesx' => 'tujesx',
 'tujemo' => 'tujemo',
 'tuje' => 'tuje',
 'tecyi' => 'tecyi',
 'taca' => 'taca',
 'tac' => 'tac',
 'stosxe' => 'stosxe',
 'stoste' => 'stoste',
 'stosmo' => 'stosmo',
 'stoh' => 'stoh',
 'steno' => 'steno',
 'steni' => 'steni',
 'stene' => 'stene',
 'stena' => 'stena',
 'sten' => 'sten',
 'pvsxi' => 'pvsxi',
 'ognu' => 'ognu',
 'ognte' => 'ognte',
 'ognmo' => 'ognmo',
 'ognem' => 'ognem',
 'ogne' => 'ogne',
 'ogn' => 'ogn',
 'isxucyi' => 'isxucyi',
 'iresxe' => 'iresxe',
 'ilicyesx' => 'ilicyesx',
 'ilicye' => 'ilicye',
 'gujucyi' => 'gujucyi',
 'gujete' => 'gujete',
 'gujesx' => 'gujesx',
 'gujemo' => 'gujemo',
 'guje' => 'guje',
 'cxomu' => 'cxomu',
 'cxoj' => 'cxoj',
 'azxete' => 'azxete',
 'azxemo' => 'azxemo',
 'agosxe' => 'agosxe',
 'sxisx' => 'sxisx',
 'sivsxi' => 'sivsxi',
 'sisxe' => 'sisxe',
 'ogosxe' => 'ogosxe',
 'oglo' => 'oglo',
 'ogli' => 'ogli',
 'ogle' => 'ogle',
 'ogla' => 'ogla',
 'ogavsxi' => 'ogavsxi',
 'ogao' => 'ogao',
 'iricyu' => 'iricyu',
 'iricye' => 'iricye',
 'iresx' => 'iresx',
 'ilivsxi' => 'ilivsxi',
 'ilisxe' => 'ilisxe',
 'govavsxi' => 'govavsxi',
 'govati' => 'govati',
 'govat' => 'govat',
 'govasxe' => 'govasxe',
 'govaste' => 'govaste',
 'govasmo' => 'govasmo',
 'govao' => 'govao',
 'govano' => 'govano',
 'govani' => 'govani',
 'govane' => 'govane',
 'govana' => 'govana',
 'govan' => 'govan',
 'govalo' => 'govalo',
 'govali' => 'govali',
 'govale' => 'govale',
 'govala' => 'govala',
 'govahu' => 'govahu',
 'govah' => 'govah',
 'govacyu' => 'govacyu',
 'govacyete' => 'govacyete',
 'govacyesx' => 'govacyesx',
 'govacyemo' => 'govacyemo',
 'govacye' => 'govacye',
 'eju' => 'eju',
 'cxeg' => 'cxeg',
 'unesx' => 'unesx',
 'une' => 'une',
 'un' => 'un',
 'tilima' => 'tilima',
 'sxivsxi' => 'sxivsxi',
 'sticyu' => 'sticyu',
 'sticyesx' => 'sticyesx',
 'sticye' => 'sticye',
 'soste' => 'soste',
 'sosmo' => 'sosmo',
 'soh' => 'soh',
 'rugati' => 'rugati',
 'ognusx' => 'ognusx',
 'ognumo' => 'ognumo',
 'misx' => 'misx',
 'micyesx' => 'micyesx',
 'micye' => 'micye',
 'lyesx' => 'lyesx',
 'lyecyu' => 'lyecyu',
 'iruje' => 'iruje',
 'irugavsxi' => 'irugavsxi',
 'irugati' => 'irugati',
 'irugat' => 'irugat',
 'irugasxe' => 'irugasxe',
 'irugaste' => 'irugaste',
 'irugasmo' => 'irugasmo',
 'irugao' => 'irugao',
 'irugano' => 'irugano',
 'irugani' => 'irugani',
 'irugane' => 'irugane',
 'irugana' => 'irugana',
 'irugan' => 'irugan',
 'irugalo' => 'irugalo',
 'irugali' => 'irugali',
 'irugale' => 'irugale',
 'irugala' => 'irugala',
 'irugah' => 'irugah',
 'irugacyu' => 'irugacyu',
 'irugacyete' => 'irugacyete',
 'irugacyesx' => 'irugacyesx',
 'irugacyemo' => 'irugacyemo',
 'irugacye' => 'irugacye',
 'iruga' => 'iruga',
 'iricyesx' => 'iricyesx',
 'ireti' => 'ireti',
 'iret' => 'iret',
 'ireste' => 'ireste',
 'iresmo' => 'iresmo',
 'ireli' => 'ireli',
 'irele' => 'irele'
    );

  $MaxSuffixLen = 0;
  foreach my $k (keys %Rules) {
      if (length($k) > $MaxSuffixLen) { $MaxSuffixLen = length($k) }
      $Rules{$k} = length($Rules{$k});
  }
}
