Przejdź do głównej zawartości

Paper on developing LanguageTool available

My paper on developing LanguageTool, focused mostly on new features needed to support many different languages in LT, has just been published in Software - Practice and Experience (if you have no access to SPE, here is the final uncorrected draft). The paper contains a section with empirical results - I tested LanguageTool on Polish, and compared the results with Microsoft Word grammar checker (the only one that exists for Polish beside LanguageTool). The results are pretty good - whereas LanguageTool rules seem to create few false alarms (the precision level is around 90% for most test samples), MS Word tends to have a lot of them (the precision level is in best cases around 50%, and in many cases even lower).


Sample text



MS Word matches



MS Word precision



LT matches



LT precision



Frequency Dictionary Corpus



4572



22,00%



8552



92,00%



Camera-ready book



586



1,00%



323



54,00%



Culinary forum



75



17,00%



186



90,00%



Catholic church notices



24



0,00%



140



87,00%



Left-wing political commentary



58



1,00%



242



97,00%



Right-wing political commentary



51



5,00%



274



93,00%



Left-wing professional politician blog



91



13,00%



238



90,00%



Right-wing professional politician blog



59



55,00%



98



94,00%



Stock-market analyst blog



43



4,00%



134



95,00%



Political blog



12



50,00%



67



98,00%



Popular personal blog 1



67



8,00%



127



88,00%



Popular personal blog 2



57



47,00%



124



98,00%




As promised in the paper, I am making my testing set freely available, as the results were evaluated manually only by myself. Now, the methodology was very simple: instead of trying to figure out the total number of errors in the text, I simply checked if rules created any problems, i.e., offered suggestions that would result in grammar errors. This way, I avoided the possible objection that I treated some corrections as useless just because I thought you might leave the text as is. Instead of arguing over such cases, I treat them as correct.

There are two testing samples: files from LanguageTool, in a text format (zipped), and from Microsoft Word (also zipped). Note: to see errors as marked by Microsoft Word, you actually need to have Microsoft Word 2000 or newer (some files are in docx format). I tested the files with Microsoft Word 2006. I excluded one file from the testing sample due to copyright restrictions; the text contained withing samples is from the Frequency Dictionary of Polish Corpus, or from web blogs.

The paper has a longer section that describes the syntax for XML rules (which is now slightly out of date, as I made unification a bit simpler to use, by using native XML constructs) and describes the architecture of the checker. People that want to become language maintainers might therefore find it interesting (I hope!).

Komentarze

Popularne posty z tego bloga

Imiesłów przysłówkowy bez orzeczenia

W zdaniach z imiesłowami przysłówkowymi (-ąc i -wszy), zakończonych znakiem interpunkcyjnym, powinno występować orzeczenie. Dopuszczalne jest opuszczenie orzeczenia w tytule. W tytule nie stosuje się jednak kropek na końcu. Na przykład: Czekając na Godota Czekając na Godota, zabawiali się rozmową. Błąd ten jest tym bardziej rażący w zdaniach, w których występuje zdanie podrzędne: !Czekając na Godota, który nie przychodził. Usterka zostanie wykryta także w błędnie formułowanych pytaniach: !Rozmawiając o sporcie, który sport uprawiasz? W powyższym przykładzie podmiot imiesłowu jest inny od podmiotu pytania (my rozmawiamy, a sport uprawiasz tylko ty). Powinno być: Skoro już mowa o sporcie, którą dyscyplinę uprawiasz?

Gromadzimy błędy językowe

Tu zbieram błędy, które mają być wykrywane regułami. Część z tych błędów można dodać także do list autokorekty w Ooo (a nawet w programie MS Word). Warto pamiętać, że na liście muszą być tylko te błędy, których nie wykryje już korektor pisowni (a zatem błędne formy fleksyjne i proste błędy ortograficzne nie muszą być tutaj umieszczane). Zapraszam do komentowania i uzupełniania tej listy, na pewno nie jest wyczerpująca. Mówiąc krótko, to taki negatywny słownik języka polskiego ;) Nowomowa, ale nie błąd: wychodzić|wyjść * naprzeciw -> popierać *, iść na rękę * wprowadzić kogo w co -> zapoznać kogo z czym [fałszywe alarmy] w przypomnieniu -> przypominając [za dużo fałszywych alarmów] do wojny -> przed wojną [fałszywe alarmy, wiele poprawnych zwrotów] więcej chory -> coraz bardziej chory [rzadkie] widzieć się zmuszonym -> być zmuszonym w uzupełnieniu -> uzupełniając do roku -> przed upływem roku [za dużo fałszywych alarmów] trzymać wagę, firmę, mowę ś

Wikipedia history diff as a revision corpus

(As this is of interest not only to the Polish-speaking community, this post is in English.) Recently, after some discussions on the lingucomponent list at OpenOffice.org on the method of finding frequent typos, I did some experiments on the revision history logs. Background. The developers of grammar checkers, and autocorrect lists, have hard times with finding relevant corpora. Revision history is an excellent source about native speakers perception of linguistic norms. Frequently revised typos are perceived as errors that need to be corrected, so using these typos on autocorrect lists is justified. The same goes for style, grammar and usage errors. Method . Experiments involved three steps: Clean the history dump (??wiki-latest-pages-meta-history.xml), to get only relevant parts of the dump. Using XML tools isn't recommended (I tried XSLT, forget it). Using a simple awk script, I was able to clean the > 30GB dump in an hour or so, and got a >17 GB file. The script is simp