├── README ├── test.txt ├── tests ├── IJ.wrong ├── nosuggest.sug ├── 1975530.wrong ├── IJ.sug ├── arabic.dic ├── arabic.wrong ├── korean.wrong ├── oconv2.good ├── oconv2.root ├── onlyincompound.sug ├── reputf.sug ├── reputf.wrong ├── 2970242.wrong ├── IJ.good ├── alias.dic ├── checksharps.wrong ├── compoundrule5.wrong ├── flag.dic ├── i35725.good ├── i53643.dic ├── i68568.dic ├── korean.aff ├── needaffix.wrong ├── needaffix3.wrong ├── oconv2.dic ├── phone.wrong ├── reputf.dic ├── warn.good ├── 2970240.good ├── IJ.dic ├── alias2.dic ├── alias3.dic ├── allcaps2.sug ├── checksharpsutf.wrong ├── encoding.aff ├── flaglong.dic ├── flagutf8.dic ├── i54633.sug ├── i68568utf.dic ├── korean.good ├── needaffix3.dic ├── needaffix5.dic ├── ngram_utf_fix.good ├── ngram_utf_fix.sug ├── oconv.good ├── utf8_bom.dic ├── utf8_bom2.dic ├── utf8_nonbmp.aff ├── wordpair.wrong ├── 1463589_utf.dic ├── 1975530.good ├── 2970240.wrong ├── 2999225.good ├── allcaps2.wrong ├── checkcompoundcase2.wrong ├── checkcompoundcaseutf.wrong ├── checksharps.sug ├── checksharpsutf.sug ├── circumfix.dic ├── compoundrule.good ├── condition_utf.dic ├── digits_in_words.wrong ├── flagnum.dic ├── i54633.good ├── i54633.wrong ├── korean.dic ├── needaffix3.good ├── simplifiedtriple.wrong ├── utf8.dic ├── warn.dic ├── 1592880.good ├── 1695964.dic ├── 1695964.sug ├── 1695964.wrong ├── 1975530.dic ├── checkcompoundpattern2.wrong ├── complexprefixes.dic ├── complexprefixesutf.dic ├── dotless_i.aff ├── forbiddenword.good ├── forceucase.sug ├── forceucase.wrong ├── ignore.dic ├── needaffix.dic ├── nepali.wrong ├── nosuggest.dic ├── oconv.sug ├── oconv.wrong ├── opentaal_cpdpat.good ├── opentaal_cpdpat.wrong ├── opentaal_cpdpat2.good ├── opentaal_cpdpat2.wrong ├── opentaal_forbiddenword1.sug ├── opentaal_forbiddenword2.sug ├── timelimit.good ├── utf8_bom.good ├── utf8_bom2.good ├── utf8_nonbmp.wrong ├── zeroaffix.good ├── .gitignore ├── alias.good ├── alias2.good ├── breakoff.good ├── checkcompoundcase2.good ├── checkcompoundcaseutf.good ├── checkcompounddup.dic ├── checkcompoundrep.good ├── circumfix.wrong ├── compoundaffix.dic ├── ignoresug.dic ├── map.sug ├── map.wrong ├── maputf.sug ├── needaffix.good ├── nepali.good ├── ngram_utf_fix.wrong ├── nosuggest.good ├── oconv.dic ├── onlyincompound.wrong ├── sug2.sug ├── sug2.wrong ├── timelimit.wrong ├── utf8_nonbmp.sug ├── 1592880.dic ├── 2970242.dic ├── 2999225.dic ├── affixes.dic ├── allcaps.dic ├── checkcompoundcaseutf.dic ├── checkcompoundpattern2.dic ├── checkcompoundtriple.wrong ├── colons_in_words.dic ├── complexprefixes.wrong ├── complexprefixes2.dic ├── complexprefixesutf.wrong ├── compoundaffix2.dic ├── compoundaffix3.dic ├── compoundrule.dic ├── compoundrule2.dic ├── compoundrule3.dic ├── compoundrule6.dic ├── conditionalprefix.wrong ├── dotless_i.dic ├── encoding.good ├── fogemorpheme.dic ├── forceucase.dic ├── fullstrip.dic ├── i53643.wrong ├── i54980.good ├── i58202.dic ├── iconv.dic ├── iconv2.good ├── keepcase.good ├── maputf.wrong ├── needaffix2.aff ├── needaffix4.aff ├── nepali.dic ├── ngram_utf_fix.dic ├── nosuggest.wrong ├── onlyincompound.dic ├── onlyincompound2.dic ├── simplifiedtriple.dic ├── simplifiedtriple.good ├── wordpair.good ├── 1706659.dic ├── 2970240.dic ├── allcaps.sug ├── allcaps.wrong ├── allcaps2.dic ├── allcaps2.good ├── allcaps_utf.dic ├── checkcompoundcase.wrong ├── checkcompoundpattern2.good ├── checkcompoundpattern4.good ├── checkcompoundpattern4.wrong ├── complexprefixes.good ├── compoundflag.good ├── fogemorpheme.good ├── iconv2.dic ├── maputf.dic ├── onlyincompound2.good ├── timelimit.dic ├── utf8_nonbmp.good ├── zeroaffix.dic ├── alias3.good ├── allcaps3.wrong ├── allcaps_utf.sug ├── allcaps_utf.wrong ├── checkcompounddup.wrong ├── checkcompoundpattern.good ├── complexprefixesutf.good ├── compoundflag.aff ├── compoundflag.dic ├── compoundflag.wrong ├── compoundforbid.dic ├── fogemorpheme.wrong ├── forbiddenword.wrong ├── keepcase.dic ├── needaffix2.good ├── needaffix4.good ├── onlyincompound2.wrong ├── slash.good ├── wordpair.dic ├── 2970242.good ├── breakoff.dic ├── checkcompoundcase.dic ├── compoundrule3.good ├── compoundrule4.wrong ├── compoundrule7.wrong ├── compoundrule8.wrong ├── opentaal_forbiddenword1.good ├── timelimit.aff ├── utfcompound.aff ├── 1706659.wrong ├── breakdefault.dic ├── checkcompoundrep.wrong ├── checkcompoundtriple.dic ├── circumfix.good ├── complexprefixes2.good ├── compoundaffix.wrong ├── compoundforbid.wrong ├── compoundrule6.good ├── conditionalprefix.dic ├── i68568utf.wrong ├── iconv.good ├── ignoresug.good ├── map.aff ├── map.dic ├── oconv2.morph ├── onlyincompound.good ├── opentaal_cpdpat.dic ├── rep.aff ├── slash.dic ├── allcaps.good ├── break.dic ├── breakoff.wrong ├── checkcompoundpattern3.dic ├── compoundaffix3.good ├── compoundrule.aff ├── compoundrule6.wrong ├── dotless_i.wrong ├── hu.wrong ├── i53643.aff ├── i68568.wrong ├── keepcase.aff ├── needaffix4.dic ├── needaffix5.wrong ├── opentaal_cpdpat2.dic ├── opentaal_keepcase.good ├── phone.aff ├── utf8_bom2.aff ├── utfcompound.good ├── 1463589.dic ├── allcaps_utf.good ├── breakdefault.wrong ├── checkcompoundcase.good ├── checkcompoundcaseutf.aff ├── compoundforbid.good ├── compoundrule2.aff ├── compoundrule3.aff ├── encoding.dic ├── i54633.dic ├── i54980.dic ├── opentaal_forbiddenword2.dic ├── phone.sug ├── utf8_bom.aff ├── affixes.good ├── allcaps3.dic ├── allcaps_utf.aff ├── breakdefault.sug ├── checkcompoundpattern4.dic ├── compoundrule5.good ├── condition.aff ├── condition.dic ├── germancompounding.dic ├── ignore.good ├── keepcase.wrong ├── needaffix.aff ├── opentaal_forbiddenword1.dic ├── opentaal_forbiddenword2.good ├── 1463589.sug ├── 1975530.aff ├── checkcompoundcase2.aff ├── checkcompounddup.good ├── checksharps.aff ├── checksharps.dic ├── compoundaffix.good ├── dotless_i.good ├── forceucase.good ├── germancompoundingold.dic ├── i54633.aff ├── i58202.aff ├── keepcase.sug ├── opentaal_keepcase.dic ├── slash.aff ├── utfcompound.wrong ├── 1463589.wrong ├── 1463589_utf.sug ├── 2970242.aff ├── arabic.aff ├── breakdefault.good ├── checksharpsutf.aff ├── compoundrule2.wrong ├── forceucase.aff ├── needaffix2.dic ├── 1463589_utf.wrong ├── 2999225.aff ├── checkcompoundcase2.dic ├── checkcompoundpattern.wrong ├── checkcompoundrep.aff ├── checkcompoundrep.dic ├── checkcompoundtriple.good ├── flag.good ├── flagnum.good ├── germancompounding.aff ├── i58202.good ├── utf8.good ├── utf8_nonbmp.dic ├── .gitattributes ├── checkcompounddup.aff ├── checkcompoundpattern.dic ├── compoundrule6.aff ├── conditionalprefix.good ├── flaglong.good ├── flagutf8.good ├── germancompoundingold.aff ├── opentaal_forbiddenword1.wrong ├── opentaal_forbiddenword2.wrong ├── utfcompound.dic ├── i54980.aff ├── oconv2.test ├── rep.sug ├── suggestiontest │ ├── .gitignore │ ├── Makefile.am │ ├── Makefile.orig │ ├── README │ ├── test │ ├── prepare2 │ └── prepare ├── checkcompoundtriple.aff ├── checksharpsutf.dic ├── forbiddenword.dic ├── fullstrip.good ├── ignoreutf.good ├── opentaal_forbiddenword2.aff ├── utf8_nonbmp.test ├── checkcompoundpattern3.wrong ├── compoundaffix3.wrong ├── ignoreutf.dic ├── 2970240.aff ├── checkcompoundcase.aff ├── ph2.good ├── breakdefault.aff ├── compoundaffix2.good ├── opentaal_keepcase.wrong ├── ph.wrong ├── right_to_left_mark.dic ├── digits_in_words.dic ├── ignore.aff ├── needaffix3.aff ├── sug2.dic ├── sugutf.dic ├── allcaps3.aff ├── checkcompoundpattern3.good ├── compoundaffix.aff ├── i68568.aff ├── colons_in_words.aff ├── rep.wrong ├── 1463589.aff ├── IJ.aff ├── base.wrong ├── onlyincompound.aff ├── opentaal_keepcase.aff ├── allcaps.aff ├── i35725.wrong ├── i58202.wrong ├── affixes.aff ├── breakoff.aff ├── i68568utf.aff ├── right_to_left_mark.good ├── wordpair.aff ├── allcaps2.aff ├── allcaps3.good ├── compoundrule5.aff ├── opentaal_forbiddenword1.aff ├── rep.dic ├── base.sug ├── compoundaffix2.aff ├── compoundaffix3.aff ├── i58202.sug ├── base_utf.wrong ├── compoundrule4.aff ├── opentaal_keepcase.sug ├── phone.dic ├── sugutf.wrong ├── utf8.aff ├── sugutf.sug ├── 1463589_utf.aff ├── alias.aff ├── break.aff ├── iconv2.aff ├── oconv2.aff ├── checkcompoundpattern.aff ├── nepali.aff ├── ph.sug ├── simplifiedtriple.aff ├── sug.dic ├── base_utf.sug ├── i35725.sug ├── break.wrong ├── complexprefixes.aff ├── flag.aff ├── break.good ├── nosuggest.aff ├── ph2.sug ├── sug.sug ├── needaffix5.good ├── reputf.aff ├── conditionalprefix.aff ├── ph.dic ├── ph2.wrong ├── checksharps.good ├── flaglong.aff ├── needaffix5.aff ├── zeroaffix.aff ├── checksharpsutf.good ├── flagutf8.aff ├── checkcompoundpattern3.aff ├── compoundrule7.aff ├── maputf.aff ├── sug.wrong ├── flagnum.aff ├── i53643.good ├── iconv.aff ├── checkcompoundpattern4.aff ├── ignoreutf.aff ├── compoundrule8.aff ├── ph2.dic ├── compoundrule5.dic ├── complexprefixes2.aff ├── condition_utf.wrong ├── 1695964.aff ├── condition_utf.good ├── warn.aff ├── 1706659.aff ├── alias3.morph ├── checkcompoundpattern2.aff ├── fogemorpheme.aff ├── i35725.dic ├── compoundrule4.dic ├── morph.aff ├── complexprefixesutf.aff ├── opentaal_cpdpat.aff ├── forbiddenword.aff ├── alias2.aff ├── alias3.aff ├── compoundrule4.good ├── compoundrule7.good ├── compoundrule8.good ├── condition.wrong ├── compoundrule7.dic ├── digits_in_words.aff ├── base.good ├── germancompoundingold.good ├── onlyincompound2.aff ├── hu.dic ├── hu.good ├── right_to_left_mark.aff ├── condition.good ├── needaffix2.morph ├── morph.dic ├── base.dic ├── compoundrule2.good ├── 1592880.aff ├── circumfix.aff ├── ignoresug.aff ├── base_utf.dic ├── alias2.morph ├── base_utf.good ├── compoundrule.wrong ├── ignoresug.morph ├── circumfix.morph ├── zeroaffix.morph ├── compoundrule8.dic ├── compoundrule3.wrong ├── compoundforbid.aff ├── morph.good ├── ngram_utf_fix.aff ├── fullstrip.aff ├── germancompounding.good ├── sugutf.aff ├── oconv.aff ├── opentaal_cpdpat2.aff ├── sug.aff ├── sug2.aff ├── conditionalprefix.morph ├── ph.aff ├── ph2.aff ├── compoundrule5.morph ├── germancompounding.wrong ├── germancompoundingold.wrong ├── condition_utf.aff ├── hu.aff └── morph.morph ├── po ├── stamp-po ├── .gitignore ├── quot.sed ├── POTFILES.in ├── LINGUAS ├── ChangeLog ├── boldquot.sed ├── remove-potcdate.sin ├── insert-header.sin ├── en@quot.header ├── en@boldquot.header └── Rules-quot ├── src ├── parsers │ ├── .gitignore │ ├── Makefile.am │ ├── firstparser.hxx │ ├── htmlparser.hxx │ ├── manparser.hxx │ ├── odfparser.hxx │ ├── latexparser.hxx │ ├── firstparser.cxx │ ├── CMakeLists.txt │ ├── xmlparser.hxx │ └── testparser.cxx ├── Makefile.am ├── tools │ ├── ispellaff2myspell │ ├── .gitignore │ ├── Makefile.am │ ├── wordforms │ ├── wordlist2hunspell │ ├── hunzip.cxx │ └── fuzzer.cxx ├── CMakeLists.txt └── hunspell │ ├── hunvisapi.h │ ├── hunvisapi.h.in │ ├── Makefile.am │ ├── phonet.hxx │ ├── baseaffix.hxx │ ├── w_char.hxx │ └── langnum.hxx ├── NEWS ├── ChangeLog.O ├── msvc ├── Hunspell.rc └── .gitignore ├── man ├── Makefile.am ├── hu │ └── Makefile.am ├── hunzip.1 └── hzip.1 ├── Makefile.am ├── m4 ├── README ├── nls.m4 └── ChangeLog ├── hunspell.pc.in ├── appveyor.yml ├── AUTHORS ├── .travis.yml ├── .gitignore ├── license.hunspell └── license.myspell /README: -------------------------------------------------------------------------------- 1 | README.md -------------------------------------------------------------------------------- /test.txt: -------------------------------------------------------------------------------- 1 | test 2 | -------------------------------------------------------------------------------- /tests/IJ.wrong: -------------------------------------------------------------------------------- 1 | Ijs 2 | -------------------------------------------------------------------------------- /tests/nosuggest.sug: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /po/stamp-po: -------------------------------------------------------------------------------- 1 | timestamp 2 | -------------------------------------------------------------------------------- /tests/1975530.wrong: -------------------------------------------------------------------------------- 1 | تيار 2 | -------------------------------------------------------------------------------- /tests/IJ.sug: -------------------------------------------------------------------------------- 1 | IJs, ijs 2 | -------------------------------------------------------------------------------- /tests/arabic.dic: -------------------------------------------------------------------------------- 1 | 1 2 | ب 3 | -------------------------------------------------------------------------------- /tests/arabic.wrong: -------------------------------------------------------------------------------- 1 | ـ 2 | -------------------------------------------------------------------------------- /tests/korean.wrong: -------------------------------------------------------------------------------- 1 | 들어오세 2 | -------------------------------------------------------------------------------- /tests/oconv2.good: -------------------------------------------------------------------------------- 1 | aas 2 | -------------------------------------------------------------------------------- /tests/oconv2.root: -------------------------------------------------------------------------------- 1 | aa 2 | -------------------------------------------------------------------------------- /tests/onlyincompound.sug: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tests/reputf.sug: -------------------------------------------------------------------------------- 1 | főő 2 | -------------------------------------------------------------------------------- /tests/reputf.wrong: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /tests/2970242.wrong: -------------------------------------------------------------------------------- 1 | foobaz 2 | -------------------------------------------------------------------------------- /tests/IJ.good: -------------------------------------------------------------------------------- 1 | ijs 2 | IJs 3 | -------------------------------------------------------------------------------- /tests/alias.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/1 3 | -------------------------------------------------------------------------------- /tests/checksharps.wrong: -------------------------------------------------------------------------------- 1 | MÜßIG 2 | -------------------------------------------------------------------------------- /tests/compoundrule5.wrong: -------------------------------------------------------------------------------- 1 | .25 2 | -------------------------------------------------------------------------------- /tests/flag.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/A3 3 | -------------------------------------------------------------------------------- /tests/i35725.good: -------------------------------------------------------------------------------- 1 | permanent 2 | -------------------------------------------------------------------------------- /tests/i53643.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo 3 | -------------------------------------------------------------------------------- /tests/i68568.dic: -------------------------------------------------------------------------------- 1 | 1 2 | Elia/a 3 | -------------------------------------------------------------------------------- /tests/korean.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | -------------------------------------------------------------------------------- /tests/needaffix.wrong: -------------------------------------------------------------------------------- 1 | foo 2 | -------------------------------------------------------------------------------- /tests/needaffix3.wrong: -------------------------------------------------------------------------------- 1 | foos 2 | -------------------------------------------------------------------------------- /tests/oconv2.dic: -------------------------------------------------------------------------------- 1 | 1 2 | eiei/A 3 | -------------------------------------------------------------------------------- /tests/phone.wrong: -------------------------------------------------------------------------------- 1 | Brasillian 2 | -------------------------------------------------------------------------------- /tests/reputf.dic: -------------------------------------------------------------------------------- 1 | 1 2 | főő 3 | -------------------------------------------------------------------------------- /tests/warn.good: -------------------------------------------------------------------------------- 1 | foo 2 | foos 3 | -------------------------------------------------------------------------------- /src/parsers/.gitignore: -------------------------------------------------------------------------------- 1 | testparser 2 | -------------------------------------------------------------------------------- /tests/2970240.good: -------------------------------------------------------------------------------- 1 | firstmiddlelast 2 | -------------------------------------------------------------------------------- /tests/IJ.dic: -------------------------------------------------------------------------------- 1 | 1 2 | ijs/i 3 | Ijs/* 4 | -------------------------------------------------------------------------------- /tests/alias2.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/1 3 3 | -------------------------------------------------------------------------------- /tests/alias3.dic: -------------------------------------------------------------------------------- 1 | 1 2 | ouro/BC 4 3 | -------------------------------------------------------------------------------- /tests/allcaps2.sug: -------------------------------------------------------------------------------- 1 | iPod 2 | ipodos 3 | -------------------------------------------------------------------------------- /tests/checksharpsutf.wrong: -------------------------------------------------------------------------------- 1 | MÜßIG 2 | -------------------------------------------------------------------------------- /tests/encoding.aff: -------------------------------------------------------------------------------- 1 | SET ISO-8859-15 2 | -------------------------------------------------------------------------------- /tests/flaglong.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/zx09 3 | -------------------------------------------------------------------------------- /tests/flagutf8.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/AÜ 3 | -------------------------------------------------------------------------------- /tests/i54633.sug: -------------------------------------------------------------------------------- 1 | éditer 2 | Éditer 3 | -------------------------------------------------------------------------------- /tests/i68568utf.dic: -------------------------------------------------------------------------------- 1 | 1 2 | Bár/a 3 | -------------------------------------------------------------------------------- /tests/korean.good: -------------------------------------------------------------------------------- 1 | 들어오세요 2 | 안녕하세요 3 | -------------------------------------------------------------------------------- /tests/needaffix3.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/A 3 | -------------------------------------------------------------------------------- /tests/needaffix5.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/AC 3 | -------------------------------------------------------------------------------- /tests/ngram_utf_fix.good: -------------------------------------------------------------------------------- 1 | человек 2 | -------------------------------------------------------------------------------- /tests/ngram_utf_fix.sug: -------------------------------------------------------------------------------- 1 | человек 2 | -------------------------------------------------------------------------------- /tests/oconv.good: -------------------------------------------------------------------------------- 1 | bébé 2 | dádá 3 | -------------------------------------------------------------------------------- /tests/utf8_bom.dic: -------------------------------------------------------------------------------- 1 | 1 2 | apéritif 3 | -------------------------------------------------------------------------------- /tests/utf8_bom2.dic: -------------------------------------------------------------------------------- 1 | 1 2 | apéritif 3 | -------------------------------------------------------------------------------- /tests/utf8_nonbmp.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | -------------------------------------------------------------------------------- /tests/wordpair.wrong: -------------------------------------------------------------------------------- 1 | compoundword 2 | -------------------------------------------------------------------------------- /tests/1463589_utf.dic: -------------------------------------------------------------------------------- 1 | 1 2 | Kühlschrank 3 | -------------------------------------------------------------------------------- /tests/1975530.good: -------------------------------------------------------------------------------- 1 | أرى 2 | أيار 3 | ترى 4 | -------------------------------------------------------------------------------- /tests/2970240.wrong: -------------------------------------------------------------------------------- 1 | lastmiddlefirst 2 | -------------------------------------------------------------------------------- /tests/2999225.good: -------------------------------------------------------------------------------- 1 | foobar 2 | foobaz 3 | -------------------------------------------------------------------------------- /tests/allcaps2.wrong: -------------------------------------------------------------------------------- 1 | ipod 2 | iPodos 3 | -------------------------------------------------------------------------------- /tests/checkcompoundcase2.wrong: -------------------------------------------------------------------------------- 1 | áoóÓoá 2 | -------------------------------------------------------------------------------- /tests/checkcompoundcaseutf.wrong: -------------------------------------------------------------------------------- 1 | áoóÓoá 2 | -------------------------------------------------------------------------------- /tests/checksharps.sug: -------------------------------------------------------------------------------- 1 | MÜSSIG, müßig 2 | -------------------------------------------------------------------------------- /tests/checksharpsutf.sug: -------------------------------------------------------------------------------- 1 | MÜSSIG, müßig 2 | -------------------------------------------------------------------------------- /tests/circumfix.dic: -------------------------------------------------------------------------------- 1 | 1 2 | nagy/C po:adj 3 | -------------------------------------------------------------------------------- /tests/compoundrule.good: -------------------------------------------------------------------------------- 1 | abc 2 | acc 3 | -------------------------------------------------------------------------------- /tests/condition_utf.dic: -------------------------------------------------------------------------------- 1 | 1 2 | óőó/SP 3 | -------------------------------------------------------------------------------- /tests/digits_in_words.wrong: -------------------------------------------------------------------------------- 1 | -jährig 2 | -------------------------------------------------------------------------------- /tests/flagnum.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/999,54321 3 | -------------------------------------------------------------------------------- /tests/i54633.good: -------------------------------------------------------------------------------- 1 | éditer 2 | Éditer 3 | -------------------------------------------------------------------------------- /tests/i54633.wrong: -------------------------------------------------------------------------------- 1 | editer 2 | Editer 3 | -------------------------------------------------------------------------------- /tests/korean.dic: -------------------------------------------------------------------------------- 1 | 2 2 | 들어오세요 3 | 안녕하세요 4 | -------------------------------------------------------------------------------- /tests/needaffix3.good: -------------------------------------------------------------------------------- 1 | foo 2 | foosbaz 3 | -------------------------------------------------------------------------------- /tests/simplifiedtriple.wrong: -------------------------------------------------------------------------------- 1 | glasssko 2 | -------------------------------------------------------------------------------- /tests/utf8.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/A 3 | foó/A 4 | -------------------------------------------------------------------------------- /tests/warn.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/WA 3 | bar 4 | -------------------------------------------------------------------------------- /tests/1592880.good: -------------------------------------------------------------------------------- 1 | weg 2 | wege 3 | wegen 4 | -------------------------------------------------------------------------------- /tests/1695964.dic: -------------------------------------------------------------------------------- 1 | 2 2 | Mull/he 3 | Mull/S 4 | -------------------------------------------------------------------------------- /tests/1695964.sug: -------------------------------------------------------------------------------- 1 | Mull 2 | Mulle 3 | Mulls 4 | -------------------------------------------------------------------------------- /tests/1695964.wrong: -------------------------------------------------------------------------------- 1 | Mall 2 | Malle 3 | Malls 4 | -------------------------------------------------------------------------------- /tests/1975530.dic: -------------------------------------------------------------------------------- 1 | 2 2 | أرى/x 3 | أيار/x 4 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern2.wrong: -------------------------------------------------------------------------------- 1 | foobar 2 | -------------------------------------------------------------------------------- /tests/complexprefixes.dic: -------------------------------------------------------------------------------- 1 | 1 2 | ouro/B 3 | 4 | -------------------------------------------------------------------------------- /tests/complexprefixesutf.dic: -------------------------------------------------------------------------------- 1 | 1 2 | ⲟⲩⲣⲟ/B 3 | -------------------------------------------------------------------------------- /tests/dotless_i.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | LANG tr 3 | -------------------------------------------------------------------------------- /tests/forbiddenword.good: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | 4 | -------------------------------------------------------------------------------- /tests/forceucase.sug: -------------------------------------------------------------------------------- 1 | Foobaz 2 | Foobarbaz 3 | -------------------------------------------------------------------------------- /tests/forceucase.wrong: -------------------------------------------------------------------------------- 1 | foobaz 2 | foobarbaz 3 | -------------------------------------------------------------------------------- /tests/ignore.dic: -------------------------------------------------------------------------------- 1 | 2 2 | xmpl 3 | expression/A 4 | -------------------------------------------------------------------------------- /tests/needaffix.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/YXA 3 | bar/Y 4 | -------------------------------------------------------------------------------- /tests/nepali.wrong: -------------------------------------------------------------------------------- 1 | र्य 2 | क्‍यार 3 | अलम्‌ 4 | -------------------------------------------------------------------------------- /tests/nosuggest.dic: -------------------------------------------------------------------------------- 1 | 1 2 | foo/AB 3 | bar/B 4 | -------------------------------------------------------------------------------- /tests/oconv.sug: -------------------------------------------------------------------------------- 1 | BÉBÉ 2 | DÁDÁ 3 | AÁBCDEÉ 4 | -------------------------------------------------------------------------------- /tests/oconv.wrong: -------------------------------------------------------------------------------- 1 | béb 2 | dád 3 | aábcde 4 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat.good: -------------------------------------------------------------------------------- 1 | schoonheidssport 2 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat.wrong: -------------------------------------------------------------------------------- 1 | schoonheidsport 2 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat2.good: -------------------------------------------------------------------------------- 1 | zout-suikertest 2 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat2.wrong: -------------------------------------------------------------------------------- 1 | zoutsuikertest 2 | -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword1.sug: -------------------------------------------------------------------------------- 1 | barwordfoo 2 | -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword2.sug: -------------------------------------------------------------------------------- 1 | barwordfoo 2 | -------------------------------------------------------------------------------- /tests/timelimit.good: -------------------------------------------------------------------------------- 1 | 1000000000000000000000 2 | -------------------------------------------------------------------------------- /tests/utf8_bom.good: -------------------------------------------------------------------------------- 1 | apéritif 2 | APÉRITIF 3 | -------------------------------------------------------------------------------- /tests/utf8_bom2.good: -------------------------------------------------------------------------------- 1 | apéritif 2 | APÉRITIF 3 | -------------------------------------------------------------------------------- /tests/utf8_nonbmp.wrong: -------------------------------------------------------------------------------- 1 | 𐏑𐏒𐏒 2 | 𐏑𐏒𐏒 3 | -------------------------------------------------------------------------------- /tests/zeroaffix.good: -------------------------------------------------------------------------------- 1 | bar 2 | foo 3 | barbaz 4 | -------------------------------------------------------------------------------- /src/Makefile.am: -------------------------------------------------------------------------------- 1 | SUBDIRS=hunspell parsers tools 2 | -------------------------------------------------------------------------------- /tests/.gitignore: -------------------------------------------------------------------------------- 1 | testSubDir 2 | *.log 3 | *.trs 4 | -------------------------------------------------------------------------------- /tests/alias.good: -------------------------------------------------------------------------------- 1 | foo 2 | foox 3 | fooy 4 | fooyx 5 | -------------------------------------------------------------------------------- /tests/alias2.good: -------------------------------------------------------------------------------- 1 | foo 2 | foox 3 | fooy 4 | fooyx 5 | -------------------------------------------------------------------------------- /tests/breakoff.good: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | scot-free 4 | -------------------------------------------------------------------------------- /tests/checkcompoundcase2.good: -------------------------------------------------------------------------------- 1 | áoóáoó 2 | Óoááoó 3 | -------------------------------------------------------------------------------- /tests/checkcompoundcaseutf.good: -------------------------------------------------------------------------------- 1 | áoóáoó 2 | Óoááoó 3 | -------------------------------------------------------------------------------- /tests/checkcompounddup.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/A 3 | bar/A 4 | -------------------------------------------------------------------------------- /tests/checkcompoundrep.good: -------------------------------------------------------------------------------- 1 | vízszer 2 | szerkocsi 3 | -------------------------------------------------------------------------------- /tests/circumfix.wrong: -------------------------------------------------------------------------------- 1 | legnagy 2 | legeslegnagy 3 | -------------------------------------------------------------------------------- /tests/compoundaffix.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/XPS 3 | bar/XPS 4 | -------------------------------------------------------------------------------- /tests/ignoresug.dic: -------------------------------------------------------------------------------- 1 | 3 2 | ինչ 3 | մնաս 4 | որտեղ 5 | -------------------------------------------------------------------------------- /tests/map.sug: -------------------------------------------------------------------------------- 1 | Frühstück 2 | tükörfúró 3 | groß 4 | -------------------------------------------------------------------------------- /tests/map.wrong: -------------------------------------------------------------------------------- 1 | Fruhstuck 2 | tukorfuro 3 | gross 4 | -------------------------------------------------------------------------------- /tests/maputf.sug: -------------------------------------------------------------------------------- 1 | Frühstück 2 | tükörfúró 3 | groß 4 | -------------------------------------------------------------------------------- /tests/needaffix.good: -------------------------------------------------------------------------------- 1 | bar 2 | foos 3 | barfoos 4 | -------------------------------------------------------------------------------- /tests/nepali.good: -------------------------------------------------------------------------------- 1 | न्न 2 | न्‌न 3 | अलम्‍ 4 | र्‌य 5 | -------------------------------------------------------------------------------- /tests/ngram_utf_fix.wrong: -------------------------------------------------------------------------------- 1 | времячко 2 | человеко 3 | -------------------------------------------------------------------------------- /tests/nosuggest.good: -------------------------------------------------------------------------------- 1 | foo 2 | foobar 3 | barfoo 4 | -------------------------------------------------------------------------------- /tests/oconv.dic: -------------------------------------------------------------------------------- 1 | 3 2 | bébé 3 | dádá 4 | aábcdeé 5 | -------------------------------------------------------------------------------- /tests/onlyincompound.wrong: -------------------------------------------------------------------------------- 1 | pseudo 2 | pseudos 3 | -------------------------------------------------------------------------------- /tests/sug2.sug: -------------------------------------------------------------------------------- 1 | a lot 2 | in spite 3 | scot-free 4 | -------------------------------------------------------------------------------- /tests/sug2.wrong: -------------------------------------------------------------------------------- 1 | alot 2 | inspite 3 | scotfree 4 | -------------------------------------------------------------------------------- /tests/timelimit.wrong: -------------------------------------------------------------------------------- 1 | 1000000000000000000000x 2 | -------------------------------------------------------------------------------- /tests/utf8_nonbmp.sug: -------------------------------------------------------------------------------- 1 | 𐏒𐏑, 𐏒𐏒 2 | 𐏒𐏑, 𐏒𐏒 3 | -------------------------------------------------------------------------------- /tests/1592880.dic: -------------------------------------------------------------------------------- 1 | 3 2 | weg/Qoz 3 | weg/P 4 | wege 5 | -------------------------------------------------------------------------------- /tests/2970242.dic: -------------------------------------------------------------------------------- 1 | 3 2 | foo/ac 3 | bar/c 4 | baz/bc 5 | -------------------------------------------------------------------------------- /tests/2999225.dic: -------------------------------------------------------------------------------- 1 | 3 2 | foo/aA 3 | bar/b 4 | baz/B 5 | -------------------------------------------------------------------------------- /tests/affixes.dic: -------------------------------------------------------------------------------- 1 | 3 2 | hello 3 | try/B 4 | work/AB 5 | -------------------------------------------------------------------------------- /tests/allcaps.dic: -------------------------------------------------------------------------------- 1 | 2 2 | OpenOffice.org 3 | UNICEF/S 4 | -------------------------------------------------------------------------------- /tests/checkcompoundcaseutf.dic: -------------------------------------------------------------------------------- 1 | 2 2 | áoó/A 3 | Óoá/A 4 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern2.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/A 3 | bar/A 4 | -------------------------------------------------------------------------------- /tests/checkcompoundtriple.wrong: -------------------------------------------------------------------------------- 1 | fooopera 2 | bareeel 3 | -------------------------------------------------------------------------------- /tests/colons_in_words.dic: -------------------------------------------------------------------------------- 1 | 2 2 | c:a 3 | S:t 4 | foo 5 | -------------------------------------------------------------------------------- /tests/complexprefixes.wrong: -------------------------------------------------------------------------------- 1 | tekouro 2 | mettekouro 3 | -------------------------------------------------------------------------------- /tests/complexprefixes2.dic: -------------------------------------------------------------------------------- 1 | 1 2 | ouro/BC [stem_1] 3 | 4 | -------------------------------------------------------------------------------- /tests/complexprefixesutf.wrong: -------------------------------------------------------------------------------- 1 | ⲧⲉⲕⲟⲩⲣⲟ 2 | ⲙⲉⲧⲧⲉⲕⲟⲩⲣⲟ 3 | -------------------------------------------------------------------------------- /tests/compoundaffix2.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/XPS 3 | bar/XPS 4 | -------------------------------------------------------------------------------- /tests/compoundaffix3.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/XPS 3 | bar/XPS 4 | -------------------------------------------------------------------------------- /tests/compoundrule.dic: -------------------------------------------------------------------------------- 1 | 3 2 | a/A 3 | b/B 4 | c/BC 5 | 6 | -------------------------------------------------------------------------------- /tests/compoundrule2.dic: -------------------------------------------------------------------------------- 1 | 3 2 | a/A 3 | b/B 4 | c/C 5 | 6 | -------------------------------------------------------------------------------- /tests/compoundrule3.dic: -------------------------------------------------------------------------------- 1 | 3 2 | a/A 3 | b/B 4 | c/C 5 | 6 | -------------------------------------------------------------------------------- /tests/compoundrule6.dic: -------------------------------------------------------------------------------- 1 | 3 2 | a/A 3 | b/B 4 | c/C 5 | 6 | -------------------------------------------------------------------------------- /tests/conditionalprefix.wrong: -------------------------------------------------------------------------------- 1 | undrink 2 | undrinks 3 | -------------------------------------------------------------------------------- /tests/dotless_i.dic: -------------------------------------------------------------------------------- 1 | 3 2 | iç 3 | ışık 4 | Diyarbakır 5 | -------------------------------------------------------------------------------- /tests/encoding.good: -------------------------------------------------------------------------------- 1 | cœur 2 | œuvre 3 | CŒUR 4 | ŒUVRE 5 | -------------------------------------------------------------------------------- /tests/fogemorpheme.dic: -------------------------------------------------------------------------------- 1 | 2 2 | gata/A 3 | kontoret/X 4 | -------------------------------------------------------------------------------- /tests/forceucase.dic: -------------------------------------------------------------------------------- 1 | 3 2 | foo/C 3 | bar/C 4 | baz/CA 5 | -------------------------------------------------------------------------------- /tests/fullstrip.dic: -------------------------------------------------------------------------------- 1 | 2 2 | andare/A 3 | riandare/A 4 | 5 | -------------------------------------------------------------------------------- /tests/i53643.wrong: -------------------------------------------------------------------------------- 1 | 1..2 2 | 1,,2 3 | 1.,2 4 | 1,.2 5 | -------------------------------------------------------------------------------- /tests/i54980.good: -------------------------------------------------------------------------------- 1 | cœur 2 | œuvre 3 | CŒUR 4 | ŒUVRE 5 | -------------------------------------------------------------------------------- /tests/i58202.dic: -------------------------------------------------------------------------------- 1 | 4 2 | foo 3 | bar 4 | Baz 5 | Boo 6 | -------------------------------------------------------------------------------- /tests/iconv.dic: -------------------------------------------------------------------------------- 1 | 4 2 | Chișinău 3 | Țepes 4 | ț 5 | Ș 6 | -------------------------------------------------------------------------------- /tests/iconv2.good: -------------------------------------------------------------------------------- 1 | GaNa 2 | Gag 3 | GaggNa 4 | NanDa 5 | -------------------------------------------------------------------------------- /tests/keepcase.good: -------------------------------------------------------------------------------- 1 | foo 2 | Bar 3 | baz. 4 | Quux. 5 | -------------------------------------------------------------------------------- /tests/maputf.wrong: -------------------------------------------------------------------------------- 1 | Fruhstuck 2 | tukorfuro 3 | gross 4 | -------------------------------------------------------------------------------- /tests/needaffix2.aff: -------------------------------------------------------------------------------- 1 | NEEDAFFIX X 2 | COMPOUNDFLAG Y 3 | -------------------------------------------------------------------------------- /tests/needaffix4.aff: -------------------------------------------------------------------------------- 1 | NEEDAFFIX X 2 | COMPOUNDFLAG Y 3 | -------------------------------------------------------------------------------- /tests/nepali.dic: -------------------------------------------------------------------------------- 1 | 4 2 | अलम् 3 | क्यार 4 | न्न 5 | र्‌य 6 | -------------------------------------------------------------------------------- /tests/ngram_utf_fix.dic: -------------------------------------------------------------------------------- 1 | 1 2 | человек/2022,2000,101 3 | -------------------------------------------------------------------------------- /tests/nosuggest.wrong: -------------------------------------------------------------------------------- 1 | foox 2 | foobarx 3 | barfoox 4 | -------------------------------------------------------------------------------- /tests/onlyincompound.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/A 3 | pseudo/OAB 4 | -------------------------------------------------------------------------------- /tests/onlyincompound2.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/A 3 | pseudo/AB 4 | -------------------------------------------------------------------------------- /tests/simplifiedtriple.dic: -------------------------------------------------------------------------------- 1 | 2 2 | glass/A 3 | sko/A 4 | -------------------------------------------------------------------------------- /tests/simplifiedtriple.good: -------------------------------------------------------------------------------- 1 | glass 2 | sko 3 | glassko 4 | -------------------------------------------------------------------------------- /tests/wordpair.good: -------------------------------------------------------------------------------- 1 | word 2 | compound 3 | wordcompound 4 | -------------------------------------------------------------------------------- /NEWS: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/NEWS -------------------------------------------------------------------------------- /po/.gitignore: -------------------------------------------------------------------------------- 1 | POTFILES 2 | remove-potcdate.sed 3 | *.gmo 4 | -------------------------------------------------------------------------------- /tests/1706659.dic: -------------------------------------------------------------------------------- 1 | 3 2 | arbeits/v 3 | scheu/Aw 4 | farbig/A 5 | -------------------------------------------------------------------------------- /tests/2970240.dic: -------------------------------------------------------------------------------- 1 | 3 2 | first/c 3 | middle/c 4 | last/c 5 | -------------------------------------------------------------------------------- /tests/allcaps.sug: -------------------------------------------------------------------------------- 1 | OpenOffice.org 2 | UNICEF 3 | UNICEF's 4 | -------------------------------------------------------------------------------- /tests/allcaps.wrong: -------------------------------------------------------------------------------- 1 | Openoffice.org 2 | Unicef 3 | Unicef's 4 | -------------------------------------------------------------------------------- /tests/allcaps2.dic: -------------------------------------------------------------------------------- 1 | 3 2 | iPod/s 3 | iPodos/* 4 | ipodos 5 | -------------------------------------------------------------------------------- /tests/allcaps2.good: -------------------------------------------------------------------------------- 1 | iPod 2 | IPOD 3 | ipodos 4 | IPODOS 5 | -------------------------------------------------------------------------------- /tests/allcaps_utf.dic: -------------------------------------------------------------------------------- 1 | 2 2 | OpenOffice.org 3 | UNICEF/S 4 | -------------------------------------------------------------------------------- /tests/checkcompoundcase.wrong: -------------------------------------------------------------------------------- 1 | fooBar 2 | BAZBar 3 | BAZfoo 4 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern2.good: -------------------------------------------------------------------------------- 1 | barfoo 2 | fozar 3 | fur 4 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern4.good: -------------------------------------------------------------------------------- 1 | sUryOdayaM 2 | pErunna 3 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern4.wrong: -------------------------------------------------------------------------------- 1 | sUryaudayaM 2 | pEruunna 3 | -------------------------------------------------------------------------------- /tests/complexprefixes.good: -------------------------------------------------------------------------------- 1 | ouro 2 | metouro 3 | tekmetouro 4 | -------------------------------------------------------------------------------- /tests/compoundflag.good: -------------------------------------------------------------------------------- 1 | foobar 2 | barfoo 3 | foobarfoo 4 | -------------------------------------------------------------------------------- /tests/fogemorpheme.good: -------------------------------------------------------------------------------- 1 | gata 2 | kontoret 3 | gatukontoret 4 | -------------------------------------------------------------------------------- /tests/iconv2.dic: -------------------------------------------------------------------------------- 1 | 4 2 | GAG 3 | GAGGNA 4 | GANA 5 | NANDA 6 | -------------------------------------------------------------------------------- /tests/maputf.dic: -------------------------------------------------------------------------------- 1 | 3 2 | Frühstück 3 | tükörfúró 4 | groß 5 | -------------------------------------------------------------------------------- /tests/onlyincompound2.good: -------------------------------------------------------------------------------- 1 | foo 2 | foopseudo 3 | pseudosfoo 4 | -------------------------------------------------------------------------------- /tests/timelimit.dic: -------------------------------------------------------------------------------- 1 | 4 2 | 0/Y 3 | 00/Y 4 | 000/Y 5 | 1/Y 6 | -------------------------------------------------------------------------------- /tests/utf8_nonbmp.good: -------------------------------------------------------------------------------- 1 | 𐏑 2 | 𐏒 3 | 𐏒𐏑 4 | 𐏒𐏒 5 | 6 | -------------------------------------------------------------------------------- /tests/zeroaffix.dic: -------------------------------------------------------------------------------- 1 | 2 2 | foo/XA aas 2 | analyze(aas) = st:aa fl:A 3 | stem(aas) = aa 4 | -------------------------------------------------------------------------------- /tests/onlyincompound.good: -------------------------------------------------------------------------------- 1 | foo 2 | pseudofoo 3 | foopseudo 4 | foopseudos 5 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat.dic: -------------------------------------------------------------------------------- 1 | 3 2 | schoonheid/Ch 3 | port/CcXs 4 | sport/Cc 5 | -------------------------------------------------------------------------------- /tests/rep.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/rep.aff -------------------------------------------------------------------------------- /tests/slash.dic: -------------------------------------------------------------------------------- 1 | 4 2 | / 3 | 1\/2 4 | http:\/\/ 5 | \/usr\/share\/myspell\/ 6 | -------------------------------------------------------------------------------- /tests/allcaps.good: -------------------------------------------------------------------------------- 1 | OpenOffice.org 2 | OPENOFFICE.ORG 3 | UNICEF's 4 | UNICEF'S 5 | -------------------------------------------------------------------------------- /tests/break.dic: -------------------------------------------------------------------------------- 1 | 6 2 | foo 3 | bar 4 | baz 5 | fox-bax 6 | foo-baz/! 7 | e-mail 8 | -------------------------------------------------------------------------------- /tests/breakoff.wrong: -------------------------------------------------------------------------------- 1 | foo- 2 | -foo 3 | foo-bar 4 | foo-bar-foo-bar 5 | scot 6 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern3.dic: -------------------------------------------------------------------------------- 1 | 4 2 | foo/A 3 | boo/AX 4 | bar/A 5 | ban/AY 6 | -------------------------------------------------------------------------------- /tests/compoundaffix3.good: -------------------------------------------------------------------------------- 1 | foo 2 | foofoo 3 | prefoo 4 | foosuf 5 | prefoosuf 6 | -------------------------------------------------------------------------------- /tests/compoundrule.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDMIN 1 2 | COMPOUNDRULE 1 3 | COMPOUNDRULE ABC 4 | -------------------------------------------------------------------------------- /tests/compoundrule6.wrong: -------------------------------------------------------------------------------- 1 | abc 2 | abbbbbccccccc 3 | aabbccccccc 4 | aabbbbbbb 5 | -------------------------------------------------------------------------------- /tests/dotless_i.wrong: -------------------------------------------------------------------------------- 1 | Diyarbakir 2 | DIYARBAKIR 3 | Iç 4 | İşık 5 | IÇ 6 | İŞIK 7 | -------------------------------------------------------------------------------- /tests/hu.wrong: -------------------------------------------------------------------------------- 1 | majomkenyérfavirág 2 | iskolatejakció 3 | devonkor 4 | forróvíz 5 | -------------------------------------------------------------------------------- /tests/i53643.aff: -------------------------------------------------------------------------------- 1 | # check numbers with separators 2 | WORDCHARS 0123456789.-, 3 | -------------------------------------------------------------------------------- /tests/i68568.wrong: -------------------------------------------------------------------------------- 1 | sant'elia 2 | sant'Elia 3 | Sant'elia 4 | Sant' 5 | SANT' 6 | -------------------------------------------------------------------------------- /tests/keepcase.aff: -------------------------------------------------------------------------------- 1 | # keep case in signed words 2 | KEEPCASE A 3 | WORDCHARS . 4 | -------------------------------------------------------------------------------- /tests/needaffix4.dic: -------------------------------------------------------------------------------- 1 | 4 2 | foo/X [1] 3 | foo/Y [2] 4 | foo/YX [3] 5 | bar/Y [4] 6 | -------------------------------------------------------------------------------- /tests/needaffix5.wrong: -------------------------------------------------------------------------------- 1 | pseudoprefoo 2 | foopseudosuf 3 | pseudoprefoopseudosuf 4 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat2.dic: -------------------------------------------------------------------------------- 1 | 100 2 | test/CACBCc 3 | zout/CACBXm 4 | suiker/CACBXm -------------------------------------------------------------------------------- /tests/opentaal_keepcase.good: -------------------------------------------------------------------------------- 1 | tv-word 2 | word-tv 3 | NATO-word 4 | word-NATO 5 | -------------------------------------------------------------------------------- /tests/phone.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/phone.aff -------------------------------------------------------------------------------- /tests/utf8_bom2.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | 3 | # removing byte order mark from dic file 4 | -------------------------------------------------------------------------------- /tests/utfcompound.good: -------------------------------------------------------------------------------- 1 | foobar 2 | barfoo 3 | foobarfoo 4 | fóóáár 5 | áárfóó 6 | -------------------------------------------------------------------------------- /msvc/Hunspell.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/msvc/Hunspell.rc -------------------------------------------------------------------------------- /tests/1463589.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/1463589.dic -------------------------------------------------------------------------------- /tests/allcaps_utf.good: -------------------------------------------------------------------------------- 1 | OpenOffice.org 2 | OPENOFFICE.ORG 3 | UNICEF's 4 | UNICEF'S 5 | -------------------------------------------------------------------------------- /tests/breakdefault.wrong: -------------------------------------------------------------------------------- 1 | scot 2 | sco-free 3 | fo-bar 4 | foo-fo-bar 5 | foo-foo-fo 6 | -------------------------------------------------------------------------------- /tests/checkcompoundcase.good: -------------------------------------------------------------------------------- 1 | Barfoo 2 | foo-Bar 3 | foo-BAZ 4 | BAZ-foo 5 | BAZ-Bar 6 | -------------------------------------------------------------------------------- /tests/checkcompoundcaseutf.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | CHECKCOMPOUNDCASE 3 | COMPOUNDFLAG A 4 | -------------------------------------------------------------------------------- /tests/compoundforbid.good: -------------------------------------------------------------------------------- 1 | foo 2 | example 3 | foobar 4 | foobaz 5 | foobarexample 6 | -------------------------------------------------------------------------------- /tests/compoundrule2.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDMIN 1 2 | COMPOUNDRULE 1 3 | COMPOUNDRULE A*B*C* 4 | -------------------------------------------------------------------------------- /tests/compoundrule3.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDMIN 1 2 | COMPOUNDRULE 1 3 | COMPOUNDRULE A?B?C? 4 | -------------------------------------------------------------------------------- /tests/encoding.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/encoding.dic -------------------------------------------------------------------------------- /tests/i54633.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/i54633.dic -------------------------------------------------------------------------------- /tests/i54980.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/i54980.dic -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword2.dic: -------------------------------------------------------------------------------- 1 | 3 2 | foo/WS 3 | word/W 4 | bar/WS 5 | foowordbar/FS -------------------------------------------------------------------------------- /tests/phone.sug: -------------------------------------------------------------------------------- 1 | Brasilia, Xxxxxxxxxx, Brilliant, Brazilian, Brassily, Brilliance 2 | -------------------------------------------------------------------------------- /tests/utf8_bom.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | 3 | # removing byte order mark from affix file 4 | -------------------------------------------------------------------------------- /tests/affixes.good: -------------------------------------------------------------------------------- 1 | hello 2 | try 3 | tried 4 | work 5 | worked 6 | rework 7 | reworked 8 | -------------------------------------------------------------------------------- /tests/allcaps3.dic: -------------------------------------------------------------------------------- 1 | 4 2 | UNESCO/S 3 | Unesco/S 4 | Nasa/S 5 | NASA/S 6 | ACTS 7 | act/s 8 | -------------------------------------------------------------------------------- /tests/allcaps_utf.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | WORDCHARS '. 3 | 4 | SFX S N 1 5 | SFX S 0 's . 6 | 7 | -------------------------------------------------------------------------------- /tests/breakdefault.sug: -------------------------------------------------------------------------------- 1 | scott 2 | scot-free 3 | foo-bar 4 | foo-foo-bar 5 | foo-foo-foo 6 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern4.dic: -------------------------------------------------------------------------------- 1 | 4 2 | sUrya/Ax 3 | udayaM/Ax 4 | pEru/Bx 5 | unna/Bx 6 | 7 | -------------------------------------------------------------------------------- /tests/compoundrule5.good: -------------------------------------------------------------------------------- 1 | 10% 2 | 0.2% 3 | 0.20% 4 | 123.4561‰ 5 | 10 6 | 0000 7 | 10.25 8 | -------------------------------------------------------------------------------- /tests/condition.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/condition.aff -------------------------------------------------------------------------------- /tests/condition.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/condition.dic -------------------------------------------------------------------------------- /tests/germancompounding.dic: -------------------------------------------------------------------------------- 1 | 4 2 | Arbeit/A- 3 | Computer/BC- 4 | -/W 5 | Arbeitsnehmer/Z 6 | -------------------------------------------------------------------------------- /tests/ignore.good: -------------------------------------------------------------------------------- 1 | example 2 | expression 3 | xmpl 4 | xprssn 5 | reexpression 6 | rxprssn 7 | -------------------------------------------------------------------------------- /tests/keepcase.wrong: -------------------------------------------------------------------------------- 1 | Foo 2 | FOO 3 | BAR 4 | bar 5 | Baz. 6 | BAZ. 7 | quux. 8 | QUUX. 9 | -------------------------------------------------------------------------------- /tests/needaffix.aff: -------------------------------------------------------------------------------- 1 | NEEDAFFIX X 2 | COMPOUNDFLAG Y 3 | 4 | SFX A Y 1 5 | SFX A 0 s/Y . 6 | -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword1.dic: -------------------------------------------------------------------------------- 1 | 4 2 | foo/W 3 | word/W 4 | bar/WS 5 | foowordbar/FS 6 | -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword2.good: -------------------------------------------------------------------------------- 1 | fooword 2 | wordbar 3 | barwordfoo 4 | barwordfoos 5 | -------------------------------------------------------------------------------- /tests/1463589.sug: -------------------------------------------------------------------------------- 1 | Kühlschrank 2 | Kühlschrank 3 | Kühlschrank 4 | Kühlschrank 5 | Kühlschrank 6 | -------------------------------------------------------------------------------- /tests/1975530.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | IGNORE ٌٍَُِّْـ 3 | 4 | PFX x N 1 5 | PFX x أ ت أ[^ي] 6 | 7 | -------------------------------------------------------------------------------- /tests/checkcompoundcase2.aff: -------------------------------------------------------------------------------- 1 | # check extended ascii 2 | CHECKCOMPOUNDCASE 3 | COMPOUNDFLAG A 4 | -------------------------------------------------------------------------------- /tests/checkcompounddup.good: -------------------------------------------------------------------------------- 1 | barfoo 2 | foobar 3 | foofoobar 4 | foobarfoo 5 | barfoobarfoo 6 | -------------------------------------------------------------------------------- /tests/checksharps.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/checksharps.aff -------------------------------------------------------------------------------- /tests/checksharps.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/checksharps.dic -------------------------------------------------------------------------------- /tests/compoundaffix.good: -------------------------------------------------------------------------------- 1 | foo 2 | foofoo 3 | prefoo 4 | foosuf 5 | prefoosuf 6 | prefoobarsuf 7 | -------------------------------------------------------------------------------- /tests/dotless_i.good: -------------------------------------------------------------------------------- 1 | Diyarbakır 2 | DİYARBAKIR 3 | iç 4 | İç 5 | ışık 6 | Işık 7 | İÇ 8 | IŞIK 9 | -------------------------------------------------------------------------------- /tests/forceucase.good: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | baz 4 | foobar 5 | Foobaz 6 | foobazbar 7 | Foobarbaz 8 | -------------------------------------------------------------------------------- /tests/germancompoundingold.dic: -------------------------------------------------------------------------------- 1 | 4 2 | Arbeit/A- 3 | Computer/BC- 4 | -/W 5 | Arbeitsnehmer/Z 6 | -------------------------------------------------------------------------------- /tests/i54633.aff: -------------------------------------------------------------------------------- 1 | # Missing capitalized suggestion for capitalized bad words 2 | SET ISO8859-1 3 | -------------------------------------------------------------------------------- /tests/i58202.aff: -------------------------------------------------------------------------------- 1 | # case suggestions 2 | MAXNGRAMSUGS 0 3 | # capitalise baz->Baz 4 | TRY B 5 | -------------------------------------------------------------------------------- /tests/keepcase.sug: -------------------------------------------------------------------------------- 1 | foo 2 | foo 3 | Bar 4 | Bar, baz. 5 | baz. 6 | baz. 7 | Quux. 8 | Quux. 9 | -------------------------------------------------------------------------------- /tests/opentaal_keepcase.dic: -------------------------------------------------------------------------------- 1 | 5 2 | tv-/KB 3 | -tv/KE 4 | word/C 5 | NATO-/B 6 | -NATO/E 7 | 8 | -------------------------------------------------------------------------------- /tests/slash.aff: -------------------------------------------------------------------------------- 1 | # slashes in words (\/) 2 | 3 | # (only for tokenization) 4 | WORDCHARS /: 5 | -------------------------------------------------------------------------------- /tests/utfcompound.wrong: -------------------------------------------------------------------------------- 1 | xyyz 2 | fooxy 3 | xyfoo 4 | fooxybar 5 | ééőő 6 | fóóéé 7 | őőáár 8 | -------------------------------------------------------------------------------- /tests/1463589.wrong: -------------------------------------------------------------------------------- 1 | kuhlschrank 2 | kuehlschrank 3 | kühlschrank 4 | Kuhlschrank 5 | Kuehlschrank 6 | -------------------------------------------------------------------------------- /tests/1463589_utf.sug: -------------------------------------------------------------------------------- 1 | Kühlschrank 2 | Kühlschrank 3 | Kühlschrank 4 | Kühlschrank 5 | Kühlschrank 6 | -------------------------------------------------------------------------------- /tests/2970242.aff: -------------------------------------------------------------------------------- 1 | CHECKCOMPOUNDPATTERN 1 2 | CHECKCOMPOUNDPATTERN /a /b 3 | COMPOUNDFLAG c 4 | 5 | -------------------------------------------------------------------------------- /tests/arabic.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | TRY أ 3 | IGNORE ٌٍَُِّْ 4 | 5 | PFX Aa Y 1 6 | PFX Aa 0 0/X0 أ[^ي] 7 | -------------------------------------------------------------------------------- /tests/breakdefault.good: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | foo- 4 | -foo 5 | scot-free 6 | foo-bar 7 | foo-bar-foo-bar 8 | -------------------------------------------------------------------------------- /tests/checksharpsutf.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/checksharpsutf.aff -------------------------------------------------------------------------------- /tests/compoundrule2.wrong: -------------------------------------------------------------------------------- 1 | ba 2 | aaabaaa 3 | bbaaa 4 | aaaaba 5 | bbbbbaa 6 | cba 7 | cab 8 | acb 9 | -------------------------------------------------------------------------------- /tests/forceucase.aff: -------------------------------------------------------------------------------- 1 | # force capitalized compound 2 | TRY F 3 | FORCEUCASE A 4 | COMPOUNDFLAG C 5 | -------------------------------------------------------------------------------- /tests/needaffix2.dic: -------------------------------------------------------------------------------- 1 | 4 2 | foo st:foo id:1 3 | foo/YX st:foo id:2 4 | foo/Y st:foo id:3 5 | bar/Y 6 | -------------------------------------------------------------------------------- /src/tools/ispellaff2myspell: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/src/tools/ispellaff2myspell -------------------------------------------------------------------------------- /tests/1463589_utf.wrong: -------------------------------------------------------------------------------- 1 | kuhlschrank 2 | kuehlschrank 3 | kühlschrank 4 | Kuhlschrank 5 | Kuehlschrank 6 | -------------------------------------------------------------------------------- /tests/2999225.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDRULE 1 2 | COMPOUNDRULE ab 3 | 4 | COMPOUNDBEGIN A 5 | COMPOUNDEND B 6 | 7 | -------------------------------------------------------------------------------- /tests/checkcompoundcase2.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/checkcompoundcase2.dic -------------------------------------------------------------------------------- /tests/checkcompoundpattern.wrong: -------------------------------------------------------------------------------- 1 | könnynyelés 2 | hosszszámítás 3 | hosszkönnynyelés 4 | könnynyeléshossz 5 | -------------------------------------------------------------------------------- /tests/checkcompoundrep.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/checkcompoundrep.aff -------------------------------------------------------------------------------- /tests/checkcompoundrep.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/checkcompoundrep.dic -------------------------------------------------------------------------------- /tests/checkcompoundtriple.good: -------------------------------------------------------------------------------- 1 | operafoo 2 | operaeel 3 | operabare 4 | eelbare 5 | eelfoo 6 | eelopera 7 | -------------------------------------------------------------------------------- /tests/flag.good: -------------------------------------------------------------------------------- 1 | foo 2 | foos 3 | foosbar 4 | foosbaz 5 | unfoo 6 | unfoos 7 | unfoosbar 8 | unfoosbaz 9 | -------------------------------------------------------------------------------- /tests/flagnum.good: -------------------------------------------------------------------------------- 1 | foo 2 | foos 3 | foosbar 4 | foosbaz 5 | unfoo 6 | unfoos 7 | unfoosbar 8 | unfoosbaz 9 | -------------------------------------------------------------------------------- /tests/germancompounding.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/germancompounding.aff -------------------------------------------------------------------------------- /tests/i58202.good: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | Foo 4 | Bar 5 | Baz 6 | Boo 7 | FOO 8 | BAR 9 | BAZ 10 | BOO 11 | -------------------------------------------------------------------------------- /tests/utf8.good: -------------------------------------------------------------------------------- 1 | foo 2 | foó 3 | fooőő 4 | fooő 5 | foóő 6 | foő 7 | foőo 8 | foőoo 9 | foóó 10 | -------------------------------------------------------------------------------- /tests/utf8_nonbmp.dic: -------------------------------------------------------------------------------- 1 | 4 # Old Persian numbers (1-4), source: Wikipedia 2 | 𐏑 3 | 𐏒 4 | 𐏒𐏑 5 | 𐏒𐏒 6 | -------------------------------------------------------------------------------- /tests/.gitattributes: -------------------------------------------------------------------------------- 1 | *.sug text eol=lf 2 | *.good text eol=lf 3 | *.wrong text eol=lf 4 | *.morph text eol=lf 5 | -------------------------------------------------------------------------------- /tests/checkcompounddup.aff: -------------------------------------------------------------------------------- 1 | # Forbid compound word with triple letters 2 | CHECKCOMPOUNDDUP 3 | COMPOUNDFLAG A 4 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern.dic: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/checkcompoundpattern.dic -------------------------------------------------------------------------------- /tests/compoundrule6.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDMIN 1 2 | COMPOUNDRULE 2 3 | COMPOUNDRULE A*A 4 | COMPOUNDRULE A*AAB*BBBC*C 5 | -------------------------------------------------------------------------------- /tests/conditionalprefix.good: -------------------------------------------------------------------------------- 1 | drink 2 | drinks 3 | drinkable 4 | drinkables 5 | undrinkable 6 | undrinkables 7 | -------------------------------------------------------------------------------- /tests/flaglong.good: -------------------------------------------------------------------------------- 1 | foo 2 | foos 3 | foosbar 4 | foosbaz 5 | unfoo 6 | unfoos 7 | unfoosbar 8 | unfoosbaz 9 | -------------------------------------------------------------------------------- /tests/flagutf8.good: -------------------------------------------------------------------------------- 1 | foo 2 | foos 3 | foosbar 4 | foosbaz 5 | unfoo 6 | unfoos 7 | unfoosbar 8 | unfoosbaz 9 | -------------------------------------------------------------------------------- /tests/germancompoundingold.aff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nitro/hunspell/master/tests/germancompoundingold.aff -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword1.wrong: -------------------------------------------------------------------------------- 1 | foowordbar 2 | foowordbars 3 | foowordba 4 | foowordbas 5 | barwodfoo 6 | -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword2.wrong: -------------------------------------------------------------------------------- 1 | foowordbar 2 | foowordbars 3 | foowordba 4 | foowordbas 5 | barwodfoo 6 | -------------------------------------------------------------------------------- /tests/utfcompound.dic: -------------------------------------------------------------------------------- 1 | 8 2 | foo/A 3 | bar/A 4 | fóó/A 5 | áár/A 6 | xy/A 7 | yz/A 8 | éé/A 9 | őő/A 10 | -------------------------------------------------------------------------------- /tests/i54980.aff: -------------------------------------------------------------------------------- 1 | # ISO-8859-15 (extended latin-1) support for French, Finnish and EURO symbol 2 | SET ISO8859-15 3 | -------------------------------------------------------------------------------- /tests/oconv2.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | DIR="`dirname $0`" 3 | NAME="`basename $0 .test`" 4 | $DIR/test.sh $NAME -i utf-8 5 | -------------------------------------------------------------------------------- /tests/rep.sug: -------------------------------------------------------------------------------- 1 | form 2 | phantom 3 | vacation 4 | a lot, lot 5 | un alunno 6 | bar 7 | vinte e un 8 | auto's, auto 9 | -------------------------------------------------------------------------------- /tests/suggestiontest/.gitignore: -------------------------------------------------------------------------------- 1 | result.aspell 2 | result.hunspell 3 | List_of_common_misspellings.txt.* 4 | x.* 5 | -------------------------------------------------------------------------------- /man/Makefile.am: -------------------------------------------------------------------------------- 1 | man_MANS = hunspell.1 hunspell.3 hunspell.5 hzip.1 hunzip.1 2 | EXTRA_DIST = $(man_MANS) 3 | SUBDIRS=hu 4 | -------------------------------------------------------------------------------- /tests/checkcompoundtriple.aff: -------------------------------------------------------------------------------- 1 | # Forbid compound word with triple letters 2 | CHECKCOMPOUNDTRIPLE 3 | COMPOUNDFLAG A 4 | -------------------------------------------------------------------------------- /tests/checksharpsutf.dic: -------------------------------------------------------------------------------- 1 | 6 2 | müßig/k 3 | Ausstoß 4 | Abstoß. 5 | Außenabmessung 6 | Prozessionsstraße 7 | Außenmaße 8 | -------------------------------------------------------------------------------- /tests/forbiddenword.dic: -------------------------------------------------------------------------------- 1 | 5 2 | foo/S [1] 3 | foo/YX [2] 4 | foo/Y [3] 5 | foo/S [4] 6 | bar/YS [5] 7 | bars/X 8 | foos/X 9 | -------------------------------------------------------------------------------- /tests/fullstrip.good: -------------------------------------------------------------------------------- 1 | andare 2 | vado 3 | va 4 | andiamo 5 | riandare 6 | rivado 7 | riva 8 | riandiamo 9 | 10 | -------------------------------------------------------------------------------- /tests/ignoreutf.good: -------------------------------------------------------------------------------- 1 | طير 2 | فتحة 3 | ضمة 4 | كسرة 5 | فتحتان 6 | ضمتان 7 | كسرتان 8 | شدة 9 | سكون 10 | -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword2.aff: -------------------------------------------------------------------------------- 1 | TRY r 2 | 3 | FORBIDDENWORD F 4 | COMPOUNDFLAG W 5 | 6 | SFX S Y 1 7 | SFX S 0 s . 8 | -------------------------------------------------------------------------------- /tests/utf8_nonbmp.test: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | DIR="`dirname $0`" 3 | NAME="${0%.test}" 4 | "$DIR"/test.sh "$NAME" -i utf-8 -1 5 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern3.wrong: -------------------------------------------------------------------------------- 1 | booban 2 | boobanfoo 3 | fozar 4 | fozarfoo 5 | fozan 6 | fozanfoo 7 | bozar 8 | bozarfoo 9 | -------------------------------------------------------------------------------- /tests/compoundaffix3.wrong: -------------------------------------------------------------------------------- 1 | prefoobarsuf 2 | foosufbar 3 | fooprebar 4 | foosufprebar 5 | fooprebarsuf 6 | prefooprebarsuf 7 | -------------------------------------------------------------------------------- /tests/ignoreutf.dic: -------------------------------------------------------------------------------- 1 | 9 2 | طِير 3 | فَتحة 4 | ضُمة 5 | كِسرة 6 | فتحًتان 7 | ضمتانٌ 8 | كسرتاٍن 9 | شدّة 10 | سكوْن 11 | -------------------------------------------------------------------------------- /tests/2970240.aff: -------------------------------------------------------------------------------- 1 | # test words with three parts 2 | CHECKCOMPOUNDPATTERN 1 3 | CHECKCOMPOUNDPATTERN le fi 4 | COMPOUNDFLAG c 5 | 6 | -------------------------------------------------------------------------------- /tests/checkcompoundcase.aff: -------------------------------------------------------------------------------- 1 | # forbid upper case letters at word bounds in compounding 2 | CHECKCOMPOUNDCASE 3 | COMPOUNDFLAG A 4 | -------------------------------------------------------------------------------- /tests/ph2.good: -------------------------------------------------------------------------------- 1 | foo 2 | word 3 | stem 4 | wordstem 5 | stemword 6 | rootforbidden 7 | root's 8 | foobarö 9 | foobarőt 10 | -------------------------------------------------------------------------------- /src/tools/.gitignore: -------------------------------------------------------------------------------- 1 | analyze 2 | bulkcheck 3 | chmorph 4 | example 5 | hunspell 6 | hunzip 7 | hzip 8 | munch 9 | unmunch 10 | -------------------------------------------------------------------------------- /tests/breakdefault.aff: -------------------------------------------------------------------------------- 1 | # default word break at hyphens and n-dashes 2 | 3 | SET UTF-8 4 | MAXNGRAMSUGS 0 5 | WORDCHARS - 6 | TRY ot 7 | -------------------------------------------------------------------------------- /tests/compoundaffix2.good: -------------------------------------------------------------------------------- 1 | foo 2 | prefoo 3 | foosuf 4 | prefoosuf 5 | prefoobarsuf 6 | foosufbar 7 | fooprebarsuf 8 | prefooprebarsuf 9 | -------------------------------------------------------------------------------- /tests/opentaal_keepcase.wrong: -------------------------------------------------------------------------------- 1 | TV-word 2 | Tv-word 3 | word-TV 4 | word-Tv 5 | wordword-TV 6 | TV-word-TV 7 | Nato-word 8 | word-nato 9 | -------------------------------------------------------------------------------- /tests/ph.wrong: -------------------------------------------------------------------------------- 1 | alot 2 | inspite 3 | whta 4 | waht 5 | wensday 6 | wendsay 7 | Wensday 8 | Wendsay 9 | wich 10 | omg 11 | OMG 12 | -------------------------------------------------------------------------------- /tests/right_to_left_mark.dic: -------------------------------------------------------------------------------- 1 | 9 2 | طِير 3 | فَتحة 4 | ضُمة 5 | كِسرة 6 | فتحًتان 7 | ضمتانٌ 8 | كسرتاٍن 9 | شدّة 10 | سكوْن 11 | -------------------------------------------------------------------------------- /tests/digits_in_words.dic: -------------------------------------------------------------------------------- 1 | 11 2 | 0/a 3 | 1/a 4 | 2/a 5 | 3/a 6 | 4/a 7 | 5/a 8 | 6/a 9 | 7/a 10 | 8/a 11 | 9/a 12 | -jährig/bc 13 | -------------------------------------------------------------------------------- /tests/ignore.aff: -------------------------------------------------------------------------------- 1 | # ignore characters in words (for Arabic Harakat or Hebrew niqqud) 2 | IGNORE aeiou 3 | 4 | PFX A Y 1 5 | PFX A 0 re . 6 | -------------------------------------------------------------------------------- /tests/needaffix3.aff: -------------------------------------------------------------------------------- 1 | # neeadaffix on affixes 2 | NEEDAFFIX X 3 | 4 | SFX A Y 1 5 | SFX A 0 s/XB . 6 | 7 | SFX B Y 1 8 | SFX B 0 baz . 9 | -------------------------------------------------------------------------------- /tests/sug2.dic: -------------------------------------------------------------------------------- 1 | 11 2 | a 3 | lot 4 | a lot 5 | alto 6 | in 7 | spite 8 | in spite 9 | inspire 10 | scot 11 | free 12 | scot-free 13 | -------------------------------------------------------------------------------- /tests/sugutf.dic: -------------------------------------------------------------------------------- 1 | 10 2 | NASA 3 | Gandhi 4 | grateful 5 | permanent 6 | vacation 7 | a 8 | lot 9 | have 10 | which 11 | McDonald 12 | -------------------------------------------------------------------------------- /tests/allcaps3.aff: -------------------------------------------------------------------------------- 1 | # homonym support 2 | WORDCHARS ' 3 | 4 | SFX s N 1 5 | SFX s 0 s . 6 | 7 | SFX S N 1 8 | SFX S 0 's . 9 | 10 | 11 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern3.good: -------------------------------------------------------------------------------- 1 | bozan 2 | barfoo 3 | banfoo 4 | banbar 5 | foobar 6 | fooban 7 | foobanbar 8 | boobar 9 | boobarfoo 10 | -------------------------------------------------------------------------------- /tests/compoundaffix.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDFLAG X 2 | 3 | PFX P Y 1 4 | PFX P 0 pre . 5 | 6 | SFX S Y 1 7 | SFX S 0 suf . 8 | -------------------------------------------------------------------------------- /tests/i68568.aff: -------------------------------------------------------------------------------- 1 | # Sant'Elia -> SANT'ELIA (Italian) 2 | # OpenOffice.org Issue 68658 3 | 4 | PFX a Y 1 5 | PFX a 0 Sant' E 6 | 7 | WORDCHARS ' 8 | -------------------------------------------------------------------------------- /tests/suggestiontest/Makefile.am: -------------------------------------------------------------------------------- 1 | EXTRA_DIST= \ 2 | List_of_common_misspellings.txt \ 3 | Makefile.orig \ 4 | prepare \ 5 | README \ 6 | test 7 | -------------------------------------------------------------------------------- /tests/colons_in_words.aff: -------------------------------------------------------------------------------- 1 | # Colons in Finnish and Swedish words. Problem reported by Lars Aronsson. 2 | # Parsing test (src/parsers) 3 | WORDCHARS : 4 | -------------------------------------------------------------------------------- /tests/rep.wrong: -------------------------------------------------------------------------------- 1 | phorm 2 | fantom 3 | vacashun 4 | vacashuns 5 | alot 6 | un'alunno 7 | foo 8 | foobars 9 | barfoos 10 | vinteún 11 | autos 12 | -------------------------------------------------------------------------------- /tests/1463589.aff: -------------------------------------------------------------------------------- 1 | # capitalized ngram suggestion test data for 2 | # Sf.net Bug ID 1463589, reported by Frederik Fouvry. 3 | MAXNGRAMSUGS 1 4 | LANG de 5 | -------------------------------------------------------------------------------- /tests/IJ.aff: -------------------------------------------------------------------------------- 1 | # check bad capitalisation of Dutch letter IJ. 2 | TRY i 3 | FORBIDDENWORD * 4 | PFX i N 1 5 | PFX i ij IJ ij 6 | 7 | REP 1 8 | REP ij IJ 9 | -------------------------------------------------------------------------------- /tests/base.wrong: -------------------------------------------------------------------------------- 1 | loooked 2 | texxt 3 | hlelo 4 | seid 5 | rottenday 6 | tomorow 7 | seeeven 8 | Nasa 9 | horrorfying 10 | peech 11 | sugesst 12 | -------------------------------------------------------------------------------- /tests/onlyincompound.aff: -------------------------------------------------------------------------------- 1 | # words only in compounds (see also fogemorpheme example) 2 | ONLYINCOMPOUND O 3 | COMPOUNDFLAG A 4 | SFX B Y 1 5 | SFX B 0 s . 6 | -------------------------------------------------------------------------------- /tests/opentaal_keepcase.aff: -------------------------------------------------------------------------------- 1 | KEEPCASE K 2 | COMPOUNDBEGIN B 3 | COMPOUNDEND E 4 | COMPOUNDFLAG C 5 | COMPOUNDMIN 1 6 | WORDCHARS - 7 | BREAK 1 8 | BREAK # 9 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | add_subdirectory(hunspell) 2 | 3 | if(HUNSPELL_BUILD_TOOLS) 4 | add_subdirectory(parsers) 5 | add_subdirectory(tools) 6 | endif() 7 | -------------------------------------------------------------------------------- /tests/allcaps.aff: -------------------------------------------------------------------------------- 1 | # check uppercase forms of allcaps word + affix and words with mixed casing 2 | WORDCHARS '. 3 | 4 | SFX S N 1 5 | SFX S 0 's . 6 | -------------------------------------------------------------------------------- /tests/i35725.wrong: -------------------------------------------------------------------------------- 1 | permenant 2 | pernament 3 | pernemant 4 | Permenant 5 | Pernament 6 | Pernemant 7 | unesco 8 | Unesco 9 | unesco's 10 | Unesco's 11 | -------------------------------------------------------------------------------- /tests/i58202.wrong: -------------------------------------------------------------------------------- 1 | fOO 2 | BAr 3 | baz 4 | BOo 5 | foobar 6 | fooBar 7 | Foobar 8 | FooBar 9 | fooBaz 10 | FooBaz 11 | Bazfoo 12 | BazFoo 13 | BazBoo 14 | -------------------------------------------------------------------------------- /msvc/.gitignore: -------------------------------------------------------------------------------- 1 | Makefile 2 | /Debug/ 3 | /Release/ 4 | /Backup*/ 5 | /x64/ 6 | /*.db 7 | /*.user 8 | *.sdf 9 | *.opensdf 10 | *.suo 11 | UpgradeLog.htm 12 | -------------------------------------------------------------------------------- /po/quot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | -------------------------------------------------------------------------------- /tests/affixes.aff: -------------------------------------------------------------------------------- 1 | # simple example for affix compression (see Hunspell(4)) 2 | PFX A Y 1 3 | PFX A 0 re . 4 | 5 | SFX B Y 2 6 | SFX B 0 ed [^y] 7 | SFX B y ied y 8 | -------------------------------------------------------------------------------- /tests/breakoff.aff: -------------------------------------------------------------------------------- 1 | # switch off default word break at hyphens and n-dashes by BREAK 0 2 | SET UTF-8 3 | MAXNGRAMSUGS 0 4 | WORDCHARS - 5 | TRY ot 6 | 7 | BREAK 0 8 | -------------------------------------------------------------------------------- /tests/i68568utf.aff: -------------------------------------------------------------------------------- 1 | # Sant'Elia -> SANT'ELIA (Italian) 2 | # OpenOffice.org Issue 68658 3 | SET UTF-8 4 | 5 | PFX a Y 1 6 | PFX a 0 Foó' B 7 | 8 | WORDCHARS ' 9 | -------------------------------------------------------------------------------- /tests/right_to_left_mark.good: -------------------------------------------------------------------------------- 1 | ‏ط‏ي‏ر 2 | ‏ف‏ت‏ح‏ة 3 | ‏ض‏م‏ة 4 | ‏ك‏س‏ر‏ة 5 | ‏ف‏ت‏ح‏ت‏ا‏ن 6 | ‏ض‏م‏ت‏ا‏ن 7 | ‏ك‏س‏ر‏ت‏ا‏ن 8 | ‏ش‏د‏ة 9 | ‏س‏ك‏و‏ن 10 | -------------------------------------------------------------------------------- /tests/wordpair.aff: -------------------------------------------------------------------------------- 1 | # a dictionary word pair separated by space 2 | # will avoid its recognition without space 3 | # at compound word analysis 4 | COMPOUNDFLAG Y 5 | -------------------------------------------------------------------------------- /tests/allcaps2.aff: -------------------------------------------------------------------------------- 1 | # forbidden all caps words are case sensitive 2 | # iPod -> ipodos ("iPodic" in Hungarian) 3 | FORBIDDENWORD * 4 | SFX s N 1 5 | SFX s 0 os . 6 | 7 | -------------------------------------------------------------------------------- /tests/allcaps3.good: -------------------------------------------------------------------------------- 1 | UNESCO 2 | Unesco 3 | UNESCO's 4 | Unesco's 5 | UNESCO'S 6 | NASA 7 | Nasa 8 | NASA's 9 | Nasa's 10 | NASA'S 11 | ACTS 12 | acts 13 | Acts 14 | -------------------------------------------------------------------------------- /tests/compoundrule5.aff: -------------------------------------------------------------------------------- 1 | # number + percent 2 | SET UTF-8 3 | COMPOUNDMIN 1 4 | COMPOUNDRULE 2 5 | COMPOUNDRULE N*%? 6 | COMPOUNDRULE NN*.NN*%? 7 | WORDCHARS 0123456789‰. 8 | -------------------------------------------------------------------------------- /tests/opentaal_forbiddenword1.aff: -------------------------------------------------------------------------------- 1 | TRY r 2 | 3 | FORBIDDENWORD F 4 | COMPOUNDRULE 2 5 | COMPOUNDRULE WW 6 | COMPOUNDRULE WWW 7 | 8 | SFX S Y 1 9 | SFX S 0 s . 10 | -------------------------------------------------------------------------------- /tests/rep.dic: -------------------------------------------------------------------------------- 1 | 10 2 | form 3 | phantom 4 | vacation 5 | vacations 6 | a 7 | lot 8 | un 9 | alunno 10 | bar 11 | barbars 12 | vinte 13 | e 14 | un 15 | auto/A 16 | -------------------------------------------------------------------------------- /tests/suggestiontest/Makefile.orig: -------------------------------------------------------------------------------- 1 | all: 2 | ./prepare 3 | ./test 4 | 5 | single: 6 | ./prepare2 7 | ./test 8 | 9 | clean: 10 | rm *.[1-5] result.* 11 | 12 | -------------------------------------------------------------------------------- /tests/base.sug: -------------------------------------------------------------------------------- 1 | looked, look 2 | text 3 | hello 4 | said 5 | rotten day, rotten-day, rotten 6 | tomorrow 7 | seven 8 | NASA 9 | horrifying 10 | speech 11 | suggest 12 | -------------------------------------------------------------------------------- /tests/compoundaffix2.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDFLAG X 2 | COMPOUNDPERMITFLAG Y 3 | 4 | PFX P Y 1 5 | PFX P 0 pre/Y . 6 | 7 | SFX S Y 1 8 | SFX S 0 suf/Y . 9 | -------------------------------------------------------------------------------- /tests/compoundaffix3.aff: -------------------------------------------------------------------------------- 1 | COMPOUNDFLAG X 2 | COMPOUNDFORBIDFLAG Z 3 | 4 | PFX P Y 1 5 | PFX P 0 pre/Z . 6 | 7 | SFX S Y 1 8 | SFX S 0 suf/Z . 9 | -------------------------------------------------------------------------------- /tests/i58202.sug: -------------------------------------------------------------------------------- 1 | foo, Boo 2 | Bar 3 | Baz 4 | Boo 5 | foo bar 6 | foo Bar 7 | Foo bar 8 | Foo Bar 9 | foo Baz 10 | Foo Baz 11 | Baz foo 12 | Baz Foo 13 | Baz Boo 14 | -------------------------------------------------------------------------------- /man/hu/Makefile.am: -------------------------------------------------------------------------------- 1 | #mandir = $(DESTDIR)/share 2 | man1dir = $(mandir)/hu/man1 3 | man4dir = $(mandir)/hu/man4 4 | man_MANS = hunspell.1 hunspell.5 5 | EXTRA_DIST = $(man_MANS) 6 | -------------------------------------------------------------------------------- /tests/base_utf.wrong: -------------------------------------------------------------------------------- 1 | loooked 2 | texxt 3 | hlelo 4 | seid 5 | rottenday 6 | tomorow 7 | seeeven 8 | Nasa 9 | horrorfying 10 | peech 11 | sugesst 12 | İmply 13 | İMPLY 14 | -------------------------------------------------------------------------------- /tests/compoundrule4.aff: -------------------------------------------------------------------------------- 1 | # English ordinal numbers 2 | WORDCHARS 0123456789 3 | COMPOUNDMIN 1 4 | ONLYINCOMPOUND c 5 | COMPOUNDRULE 2 6 | COMPOUNDRULE n*1t 7 | COMPOUNDRULE n*mp 8 | -------------------------------------------------------------------------------- /tests/opentaal_keepcase.sug: -------------------------------------------------------------------------------- 1 | Tv-word, Tv- word, Word 2 | Tv- word, Word 3 | word -tv, word-tv, word 4 | word -tv, word-tv, word 5 | wordword-tv 6 | Tv-word-tv 7 | NATO- 8 | -NATO 9 | -------------------------------------------------------------------------------- /tests/phone.dic: -------------------------------------------------------------------------------- 1 | 10 2 | Brasilia 3 | brassily 4 | Brazilian 5 | brilliance 6 | brilliancy 7 | brilliant 8 | brain 9 | brass 10 | Churchillian 11 | xxxxxxxxxx ph:Brasilia 12 | -------------------------------------------------------------------------------- /tests/sugutf.wrong: -------------------------------------------------------------------------------- 1 | nasa 2 | Ghandi 3 | greatful 4 | permenant 5 | vacacation 6 | alot 7 | permanent.Vacation 8 | ahev 9 | hwihc 10 | GAndhi 11 | Mcdonald 12 | permqnent 13 | -------------------------------------------------------------------------------- /tests/utf8.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | 3 | SFX A Y 7 4 | SFX A 0 őő . 5 | SFX A 0 ő o 6 | SFX A 0 ő ó 7 | SFX A ó ő ó 8 | SFX A ó őoo ó 9 | SFX A o őo o 10 | SFX A 0 ó [abcdó] 11 | -------------------------------------------------------------------------------- /tests/sugutf.sug: -------------------------------------------------------------------------------- 1 | NASA 2 | Gandhi 3 | grateful 4 | permanent 5 | vacation 6 | a lot, lot 7 | permanent. Vacation 8 | have 9 | which 10 | Gandhi 11 | McDonald 12 | permanent 13 | -------------------------------------------------------------------------------- /tests/1463589_utf.aff: -------------------------------------------------------------------------------- 1 | # capitalized ngram suggestion test data (Unicode version) for 2 | # Sf.net Bug ID 1463589, reported by Frederik Fouvry. 3 | SET UTF-8 4 | MAXNGRAMSUGS 1 5 | LANG de 6 | -------------------------------------------------------------------------------- /tests/alias.aff: -------------------------------------------------------------------------------- 1 | # aliases for flag vectors (AF) 2 | # AB -> 1 3 | # A -> 2 4 | AF 2 5 | AF AB 6 | AF A 7 | 8 | SFX A Y 1 9 | SFX A 0 x . 10 | 11 | SFX B Y 1 12 | SFX B 0 y/2 . 13 | -------------------------------------------------------------------------------- /tests/break.aff: -------------------------------------------------------------------------------- 1 | # word break points test, recursive break at dash and n-dash 2 | SET UTF-8 3 | 4 | BREAK 2 5 | BREAK - 6 | BREAK – 7 | 8 | WORDCHARS -– 9 | 10 | FORBIDDENWORD ! 11 | -------------------------------------------------------------------------------- /tests/iconv2.aff: -------------------------------------------------------------------------------- 1 | # The longer input pattern should be used if matched 2 | ICONV 6 3 | ICONV Da DA 4 | ICONV Ga GA 5 | ICONV Gag GAG 6 | ICONV Gagg GAGG 7 | ICONV Na NA 8 | ICONV Nan NAN 9 | -------------------------------------------------------------------------------- /tests/oconv2.aff: -------------------------------------------------------------------------------- 1 | # tests OCONV conversion of root and morphes output 2 | SET UTF-8 3 | 4 | ICONV 1 5 | ICONV a ei 6 | OCONV 1 7 | OCONV ei a 8 | 9 | SFX A Y 1 10 | SFX A 0 s . 11 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern.aff: -------------------------------------------------------------------------------- 1 | # forbid compounds with spec. pattern at word bounds 2 | COMPOUNDFLAG A 3 | CHECKCOMPOUNDPATTERN 2 4 | CHECKCOMPOUNDPATTERN nny ny 5 | CHECKCOMPOUNDPATTERN ssz sz 6 | -------------------------------------------------------------------------------- /tests/nepali.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | IGNORE ￰ 3 | WORDCHARS ःािीॉॊोौॎॏॕॖॗ‌‍ 4 | 5 | 6 | ICONV 5 7 | ICONV ‌_ ‌ 8 | ICONV र्‌य र्‌य 9 | ICONV र्‌व र्‌व 10 | ICONV ‌ ￰ 11 | ICONV ‍_ ￰ 12 | 13 | -------------------------------------------------------------------------------- /tests/ph.sug: -------------------------------------------------------------------------------- 1 | a lot 2 | in spite, inspire 3 | what 4 | what 5 | Wednesday 6 | Wednesday 7 | Wednesday 8 | Wednesday 9 | which, witch, winch, wish 10 | Oh, my gosh! 11 | OH, MY GOSH! 12 | -------------------------------------------------------------------------------- /tests/simplifiedtriple.aff: -------------------------------------------------------------------------------- 1 | # Forbid compound word with triple letters 2 | CHECKCOMPOUNDTRIPLE 3 | # Allow simplified forms 4 | SIMPLIFIEDTRIPLE 5 | 6 | COMPOUNDMIN 2 7 | 8 | COMPOUNDFLAG A 9 | -------------------------------------------------------------------------------- /tests/sug.dic: -------------------------------------------------------------------------------- 1 | 13 2 | NASA 3 | Gandhi 4 | grateful 5 | permanent 6 | vacation 7 | a 8 | lot 9 | have 10 | which 11 | McDonald 12 | permanent-vacation/? 13 | in 14 | spite 15 | inspire 16 | -------------------------------------------------------------------------------- /tests/base_utf.sug: -------------------------------------------------------------------------------- 1 | looked, look 2 | text 3 | hello 4 | said 5 | rotten day, rotten-day, rotten 6 | tomorrow 7 | seven 8 | NASA 9 | horrifying 10 | speech 11 | suggest 12 | Imply 13 | IMPLY 14 | -------------------------------------------------------------------------------- /tests/i35725.sug: -------------------------------------------------------------------------------- 1 | permanent, preferment 2 | permanent, ornament 3 | permanent 4 | Permanent, Preferment 5 | Permanent, Ornament 6 | Permanent 7 | UNESCO 8 | UNESCO 9 | UNESCO's 10 | UNESCO's 11 | -------------------------------------------------------------------------------- /tests/break.wrong: -------------------------------------------------------------------------------- 1 | fox 2 | bax 3 | -foo 4 | bar- 5 | fox-bar 6 | foo-bax 7 | foo–bax 8 | fox–bar 9 | foo-bar-fox-bar 10 | foo-bax-foo-bar 11 | foo-bar–fox-bar 12 | foo-bax–foo-bar 13 | foo-baz 14 | -------------------------------------------------------------------------------- /tests/complexprefixes.aff: -------------------------------------------------------------------------------- 1 | # set twofold prefix stripping 2 | # Coptic example by Moheb Mekhaiel 3 | COMPLEXPREFIXES 4 | 5 | PFX A Y 1 6 | PFX A 0 tek . 7 | 8 | PFX B Y 1 9 | PFX B 0 met/A . 10 | -------------------------------------------------------------------------------- /tests/flag.aff: -------------------------------------------------------------------------------- 1 | # base 1-character flags 2 | 3 | SFX A Y 1 4 | SFX A 0 s/123 . 5 | 6 | SFX 1 Y 1 7 | SFX 1 0 bar . 8 | 9 | SFX 2 Y 1 10 | SFX 2 0 baz . 11 | 12 | PFX 3 Y 1 13 | PFX 3 0 un . 14 | -------------------------------------------------------------------------------- /tests/break.good: -------------------------------------------------------------------------------- 1 | foo 2 | bar 3 | fox-bax 4 | foo-bar 5 | foo–bar 6 | foo-bar-foo-bar 7 | foo-bar–foo-bar 8 | bar-baz 9 | baz-foo 10 | foo-bar-foo-bar-foo-bar-foo-bar-foo-bar 11 | e-mail 12 | e-mail-foo 13 | -------------------------------------------------------------------------------- /tests/nosuggest.aff: -------------------------------------------------------------------------------- 1 | # don't suggest word with NOSUGGEST flag (for example vulgar or obscene words) 2 | # See OpenOffice.org Issue #55498 3 | # (nosuggest.sug is an empty file) 4 | NOSUGGEST A 5 | COMPOUNDFLAG B 6 | -------------------------------------------------------------------------------- /tests/ph2.sug: -------------------------------------------------------------------------------- 1 | foo 2 | foo, word 3 | foo bar 4 | wordstem 5 | stemword 6 | stemwordstem 7 | forbidden root 8 | forbidden root's 9 | pretty 10 | prettiest 11 | foobarö 12 | foobarőt 13 | happy 14 | happiest 15 | -------------------------------------------------------------------------------- /tests/sug.sug: -------------------------------------------------------------------------------- 1 | NASA 2 | Gandhi 3 | grateful 4 | permanent 5 | vacation 6 | a lot, lot 7 | in spite, inspire 8 | permanent. Vacation 9 | have 10 | which 11 | Gandhi 12 | McDonald 13 | permanent 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/needaffix5.good: -------------------------------------------------------------------------------- 1 | foo 2 | prefoo 3 | foosuf 4 | prefoosuf 5 | foosufbar 6 | prefoosufbar 7 | pseudoprefoosuf 8 | pseudoprefoosufbar 9 | pseudoprefoopseudosufbar 10 | prefoopseudosuf 11 | prefoopseudosufbar 12 | -------------------------------------------------------------------------------- /tests/reputf.aff: -------------------------------------------------------------------------------- 1 | # With REP suggestions, we can fix typical language specific misspellings. 2 | 3 | SET UTF-8 4 | 5 | # switch off ngram suggestion for testing 6 | MAXNGRAMSUGS 0 7 | 8 | REP 1 9 | REP oo őő 10 | -------------------------------------------------------------------------------- /tests/conditionalprefix.aff: -------------------------------------------------------------------------------- 1 | PFX P Y 1 2 | PFX P 0 un . ip:un 3 | 4 | SFX S Y 1 5 | SFX S 0 s . is:PL 6 | 7 | SFX Q Y 1 8 | SFX Q 0 s . is:3SGV 9 | 10 | SFX R Y 1 11 | SFX R 0 able/PS . ds:DER_V_ADJ_ABLE 12 | -------------------------------------------------------------------------------- /tests/ph.dic: -------------------------------------------------------------------------------- 1 | 8 2 | a lot ph:alot 3 | in spite ph:inspite 4 | inspire 5 | what ph:whta ph:waht 6 | Wednesday ph:wendsay ph:wensday 7 | which ph:wich 8 | witch ph:wich 9 | winch 10 | wish 11 | Oh, my gosh! ph:omg 12 | -------------------------------------------------------------------------------- /tests/ph2.wrong: -------------------------------------------------------------------------------- 1 | bar 2 | baz 3 | foobar 4 | bazstem 5 | stembaz 6 | stembazstem 7 | forbiddenroot 8 | forbiddenroot's 9 | rootforbiddenroot 10 | prity 11 | pritiest 12 | fubarö 13 | fubarőt 14 | hepy 15 | hepiest 16 | -------------------------------------------------------------------------------- /po/POTFILES.in: -------------------------------------------------------------------------------- 1 | # List of source files containing translatable strings. 2 | # Copyright (C) 1995, 1996 Free Software Foundation, Inc. 3 | 4 | # Package source files 5 | src/tools/hunspell.cxx 6 | 7 | # end of file POTFILE.in 8 | -------------------------------------------------------------------------------- /tests/checksharps.good: -------------------------------------------------------------------------------- 1 | müßig 2 | Müßig 3 | MÜSSIG 4 | Ausstoß 5 | Abstoß. 6 | Außenabmessung 7 | Prozessionsstraße 8 | Außenmaße 9 | AUSSTOSS 10 | ABSTOSS. 11 | AUSSENABMESSUNG 12 | PROZESSIONSSTRASSE 13 | AUSSENMASSE 14 | -------------------------------------------------------------------------------- /tests/flaglong.aff: -------------------------------------------------------------------------------- 1 | # 2-character flags 2 | FLAG long 3 | 4 | SFX zx Y 1 5 | SFX zx 0 s/g?1G09 . 6 | 7 | SFX g? Y 1 8 | SFX g? 0 bar . 9 | 10 | SFX 1G Y 1 11 | SFX 1G 0 baz . 12 | 13 | PFX 09 Y 1 14 | PFX 09 0 un . 15 | -------------------------------------------------------------------------------- /tests/needaffix5.aff: -------------------------------------------------------------------------------- 1 | # on affixes 2 | NEEDAFFIX X 3 | 4 | SFX A Y 2 5 | SFX A 0 suf/B . 6 | SFX A 0 pseudosuf/XB . 7 | 8 | SFX B Y 1 9 | SFX B 0 bar . 10 | 11 | PFX C Y 2 12 | PFX C 0 pre . 13 | PFX C 0 pseudopre/X . 14 | -------------------------------------------------------------------------------- /tests/zeroaffix.aff: -------------------------------------------------------------------------------- 1 | PSEUDOROOT X 2 | COMPOUNDFLAG Y 3 | 4 | SFX A Y 1 5 | SFX A 0 0 . > 6 | 7 | SFX B Y 1 8 | SFX B 0 0 . > 9 | 10 | SFX C Y 2 11 | SFX C 0 0/XAB . 12 | SFX C 0 baz/XAB . 13 | -------------------------------------------------------------------------------- /po/LINGUAS: -------------------------------------------------------------------------------- 1 | # Set of available languages. 2 | ca 3 | cs 4 | da 5 | de 6 | es 7 | fr 8 | gl 9 | hu 10 | ie 11 | is 12 | it 13 | ky 14 | nb_NO 15 | nl 16 | nl_BE 17 | pl 18 | pt_BR 19 | pt_PT 20 | ru 21 | sv 22 | tg 23 | uk 24 | -------------------------------------------------------------------------------- /tests/checksharpsutf.good: -------------------------------------------------------------------------------- 1 | müßig 2 | Müßig 3 | MÜSSIG 4 | Ausstoß 5 | Abstoß. 6 | Außenabmessung 7 | Prozessionsstraße 8 | Außenmaße 9 | AUSSTOSS 10 | ABSTOSS. 11 | AUSSENABMESSUNG 12 | PROZESSIONSSTRASSE 13 | AUSSENMASSE 14 | -------------------------------------------------------------------------------- /tests/flagutf8.aff: -------------------------------------------------------------------------------- 1 | # UTF-8 flags 2 | FLAG UTF-8 3 | 4 | SFX A Y 1 5 | SFX A 0 s/ÖüÜ . 6 | #SFX A 0 s/ÖüÖÜ . 7 | 8 | SFX Ö Y 1 9 | SFX Ö 0 bar . 10 | 11 | SFX ü Y 1 12 | SFX ü 0 baz . 13 | 14 | PFX Ü Y 1 15 | PFX Ü 0 un . 16 | -------------------------------------------------------------------------------- /po/ChangeLog: -------------------------------------------------------------------------------- 1 | 2017-10-22 gettextize 2 | 3 | * Makefile.in.in: Upgrade to gettext-0.19.8.1. 4 | 5 | 2016-11-02 gettextize 6 | 7 | * Makefile.in.in: Upgrade to gettext-0.19.7. 8 | 9 | -------------------------------------------------------------------------------- /po/boldquot.sed: -------------------------------------------------------------------------------- 1 | s/"\([^"]*\)"/“\1”/g 2 | s/`\([^`']*\)'/‘\1’/g 3 | s/ '\([^`']*\)' / ‘\1’ /g 4 | s/ '\([^`']*\)'$/ ‘\1’/g 5 | s/^'\([^`']*\)' /‘\1’ /g 6 | s/“”/""/g 7 | s/“/“/g 8 | s/”/”/g 9 | s/‘/‘/g 10 | s/’/’/g 11 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern3.aff: -------------------------------------------------------------------------------- 1 | # forbid compounds with spec. pattern at word bound and allow modificated form 2 | # (for Indian languages) 3 | COMPOUNDFLAG A 4 | CHECKCOMPOUNDPATTERN 1 5 | CHECKCOMPOUNDPATTERN o/X b/Y z 6 | COMPOUNDMIN 1 7 | -------------------------------------------------------------------------------- /tests/compoundrule7.aff: -------------------------------------------------------------------------------- 1 | # English ordinal numbers (parenthesized long flags) 2 | FLAG long 3 | WORDCHARS 0123456789 4 | COMPOUNDMIN 1 5 | ONLYINCOMPOUND cc 6 | COMPOUNDRULE 2 7 | COMPOUNDRULE (nn)*(11)(tt) 8 | COMPOUNDRULE (nn)*(mm)(pp) 9 | -------------------------------------------------------------------------------- /tests/maputf.aff: -------------------------------------------------------------------------------- 1 | # With MAP suggestion, Hunspell can add missing accents to a word. 2 | 3 | SET UTF-8 4 | 5 | # switch off ngram suggestion for testing 6 | MAXNGRAMSUGS 0 7 | 8 | MAP 3 9 | MAP uúü 10 | MAP öóo 11 | MAP ß(ss) 12 | -------------------------------------------------------------------------------- /tests/sug.wrong: -------------------------------------------------------------------------------- 1 | nasa 2 | Ghandi 3 | greatful 4 | permenant 5 | vacacation 6 | alot 7 | inspite 8 | permanent.Vacation 9 | ahev 10 | hwihc 11 | GAndhi 12 | Mcdonald 13 | permqnent 14 | permanent-vacation 15 | permqnent-vacation 16 | -------------------------------------------------------------------------------- /tests/flagnum.aff: -------------------------------------------------------------------------------- 1 | # numerical flags 2 | FLAG num 3 | 4 | SFX 999 Y 1 5 | SFX 999 0 s/214,216,54321 . 6 | 7 | SFX 214 Y 1 8 | SFX 214 0 bar . 9 | 10 | SFX 216 Y 1 11 | SFX 216 0 baz . 12 | 13 | PFX 54321 Y 1 14 | PFX 54321 0 un . 15 | -------------------------------------------------------------------------------- /tests/i53643.good: -------------------------------------------------------------------------------- 1 | 1 2 | 12 3 | 123 4 | 1234 5 | 12345 6 | 123456 7 | 1234567 8 | 1.1 9 | 1.12 10 | 1.123 11 | 1.1234 12 | 1.12345 13 | 1.123456 14 | 12.1 15 | 123.12 16 | 1234.123 17 | 12345.1234 18 | 123456.12345 19 | 1234567.123456 20 | -------------------------------------------------------------------------------- /tests/iconv.aff: -------------------------------------------------------------------------------- 1 | # input conversion (accept comma acuted letters also with cedilla, 2 | # as de facto replacement of the Romanian standard) 3 | SET UTF-8 4 | 5 | ICONV 4 6 | ICONV ş ș 7 | ICONV ţ ț 8 | ICONV Ş Ș 9 | ICONV Ţ Ț 10 | 11 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern4.aff: -------------------------------------------------------------------------------- 1 | # sandhi in Telugu writing system, based on the Kiran Chittella's example 2 | 3 | COMPOUNDFLAG x 4 | COMPOUNDMIN 1 5 | CHECKCOMPOUNDPATTERN 2 6 | CHECKCOMPOUNDPATTERN a/A u/A O 7 | CHECKCOMPOUNDPATTERN u/B u/B u 8 | 9 | -------------------------------------------------------------------------------- /tests/ignoreutf.aff: -------------------------------------------------------------------------------- 1 | # Arabic test for feature ignoring diacritics 2 | SET UTF-8 3 | # Arabic diacritics (harakat): 4 | # sukun, shadda, kasra, damma, fatha, kasratan, dammantan, fathatan (left to right) 5 | IGNORE ًٌٍَُِّْ 6 | WORDCHARS ًٌٍَُِّْ 7 | -------------------------------------------------------------------------------- /tests/compoundrule8.aff: -------------------------------------------------------------------------------- 1 | # English ordinal numbers (parenthesized numerical flags) 2 | FLAG num 3 | WORDCHARS 0123456789 4 | COMPOUNDMIN 1 5 | ONLYINCOMPOUND 1000 6 | COMPOUNDRULE 2 7 | COMPOUNDRULE (1001)*(1002)(2001) 8 | COMPOUNDRULE (1001)*(2002)(2000) 9 | -------------------------------------------------------------------------------- /tests/ph2.dic: -------------------------------------------------------------------------------- 1 | 9 2 | foo ph:bar ph:baz 3 | foo bar ph:foobar 4 | word/Y ph:baz 5 | stem/Y ph: ph: 6 | forbidden/Y 7 | root/YA 8 | forbidden root/A ph:forbiddenroot 9 | pretty/B ph:prity* 10 | foobarö/B ph:fubarő* 11 | happy/B ph:hepy ph:hepi->happi 12 | -------------------------------------------------------------------------------- /Makefile.am: -------------------------------------------------------------------------------- 1 | ACLOCAL_AMFLAGS = -I m4 2 | 3 | SUBDIRS= po src man tests 4 | 5 | pkgconfdir = $(libdir)/pkgconfig 6 | pkgconf_DATA = hunspell.pc 7 | 8 | EXTRA_DIST = license.myspell license.hunspell \ 9 | ChangeLog.O COPYING.LESSER hunspell.pc.in 10 | -------------------------------------------------------------------------------- /m4/README: -------------------------------------------------------------------------------- 1 | These files are used by a program called aclocal (part of the GNU automake 2 | package). aclocal uses these files to create aclocal.m4 which is in turn 3 | used by autoconf to create the configure script at the the top level in 4 | this distribution. 5 | -------------------------------------------------------------------------------- /tests/compoundrule5.dic: -------------------------------------------------------------------------------- 1 | 13 2 | 0/N po:num 3 | 1/N po:num 4 | 2/N po:num 5 | 3/N po:num 6 | 4/N po:num 7 | 5/N po:num 8 | 6/N po:num 9 | 7/N po:num 10 | 8/N po:num 11 | 9/N po:num 12 | ./. po:sign_dot 13 | %/% po:sign_percent 14 | ‰/% po:sign_per_mille 15 | -------------------------------------------------------------------------------- /tests/complexprefixes2.aff: -------------------------------------------------------------------------------- 1 | # complex prefixes with morphological analysis 2 | COMPLEXPREFIXES 3 | WORDCHARS _ 4 | 5 | PFX A Y 1 6 | PFX A 0 tek . affix_1/ 7 | 8 | PFX B Y 1 9 | PFX B 0 met/A . affix_2/ 10 | 11 | SFX C Y 1 12 | SFX C 0 _test_ . /suffix_1 13 | -------------------------------------------------------------------------------- /tests/condition_utf.wrong: -------------------------------------------------------------------------------- 1 | óőósuf4 2 | pre4óőó 3 | óőósuf5 4 | pre5óőó 5 | óőósuf8 6 | pre8óőó 7 | óőósuf9 8 | pre9óőó 9 | óőósuf11 10 | pre11óőó 11 | óőósuf12 12 | pre12óőó 13 | óőósuf15 14 | pre15óőó 15 | óőósuf17 16 | óőósuf18 17 | pre17óőó 18 | pre18óőó 19 | -------------------------------------------------------------------------------- /tests/1695964.aff: -------------------------------------------------------------------------------- 1 | # fix NEEDAFFIX homonym suggestion. 2 | # Sf.net Bug ID 1695964, reported by Björn Jacke. 3 | TRY esianrtolcdugmphbyfvkwESIANRTOLCDUGMPHBYFVKW 4 | MAXNGRAMSUGS 0 5 | NEEDAFFIX h 6 | SFX S Y 1 7 | SFX S 0 s . 8 | 9 | SFX e Y 1 10 | SFX e 0 e . 11 | -------------------------------------------------------------------------------- /tests/condition_utf.good: -------------------------------------------------------------------------------- 1 | óőó 2 | óőósuf1 3 | pre1óőó 4 | óőósuf2 5 | pre2óőó 6 | óőósuf3 7 | pre3óőó 8 | óőósuf6 9 | pre6óőó 10 | óőósuf7 11 | pre7óőó 12 | óőósuf10 13 | pre10óőó 14 | óőósuf13 15 | pre13óőó 16 | óőósuf14 17 | pre14óőó 18 | óőósuf16 19 | pre16óőó 20 | -------------------------------------------------------------------------------- /tests/warn.aff: -------------------------------------------------------------------------------- 1 | # WARN flag 2 | # The signed word, and its suffixed forms result warning message in command-line 3 | 4 | #Use to forbid the words with flag WARN 5 | #FORBIDWARN 6 | 7 | WARN W 8 | 9 | SFX A Y 1 10 | SFX A 0 s . 11 | 12 | REP 1 13 | REP foo bar 14 | -------------------------------------------------------------------------------- /tests/1706659.aff: -------------------------------------------------------------------------------- 1 | # test COMPOUNDRULE bug reported by Björn Jacke 2 | SET ISO8859-1 3 | TRY esijanrtolcdugmphbyfvkwqxz 4 | 5 | SFX A Y 5 6 | SFX A 0 e . 7 | SFX A 0 er . 8 | SFX A 0 en . 9 | SFX A 0 em . 10 | SFX A 0 es . 11 | 12 | COMPOUNDRULE 1 13 | COMPOUNDRULE vw 14 | -------------------------------------------------------------------------------- /tests/alias3.morph: -------------------------------------------------------------------------------- 1 | > ouro 2 | analyze(ouro) = [stem_1] ouro:ts 3 | > metouro 4 | analyze(metouro) = affix_2/ ouro:ts [stem_1] 5 | > tekmetouro 6 | analyze(tekmetouro) = affix_1/ affix_2/ ouro:ts [stem_1] 7 | > ouro_test_ 8 | analyze(ouro_test_) = [stem_1] ouro:ts /suffix_1 9 | -------------------------------------------------------------------------------- /tests/checkcompoundpattern2.aff: -------------------------------------------------------------------------------- 1 | # forbid compounds with spec. pattern at word bound and allow modificated form 2 | # (for German and Indian languages) 3 | COMPOUNDFLAG A 4 | CHECKCOMPOUNDPATTERN 2 5 | CHECKCOMPOUNDPATTERN o b z 6 | CHECKCOMPOUNDPATTERN oo ba u 7 | COMPOUNDMIN 1 8 | -------------------------------------------------------------------------------- /tests/fogemorpheme.aff: -------------------------------------------------------------------------------- 1 | # fogemorphemes: special morphemes in compounds 2 | # 3 | # Swedish example: 4 | # gata + kontoret = gatukontoret 5 | 6 | COMPOUNDFLAG X 7 | COMPOUNDBEGIN Y 8 | ONLYINCOMPOUND Z 9 | COMPOUNDPERMITFLAG P 10 | 11 | SFX A Y 1 12 | SFX A a u/YPZ . 13 | -------------------------------------------------------------------------------- /tests/i35725.dic: -------------------------------------------------------------------------------- 1 | 15 2 | endangerment/SM 3 | ferment/FSCM 4 | preferment/SM 5 | impermanent/Y 6 | permanent/YSP 7 | semipermanent/Y 8 | empowerment/MS 9 | supermen 10 | tournament/MS 11 | ornamental/SY 12 | ornament/GSDM 13 | supernatant 14 | pimpernel 15 | UNESCO/M 16 | -------------------------------------------------------------------------------- /tests/compoundrule4.dic: -------------------------------------------------------------------------------- 1 | 22 2 | 0/nm 3 | 1/n1 4 | 2/nm 5 | 3/nm 6 | 4/nm 7 | 5/nm 8 | 6/nm 9 | 7/nm 10 | 8/nm 11 | 9/nm 12 | 0th/pt 13 | 1st/p 14 | 1th/tc 15 | 2nd/p 16 | 2th/tc 17 | 3rd/p 18 | 3th/tc 19 | 4th/pt 20 | 5th/pt 21 | 6th/pt 22 | 7th/pt 23 | 8th/pt 24 | 9th/pt 25 | -------------------------------------------------------------------------------- /tests/morph.aff: -------------------------------------------------------------------------------- 1 | # example for morphological analysis, stemming and generation 2 | PFX P Y 1 3 | PFX P 0 un . dp:pfx_un sp:un 4 | 5 | SFX S Y 1 6 | SFX S 0 s . is:plur 7 | 8 | SFX Q Y 1 9 | SFX Q 0 s . is:sg_3 10 | 11 | SFX R Y 1 12 | SFX R 0 able/PS . ds:der_able 13 | -------------------------------------------------------------------------------- /tests/complexprefixesutf.aff: -------------------------------------------------------------------------------- 1 | # Coptic example by Moheb Mekhaiel 2 | # Encoded with the new Coptic character encoding of Unicode 4.1 3 | SET UTF-8 4 | 5 | # set twofold prefix stripping 6 | COMPLEXPREFIXES 7 | 8 | PFX A Y 1 9 | PFX A 0 ⲧⲉⲕ . 10 | 11 | PFX B Y 1 12 | PFX B 0 ⲙⲉⲧ/A . 13 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat.aff: -------------------------------------------------------------------------------- 1 | FLAG long 2 | COMPOUNDBEGIN Ca 3 | COMPOUNDMIDDLE Cb 4 | COMPOUNDEND Cc 5 | COMPOUNDPERMITFLAG Cp 6 | ONLYINCOMPOUND Cx 7 | 8 | CHECKCOMPOUNDPATTERN 1 9 | CHECKCOMPOUNDPATTERN /Ch /Xs 10 | 11 | SFX Ch Y 2 12 | SFX Ch 0 s/CaCbCxCp . 13 | SFX Ch 0 s-/CaCbCcCp . 14 | -------------------------------------------------------------------------------- /tests/forbiddenword.aff: -------------------------------------------------------------------------------- 1 | # FORBIDDENWORD flag 2 | # The signed word, and its suffixed forms are all forbidden, 3 | # excepts with root homonyms. 4 | # Useful for forbidding bad suffixed forms or compounds. 5 | 6 | 7 | FORBIDDENWORD X 8 | COMPOUNDFLAG Y 9 | 10 | SFX A Y 1 11 | SFX A 0 s . 12 | -------------------------------------------------------------------------------- /tests/alias2.aff: -------------------------------------------------------------------------------- 1 | # aliases for flag vectors (AF) and morphological descriptions (AM) 2 | # AB -> 1 3 | # A -> 2 4 | AF 2 5 | AF AB 6 | AF A 7 | 8 | AM 3 9 | AM is:affix_x 10 | AM ds:affix_y 11 | AM po:noun xx:other_data 12 | 13 | SFX A Y 1 14 | SFX A 0 x . 1 15 | 16 | SFX B Y 1 17 | SFX B 0 y/2 . 2 18 | -------------------------------------------------------------------------------- /tests/alias3.aff: -------------------------------------------------------------------------------- 1 | # morph. aliases with complex prefixes 2 | COMPLEXPREFIXES 3 | WORDCHARS _ 4 | 5 | AM 4 6 | AM affix_1/ 7 | AM affix_2/ 8 | AM /suffix_1 9 | AM [stem_1] 10 | 11 | PFX A Y 1 12 | PFX A 0 tek . 1 13 | 14 | PFX B Y 1 15 | PFX B 0 met/A . 2 16 | 17 | SFX C Y 1 18 | SFX C 0 _test_ . 3 19 | -------------------------------------------------------------------------------- /tests/compoundrule4.good: -------------------------------------------------------------------------------- 1 | 1st 2 | 2nd 3 | 3rd 4 | 4th 5 | 5th 6 | 6th 7 | 7th 8 | 8th 9 | 9th 10 | 10th 11 | 11th 12 | 12th 13 | 13th 14 | 14th 15 | 15th 16 | 16th 17 | 17th 18 | 18th 19 | 19th 20 | 20th 21 | 21st 22 | 22nd 23 | 23rd 24 | 24th 25 | 25th 26 | 100th 27 | 1000th 28 | 10001st 29 | 10011th 30 | -------------------------------------------------------------------------------- /tests/compoundrule7.good: -------------------------------------------------------------------------------- 1 | 1st 2 | 2nd 3 | 3rd 4 | 4th 5 | 5th 6 | 6th 7 | 7th 8 | 8th 9 | 9th 10 | 10th 11 | 11th 12 | 12th 13 | 13th 14 | 14th 15 | 15th 16 | 16th 17 | 17th 18 | 18th 19 | 19th 20 | 20th 21 | 21st 22 | 22nd 23 | 23rd 24 | 24th 25 | 25th 26 | 100th 27 | 1000th 28 | 10001st 29 | 10011th 30 | -------------------------------------------------------------------------------- /tests/compoundrule8.good: -------------------------------------------------------------------------------- 1 | 1st 2 | 2nd 3 | 3rd 4 | 4th 5 | 5th 6 | 6th 7 | 7th 8 | 8th 9 | 9th 10 | 10th 11 | 11th 12 | 12th 13 | 13th 14 | 14th 15 | 15th 16 | 16th 17 | 17th 18 | 18th 19 | 19th 20 | 20th 21 | 21st 22 | 22nd 23 | 23rd 24 | 24th 25 | 25th 26 | 100th 27 | 1000th 28 | 10001st 29 | 10011th 30 | -------------------------------------------------------------------------------- /tests/condition.wrong: -------------------------------------------------------------------------------- 1 | ofosuf4 2 | pre4ofo 3 | ofosuf5 4 | pre5ofo 5 | ofosuf8 6 | pre8ofo 7 | ofosuf9 8 | pre9ofo 9 | ofosuf11 10 | pre10ofo 11 | pre11ofo 12 | ofosuf12 13 | pre12ofo 14 | ofosuf15 15 | pre15ofo 16 | ofosuf17 17 | pre17ofo 18 | ofosuf18 19 | pre18ofo 20 | entertainning 21 | gninnianretne 22 | -------------------------------------------------------------------------------- /tests/compoundrule7.dic: -------------------------------------------------------------------------------- 1 | 22 2 | 0/nnmm 3 | 1/nn11 4 | 2/nnmm 5 | 3/nnmm 6 | 4/nnmm 7 | 5/nnmm 8 | 6/nnmm 9 | 7/nnmm 10 | 8/nnmm 11 | 9/nnmm 12 | 0th/pptt 13 | 1st/pp 14 | 1th/ttcc 15 | 2nd/pp 16 | 2th/ttcc 17 | 3rd/pp 18 | 3th/ttcc 19 | 4th/pptt 20 | 5th/pptt 21 | 6th/pptt 22 | 7th/pptt 23 | 8th/pptt 24 | 9th/pptt 25 | -------------------------------------------------------------------------------- /tests/digits_in_words.aff: -------------------------------------------------------------------------------- 1 | # Digits in words, handled by COMPOUNDRULE. 2 | # 1-jährig, 2-jährig, 100-jährig etc. 3 | SET UTF-8 4 | COMPOUNDMIN 1 5 | # recognize ab, aab, aaab etc. compounds (a=digits, b=-jährig, see dic file) 6 | COMPOUNDRULE 1 7 | COMPOUNDRULE a*b 8 | ONLYINCOMPOUND c 9 | WORDCHARS 0123456789- 10 | -------------------------------------------------------------------------------- /hunspell.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@prefix@ 2 | exec_prefix=${prefix} 3 | libdir=@libdir@ 4 | includedir=@includedir@ 5 | 6 | Name: hunspell 7 | Description: Hunspell spellchecking library 8 | Version: @VERSION@ 9 | Libs: -L${libdir} -lhunspell-@HUNSPELL_VERSION_MAJOR@.@HUNSPELL_VERSION_MINOR@ 10 | Cflags: -I${includedir}/hunspell 11 | -------------------------------------------------------------------------------- /tests/base.good: -------------------------------------------------------------------------------- 1 | created 2 | uncreate 3 | uncreated 4 | imply 5 | implied 6 | unnatural 7 | conveyed 8 | sawyer 9 | NASA 10 | FAQs 11 | can't 12 | doesn't 13 | won't 14 | Created 15 | Hello 16 | HELLO 17 | NASA 18 | etc. 19 | etc 20 | HELLO 21 | lip. 22 | text. 23 | NASA. 24 | Text. 25 | TEXT. 26 | Hunspell. 27 | HUNSPELL. 28 | -------------------------------------------------------------------------------- /tests/germancompoundingold.good: -------------------------------------------------------------------------------- 1 | Computer 2 | Computern 3 | Arbeit 4 | Arbeits- 5 | Computerarbeit 6 | Computerarbeits- 7 | Arbeitscomputer 8 | Arbeitscomputern 9 | Computerarbeitscomputer 10 | Computerarbeitscomputern 11 | Arbeitscomputerarbeit 12 | Computerarbeits-Computer 13 | Computerarbeits-Computern 14 | Computer-Arbeit 15 | -------------------------------------------------------------------------------- /tests/onlyincompound2.aff: -------------------------------------------------------------------------------- 1 | # affixes only in compounds (see also fogemorpheme example) 2 | ONLYINCOMPOUND O 3 | COMPOUNDFLAG A 4 | COMPOUNDPERMITFLAG P 5 | 6 | SFX B Y 1 7 | SFX B 0 s/OP . 8 | 9 | # obligate fogemorpheme by forbidding the stem (0) in compounds 10 | 11 | CHECKCOMPOUNDPATTERN 1 12 | CHECKCOMPOUNDPATTERN 0/B /A 13 | -------------------------------------------------------------------------------- /tests/hu.dic: -------------------------------------------------------------------------------- 1 | 20 2 | majom/Y 3 | kenyér/Y 4 | fa/Y 5 | ág/Y 6 | virág/Y 7 | sárkány/Y 8 | fog/Y 9 | vetemény/Y 10 | iskola/Y 11 | tej/Y 12 | akció/Y 13 | devon/Y 14 | kor/Y 15 | társ/Y 16 | devon kor 17 | e-mail 18 | cím 19 | Strattmann 20 | Strattmann-nal 21 | Batthyány 22 | áll/S 23 | forr/S 24 | víz/Y 25 | tartály/Y 26 | forró/F! 27 | -------------------------------------------------------------------------------- /tests/hu.good: -------------------------------------------------------------------------------- 1 | majomkenyér 2 | majomkenyérfa 3 | majomkenyérfaág 4 | majomkenyérvirág 5 | kenyérfavirág 6 | sárkányfogvetemény 7 | kortárs 8 | e-mail-cím 9 | Batthyány 10 | Strattmann 11 | Strattmann-nal 12 | Batthyány-Strattmann 13 | Batthyány-Strattmann-nal 14 | áll 15 | álló 16 | forr 17 | forró 18 | állóvíz 19 | forróvíz-tartály 20 | -------------------------------------------------------------------------------- /tests/right_to_left_mark.aff: -------------------------------------------------------------------------------- 1 | # Arabic test for feature ignoring diacritics and RLM (U+200F, RIGHT-TO-LEFT-MARK) 2 | # (Extended version of the test "ignoreutf") 3 | SET UTF-8 4 | # Arabic diacritics (harakat): 5 | # sukun, shadda, kasra, damma, fatha, kasratan, dammantan, fathatan (left to right) 6 | IGNORE ًٌٍَُِّْ‏ 7 | WORDCHARS ًٌٍَُِّْ‏ 8 | -------------------------------------------------------------------------------- /tests/condition.good: -------------------------------------------------------------------------------- 1 | ofo 2 | ofosuf1 3 | pre1ofo 4 | ofosuf2 5 | pre2ofo 6 | ofosuf3 7 | pre3ofo 8 | ofosuf6 9 | pre6ofo 10 | ofosuf7 11 | pre7ofo 12 | ofosuf10 13 | ofosuf13 14 | pre13ofo 15 | ofosuf14 16 | pre14ofo 17 | ofosuf16 18 | pre16ofo 19 | entertain 20 | entertaining 21 | gninianretne 22 | ér 23 | éram 24 | érach 25 | wries 26 | unwry 27 | -------------------------------------------------------------------------------- /tests/needaffix2.morph: -------------------------------------------------------------------------------- 1 | > foo 2 | analyze(foo) = st:foo id:1 3 | analyze(foo) = st:foo id:3 4 | stem(foo) = foo 5 | > bar 6 | analyze(bar) = st:bar 7 | stem(bar) = bar 8 | > foobar 9 | analyze(foobar) = pa:foo st:foo id:3 pa:bar 10 | stem(foobar) = foo 11 | > barfoo 12 | analyze(barfoo) = pa:bar st:bar pa:foo st:foo id:3 13 | stem(barfoo) = barfoo 14 | -------------------------------------------------------------------------------- /tests/morph.dic: -------------------------------------------------------------------------------- 1 | 9 2 | drink/S po:noun 3 | drink/RQ po:verb al:drank al:drunk ts:present 4 | drank po:verb st:drink is:past_1 5 | drunk po:verb st:drink is:past_2 6 | eat/RQ po:verb al:ate al:eaten ts:present 7 | ate po:verb st:eat is:past_1 8 | eaten po:verb st:eat is:past_2 9 | phenomenon po:noun al:phenomena 10 | phenomena po:noun st:phenomenon is:plur 11 | -------------------------------------------------------------------------------- /tests/base.dic: -------------------------------------------------------------------------------- 1 | 28 2 | created/U 3 | create/XKVNGADS 4 | imply/GNSDX 5 | natural/PUY 6 | like/USPBY 7 | convey/BDGS 8 | look/GZRDS 9 | text 10 | hello 11 | said 12 | sawyer 13 | NASA 14 | rotten 15 | day 16 | tomorrow 17 | seven 18 | FAQ/SM 19 | can't 20 | doesn't 21 | etc 22 | won't 23 | lip 24 | text 25 | horrifying 26 | speech 27 | suggest 28 | uncreate/V 29 | Hunspell 30 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | environment: 2 | matrix: 3 | - MSYSTEM: MINGW64 4 | BASH_PATH: C:\msys64\usr\bin\bash 5 | # - BASH_PATH: c:\cygwin\bin\bash 6 | 7 | install: 8 | - cmd: '%BASH_PATH% -lc "pacman --noconfirm -Syu mingw-w64-x86_64-boost"' 9 | 10 | build_script: 11 | - cmd: '%BASH_PATH% -lc "cd $APPVEYOR_BUILD_FOLDER; autoreconf -i && ./configure && make && make check"' 12 | -------------------------------------------------------------------------------- /tests/compoundrule2.good: -------------------------------------------------------------------------------- 1 | aa 2 | aaa 3 | aaaa 4 | ab 5 | aab 6 | aaab 7 | aaaab 8 | abb 9 | aabb 10 | aaabbb 11 | bb 12 | bbb 13 | bbbb 14 | aaab 15 | abc 16 | abcc 17 | abbc 18 | abbcc 19 | aabc 20 | aabcc 21 | aabbc 22 | aabbcc 23 | aaabbbccc 24 | ac 25 | acc 26 | aac 27 | aacc 28 | aaaccc 29 | bc 30 | bcc 31 | bbc 32 | bbcc 33 | bbbccc 34 | cc 35 | ccc 36 | cccccc 37 | abcc 38 | -------------------------------------------------------------------------------- /tests/1592880.aff: -------------------------------------------------------------------------------- 1 | # fix homonym handling for German dictionary project, 2 | # reported by Björn Jacke (sf.net Bug ID 1592880). 3 | SET ISO8859-1 4 | 5 | SFX N Y 1 6 | SFX N 0 n . 7 | 8 | SFX S Y 1 9 | SFX S 0 s . 10 | 11 | SFX P Y 1 12 | SFX P 0 en . 13 | 14 | SFX Q Y 2 15 | SFX Q 0 e . 16 | SFX Q 0 en . 17 | 18 | COMPOUNDEND z 19 | COMPOUNDPERMITFLAG c 20 | ONLYINCOMPOUND o 21 | -------------------------------------------------------------------------------- /tests/circumfix.aff: -------------------------------------------------------------------------------- 1 | # circumfixes: ~ obligate prefix/suffix combinations 2 | # superlative in Hungarian: leg- (prefix) AND -bb (suffix) 3 | 4 | CIRCUMFIX X 5 | 6 | PFX A Y 1 7 | PFX A 0 leg/X . 8 | 9 | PFX B Y 1 10 | PFX B 0 legesleg/X . 11 | 12 | SFX C Y 3 13 | SFX C 0 obb . is:COMPARATIVE 14 | SFX C 0 obb/AX . is:SUPERLATIVE 15 | SFX C 0 obb/BX . is:SUPERSUPERLATIVE 16 | 17 | -------------------------------------------------------------------------------- /tests/ignoresug.aff: -------------------------------------------------------------------------------- 1 | # Ignore punctuation marks used inside of Armenian words, and produce correct 2 | # suggestion (see issue #570). However, "suggestion test" cannot be used because 3 | # words in `.wrong` file are not wrong realy, so it leads to an error. 4 | # Therefore, we apply "morphological analysis" which has a similar result. 5 | 6 | SET UTF-8 7 | WORDCHARS ֊՛՜՞՚ 8 | IGNORE ֊՛՜՞՚ 9 | -------------------------------------------------------------------------------- /tests/base_utf.dic: -------------------------------------------------------------------------------- 1 | 28 2 | created/U 3 | create/XKVNGADS 4 | imply/GNSDX 5 | natural/PUY 6 | like/USPBY 7 | convey/BDGS 8 | look/GZRDS 9 | text 10 | hello 11 | said 12 | sawyer 13 | NASA 14 | rotten 15 | day 16 | tomorrow 17 | seven 18 | FAQ/SM 19 | can’t 20 | doesn’t 21 | etc 22 | won’t 23 | lip 24 | text 25 | horrifying 26 | speech 27 | suggest 28 | uncreate/V 29 | Hunspell 30 | İzmir 31 | -------------------------------------------------------------------------------- /tests/alias2.morph: -------------------------------------------------------------------------------- 1 | > foo 2 | analyze(foo) = st:foo po:noun xx:other_data 3 | stem(foo) = foo 4 | > foox 5 | analyze(foox) = st:foo po:noun xx:other_data is:affix_x 6 | stem(foox) = foo 7 | > fooy 8 | analyze(fooy) = st:foo po:noun xx:other_data ds:affix_y 9 | stem(fooy) = fooy 10 | > fooyx 11 | analyze(fooyx) = st:foo po:noun xx:other_data ds:affix_y is:affix_x 12 | stem(fooyx) = fooy 13 | -------------------------------------------------------------------------------- /tests/base_utf.good: -------------------------------------------------------------------------------- 1 | created 2 | uncreate 3 | uncreated 4 | imply 5 | implied 6 | unnatural 7 | conveyed 8 | sawyer 9 | NASA 10 | FAQs 11 | can’t 12 | doesn’t 13 | won’t 14 | Created 15 | Hello 16 | HELLO 17 | NASA 18 | etc. 19 | etc 20 | HELLO 21 | lip. 22 | text. 23 | NASA. 24 | Text. 25 | TEXT. 26 | Hunspell. 27 | HUNSPELL. 28 | İzmir 29 | İZMİR 30 | İzmir. 31 | İZMİR. 32 | Imply 33 | IMPLY 34 | -------------------------------------------------------------------------------- /tests/compoundrule.wrong: -------------------------------------------------------------------------------- 1 | ba 2 | aaabaaa 3 | bbaaa 4 | aaaaba 5 | bbbbbaa 6 | aa 7 | aaa 8 | aaaa 9 | ab 10 | aab 11 | aaab 12 | aaaab 13 | abb 14 | aabb 15 | aaabbb 16 | bb 17 | bbb 18 | bbbb 19 | aaab 20 | abcc 21 | abbc 22 | abbcc 23 | aabc 24 | aabcc 25 | aabbc 26 | aabbcc 27 | aaabbbccc 28 | ac 29 | aac 30 | aacc 31 | aaaccc 32 | bc 33 | bcc 34 | bbc 35 | bbcc 36 | bbbccc 37 | cc 38 | ccc 39 | cccccc 40 | -------------------------------------------------------------------------------- /tests/ignoresug.morph: -------------------------------------------------------------------------------- 1 | > ինչ 2 | analyze(ինչ) = st:ինչ 3 | stem(ինչ) = ինչ 4 | > ի՞նչ 5 | analyze(ի՞նչ) = st:ինչ 6 | stem(ի՞նչ) = ինչ 7 | > մնաս 8 | analyze(մնաս) = st:մնաս 9 | stem(մնաս) = մնաս 10 | > մնա՜ս 11 | analyze(մնա՜ս) = st:մնաս 12 | stem(մնա՜ս) = մնաս 13 | > որտեղ 14 | analyze(որտեղ) = st:որտեղ 15 | stem(որտեղ) = որտեղ 16 | > որտե՞ղ 17 | analyze(որտե՞ղ) = st:որտեղ 18 | stem(որտե՞ղ) = որտեղ 19 | -------------------------------------------------------------------------------- /tests/circumfix.morph: -------------------------------------------------------------------------------- 1 | > nagy 2 | analyze(nagy) = st:nagy po:adj 3 | stem(nagy) = nagy 4 | > nagyobb 5 | analyze(nagyobb) = st:nagy po:adj is:COMPARATIVE 6 | stem(nagyobb) = nagy 7 | > legnagyobb 8 | analyze(legnagyobb) = fl:A st:nagy po:adj is:SUPERLATIVE 9 | stem(legnagyobb) = nagy 10 | > legeslegnagyobb 11 | analyze(legeslegnagyobb) = fl:B st:nagy po:adj is:SUPERSUPERLATIVE 12 | stem(legeslegnagyobb) = nagy 13 | -------------------------------------------------------------------------------- /tests/zeroaffix.morph: -------------------------------------------------------------------------------- 1 | > bar 2 | analyze(bar) = st:bar > 3 | analyze(bar) = st:bar 4 | analyze(bar) = st:bar > 5 | analyze(bar) = st:bar > 6 | stem(bar) = bar 7 | > foo 8 | analyze(foo) = st:foo 9 | stem(foo) = foo 10 | > barbaz 11 | analyze(barbaz) = st:bar > 12 | analyze(barbaz) = st:bar > 13 | stem(barbaz) = bar 14 | -------------------------------------------------------------------------------- /tests/compoundrule8.dic: -------------------------------------------------------------------------------- 1 | 22 2 | 0/1001,2002 3 | 1/1001,1002 4 | 2/1001,2002 5 | 3/1001,2002 6 | 4/1001,2002 7 | 5/1001,2002 8 | 6/1001,2002 9 | 7/1001,2002 10 | 8/1001,2002 11 | 9/1001,2002 12 | 0th/2000,2001 13 | 1st/2000 14 | 1th/2001,1000 15 | 2nd/2000 16 | 2th/2001,1000 17 | 3rd/2000 18 | 3th/2001,1000 19 | 4th/2000,2001 20 | 5th/2000,2001 21 | 6th/2000,2001 22 | 7th/2000,2001 23 | 8th/2000,2001 24 | 9th/2000,2001 25 | -------------------------------------------------------------------------------- /tests/compoundrule3.wrong: -------------------------------------------------------------------------------- 1 | aa 2 | aaa 3 | aaaa 4 | aab 5 | aaab 6 | aaaab 7 | abb 8 | aabb 9 | aaabbb 10 | bb 11 | bbb 12 | bbbb 13 | aaab 14 | abcc 15 | abbc 16 | abbcc 17 | aabc 18 | aabcc 19 | aabbc 20 | aabbcc 21 | aaabbbccc 22 | acc 23 | aac 24 | aacc 25 | aaaccc 26 | bcc 27 | bbc 28 | bbcc 29 | bbbccc 30 | cc 31 | ccc 32 | cccccc 33 | abcc 34 | ba 35 | aaabaaa 36 | bbaaa 37 | aaaaba 38 | bbbbbaa 39 | cba 40 | cab 41 | acb 42 | -------------------------------------------------------------------------------- /tests/compoundforbid.aff: -------------------------------------------------------------------------------- 1 | # Dictionary words with COMPOUNDFORBIDFLAG are 2 | # removed from the beginning and middle of 3 | # compound words, overriding the effect of 4 | # COMPOUNDPERMITFLAG. 5 | # 6 | # See compoundaffix3 test for basic usage 7 | # of COMPOUNDFORBIDFLAG. 8 | 9 | COMPOUNDFLAG X 10 | COMPOUNDPERMITFLAG Y 11 | COMPOUNDFORBIDFLAG Z 12 | 13 | SFX S Y 2 14 | SFX S 0 bar/YX . 15 | SFX S 0 baz/YX . 16 | -------------------------------------------------------------------------------- /tests/morph.good: -------------------------------------------------------------------------------- 1 | drink 2 | drinks 3 | drinkable 4 | drinkables 5 | undrinkable 6 | undrinkables 7 | drank 8 | drunk 9 | phenomenon 10 | phenomena 11 | drink eat 12 | drink eats 13 | drink ate 14 | drink eaten 15 | drink eatable 16 | drink eatables 17 | drink phenomena 18 | drinks eat 19 | drinks eats 20 | drinks ate 21 | drinks eaten 22 | drinks eatable 23 | drinks eatables 24 | drinks phenomena 25 | undrinkable phenomena 26 | phenomenon drinks 27 | -------------------------------------------------------------------------------- /tests/ngram_utf_fix.aff: -------------------------------------------------------------------------------- 1 | # Test fix of suffixed ngram suggestions with UTF-8 encoding and long flags. 2 | # Based on Vitaly Piryatinsky's bug report and example. 3 | SET UTF-8 4 | FLAG num 5 | 6 | PFX 101 Y 1 7 | PFX 101 0 пред . 8 | 9 | SFX 1381 Y 1 10 | SFX 1381 0 о . 11 | 12 | SFX 2000 Y 3 13 | SFX 2000 0 ам . 14 | SFX 2000 0 ами . 15 | SFX 2000 0 ах . 16 | 17 | SFX 2022 Y 4 18 | SFX 2022 0 а . 19 | SFX 2022 0 у . 20 | SFX 2022 0 ом . 21 | SFX 2022 0 е . 22 | -------------------------------------------------------------------------------- /tests/fullstrip.aff: -------------------------------------------------------------------------------- 1 | # FULLSTRIP option: Hunspell can strip full words by affix rules 2 | # see OpenOffice.org Issue #80145 3 | # test data from Davide Prina 4 | 5 | FULLSTRIP 6 | 7 | SET ISO8859-15 8 | TRY aioertnsclmdpgubzfvhàq'ACMSkBGPLxEyRTVòIODNwFéùèìjUZKHWJYQX 9 | 10 | SFX A Y 3 # verbo andare (verb to go) 11 | SFX A andare vado andare # io vado (I go) 12 | SFX A andare va andare # tu vai (you go) 13 | SFX A are iamo andare # noi andiamo (we go) 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/germancompounding.good: -------------------------------------------------------------------------------- 1 | Computer 2 | Computern 3 | Arbeit 4 | Arbeits- 5 | Computerarbeit 6 | Computerarbeits- 7 | Arbeitscomputer 8 | Computercomputer 9 | Computercomputern 10 | Arbeitscomputern 11 | Computerarbeitscomputer 12 | Computerarbeitscomputern 13 | Arbeitscomputercomputer 14 | Computercomputerarbeit 15 | Arbeitscomputerarbeit 16 | Arbeitsarbeitsarbeit 17 | Computerarbeitsarbeit 18 | Computerarbeits-Computer 19 | Computerarbeits-Computern 20 | Computer-Arbeit 21 | -------------------------------------------------------------------------------- /tests/sugutf.aff: -------------------------------------------------------------------------------- 1 | # new suggestion methods of Hunspell 1.5: 2 | # capitalization: nasa -> NASA 3 | # long swap: permenant -> permanent 4 | # long mov: Ghandi -> Gandhi 5 | # double two characters: vacacation -> vacation 6 | # space with REP: "alot" -> "a lot" ("a lot" need to be in the dic file.) 7 | 8 | SET UTF-8 9 | # switch off ngram suggestion for testing 10 | MAXNGRAMSUGS 0 11 | REP 1 12 | REP alot a_lot 13 | KEY qwertzuiop|asdfghjkl|yxcvbnm|aq 14 | WORDCHARS . 15 | FORBIDDENWORD ? 16 | -------------------------------------------------------------------------------- /tests/oconv.aff: -------------------------------------------------------------------------------- 1 | # output conversion 2 | SET UTF-8 3 | 4 | # Testing also whitespace and comments. 5 | OCONV 7 # space, space 6 | OCONV a A # tab, space, space 7 | OCONV á Á # tab, tab, space 8 | OCONV b B # tab, tab, tab 9 | OCONV c C # 2xspace, 2xspace, 2xtab 10 | OCONV d D # tab+space, space+tab, space 11 | OCONV e E # 12 | OCONV é É 13 | # Only comment. Note that line above ends with space+tab. 14 | 15 | # space 16 | # 2xspace 17 | # tab 18 | # 2xtab 19 | # space+tab 20 | # tab+space 21 | -------------------------------------------------------------------------------- /tests/suggestiontest/README: -------------------------------------------------------------------------------- 1 | source of text data: Wikipedia 2 | http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines 3 | 4 | For testing Hunspell you need the extended en_US dictionary with phonetic table: 5 | http://hunspell.sourceforge.net/en_US.zip 6 | 7 | test: 8 | make -f Makefile.orig 9 | 10 | test only with Hunspell: 11 | 12 | make -f Makefile.orig single 13 | 14 | test with different input file and dictionaries: 15 | 16 | INPUT=dutchlist.txt HUNSPELL=nl_NL ASPELL=nl make -f Makefile.orig 17 | -------------------------------------------------------------------------------- /po/remove-potcdate.sin: -------------------------------------------------------------------------------- 1 | # Sed script that remove the POT-Creation-Date line in the header entry 2 | # from a POT file. 3 | # 4 | # The distinction between the first and the following occurrences of the 5 | # pattern is achieved by looking at the hold space. 6 | /^"POT-Creation-Date: .*"$/{ 7 | x 8 | # Test if the hold space is empty. 9 | s/P/P/ 10 | ta 11 | # Yes it was empty. First occurrence. Remove the line. 12 | g 13 | d 14 | bb 15 | :a 16 | # The hold space was nonempty. Following occurrences. Do nothing. 17 | x 18 | :b 19 | } 20 | -------------------------------------------------------------------------------- /tests/opentaal_cpdpat2.aff: -------------------------------------------------------------------------------- 1 | # Test file based on OpenTaal's Dutch dictionary, coded by Ruud Baars 2 | 3 | WORDCHARS - 4 | NOSPLITSUGS 5 | FLAG long 6 | 7 | COMPOUNDBEGIN Ca 8 | COMPOUNDMIDDLE Cb 9 | COMPOUNDEND Cc 10 | COMPOUNDPERMITFLAG Cp 11 | ONLYINCOMPOUND Cx 12 | 13 | CHECKCOMPOUNDPATTERN 2 14 | CHECKCOMPOUNDPATTERN 0/Ch /Xs 15 | CHECKCOMPOUNDPATTERN 0/Xm /Xm 16 | 17 | SFX CA Y 2 18 | SFX CA 0 /CaCp . 19 | SFX CA 0 -/CaCp . 20 | 21 | SFX CB Y 2 22 | SFX CB 0 /CbCp . 23 | SFX CB 0 -/CbCp . 24 | 25 | SFX Ch Y 2 26 | SFX Ch 0 s/CaCbCxCp . 27 | SFX Ch 0 s-/CaCbCcCp . 28 | -------------------------------------------------------------------------------- /src/hunspell/hunvisapi.h: -------------------------------------------------------------------------------- 1 | #ifndef HUNSPELL_VISIBILITY_H_ 2 | #define HUNSPELL_VISIBILITY_H_ 3 | 4 | #if defined(HUNSPELL_STATIC) 5 | # define LIBHUNSPELL_DLL_EXPORTED 6 | #elif defined(_WIN32) 7 | # if defined(BUILDING_LIBHUNSPELL) 8 | # define LIBHUNSPELL_DLL_EXPORTED __declspec(dllexport) 9 | # else 10 | # define LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport) 11 | # endif 12 | #elif defined(BUILDING_LIBHUNSPELL) && 1 13 | # define LIBHUNSPELL_DLL_EXPORTED __attribute__((__visibility__("default"))) 14 | #else 15 | # define LIBHUNSPELL_DLL_EXPORTED 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/hunspell/hunvisapi.h.in: -------------------------------------------------------------------------------- 1 | #ifndef HUNSPELL_VISIBILITY_H_ 2 | #define HUNSPELL_VISIBILITY_H_ 3 | 4 | #if defined(HUNSPELL_STATIC) 5 | # define LIBHUNSPELL_DLL_EXPORTED 6 | #elif defined(_WIN32) 7 | # if defined(BUILDING_LIBHUNSPELL) 8 | # define LIBHUNSPELL_DLL_EXPORTED __declspec(dllexport) 9 | # else 10 | # define LIBHUNSPELL_DLL_EXPORTED __declspec(dllimport) 11 | # endif 12 | #elif defined(BUILDING_LIBHUNSPELL) && @HAVE_VISIBILITY@ 13 | # define LIBHUNSPELL_DLL_EXPORTED __attribute__((__visibility__("default"))) 14 | #else 15 | # define LIBHUNSPELL_DLL_EXPORTED 16 | #endif 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /src/parsers/Makefile.am: -------------------------------------------------------------------------------- 1 | 2 | AM_CPPFLAGS=-I${top_builddir}/src/hunspell 3 | 4 | noinst_LIBRARIES=libparsers.a 5 | libparsers_a_SOURCES=firstparser.cxx xmlparser.cxx \ 6 | latexparser.cxx manparser.cxx \ 7 | textparser.cxx htmlparser.cxx \ 8 | odfparser.cxx 9 | 10 | noinst_PROGRAMS=testparser 11 | testparser_SOURCES=firstparser.cxx firstparser.hxx xmlparser.cxx \ 12 | xmlparser.hxx latexparser.cxx latexparser.hxx \ 13 | manparser.cxx manparser.hxx testparser.cxx \ 14 | textparser.cxx textparser.hxx htmlparser.cxx \ 15 | htmlparser.hxx odfparser.hxx odfparser.cxx 16 | 17 | # need mystrdup() 18 | LDADD = ../hunspell/libhunspell-1.7.la 19 | -------------------------------------------------------------------------------- /man/hunzip.1: -------------------------------------------------------------------------------- 1 | .TH hzip 1 "2008-06-12" 2 | .LO 1 3 | .SH NAME 4 | hunzip \- decompress and decrypt hzip files to the standard output 5 | .SH SYNOPSIS 6 | hunzip [\-h] file.hz [password] 7 | .SH DESCRIPTION 8 | .I Hunzip 9 | is the decompression and decryption program of hzip format. 10 | .SH OPTIONS 11 | .IP \fB\-h\fR 12 | Display short help description. 13 | .SH EXAMPLE 14 | .sp 15 | .BI "hunzip file.hz >file" 16 | .SH NOTES 17 | Redirection of the standard output results platform-specific 18 | line terminating, so a compressed hzip file with new line terminators 19 | would be bigger with the extra CR characters of the decompression on 20 | Windows platforms. 21 | .SH SEE ALSO 22 | .B hunzip (1), hunspell(1) 23 | .SH AUTHOR 24 | László Németh. 25 | -------------------------------------------------------------------------------- /tests/sug.aff: -------------------------------------------------------------------------------- 1 | # new suggestion methods of Hunspell 1.5: 2 | # capitalization: nasa -> NASA 3 | # long swap: permenant -> permanent 4 | # long mov: Ghandi -> Gandhi 5 | # double two characters: vacacation -> vacation 6 | # space with REP: "alot" -> "a lot" ("a lot" need to be in the dic file.) 7 | # 8 | # Note: see test "ph" for the newer and 9 | # more simple method to handle common misspellings, 10 | # for example, alot->a lot, inspite->in spite, 11 | # (that is giving the best suggestion, and limiting 12 | # ngram/phonetic suggestion) 13 | 14 | # switch off ngram suggestion for testing 15 | MAXNGRAMSUGS 0 16 | REP 2 17 | REP alot a_lot 18 | REP inspite in_spite 19 | KEY qwertzuiop|asdfghjkl|yxcvbnm|aq 20 | WORDCHARS .- 21 | FORBIDDENWORD ? 22 | 23 | -------------------------------------------------------------------------------- /tests/sug2.aff: -------------------------------------------------------------------------------- 1 | # new suggestion methods of Hunspell 1.7: 2 | # dictionary word pairs with spaces or dashes 3 | # got top priority, and removes other not 4 | # "good" (uppercase, REP, ph:) suggestions: 5 | # 6 | # "alot" -> "a lot" 7 | # 8 | # Note: use ph: at the dictionary word pair 9 | # with space or dash to keep the other not 10 | # "good" suggestions, for example 11 | # 12 | # a lot ph:alot 13 | # 14 | # results "alot" -> "a lot", "alto", "slot"... 15 | 16 | # switch off ngram suggestion for testing 17 | MAXNGRAMSUGS 0 18 | KEY qwertzuiop|asdfghjkl|yxcvbnm|aq 19 | 20 | # Note: TRY with a letter "a" or "-" needs for 21 | # checking dictionary word pairs with dashes 22 | TRY esianrtolcdugmphbyfvkwz' 23 | WORDCHARS .- 24 | FORBIDDENWORD ? 25 | 26 | -------------------------------------------------------------------------------- /tests/conditionalprefix.morph: -------------------------------------------------------------------------------- 1 | > drink 2 | analyze(drink) = st:drink po:verb 3 | analyze(drink) = st:drink po:noun 4 | stem(drink) = drink 5 | > drinks 6 | analyze(drinks) = st:drink po:verb is:3SGV 7 | analyze(drinks) = st:drink po:noun is:PL 8 | stem(drinks) = drink 9 | > drinkable 10 | analyze(drinkable) = st:drink po:verb ds:DER_V_ADJ_ABLE 11 | stem(drinkable) = drinkable 12 | > drinkables 13 | analyze(drinkables) = st:drink po:verb ds:DER_V_ADJ_ABLE is:PL 14 | stem(drinkables) = drinkable 15 | > undrinkable 16 | analyze(undrinkable) = ip:un st:drink po:verb ds:DER_V_ADJ_ABLE 17 | stem(undrinkable) = drinkable 18 | > undrinkables 19 | analyze(undrinkables) = ip:un st:drink po:verb ds:DER_V_ADJ_ABLE is:PL 20 | stem(undrinkables) = drinkable 21 | -------------------------------------------------------------------------------- /po/insert-header.sin: -------------------------------------------------------------------------------- 1 | # Sed script that inserts the file called HEADER before the header entry. 2 | # 3 | # At each occurrence of a line starting with "msgid ", we execute the following 4 | # commands. At the first occurrence, insert the file. At the following 5 | # occurrences, do nothing. The distinction between the first and the following 6 | # occurrences is achieved by looking at the hold space. 7 | /^msgid /{ 8 | x 9 | # Test if the hold space is empty. 10 | s/m/m/ 11 | ta 12 | # Yes it was empty. First occurrence. Read the file. 13 | r HEADER 14 | # Output the file's contents by reading the next line. But don't lose the 15 | # current line while doing this. 16 | g 17 | N 18 | bb 19 | :a 20 | # The hold space was nonempty. Following occurrences. Do nothing. 21 | x 22 | :b 23 | } 24 | -------------------------------------------------------------------------------- /man/hzip.1: -------------------------------------------------------------------------------- 1 | .TH hunzip 1 "2008-06-12" 2 | .LO 1 3 | .SH NAME 4 | hunzip \- compress and encrypt dictionary files 5 | .SH SYNOPSIS 6 | hzip [\-h] [\-P password] [file(s)] 7 | .SH DESCRIPTION 8 | .I hunzip 9 | is a small utility for text file compression and encryption, especially for 10 | sorted dictionaries. "hunspell filename" creates the compressed 11 | file "filename.hz" without removing the original file. 12 | 13 | The compression algorithm uses 16-bit Huffman encoding and 14 | line-oriented prefix-suffix compression. It has good 15 | compression ratio for huge sorted word lists. 16 | .SH OPTIONS 17 | .IP \fB\-h\fR 18 | Display short help description. 19 | .IP \fB\-P\ password\fR 20 | Encrypted compression by an arbitrary length password. 21 | .SH SEE ALSO 22 | .B hzip (1), hunspell(1) 23 | .SH AUTHOR 24 | László Németh. 25 | -------------------------------------------------------------------------------- /AUTHORS: -------------------------------------------------------------------------------- 1 | Author: László Németh 2 | 3 | MySpell's (Hunspell's code base) author: Kevin Hendricks 4 | 5 | Maintainer, distinguished contributor: Caolán McNamara 6 | 7 | Author of rule-based transformation code for phonetic suggestions 8 | (PHONE/phonet.cxx, used by English dictionaries): Björn Jacke 9 | 10 | 11 | Hunspell/MySpell code base is result of work of several 12 | contributors. See git log, ./THANKS, ./Changelog, ./Changelog.O, 13 | MySpell's README and CONTRIBUTORS files for their contributions. 14 | 15 | 16 | Note: Following contributors are not owners and 17 | not representatives of Hunspell, and they haven't got 18 | permission from Hunspell's author to act on the behalf 19 | of Hunspell project: Sander van Geloven, Dimitri Mijoski 20 | 21 | 22 | If you would like to support Hunspell, join the 23 | development or contact the author. 24 | -------------------------------------------------------------------------------- /tests/ph.aff: -------------------------------------------------------------------------------- 1 | # new suggestion methods of Hunspell 1.7: 2 | # ph: for dictionary-based suggestions. 3 | # 4 | # For example, suggestions for "wich" 5 | # with this test dictonary: 6 | # 7 | # Hunspell 1.3.3 8 | # wich 9 | # & wich 4 0: winch, witch, which, wish 10 | # 11 | # Hunspell 1.6.2 12 | # wich 13 | # & wich 4 0: which, witch, winch, wish 14 | # 15 | # Suggestions will be limited for 16 | # the dictionary words with the same ph: field, 17 | # and for non-ngram suggestions. 18 | # 19 | # Order of the ph: suggestions for the 20 | # same mispelling, eg. wich -> which, witch 21 | # follows the order of the words in the dictionary: 22 | # 23 | # which ph:wich 24 | # witch ph:witch 25 | # 26 | # switch off ngram suggestions to check only 27 | # ph: based suggestions 28 | MAXNGRAMSUGS 0 29 | 30 | TRY esianrtolcdugmphbyfvkwzESIANRTOLCDUGMPHBYFVKWZ'- 31 | -------------------------------------------------------------------------------- /tests/ph2.aff: -------------------------------------------------------------------------------- 1 | # switch off ngram suggestion to test 2 | # usage of ph: dictionary fields in REP 3 | # suggestions 4 | SET UTF-8 5 | 6 | MAXNGRAMSUGS 0 7 | 8 | # test in compounds, too 9 | COMPOUNDFLAG Y 10 | 11 | # test also dictionary items with space, 12 | # and forbidden compounding, if there is 13 | # a ph: field with that compound as 14 | # mispelling in the dictionary 15 | CHECKCOMPOUNDREP 16 | 17 | # test in compound word with affixes 18 | SFX A Y 1 19 | SFX A 0 's . 20 | 21 | # when the ph: field ends with the character *, 22 | # strip last character of the pattern and the replacement 23 | # to match in REP suggestions also at character changes, 24 | # for example, "pretty ph:prity*" results "prit->prett" 25 | # REP replacement instead of "prity->pretty", to get 26 | # prity->pretty and pritiest->prettiest suggestions. 27 | 28 | SFX B Y 2 29 | SFX B y iest [^aeiou]y 30 | SFX B ö őt ö 31 | 32 | WORDCHARS ' 33 | -------------------------------------------------------------------------------- /src/hunspell/Makefile.am: -------------------------------------------------------------------------------- 1 | lib_LTLIBRARIES = libhunspell-1.7.la 2 | libhunspell_1_7_includedir = $(includedir)/hunspell 3 | libhunspell_1_7_la_SOURCES=affentry.cxx affentry.hxx affixmgr.cxx affixmgr.hxx \ 4 | atypes.hxx baseaffix.hxx csutil.cxx csutil.hxx \ 5 | filemgr.cxx filemgr.hxx hashmgr.cxx hashmgr.hxx \ 6 | htypes.hxx hunspell.cxx hunspell.h hunspell.hxx \ 7 | hunzip.cxx hunzip.hxx langnum.hxx \ 8 | phonet.cxx phonet.hxx replist.cxx replist.hxx \ 9 | suggestmgr.cxx suggestmgr.hxx utf_info.hxx w_char.hxx 10 | nodist_libhunspell_1_7_la_SOURCES=hunvisapi.h 11 | 12 | 13 | libhunspell_1_7_include_HEADERS=hunspell.hxx hunspell.h hunvisapi.h \ 14 | w_char.hxx atypes.hxx 15 | 16 | libhunspell_1_7_la_LDFLAGS=-no-undefined -version-info 0:1:0 17 | 18 | AM_CXXFLAGS=$(CFLAG_VISIBILITY) -DBUILDING_LIBHUNSPELL 19 | -------------------------------------------------------------------------------- /tests/compoundrule5.morph: -------------------------------------------------------------------------------- 1 | > 10% 2 | analyze(10%) = pa:1 st:1 po:num pa:0 st:0 po:num pa:% st:% po:sign_percent 3 | stem(10%) = 10% 4 | > 0.2% 5 | analyze(0.2%) = pa:0 st:0 po:num pa:. st:. po:sign_dot pa:2 st:2 po:num pa:% st:% po:sign_percent 6 | stem(0.2%) = 0.2% 7 | > 0.20% 8 | analyze(0.20%) = pa:0 st:0 po:num pa:. st:. po:sign_dot pa:2 st:2 po:num pa:0 st:0 po:num pa:% st:% po:sign_percent 9 | stem(0.20%) = 0.20% 10 | > 123.4561‰ 11 | analyze(123.4561‰) = pa:1 st:1 po:num pa:2 st:2 po:num pa:3 st:3 po:num pa:. st:. po:sign_dot pa:4 st:4 po:num pa:5 st:5 po:num pa:6 st:6 po:num pa:1 st:1 po:num pa:‰ st:‰ po:sign_per_mille 12 | stem(123.4561‰) = 123.4561‰ 13 | > 10 14 | analyze(10) = pa:1 st:1 po:num pa:0 st:0 po:num 15 | stem(10) = 10 16 | > 0000 17 | analyze(0000) = pa:0 st:0 po:num pa:0 st:0 po:num pa:0 st:0 po:num pa:0 st:0 po:num 18 | stem(0000) = 0000 19 | > 10.25 20 | analyze(10.25) = pa:1 st:1 po:num pa:0 st:0 po:num pa:. st:. po:sign_dot pa:2 st:2 po:num pa:5 st:5 po:num 21 | stem(10.25) = 10.25 22 | -------------------------------------------------------------------------------- /src/tools/Makefile.am: -------------------------------------------------------------------------------- 1 | bin_PROGRAMS=analyze chmorph hunspell munch unmunch hzip hunzip 2 | 3 | AM_CPPFLAGS=-I${top_builddir}/src/hunspell -I${top_srcdir}/src/hunspell -I${top_srcdir}/src/parsers 4 | 5 | hzip_SOURCES=hzip.cxx 6 | hunzip_SOURCES=hunzip.cxx 7 | hunzip_LDADD = ../hunspell/libhunspell-1.7.la 8 | 9 | munch_SOURCES=munch.cxx munch.h 10 | unmunch_SOURCES=unmunch.cxx unmunch.h 11 | 12 | example_SOURCES=example.cxx 13 | example_LDADD = ../hunspell/libhunspell-1.7.la 14 | 15 | hunspell_SOURCES=hunspell.cxx 16 | nodist_hunspell_SOURCES= ../../config.h 17 | hunspell_LDADD = @LIBINTL@ @LIBICONV@ ../parsers/libparsers.a \ 18 | ../hunspell/libhunspell-1.7.la @CURSESLIB@ @READLINELIB@ 19 | 20 | analyze_SOURCES=analyze.cxx 21 | analyze_LDADD = ../hunspell/libhunspell-1.7.la 22 | 23 | chmorph_SOURCES=chmorph.cxx 24 | chmorph_LDADD = ../parsers/libparsers.a ../hunspell/libhunspell-1.7.la 25 | 26 | noinst_PROGRAMS=example 27 | 28 | dist_bin_SCRIPTS=makealias affixcompress wordforms ispellaff2myspell wordlist2hunspell 29 | -------------------------------------------------------------------------------- /tests/suggestiontest/test: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Check common misspellings 3 | # input file format: 4 | # word->word1, ... 5 | # Source: http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines 6 | 7 | input=${INPUT:-List_of_common_misspellings.txt} 8 | 9 | function check() { 10 | cat $1 | awk 'BEGIN{maxord=0;FS="\t"}FILENAME=="-"{for (i=1; i<=NF; i++){a[NR,$(i)]=i};max=NR;next}{x1=a[NR-max,$2];x2=a[NR-max,$3];sug++;if($3)sug++;if (!x1&&!x2){mis2++;misrow=misrow"\n"$0};if(!x1||($3 && !x2))mis++;ord+=x1+x2;}END{ 11 | print "Missed rows", misrow; 12 | print "=======================================" 13 | print maxord, "max. suggestion for a word"; 14 | print max, "input rows"; 15 | print mis2, "missing rows"; 16 | print sug, "expected suggestions"; 17 | print mis, "missing suggestions"; 18 | print ord/(sug-mis), "average ranking"; 19 | }' - $2 20 | } 21 | 22 | test -f $input.4 && check $input.4 $input.3 >result.aspell 23 | check $input.5 $input.3 >result.hunspell 24 | test -f result.aspell && tail -6 result.aspell 25 | tail -6 result.hunspell 26 | -------------------------------------------------------------------------------- /tests/suggestiontest/prepare2: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Check common misspellings 3 | # input file format: 4 | # word->word1, ... 5 | # Source: http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines 6 | 7 | hunspell=../../src/tools/hunspell 8 | hlang=${HUNSPELL:-en_US} 9 | input=${INPUT:-List_of_common_misspellings.txt} 10 | 11 | # remove bad words recognised by Hunspell as good 12 | cat $input | sed 's/[-]>/ /' | $hunspell -d $hlang -1 -L | 13 | 14 | # remove spaces from end of lines 15 | sed 's/ *$//' >$input.1 16 | 17 | # change commas with tabs 18 | cat $input.1 | sed 's/, */ /g' >$input.2 19 | 20 | # remove lines with unrecognised suggestions (except suggestion with spaces) 21 | cut -d ' ' -f 2- $input.2 | tr "\t" "\n" | grep -v ' ' >x.1 22 | cat x.1 | $hunspell -l -d $hlang >x.2 23 | cat x.2 | awk 'BEGIN{FS="\t"} 24 | FILENAME=="-"{a[$1]=1;next}a[$2]!=1 && a[$3]!=1{print $0}' - $input.2 >$input.3 25 | 26 | test -f $input.4 && rm $input.4 27 | 28 | cat $input.3 | $hunspell -d $hlang -a -1 | grep -v ^$ | sed -n '2,$p' | 29 | sed 's/^.*: //;s/, / /g' >$input.5 30 | 31 | -------------------------------------------------------------------------------- /tests/germancompounding.wrong: -------------------------------------------------------------------------------- 1 | computer 2 | computern 3 | arbeit 4 | Arbeits 5 | arbeits 6 | ComputerArbeit 7 | ComputernArbeit 8 | Computernarbeit 9 | ComputerArbeits 10 | Arbeitcomputer 11 | Arbeitcomputern 12 | ArbeitsComputer 13 | ArbeitsComputern 14 | Computerarbeitcomputer 15 | ComputerArbeitcomputer 16 | ComputerArbeitscomputer 17 | Computerarbeitcomputern 18 | ComputerArbeitcomputern 19 | ComputerArbeitscomputern 20 | Arbeitscomputerarbeits 21 | Arbeitscomputernarbeits 22 | Computerarbeits-computer 23 | Arbeitsnehmer 24 | computers 25 | computern 26 | computernarbeit 27 | computernArbeit 28 | computerArbeit 29 | computerArbeits 30 | arbeitcomputer 31 | arbeitsComputer 32 | computerarbeitcomputer 33 | computerArbeitcomputer 34 | computerArbeitscomputer 35 | arbeitscomputerarbeits 36 | computerarbeits-computer 37 | arbeitsnehmer 38 | computernarbeit 39 | computernArbeit 40 | arbeits- 41 | computerarbeit 42 | computerarbeits- 43 | arbeitscomputer 44 | arbeitscomputern 45 | computerarbeitscomputer 46 | computerarbeitscomputern 47 | computerarbeitscomputers 48 | arbeitscomputerarbeit 49 | computerarbeits-Computer 50 | computerarbeits-Computern 51 | -------------------------------------------------------------------------------- /tests/germancompoundingold.wrong: -------------------------------------------------------------------------------- 1 | computer 2 | computern 3 | arbeit 4 | Arbeits 5 | arbeits 6 | ComputerArbeit 7 | ComputernArbeit 8 | Computernarbeit 9 | ComputerArbeits 10 | Arbeitcomputer 11 | Arbeitcomputern 12 | ArbeitsComputer 13 | ArbeitsComputern 14 | Computerarbeitcomputer 15 | ComputerArbeitcomputer 16 | ComputerArbeitscomputer 17 | Computerarbeitcomputern 18 | ComputerArbeitcomputern 19 | ComputerArbeitscomputern 20 | Arbeitscomputerarbeits 21 | Arbeitscomputernarbeits 22 | Computerarbeits-computer 23 | Arbeitsnehmer 24 | computers 25 | computern 26 | computernarbeit 27 | computernArbeit 28 | computerArbeit 29 | computerArbeits 30 | arbeitcomputer 31 | arbeitsComputer 32 | computerarbeitcomputer 33 | computerArbeitcomputer 34 | computerArbeitscomputer 35 | arbeitscomputerarbeits 36 | computerarbeits-computer 37 | arbeitsnehmer 38 | computernarbeit 39 | computernArbeit 40 | arbeits- 41 | computerarbeit 42 | computerarbeits- 43 | arbeitscomputer 44 | arbeitscomputern 45 | computerarbeitscomputer 46 | computerarbeitscomputern 47 | computerarbeitscomputers 48 | arbeitscomputerarbeit 49 | computerarbeits-Computer 50 | computerarbeits-Computern 51 | -------------------------------------------------------------------------------- /tests/condition_utf.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | WORDCHARS 0123456789 3 | 4 | SFX S N 18 5 | SFX S 0 suf1 . 6 | SFX S 0 suf2 ó 7 | SFX S 0 suf3 [áéóú] 8 | SFX S 0 suf4 [^ó] 9 | SFX S 0 suf5 [^áéóú] 10 | SFX S 0 suf6 őó 11 | SFX S 0 suf7 ő[áéóú] 12 | SFX S 0 suf8 ő[^ó] 13 | SFX S 0 suf9 ő[^áéóú] 14 | SFX S 0 suf10 [áéóőú]ó 15 | SFX S 0 suf11 [^ő]ó 16 | SFX S 0 suf12 [^áéóőú]ó 17 | SFX S 0 suf13 [áéőú][^ú] 18 | SFX S 0 suf14 [^ú][áéóú] 19 | SFX S 0 suf15 [áéóú][^áéőú] 20 | SFX S 0 suf16 [^áéóú][^áéőú] 21 | SFX S 0 suf17 [áéóú][bcdfgkmnóprstvz] 22 | SFX S 0 suf18 [áéóú]ó 23 | 24 | PFX P N 18 25 | PFX P 0 pre1 . 26 | PFX P 0 pre2 ó 27 | PFX P 0 pre3 [áéóú] 28 | PFX P 0 pre4 [^ó] 29 | PFX P 0 pre5 [^áéóú] 30 | PFX P 0 pre6 óő 31 | PFX P 0 pre7 ó[áéőú] 32 | PFX P 0 pre8 ó[^ő] 33 | PFX P 0 pre9 ó[^áéóőú] 34 | PFX P 0 pre10 [áéóőú]ő 35 | PFX P 0 pre11 [^ó]ő 36 | PFX P 0 pre12 [^áéóőú]ő 37 | PFX P 0 pre13 [áéóú][áéőú] 38 | PFX P 0 pre14 [áéóú][^áéóú] 39 | PFX P 0 pre15 [áéóú][^áéőú] 40 | PFX P 0 pre16 [^áéőú][^áéóú] 41 | PFX P 0 pre17 [bcdfgkmnóprstvz][áéóú] 42 | PFX P 0 pre18 ó[áéóú] 43 | -------------------------------------------------------------------------------- /tests/hu.aff: -------------------------------------------------------------------------------- 1 | SET UTF-8 2 | LANG hu_HU 3 | 4 | # words with flag Y can form compound words 5 | COMPOUNDFLAG Y 6 | 7 | # min. word length in compounds: 8 | # allow 2-letter words 9 | COMPOUNDMIN 2 10 | 11 | # max. word count in compounds 12 | COMPOUNDWORDMAX 2 13 | 14 | # exception for Hungarian: 15 | # allow more words in a compound, than COMPOUNDWORDMAX, 16 | # if syllable count of the compound is 6 or less 17 | COMPOUNDSYLLABLE 6 aáeéiíoóöőuúüű 18 | 19 | # test case for commit 1fada01 "fix other regression in compounding" 20 | REP 1 21 | REP kor _kor 22 | 23 | CHECKCOMPOUNDREP 24 | 25 | # to check word breaking 26 | 27 | WORDCHARS - 28 | 29 | BREAK 1 30 | BREAK - 31 | 32 | # to check COMPOUNDFORBIDFLAG and spec. Hungarian compounding 33 | 34 | COMPOUNDPERMITFLAG + 35 | COMPOUNDFORBIDFLAG ! 36 | 37 | # SFX F suffix "-ó" is allowed in compounds by COMPOUNDPERMITFLAG, 38 | # but the generated word form "forró" is forbidden in compound 39 | # by the dictionary item "forró" with COMPOUNDFORBIDFLAG 40 | # 41 | # Exception: in special Hungarian "moving rule" (hard-wired to the 42 | # flag "F" in a LANG_hu code), "forró" can be in similar compounds: 43 | # "forróvíz-tartály" 44 | 45 | SFX S Y 1 46 | SFX S 0 ó/Y+ . 47 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: cpp 2 | 3 | compiler: 4 | - clang 5 | - gcc 6 | 7 | sudo: false 8 | 9 | os: 10 | - linux 11 | - osx 12 | 13 | before_install: 14 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then 15 | brew --version; 16 | HOMEBREW_NO_ENV_FILTERING=1 brew update; 17 | fi 18 | 19 | install: 20 | - if [ "$TRAVIS_OS_NAME" = "osx" ]; then 21 | brew install gettext; 22 | brew link gettext --force; 23 | fi 24 | # Don't use real gcc on OS X, problems arise when 25 | # Hunspell built with gcc is linked with cppunit built with clang. 26 | # Homebrew builds are build with clang 27 | before_script: 28 | - if [ "$CXX" = "g++" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then 29 | export CXX="g++-5" CC="gcc-5"; 30 | fi 31 | 32 | script: 33 | - autoreconf -i && ./configure && make && make check 34 | # - if [ "$TRAVIS_OS_NAME" = "osx" ]; then autoreconf -i -I /usr/local/share/aclocal && ./configure && make && make check; fi 35 | # might be needed for future 36 | 37 | after_failure: 38 | - cat tests/test-suite.log 39 | 40 | addons: 41 | apt: 42 | sources: 43 | - ubuntu-toolchain-r-test 44 | packages: 45 | - autoconf 46 | - automake 47 | - autopoint 48 | - gcc-5 49 | - g++-5 50 | -------------------------------------------------------------------------------- /po/en@quot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | -------------------------------------------------------------------------------- /m4/nls.m4: -------------------------------------------------------------------------------- 1 | # nls.m4 serial 5 (gettext-0.18) 2 | dnl Copyright (C) 1995-2003, 2005-2006, 2008-2014, 2016 Free Software 3 | dnl Foundation, Inc. 4 | dnl This file is free software; the Free Software Foundation 5 | dnl gives unlimited permission to copy and/or distribute it, 6 | dnl with or without modifications, as long as this notice is preserved. 7 | dnl 8 | dnl This file can be used in projects which are not available under 9 | dnl the GNU General Public License or the GNU Library General Public 10 | dnl License but which still want to provide support for the GNU gettext 11 | dnl functionality. 12 | dnl Please note that the actual code of the GNU gettext library is covered 13 | dnl by the GNU Library General Public License, and the rest of the GNU 14 | dnl gettext package is covered by the GNU General Public License. 15 | dnl They are *not* in the public domain. 16 | 17 | dnl Authors: 18 | dnl Ulrich Drepper , 1995-2000. 19 | dnl Bruno Haible , 2000-2003. 20 | 21 | AC_PREREQ([2.50]) 22 | 23 | AC_DEFUN([AM_NLS], 24 | [ 25 | AC_MSG_CHECKING([whether NLS is requested]) 26 | dnl Default is enabled NLS 27 | AC_ARG_ENABLE([nls], 28 | [ --disable-nls do not use Native Language Support], 29 | USE_NLS=$enableval, USE_NLS=yes) 30 | AC_MSG_RESULT([$USE_NLS]) 31 | AC_SUBST([USE_NLS]) 32 | ]) 33 | -------------------------------------------------------------------------------- /po/en@boldquot.header: -------------------------------------------------------------------------------- 1 | # All this catalog "translates" are quotation characters. 2 | # The msgids must be ASCII and therefore cannot contain real quotation 3 | # characters, only substitutes like grave accent (0x60), apostrophe (0x27) 4 | # and double quote (0x22). These substitutes look strange; see 5 | # http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html 6 | # 7 | # This catalog translates grave accent (0x60) and apostrophe (0x27) to 8 | # left single quotation mark (U+2018) and right single quotation mark (U+2019). 9 | # It also translates pairs of apostrophe (0x27) to 10 | # left single quotation mark (U+2018) and right single quotation mark (U+2019) 11 | # and pairs of quotation mark (0x22) to 12 | # left double quotation mark (U+201C) and right double quotation mark (U+201D). 13 | # 14 | # When output to an UTF-8 terminal, the quotation characters appear perfectly. 15 | # When output to an ISO-8859-1 terminal, the single quotation marks are 16 | # transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to 17 | # grave/acute accent (by libiconv), and the double quotation marks are 18 | # transliterated to 0x22. 19 | # When output to an ASCII terminal, the single quotation marks are 20 | # transliterated to apostrophes, and the double quotation marks are 21 | # transliterated to 0x22. 22 | # 23 | # This catalog furthermore displays the text between the quotation marks in 24 | # bold face, assuming the VT100/XTerm escape sequences. 25 | # 26 | -------------------------------------------------------------------------------- /tests/suggestiontest/prepare: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Check common misspellings 3 | # input file format: 4 | # word->word1, ... 5 | # Source: http://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines 6 | 7 | hunspell=../../src/tools/hunspell 8 | hlang=${HUNSPELL:-en_US} 9 | alang=${ASPELL:-en_US} 10 | input=${INPUT:-List_of_common_misspellings.txt} 11 | 12 | # remove bad words recognised by Hunspell as good 13 | cat $input | sed 's/[-]>/ /' | $hunspell -d $hlang -1 -L | 14 | 15 | # remove items with dash for Aspell 16 | grep '^[^-]* ' | 17 | 18 | # remove spaces from end of lines 19 | sed 's/ *$//' >$input.1 20 | 21 | # remove bad words recognised by Aspell as good 22 | cut -f 1 -d ' ' $input.1 | aspell -l $alang --list | 23 | awk 'FILENAME=="-"{a[$1]=1;next}a[$1]{print$0}' - $input.1 | 24 | 25 | # change commas with tabs 26 | sed 's/, */ /g' >$input.2 27 | 28 | # remove lines with unrecognised suggestions (except suggestion with spaces) 29 | cut -d ' ' -f 2- $input.2 | tr "\t" "\n" | grep -v ' ' >x.1 30 | cat x.1 | $hunspell -l -d $hlang >x.2 31 | cat x.1 | aspell -l $alang --list >>x.2 32 | cat x.2 | awk 'BEGIN{FS="\t"} 33 | FILENAME=="-"{a[$1]=1;next}a[$2]!=1 && a[$3]!=1{print $0}' - $input.2 >$input.3 34 | 35 | cut -f 1 -d ' ' $input.3 | aspell -l $alang -a | grep -v ^$ | sed -n '2,$p' | 36 | sed 's/^.*: //;s/, / /g' >$input.4 37 | 38 | cat $input.3 | $hunspell -d $hlang -a -1 | grep -v ^$ | sed -n '2,$p' | 39 | sed 's/^.*: //;s/, / /g' >$input.5 40 | 41 | -------------------------------------------------------------------------------- /src/tools/wordforms: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | case $# in 3 | 0|1|2) echo "Usage: wordforms [-s | -p] dictionary.aff dictionary.dic word 4 | -s: print only suffixed forms 5 | -p: print only prefixed forms 6 | "; exit 1;; 7 | esac 8 | fx=0 9 | case $1 in 10 | -s) fx=1; shift;; 11 | -p) fx=2; shift;; 12 | esac 13 | test -h /tmp/wordforms.aff && rm /tmp/wordforms.aff 14 | ln -s $PWD/$1 /tmp/wordforms.aff 15 | # prepared dic only with the query word 16 | echo 1 >/tmp/wordforms.dic 17 | grep "^$3/" $2 >>/tmp/wordforms.dic 18 | echo $3 | awk -v "fx=$fx" ' 19 | fx!=2 && FILENAME!="-" && /^SFX/ && NF > 4{split($4,a,"/");clen=($3=="0") ? 0 : length($3);sfx[a[1],clen]=a[1];sfxc[a[1],clen]=clen;next} 20 | fx!=1 && FILENAME!="-" && /^PFX/ && NF > 4{split($4,a,"/");clen=($3=="0") ? 0 : length($3);pfx[a[1],clen]=a[1];pfxc[a[1],clen]=clen;next} 21 | FILENAME=="-"{ 22 | wlen=length($1) 23 | if (fx==0 || fx==2) { 24 | for (j in pfx) {if (wlen<=pfxc[j]) continue; print (pfx[j]=="0" ? "" : pfx[j]) substr($1, pfxc[j]+1)} 25 | } 26 | if (fx==0 || fx==1) { 27 | for(i in sfx){clen=sfxc[i];if (wlen<=clen) continue; print substr($1, 1, wlen-clen) (sfx[i]=="0" ? "": sfx[i]) } 28 | } 29 | if (fx==0) { 30 | for (j in pfx) {if (wlen<=pfxc[j]) continue; 31 | for(i in sfx){clen=sfxc[i];if (wlen<=clen || wlen <= (clen + pfxc[j]))continue; 32 | print (pfx[j]=="0" ? "" : pfx[j]) substr($1, pfxc[j]+1, wlen-clen-pfxc[j]) (sfx[i]=="0" ? "": sfx[i]) }} 33 | } 34 | } 35 | ' /tmp/wordforms.aff - | hunspell -d /tmp/wordforms -G -l 36 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # autom4te 2 | /autom4te.cache 3 | 4 | # aclocal 5 | /aclocal.m4 6 | 7 | # libtoolize https://www.gnu.org/software/libtool/ 8 | /ltmain.sh 9 | /m4/libtool.m4 10 | /m4/ltoptions.m4 11 | /m4/ltsugar.m4 12 | /m4/ltversion.m4 13 | /m4/lt~obsolete.m4 14 | 15 | # http://www.gnu.org/software/autoconf 16 | /configure 17 | 18 | # autoheader 19 | /config.h.in 20 | 21 | # http://www.gnu.org/software/automake 22 | /compile 23 | /config.guess 24 | /config.sub 25 | /install-sh 26 | /missing 27 | 28 | /INSTALL 29 | 30 | /ar-lib 31 | /depcomp 32 | /mdate-sh 33 | /mkinstalldirs 34 | /py-compile 35 | /tap-driver.sh 36 | /test-driver 37 | /ylwrap 38 | 39 | /Makefile.in 40 | /src/**/Makefile.in 41 | /docs/**/Makefile.in 42 | /m4/**/Makefile.in 43 | /tests/**/Makefile.in 44 | 45 | # http://www.gnu.org/software/texinfo 46 | /texinfo.tex 47 | 48 | # autoscan 49 | /autoscan.log 50 | /autoscan-*.log 51 | /configure.scan 52 | 53 | # ./configure script 54 | /config.h 55 | /config.log 56 | /config.status 57 | /hunspell.pc 58 | /libtool 59 | /stamp-h1 60 | 61 | /po/Makefile.in 62 | Makefile 63 | 64 | # make 65 | .deps/ 66 | .libs/ 67 | *.lo 68 | *.la 69 | *.exe 70 | *.o 71 | *.a 72 | *~ 73 | a.out 74 | 75 | # make dist 76 | hunspell-*.tar.gz 77 | 78 | # QtCreator 79 | /Makefile.am.user 80 | 81 | # https://vim.sourceforge.io/ 82 | .?*.swp 83 | 84 | # found during configuring 85 | /confdefs.h 86 | /confinc 87 | /confmf 88 | /configure.tmp 89 | /conftest 90 | /conftest.sh 91 | /conftest.c 92 | /conftest.cpp 93 | /conftest.err 94 | /conftest.er1 95 | 96 | #MSVC 97 | /msvc/Hunspell.VC.VC.opendb 98 | -------------------------------------------------------------------------------- /src/tools/wordlist2hunspell: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # (C) 2008 Caolán McNamara 4 | # 5 | # This program is free software; you can redistribute it and/or modify 6 | # it under the terms of the GNU General Public License as published by 7 | # the Free Software Foundation; either version 2 of the License, or 8 | # (at your option) any later version. 9 | # 10 | # This program is distributed in the hope that it will be useful, 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | # GNU General Public License for more details. 14 | # 15 | # You should have received a copy of the GNU General Public License 16 | # along with this program. If not, see . 17 | 18 | # This creates a LANG_TERRITORY .aff & .dic from a wordlist. 19 | # It is only a simple wordlist spellchecking dictionary output, no 20 | # knowledge of language rules can be extrapolated to shrink the 21 | # wordlist or provide .aff rules for extending wordstems 22 | 23 | if [ $# -lt 2 ]; then 24 | echo "Usage: wordlist2hunspell wordlist_file locale" 25 | echo "e.g. wordlist2hunspell breton.words br_FR to create br_FR.dic and br_FR.aff in cwd" 26 | exit 1 27 | fi 28 | 29 | export LANG=$2.utf8 30 | echo "# A basic .aff for a raw wordlist, created through wordlist2hunspell" > $2.aff 31 | echo SET UTF-8 >> $2.aff 32 | #see https://bugzilla.redhat.com/show_bug.cgi?id=462184 for the "C" hacks 33 | echo TRY `sed 's/./&\n/g' $1 | sed '/^$/d' | LC_ALL=C sort -n | LC_ALL=C uniq -c | LC_ALL=C sort -rn | tr -s ' ' | cut -d ' ' -f 3 | tr -d '\n'` >> $2.aff 34 | cat $1 | sed '/^$/d' | wc -l > $2.dic 35 | LC_ALL=C sort $1 | sed '/^$/d' >> $2.dic 36 | 37 | echo Basic $2.dic and $2.aff created 38 | -------------------------------------------------------------------------------- /src/hunspell/phonet.hxx: -------------------------------------------------------------------------------- 1 | /* phonetic.c - generic replacement aglogithms for phonetic transformation 2 | Copyright (C) 2000 Bjoern Jacke 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License version 2.1 as published by the Free Software Foundation; 7 | 8 | This library is distributed in the hope that it will be useful, 9 | but WITHOUT ANY WARRANTY; without even the implied warranty of 10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 11 | Lesser General Public License for more details. 12 | 13 | You should have received a copy of the GNU Lesser General Public 14 | License along with this library; If not, see 15 | . 16 | 17 | Changelog: 18 | 19 | 2000-01-05 Bjoern Jacke 20 | Initial Release insprired by the article about phonetic 21 | transformations out of c't 25/1999 22 | 23 | 2007-07-26 Bjoern Jacke 24 | Released under MPL/GPL/LGPL tri-license for Hunspell 25 | 26 | 2007-08-23 Laszlo Nemeth 27 | Porting from Aspell to Hunspell using C-like structs 28 | */ 29 | 30 | #ifndef PHONET_HXX_ 31 | #define PHONET_HXX_ 32 | 33 | #define HASHSIZE 256 34 | #define MAXPHONETLEN 256 35 | #define MAXPHONETUTF8LEN (MAXPHONETLEN * 4) 36 | 37 | #include "hunvisapi.h" 38 | 39 | struct phonetable { 40 | char utf8; 41 | std::vector rules; 42 | int hash[HASHSIZE]; 43 | }; 44 | 45 | LIBHUNSPELL_DLL_EXPORTED void init_phonet_hash(phonetable& parms); 46 | 47 | LIBHUNSPELL_DLL_EXPORTED std::string phonet(const std::string& inword, 48 | phonetable& phone); 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /tests/morph.morph: -------------------------------------------------------------------------------- 1 | > drink 2 | analyze(drink) = st:drink po:noun 3 | analyze(drink) = st:drink po:verb al:drank al:drunk ts:present 4 | stem(drink) = drink 5 | > drinks 6 | analyze(drinks) = st:drink po:verb al:drank al:drunk ts:present is:sg_3 7 | analyze(drinks) = st:drink po:noun is:plur 8 | stem(drinks) = drink 9 | > drinkable 10 | analyze(drinkable) = st:drink po:verb al:drank al:drunk ts:present ds:der_able 11 | stem(drinkable) = drinkable 12 | > drinkables 13 | analyze(drinkables) = st:drink po:verb al:drank al:drunk ts:present ds:der_able is:plur 14 | stem(drinkables) = drinkable 15 | > undrinkable 16 | analyze(undrinkable) = dp:pfx_un sp:un st:drink po:verb al:drank al:drunk ts:present ds:der_able 17 | stem(undrinkable) = undrinkable 18 | > undrinkables 19 | analyze(undrinkables) = dp:pfx_un sp:un st:drink po:verb al:drank al:drunk ts:present ds:der_able is:plur 20 | stem(undrinkables) = undrinkable 21 | > drank 22 | analyze(drank) = po:verb st:drink is:past_1 23 | stem(drank) = drink 24 | > drunk 25 | analyze(drunk) = po:verb st:drink is:past_2 26 | stem(drunk) = drink 27 | > phenomenon 28 | analyze(phenomenon) = st:phenomenon po:noun al:phenomena 29 | stem(phenomenon) = phenomenon 30 | > phenomena 31 | analyze(phenomena) = po:noun st:phenomenon is:plur 32 | stem(phenomena) = phenomenon 33 | generate(drink, eat) = drink 34 | generate(drink, eats) = drinks 35 | generate(drink, ate) = drank 36 | generate(drink, eaten) = drunk 37 | generate(drink, eatable) = drinkable 38 | generate(drink, eatables) = drinkables 39 | generate(drink, phenomena) = drinks 40 | generate(drinks, eat) = drink 41 | generate(drinks, eats) = drinks 42 | generate(drinks, ate) = drank 43 | generate(drinks, eaten) = drunk 44 | generate(drinks, eatable) = drinkable 45 | generate(drinks, eatables) = drinkables 46 | generate(drinks, phenomena) = drinks 47 | generate(undrinkable, phenomena) = undrinkables 48 | generate(phenomenon, drinks) = phenomena 49 | -------------------------------------------------------------------------------- /license.hunspell: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): 19 | * David Einstein 20 | * Davide Prina 21 | * Giuseppe Modugno 22 | * Gianluca Turconi 23 | * Simon Brouwer 24 | * Noll János 25 | * Bíró Árpád 26 | * Goldman Eleonóra 27 | * Sarlós Tamás 28 | * Bencsáth Boldizsár 29 | * Halácsy Péter 30 | * Dvornik László 31 | * Gefferth András 32 | * Nagy Viktor 33 | * Varga Dániel 34 | * Chris Halls 35 | * Rene Engelhard 36 | * Bram Moolenaar 37 | * Dafydd Jones 38 | * Harri Pitkänen 39 | * Andras Timar 40 | * Tor Lillqvist 41 | * 42 | * Alternatively, the contents of this file may be used under the terms of 43 | * either the GNU General Public License Version 2 or later (the "GPL"), or 44 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 45 | * in which case the provisions of the GPL or the LGPL are applicable instead 46 | * of those above. If you wish to allow use of your version of this file only 47 | * under the terms of either the GPL or the LGPL, and not to allow others to 48 | * use your version of this file under the terms of the MPL, indicate your 49 | * decision by deleting the provisions above and replace them with the notice 50 | * and other provisions required by the GPL or the LGPL. If you do not delete 51 | * the provisions above, a recipient may use your version of this file under 52 | * the terms of any one of the MPL, the GPL or the LGPL. 53 | * 54 | * ***** END LICENSE BLOCK ***** */ 55 | -------------------------------------------------------------------------------- /src/parsers/firstparser.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef FIRSTPARSER_HXX_ 39 | #define FIRSTPARSER_HXX_ 40 | 41 | #include "textparser.hxx" 42 | 43 | /* 44 | * Check first word of the input line 45 | * 46 | */ 47 | 48 | class FirstParser : public TextParser { 49 | public: 50 | explicit FirstParser(const char* wc); 51 | virtual ~FirstParser(); 52 | 53 | virtual bool next_token(std::string&); 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /po/Rules-quot: -------------------------------------------------------------------------------- 1 | # This file, Rules-quot, can be copied and used freely without restrictions. 2 | # Special Makefile rules for English message catalogs with quotation marks. 3 | 4 | DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot 5 | 6 | .SUFFIXES: .insert-header .po-update-en 7 | 8 | en@quot.po-create: 9 | $(MAKE) en@quot.po-update 10 | en@boldquot.po-create: 11 | $(MAKE) en@boldquot.po-update 12 | 13 | en@quot.po-update: en@quot.po-update-en 14 | en@boldquot.po-update: en@boldquot.po-update-en 15 | 16 | .insert-header.po-update-en: 17 | @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \ 18 | if test "$(PACKAGE)" = "gettext-tools" && test "$(CROSS_COMPILING)" != "yes"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \ 19 | tmpdir=`pwd`; \ 20 | echo "$$lang:"; \ 21 | ll=`echo $$lang | sed -e 's/@.*//'`; \ 22 | LC_ALL=C; export LC_ALL; \ 23 | cd $(srcdir); \ 24 | if $(MSGINIT) $(MSGINIT_OPTIONS) -i $(DOMAIN).pot --no-translator -l $$lang -o - 2>/dev/null \ 25 | | $(SED) -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | \ 26 | { case `$(MSGFILTER) --version | sed 1q | sed -e 's,^[^0-9]*,,'` in \ 27 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-8] | 0.1[0-8].*) \ 28 | $(MSGFILTER) $(SED) -f `echo $$lang | sed -e 's/.*@//'`.sed \ 29 | ;; \ 30 | *) \ 31 | $(MSGFILTER) `echo $$lang | sed -e 's/.*@//'` \ 32 | ;; \ 33 | esac } 2>/dev/null > $$tmpdir/$$lang.new.po \ 34 | ; then \ 35 | if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ 36 | rm -f $$tmpdir/$$lang.new.po; \ 37 | else \ 38 | if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ 39 | :; \ 40 | else \ 41 | echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ 42 | exit 1; \ 43 | fi; \ 44 | fi; \ 45 | else \ 46 | echo "creation of $$lang.po failed!" 1>&2; \ 47 | rm -f $$tmpdir/$$lang.new.po; \ 48 | fi 49 | 50 | en@quot.insert-header: insert-header.sin 51 | sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header 52 | 53 | en@boldquot.insert-header: insert-header.sin 54 | sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header 55 | 56 | mostlyclean: mostlyclean-quot 57 | mostlyclean-quot: 58 | rm -f *.insert-header 59 | -------------------------------------------------------------------------------- /src/parsers/htmlparser.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef HTMLPARSER_HXX_ 39 | #define HTMLPARSER_HXX_ 40 | 41 | #include "xmlparser.hxx" 42 | 43 | /* 44 | * HTML Parser 45 | * 46 | */ 47 | 48 | class HTMLParser : public XMLParser { 49 | public: 50 | explicit HTMLParser(const char* wc); 51 | HTMLParser(const w_char* wordchars, int len); 52 | virtual bool next_token(std::string&); 53 | virtual ~HTMLParser(); 54 | }; 55 | 56 | #endif 57 | -------------------------------------------------------------------------------- /src/parsers/manparser.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef MANPARSER_HXX_ 39 | #define MANPARSER_HXX_ 40 | 41 | #include "textparser.hxx" 42 | 43 | /* 44 | * Manparse Parser 45 | * 46 | */ 47 | 48 | class ManParser : public TextParser { 49 | protected: 50 | public: 51 | explicit ManParser(const char* wc); 52 | ManParser(const w_char* wordchars, int len); 53 | virtual ~ManParser(); 54 | 55 | virtual bool next_token(std::string&); 56 | }; 57 | 58 | #endif 59 | -------------------------------------------------------------------------------- /src/parsers/odfparser.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef ODFPARSER_HXX_ 39 | #define ODFPARSER_HXX_ 40 | 41 | #include "xmlparser.hxx" 42 | 43 | /* 44 | * HTML Parser 45 | * 46 | */ 47 | 48 | class ODFParser : public XMLParser { 49 | public: 50 | explicit ODFParser(const char* wc); 51 | ODFParser(const w_char* wordchars, int len); 52 | virtual bool next_token(std::string&); 53 | virtual std::string get_word(const std::string &tok); 54 | virtual ~ODFParser(); 55 | }; 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /src/tools/hunzip.cxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | #include "../hunspell/hunzip.hxx" 43 | 44 | #define DESC \ 45 | "hunzip - decompress a hzip file to the standard output\n" \ 46 | "Usage: hunzip file.hz [password]\n" 47 | 48 | int main(int argc, char** argv) { 49 | if (argc == 1 || strcmp(argv[1], "-h") == 0) { 50 | fprintf(stderr, DESC); 51 | return 1; 52 | } 53 | Hunzip h(argv[1], (argc > 2) ? argv[2] : NULL); 54 | if (!h.is_open()) 55 | return 0; 56 | std::string s; 57 | while (h.getline(s)) 58 | printf("%s", s.c_str()); 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /src/parsers/latexparser.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef LATEXPARSER_HXX_ 39 | #define LATEXPARSER_HXX_ 40 | 41 | #include "textparser.hxx" 42 | 43 | /* 44 | * HTML Parser 45 | * 46 | */ 47 | 48 | class LaTeXParser : public TextParser { 49 | int pattern_num; // number of comment 50 | int depth; // depth of blocks 51 | int arg; // arguments's number 52 | int opt; // optional argument attrib. 53 | 54 | public: 55 | explicit LaTeXParser(const char* wc); 56 | LaTeXParser(const w_char* wordchars, int len); 57 | virtual ~LaTeXParser(); 58 | 59 | virtual bool next_token(std::string&); 60 | 61 | private: 62 | int look_pattern(int col); 63 | }; 64 | 65 | #endif 66 | -------------------------------------------------------------------------------- /src/parsers/firstparser.cxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #include 39 | #include 40 | #include 41 | #include 42 | 43 | #include "../hunspell/csutil.hxx" 44 | #include "firstparser.hxx" 45 | 46 | #ifndef W32 47 | using namespace std; 48 | #endif 49 | 50 | FirstParser::FirstParser(const char* wordchars) 51 | : TextParser(wordchars) { 52 | } 53 | 54 | FirstParser::~FirstParser() {} 55 | 56 | bool FirstParser::next_token(std::string& t) { 57 | t.clear(); 58 | const size_t tabpos = line[actual].find('\t'); 59 | if (tabpos != std::string::npos && tabpos > token) { 60 | token = tabpos; 61 | t = line[actual].substr(0, tabpos); 62 | return true; 63 | } 64 | return false; 65 | } 66 | -------------------------------------------------------------------------------- /src/hunspell/baseaffix.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef BASEAFF_HXX_ 39 | #define BASEAFF_HXX_ 40 | 41 | #include 42 | 43 | class AffEntry { 44 | private: 45 | AffEntry(const AffEntry&); 46 | AffEntry& operator=(const AffEntry&); 47 | 48 | public: 49 | AffEntry() 50 | : numconds(0), 51 | opts(0), 52 | aflag(0), 53 | morphcode(0), 54 | contclass(NULL), 55 | contclasslen(0) {} 56 | virtual ~AffEntry(); 57 | std::string appnd; 58 | std::string strip; 59 | unsigned char numconds; 60 | char opts; 61 | unsigned short aflag; 62 | union { 63 | char conds[MAXCONDLEN]; 64 | struct { 65 | char conds1[MAXCONDLEN_1]; 66 | char* conds2; 67 | } l; 68 | } c; 69 | char* morphcode; 70 | unsigned short* contclass; 71 | short contclasslen; 72 | }; 73 | 74 | #endif 75 | -------------------------------------------------------------------------------- /src/hunspell/w_char.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef W_CHAR_HXX_ 39 | #define W_CHAR_HXX_ 40 | 41 | #include 42 | 43 | #ifndef GCC 44 | struct w_char { 45 | #else 46 | struct __attribute__((packed)) w_char { 47 | #endif 48 | unsigned char l; 49 | unsigned char h; 50 | 51 | friend bool operator<(const w_char a, const w_char b) { 52 | unsigned short a_idx = (a.h << 8) + a.l; 53 | unsigned short b_idx = (b.h << 8) + b.l; 54 | return a_idx < b_idx; 55 | } 56 | 57 | friend bool operator==(const w_char a, const w_char b) { 58 | return (((a).l == (b).l) && ((a).h == (b).h)); 59 | } 60 | 61 | friend bool operator!=(const w_char a, const w_char b) { 62 | return !(a == b);; 63 | } 64 | }; 65 | 66 | // two character arrays 67 | struct replentry { 68 | std::string pattern; 69 | std::string outstrings[4]; // med, ini, fin, isol 70 | }; 71 | 72 | #endif 73 | -------------------------------------------------------------------------------- /src/hunspell/langnum.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef LANGNUM_HXX_ 39 | #define LANGNUM_HXX_ 40 | 41 | /* 42 | language numbers for language specific codes 43 | see https://wiki.openoffice.org/w/index.php?title=Languages&oldid=230199 44 | */ 45 | 46 | enum { 47 | LANG_ar = 96, 48 | LANG_az = 100, // custom number 49 | LANG_bg = 41, 50 | LANG_ca = 37, 51 | LANG_crh = 102, // custom number 52 | LANG_cs = 42, 53 | LANG_da = 45, 54 | LANG_de = 49, 55 | LANG_el = 30, 56 | LANG_en = 01, 57 | LANG_es = 34, 58 | LANG_eu = 10, 59 | LANG_fr = 02, 60 | LANG_gl = 38, 61 | LANG_hr = 78, 62 | LANG_hu = 36, 63 | LANG_it = 39, 64 | LANG_la = 99, // custom number 65 | LANG_lv = 101, // custom number 66 | LANG_nl = 31, 67 | LANG_pl = 48, 68 | LANG_pt = 03, 69 | LANG_ru = 07, 70 | LANG_sv = 50, 71 | LANG_tr = 90, 72 | LANG_uk = 80, 73 | LANG_xx = 999 74 | }; 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /m4/ChangeLog: -------------------------------------------------------------------------------- 1 | 2017-10-22 gettextize 2 | 3 | * gettext.m4: New file, from gettext-0.19.8.1. 4 | * iconv.m4: New file, from gettext-0.19.8.1. 5 | * lib-ld.m4: New file, from gettext-0.19.8.1. 6 | * lib-link.m4: New file, from gettext-0.19.8.1. 7 | * lib-prefix.m4: New file, from gettext-0.19.8.1. 8 | * nls.m4: New file, from gettext-0.19.8.1. 9 | * po.m4: New file, from gettext-0.19.8.1. 10 | * progtest.m4: New file, from gettext-0.19.8.1. 11 | * visibility.m4: from gettext-0.19.8.1, manually copied. 12 | 13 | 2016-11-02 gettextize 14 | 15 | * gettext.m4: Upgrade to gettext-0.19.8. Manually copied. 16 | * iconv.m4: Upgrade to gettext-0.19.7. 17 | * lib-ld.m4: Upgrade to gettext-0.19.7. 18 | * lib-link.m4: Upgrade to gettext-0.19.7. 19 | * lib-prefix.m4: Upgrade to gettext-0.19.7. 20 | * nls.m4: Upgrade to gettext-0.19.7. 21 | * po.m4: Upgrade to gettext-0.19.7. 22 | * progtest.m4: Upgrade to gettext-0.19.7. 23 | * codeset.m4: Upgrade to gettext-0.19.7. 24 | * fcntl-o.m4: Upgrade to gettext-0.19.7. 25 | * glibc2.m4: Upgrade to gettext-0.19.7. 26 | * glibc21.m4: Upgrade to gettext-0.19.7. 27 | * intdiv0.m4: Upgrade to gettext-0.19.7. 28 | * intl.m4: Upgrade to gettext-0.19.7. 29 | * intldir.m4: Upgrade to gettext-0.19.7. 30 | * intlmacosx.m4: Upgrade to gettext-0.19.7. 31 | * intmax.m4: Upgrade to gettext-0.19.7. 32 | * inttypes_h.m4: Upgrade to gettext-0.19.7. 33 | * inttypes-pri.m4: Upgrade to gettext-0.19.7. 34 | * lcmessage.m4: Upgrade to gettext-0.19.7. 35 | * lock.m4: Upgrade to gettext-0.19.7. 36 | * longlong.m4: Upgrade to gettext-0.19.7. 37 | * printf-posix.m4: Upgrade to gettext-0.19.7. 38 | * size_max.m4: Upgrade to gettext-0.19.7. 39 | * stdint_h.m4: Upgrade to gettext-0.19.7. 40 | * threadlib.m4: Upgrade to gettext-0.19.7. 41 | * uintmax_t.m4: Upgrade to gettext-0.19.7. 42 | * visibility.m4: Upgrade to gettext-0.19.7. 43 | * wchar_t.m4: Upgrade to gettext-0.19.7. 44 | * wint_t.m4: Upgrade to gettext-0.19.7. 45 | * xsize.m4: Upgrade to gettext-0.19.7. 46 | * Makefile.am (EXTRA_DIST): Add the new files. 47 | 48 | 2002-05-22 gettextize 49 | 50 | * gettext.m4: Upgrade to gettext-0.11.2. 51 | * isc-posix.m4: Upgrade to gettext-0.11.2. 52 | * lib-link.m4: Upgrade to gettext-0.11.2. 53 | 54 | 2002-01-25 gettextize 55 | 56 | * codeset.m4: New file, from gettext-0.11-pre5++. 57 | * gettext.m4: New file, from gettext-0.11-pre5++. 58 | * glibc21.m4: New file, from gettext-0.11-pre5++. 59 | * iconv.m4: New file, from gettext-0.11-pre5++. 60 | * isc-posix.m4: New file, from gettext-0.11-pre5++. 61 | * lcmessage.m4: New file, from gettext-0.11-pre5++. 62 | * lib-ld.m4: New file, from gettext-0.11-pre5++. 63 | * lib-link.m4: New file, from gettext-0.11-pre5++. 64 | * lib-prefix.m4: New file, from gettext-0.11-pre5++. 65 | * progtest.m4: New file, from gettext-0.11-pre5++. 66 | * Makefile.am: New file. 67 | 68 | -------------------------------------------------------------------------------- /src/parsers/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------------------------------- # 2 | # ~~~ Set target names 3 | set(_LIB_OUTPUT_NAME "parsers") 4 | set(_TEST_OUTPUT_NAME "test") 5 | 6 | set(HUNSPELL_PARSERS_TARGET_PREFIX "parsers" CACHE INTERNAL "") 7 | set(HUNSPELL_PARSERS_LIB_TARGET "${HUNSPELL_PARSERS_TARGET_PREFIX}_lib" CACHE INTERNAL "") 8 | set(HUNSPELL_PARSERS_TEST_TARGET "${HUNSPELL_PARSERS_TARGET_PREFIX}_${_TEST_OUTPUT_NAME}" CACHE INTERNAL "") 9 | # ---------------------------------------------------------------------------- # 10 | 11 | 12 | # ---------------------------------------------------------------------------- # 13 | # ~~~ Parsers lib target 14 | add_library(${HUNSPELL_PARSERS_LIB_TARGET} STATIC) 15 | 16 | target_sources(${HUNSPELL_PARSERS_LIB_TARGET} 17 | PRIVATE 18 | firstparser.cxx 19 | htmlparser.cxx 20 | latexparser.cxx 21 | manparser.cxx 22 | odfparser.cxx 23 | textparser.cxx 24 | xmlparser.cxx 25 | ) 26 | target_include_directories(${HUNSPELL_PARSERS_LIB_TARGET} 27 | PUBLIC 28 | $ 29 | $ 30 | ) 31 | target_link_libraries(${HUNSPELL_PARSERS_LIB_TARGET} 32 | PUBLIC ${HUNSPELL_LIB_TARGET_SHARED} 33 | ) 34 | set_target_properties(${HUNSPELL_PARSERS_LIB_TARGET} PROPERTIES 35 | OUTPUT_NAME ${_LIB_OUTPUT_NAME} 36 | FOLDER ${HUNSPELL_PARSERS_TARGET_PREFIX} 37 | ) 38 | 39 | # Create an alias 40 | add_library(${HUNSPELL_NAMESPACE}${HUNSPELL_PARSERS_LIB_TARGET} ALIAS ${HUNSPELL_PARSERS_LIB_TARGET}) 41 | # ---------------------------------------------------------------------------- # 42 | 43 | 44 | # ---------------------------------------------------------------------------- # 45 | # ~~~ Parsers test executable 46 | add_executable(${HUNSPELL_PARSERS_TEST_TARGET} testparser.cxx) 47 | 48 | target_include_directories(${HUNSPELL_PARSERS_TEST_TARGET} 49 | PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} 50 | ) 51 | target_link_libraries(${HUNSPELL_PARSERS_TEST_TARGET} 52 | PRIVATE 53 | ${HUNSPELL_PARSERS_LIB_TARGET} 54 | ${HUNSPELL_LIB_TARGET_SHARED} 55 | ) 56 | 57 | set_target_properties(${HUNSPELL_PARSERS_TEST_TARGET} PROPERTIES 58 | OUTPUT_NAME ${_TEST_OUTPUT_NAME} 59 | FOLDER ${HUNSPELL_PARSERS_TARGET_PREFIX} 60 | ) 61 | 62 | if(WIN32 OR MINGW) 63 | copy_dll_if_changed(${HUNSPELL_LIB_TARGET_SHARED} ${HUNSPELL_PARSERS_TEST_TARGET}) 64 | endif() 65 | # ---------------------------------------------------------------------------- # 66 | 67 | 68 | # ---------------------------------------------------------------------------- # 69 | # ~~~ Add extra export targets 70 | add_extra_export_target(${HUNSPELL_PARSERS_LIB_TARGET}) 71 | add_extra_export_target(${HUNSPELL_PARSERS_TEST_TARGET}) 72 | # ---------------------------------------------------------------------------- # 73 | -------------------------------------------------------------------------------- /src/parsers/xmlparser.hxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #ifndef XMLPARSER_HXX_ 39 | #define XMLPARSER_HXX_ 40 | 41 | #include "textparser.hxx" 42 | 43 | /* 44 | * XML Parser 45 | * 46 | */ 47 | 48 | class XMLParser : public TextParser { 49 | public: 50 | explicit XMLParser(const char* wc); 51 | XMLParser(const w_char* wordchars, int len); 52 | bool next_token(const char* p[][2], 53 | unsigned int len, 54 | const char* p2[][2], 55 | unsigned int len2, 56 | const char* p3[][2], 57 | unsigned int len3, 58 | std::string&); 59 | virtual bool next_token(std::string&); 60 | std::string get_word2(const char* p2[][2], 61 | unsigned int len2, 62 | const std::string &tok); 63 | int change_token(const char* word); 64 | virtual ~XMLParser(); 65 | 66 | private: 67 | int look_pattern(const char* p[][2], unsigned int len, int column); 68 | int pattern_num; 69 | int pattern2_num; 70 | int pattern3_num; 71 | int prevstate; 72 | int checkattr; 73 | char quotmark; 74 | }; 75 | 76 | #endif 77 | -------------------------------------------------------------------------------- /license.myspell: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2002 Kevin B. Hendricks, Stratford, Ontario, Canada 3 | * And Contributors. All rights reserved. 4 | * 5 | * Redistribution and use in source and binary forms, with or without 6 | * modification, are permitted provided that the following conditions 7 | * are met: 8 | * 9 | * 1. Redistributions of source code must retain the above copyright 10 | * notice, this list of conditions and the following disclaimer. 11 | * 12 | * 2. Redistributions in binary form must reproduce the above copyright 13 | * notice, this list of conditions and the following disclaimer in the 14 | * documentation and/or other materials provided with the distribution. 15 | * 16 | * 3. All modifications to the source code must be clearly marked as 17 | * such. Binary redistributions based on modified source code 18 | * must be clearly marked as modified versions in the documentation 19 | * and/or other materials provided with the distribution. 20 | * 21 | * THIS SOFTWARE IS PROVIDED BY KEVIN B. HENDRICKS AND CONTRIBUTORS 22 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 23 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 24 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL 25 | * KEVIN B. HENDRICKS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, 26 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, 27 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 28 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32 | * SUCH DAMAGE. 33 | * 34 | * 35 | * NOTE: A special thanks and credit goes to Geoff Kuenning 36 | * the creator of ispell. MySpell's affix algorithms were 37 | * based on those of ispell which should be noted is 38 | * copyright Geoff Kuenning et.al. and now available 39 | * under a BSD style license. For more information on ispell 40 | * and affix compression in general, please see: 41 | * http://www.cs.ucla.edu/ficus-members/geoff/ispell.html 42 | * (the home page for ispell) 43 | * 44 | * An almost complete rewrite of MySpell for use by 45 | * the Mozilla project has been developed by David Einstein 46 | * (Deinst@world.std.com). David and I are now 47 | * working on parallel development tracks to help 48 | * our respective projects (Mozilla and OpenOffice.org 49 | * and we will maintain full affix file and dictionary 50 | * file compatibility and work on merging our versions 51 | * of MySpell back into a single tree. David has been 52 | * a significant help in improving MySpell. 53 | * 54 | * Special thanks also go to La'szlo' Ne'meth 55 | * who is the author of the 56 | * Hungarian dictionary and who developed and contributed 57 | * the code to support compound words in MySpell 58 | * and fixed numerous problems with the encoding 59 | * case conversion tables. 60 | * 61 | */ 62 | -------------------------------------------------------------------------------- /src/tools/fuzzer.cxx: -------------------------------------------------------------------------------- 1 | /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ 2 | /* ***** BEGIN LICENSE BLOCK ***** 3 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 4 | * 5 | * The contents of this file are subject to the Mozilla Public License Version 6 | * 1.1 (the "License"); you may not use this file except in compliance with 7 | * the License. You may obtain a copy of the License at 8 | * http://www.mozilla.org/MPL/ 9 | * 10 | * Software distributed under the License is distributed on an "AS IS" basis, 11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 12 | * for the specific language governing rights and limitations under the 13 | * License. 14 | * 15 | * Alternatively, the contents of this file may be used under the terms of 16 | * either the GNU General Public License Version 2 or later (the "GPL"), or 17 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 18 | * in which case the provisions of the GPL or the LGPL are applicable instead 19 | * of those above. If you wish to allow use of your version of this file only 20 | * under the terms of either the GPL or the LGPL, and not to allow others to 21 | * use your version of this file under the terms of the MPL, indicate your 22 | * decision by deleting the provisions above and replace them with the notice 23 | * and other provisions required by the GPL or the LGPL. If you do not delete 24 | * the provisions above, a recipient may use your version of this file under 25 | * the terms of any one of the MPL, the GPL or the LGPL. 26 | * 27 | * ***** END LICENSE BLOCK ***** */ 28 | 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | 36 | std::vector> dictionaries; 37 | 38 | bool endswith(const std::string &str, const std::string &suffix) 39 | { 40 | return str.size() >= suffix.size() && 41 | str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; 42 | } 43 | 44 | extern "C" int LLVMFuzzerInitialize(int *argc, char ***argv) 45 | { 46 | char* exe_path = (*argv)[0]; 47 | // dirname() can modify its argument. 48 | char* exe_path_copy = strdup(exe_path); 49 | char* dir = dirname(exe_path_copy); 50 | DIR* d = opendir(dir); 51 | struct dirent *direntry; 52 | while ((direntry = readdir(d)) != NULL) 53 | { 54 | std::string entry(direntry->d_name); 55 | if (endswith(entry, ".aff")) 56 | { 57 | std::string dic = entry.substr(0, entry.size() - 4) + ".dic"; 58 | dictionaries.emplace_back(new Hunspell(entry.c_str(), dic.c_str())); 59 | } 60 | } 61 | closedir(d); 62 | free(exe_path_copy); 63 | 64 | return 0; 65 | } 66 | 67 | extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size) 68 | { 69 | std::string word(data, size); 70 | for (auto& dict : dictionaries) 71 | { 72 | if (!dict->spell(word)) 73 | dict->suggest(word); 74 | } 75 | return 0; 76 | } 77 | 78 | /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ 79 | -------------------------------------------------------------------------------- /src/parsers/testparser.cxx: -------------------------------------------------------------------------------- 1 | /* ***** BEGIN LICENSE BLOCK ***** 2 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1 3 | * 4 | * Copyright (C) 2002-2017 Németh László 5 | * 6 | * The contents of this file are subject to the Mozilla Public License Version 7 | * 1.1 (the "License"); you may not use this file except in compliance with 8 | * the License. You may obtain a copy of the License at 9 | * http://www.mozilla.org/MPL/ 10 | * 11 | * Software distributed under the License is distributed on an "AS IS" basis, 12 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License 13 | * for the specific language governing rights and limitations under the 14 | * License. 15 | * 16 | * Hunspell is based on MySpell which is Copyright (C) 2002 Kevin Hendricks. 17 | * 18 | * Contributor(s): David Einstein, Davide Prina, Giuseppe Modugno, 19 | * Gianluca Turconi, Simon Brouwer, Noll János, Bíró Árpád, 20 | * Goldman Eleonóra, Sarlós Tamás, Bencsáth Boldizsár, Halácsy Péter, 21 | * Dvornik László, Gefferth András, Nagy Viktor, Varga Dániel, Chris Halls, 22 | * Rene Engelhard, Bram Moolenaar, Dafydd Jones, Harri Pitkänen 23 | * 24 | * Alternatively, the contents of this file may be used under the terms of 25 | * either the GNU General Public License Version 2 or later (the "GPL"), or 26 | * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 27 | * in which case the provisions of the GPL or the LGPL are applicable instead 28 | * of those above. If you wish to allow use of your version of this file only 29 | * under the terms of either the GPL or the LGPL, and not to allow others to 30 | * use your version of this file under the terms of the MPL, indicate your 31 | * decision by deleting the provisions above and replace them with the notice 32 | * and other provisions required by the GPL or the LGPL. If you do not delete 33 | * the provisions above, a recipient may use your version of this file under 34 | * the terms of any one of the MPL, the GPL or the LGPL. 35 | * 36 | * ***** END LICENSE BLOCK ***** */ 37 | 38 | #include 39 | #include 40 | #include 41 | 42 | #include "textparser.hxx" 43 | #include "htmlparser.hxx" 44 | #include "latexparser.hxx" 45 | #include "xmlparser.hxx" 46 | 47 | #ifndef W32 48 | using namespace std; 49 | #endif 50 | 51 | int main(int argc, char** argv) { 52 | FILE* f; 53 | /* first parse the command line options */ 54 | 55 | if (argc < 2) { 56 | fprintf(stderr, "correct syntax is:\n"); 57 | fprintf(stderr, "testparser file\n"); 58 | fprintf(stderr, "example: testparser /dev/stdin\n"); 59 | exit(1); 60 | } 61 | 62 | /* open the words to check list */ 63 | f = fopen(argv[1], "r"); 64 | if (!f) { 65 | fprintf(stderr, "Error - could not open file of words to check\n"); 66 | exit(1); 67 | } 68 | 69 | TextParser* p = new TextParser( 70 | "qwertzuiopasdfghjklyxcvbnmQWERTZUIOPASDFGHJKLYXCVBNM"); 71 | 72 | char buf[MAXLNLEN]; 73 | 74 | while (fgets(buf, MAXLNLEN, f)) { 75 | p->put_line(buf); 76 | p->set_url_checking(1); 77 | std::string next; 78 | while (p->next_token(next)) { 79 | fprintf(stdout, "token: %s\n", next.c_str()); 80 | } 81 | } 82 | 83 | delete p; 84 | fclose(f); 85 | return 0; 86 | } 87 | --------------------------------------------------------------------------------