Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: third_party/hunspell_new/tests/suggestiontest/test

Issue 1135173004: Rename third_party/hunspell_new back to third_party/hunspell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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/Fo r_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
OLDNEW
« no previous file with comments | « third_party/hunspell_new/tests/suggestiontest/prepare ('k') | third_party/hunspell_new/tests/sugutf.aff » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698