File Coverage

blib/lib/Pod/Spell/CommonMistakes/WordList.pm
Criterion Covered Total %
statement 22 25 88.0
branch 5 8 62.5
condition n/a
subroutine 5 5 100.0
pod n/a
total 32 38 84.2


line stmt bran cond sub pod time code
1             #
2             # This file is part of Pod-Spell-CommonMistakes
3             #
4             # This software is copyright (c) 2014 by Apocalypse.
5             #
6             # This is free software; you can redistribute it and/or modify it under
7             # the same terms as the Perl 5 programming language system itself.
8             #
9 1     1   4 use strict; use warnings;
  1     1   1  
  1         28  
  1         3  
  1         1  
  1         51  
10             package Pod::Spell::CommonMistakes::WordList;
11             $Pod::Spell::CommonMistakes::WordList::VERSION = '1.001';
12             our $AUTHORITY = 'cpan:APOCAL';
13              
14             # ABSTRACT: Holds the wordlist data for Pod::Spell::CommonMistakes
15              
16             # auto-export our 2 subs
17 1     1   3 use parent qw( Exporter );
  1         1  
  1         4  
18             our @EXPORT = qw( _check_case _check_common );
19              
20             # TODO Figure out an autoimporter?
21             # apoc@box:~/lintian/data/spelling$ cat corrections-case | perl -e 'print "my \%case = (\n"; while ( ) { next if $_ =~ /^#/; if ( $_ =~ /^(.+)\|\|(.+)$/ ) { print " \"$1\" => \"$2\",\n" } }; print ");\n"'
22              
23             # CASE LIST
24              
25             #apoc@blackhole:~/othergit/lintian/data/spelling$ cat corrections-case
26             # Picky corrections, applied before lowercasing the word. These are only
27             # applied to things known to be entirely English text, such as package
28             # descriptions, and should not be applied to files that may contain
29             # configuration fragments or more informal files such as debian/copyright.
30             #
31             # The format of each line is:
32             # mistake||correction
33              
34             my %case = (
35             "apache" => "Apache",
36             "api" => "API",
37             "Api" => "API",
38             "D-BUS" => "D-Bus",
39             "d-bus" => "D-Bus",
40             "dbus" => "D-Bus",
41             "debian" => "Debian",
42             "Debian-Edu" => "Debian Edu",
43             "debian-edu" => "Debian Edu",
44             "Docbook" => "DocBook",
45             "docbook" => "DocBook",
46             "english" => "English",
47             "french" => "French",
48             "EMacs" => "Emacs",
49             "Gconf" => "GConf",
50             "gconf" => "GConf",
51             "german" => "German",
52             "Gnome" => "GNOME",
53             "gnome" => "GNOME",
54             "Gnome-VFS" => "GnomeVFS",
55             "Gnome-Vfs" => "GnomeVFS",
56             "GnomeVfs" => "GnomeVFS",
57             "gnome-vfs" => "GnomeVFS",
58             "gnomevfs" => "GnomeVFS",
59             "gnu" => "GNU",
60             "Gnu" => "GNU",
61             "Gobject" => "GObject",
62             "gobject" => "GObject",
63             "Gstreamer" => "GStreamer",
64             "gstreamer" => "GStreamer",
65             "GTK" => "GTK+",
66             "gtk+" => "GTK+",
67             "Http" => "HTTP",
68             "kde" => "KDE",
69             "meta-package" => "metapackage",
70             "MYSQL" => "MySQL",
71             "Mysql" => "MySQL",
72             "mysql" => "MySQL",
73             "linux" => "Linux",
74             "Latex" => "LaTeX",
75             "latex" => "LaTeX",
76             "oAuth" => "OAuth",
77             "OCAML" => "OCaml",
78             "Ocaml" => "OCaml",
79             "ocaml" => "OCaml",
80             "OpenLdap" => "OpenLDAP",
81             "Openldap" => "OpenLDAP",
82             "openldap" => "OpenLDAP",
83             "openstreetmap" => "OpenStreetMap",
84             "Openstreetmap" => "OpenStreetMap",
85             "OpenStreetmap" => "OpenStreetMap",
86             "Postgresql" => "PostgreSQL",
87             "postgresql" => "PostgreSQL",
88             "python" => "Python",
89             "russian" => "Russian",
90             "SkoleLinux" => "Skolelinux",
91             "skolelinux" => "Skolelinux",
92             "SLang" => "S-Lang",
93             "S-lang" => "S-Lang",
94             "s-lang" => "S-Lang",
95             "spanish" => "Spanish",
96             "subversion" => "Subversion",
97             "TCL" => "Tcl",
98             "tcl" => "Tcl",
99             "TEX" => "TeX",
100             "Tex" => "TeX",
101             "TeTeX" => "teTeX",
102             "Tetex" => "teTeX",
103             "tetex" => "teTeX",
104             "TeXLive" => "TeX Live",
105             "TeX-Live" => "TeX Live",
106             "TeXlive" => "TeX Live",
107             "TeX-live" => "TeX Live",
108             "texlive" => "TeX Live",
109             "tex-live" => "TeX Live",
110             "TK" => "Tk",
111             "tk" => "Tk",
112             "Xemacs" => "XEmacs",
113             "XEMacs" => "XEmacs",
114             "XFCE" => "Xfce",
115             "XFce" => "Xfce",
116             "xfce" => "Xfce",
117             );
118              
119             sub _check_case {
120 20     20   15 my $words = shift;
121              
122             # Holds the failures we saw
123 20         17 my %err;
124              
125 20         19 foreach my $w ( @$words ) {
126 77 50       126 if ( exists $case{ $w } ) {
127 0         0 $err{ $w } = $case{ $w };
128             }
129             }
130              
131 20         48 return \%err;
132             }
133              
134             # COMMON LIST
135              
136             #apoc@blackhole:~/othergit/lintian/data/spelling$ cat corrections
137             # All spelling errors that have been observed "in the wild" in package
138             # descriptions are added here, on the grounds that if they occurred once they
139             # are more likely to occur again.
140             #
141             # Misspellings of "compatibility", "separate", and "similar" are particularly
142             # common.
143             #
144             # Be careful with corrections that involve punctuation, since the check is a
145             # bit rough with punctuation. For example, I had to delete the correction of
146             # "builtin" to "built-in".
147             #
148             # The format of each line is:
149             # mistake||correction
150             #
151             # Note that corrections involving multiple word mistakes or case errors
152             # should be included in the appropriate data file, rather than here.
153              
154             # TODO Figure out an autoimporter?
155             # apoc@box:~/lintian/data/spelling$ cat corrections | perl -e 'print "my \%common = (\n"; while ( ) { next if $_ =~ /^#/; if ( $_ =~ /^(.+)\|\|(.+)$/ ) { print " \"$1\" => \"$2\",\n" } }; print ");\n"'
156              
157             # TODO ARGH Perl::Critic!@#$
158             # Perl::Critic found these violations in "blib/lib/Pod/Spell/CommonMistakes/WordList.pm":
159             # [ValuesAndExpressions::ProhibitDuplicateHashKeys] Duplicate hash key "availble" at line 257, near '"availble" => "available",'
160             # [ValuesAndExpressions::ProhibitDuplicateHashKeys] Duplicate hash key "avaliable" at line 260, near '"avaliable" => "available",'
161             my %common = ( ## no critic (ValuesAndExpressions::ProhibitDuplicateHashKeys)
162             "abandonning" => "abandoning",
163             "abigious" => "ambiguous",
164             "abitrate" => "arbitrate",
165             "abov" => "above",
166             "absense" => "absence",
167             "absolut" => "absolute",
168             "absoulte" => "absolute",
169             "acceleratoin" => "acceleration",
170             "accelleration" => "acceleration",
171             "accesing" => "accessing",
172             "accesnt" => "accent",
173             "accessable" => "accessible",
174             "accesss" => "access",
175             "accidentaly" => "accidentally",
176             "accidentually" => "accidentally",
177             "accomodate" => "accommodate",
178             "accomodates" => "accommodates",
179             "accout" => "account",
180             "acessable" => "accessible",
181             "acess" => "access",
182             "acient" => "ancient",
183             "acknowldegement" => "acknowldegement",
184             "ackowledge" => "acknowledge",
185             "ackowledged" => "acknowledged",
186             "acording" => "according",
187             "activete" => "activate",
188             "acumulating" => "accumulating",
189             "addional" => "additional",
190             "additionaly" => "additionally",
191             "addreses" => "addresses",
192             "aditional" => "additional",
193             "aditionally" => "additionally",
194             "aditionaly" => "additionally",
195             "adress" => "address",
196             "adresses" => "addresses",
197             "adviced" => "advised",
198             "afecting" => "affecting",
199             "albumns" => "albums",
200             "alegorical" => "allegorical",
201             "algorith" => "algorithm",
202             "algorithmical" => "algorithmically",
203             "algoritm" => "algorithm",
204             "algoritms" => "algorithms",
205             "algorrithm" => "algorithm",
206             "algorritm" => "algorithm",
207             "allpication" => "application",
208             "alogirhtms" => "algorithms",
209             "alot" => "a lot",
210             "alow" => "allow",
211             "alows" => "allows",
212             "altough" => "although",
213             "ambigious" => "ambiguous",
214             "amoung" => "among",
215             "amout" => "amount",
216             "analysator" => "analyzer",
217             "ang" => "and",
218             "anniversery" => "anniversary",
219             "annoucement" => "announcement",
220             "anomolies" => "anomalies",
221             "anomoly" => "anomaly",
222             "aplication" => "application",
223             "appearence" => "appearance",
224             "appliction" => "application",
225             "applictions" => "applications",
226             "appropiate" => "appropriate",
227             "appropriatly" => "appropriately",
228             "aquired" => "acquired",
229             "arbitary" => "arbitrary",
230             "architechture" => "architecture",
231             "arguement" => "argument",
232             "arguements" => "arguments",
233             "aritmetic" => "arithmetic",
234             "arne't" => "aren't",
235             "arraival" => "arrival",
236             "artifical" => "artificial",
237             "artillary" => "artillery",
238             "assigment" => "assignment",
239             "assigments" => "assignments",
240             "assistent" => "assistant",
241             "asuming" => "assuming",
242             "asycronous" => "asynchronous",
243             "atomatically" => "automatically",
244             "attachement" => "attachment",
245             "attemps" => "attempts",
246             "attruibutes" => "attributes",
247             "authentification" => "authentication",
248             "automaticaly" => "automatically",
249             "automaticly" => "automatically",
250             "automatize" => "automate",
251             "automatized" => "automated",
252             "automatizes" => "automates",
253             "autonymous" => "autonomous",
254             "auxilliary" => "auxiliary",
255             "avaiable" => "available",
256             "availabled" => "available",
257             "availablity" => "availability",
258             "availale" => "available",
259             "availavility" => "availability",
260             "availble" => "available",
261             "availble" => "available",
262             "availiable" => "available",
263             "avaliable" => "available",
264             "avaliable" => "available",
265             "backgroud" => "background",
266             "bahavior" => "behavior",
267             "baloon" => "balloon",
268             "baloons" => "balloons",
269             "bandwith" => "bandwidth",
270             "batery" => "battery",
271             "becomming" => "becoming",
272             "becuase" => "because",
273             "begining" => "beginning",
274             "bianries" => "binaries",
275             "calender" => "calendar",
276             "cancelation" => "cancellation",
277             "capabilites" => "capabilities",
278             "capatibilities" => "capabilities",
279             "cariage" => "carriage",
280             "challange" => "challenge",
281             "challanges" => "challenges",
282             "changable" => "changeable",
283             "charachter" => "character",
284             "charachters" => "characters",
285             "charater" => "character",
286             "charaters" => "characters",
287             "charcter" => "character",
288             "childs" => "children",
289             "chnage" => "change",
290             "chnages" => "changes",
291             "choosen" => "chosen",
292             "collapsable" => "collapsible",
293             "colorfull" => "colorful",
294             "comand" => "command",
295             "comit" => "commit",
296             "commerical" => "commercial",
297             "comminucation" => "communication",
298             "commited" => "committed",
299             "commiting" => "committing",
300             "committ" => "commit",
301             "commoditiy" => "commodity",
302             "compability" => "compatibility",
303             "compatability" => "compatibility",
304             "compatable" => "compatible",
305             "compatibiliy" => "compatibility",
306             "compatibilty" => "compatibility",
307             "compilant" => "compliant",
308             "compleatly" => "completely",
309             "completly" => "completely",
310             "complient" => "compliant",
311             "compres" => "compress",
312             "compresion" => "compression",
313             "comression" => "compression",
314             "conditionaly" => "conditionally",
315             "configuratoin" => "configuration",
316             "conjuction" => "conjunction",
317             "connectinos" => "connections",
318             "connnection" => "connection",
319             "connnections" => "connections",
320             "consistancy" => "consistency",
321             "consistant" => "consistent",
322             "containes" => "contains",
323             "containts" => "contains",
324             "contaisn" => "contains",
325             "contence" => "contents",
326             "continous" => "continuous",
327             "continously" => "continuously",
328             "continueing" => "continuing",
329             "contraints" => "constraints",
330             "convertor" => "converter",
331             "convinient" => "convenient",
332             "corected" => "corrected",
333             "correponding" => "corresponding",
334             "correponds" => "corresponds",
335             "correspoding" => "corresponding",
336             "cryptocraphic" => "cryptographic",
337             "curently" => "currently",
338             "dafault" => "default",
339             "deafult" => "default",
340             "deamon" => "daemon",
341             "debain" => "Debian",
342             "debians" => "Debian's",
343             "decompres" => "decompress",
344             "definate" => "definite",
345             "definately" => "definitely",
346             "delared" => "declared",
347             "delare" => "declare",
348             "delares" => "declares",
349             "delaring" => "declaring",
350             "delemiter" => "delimiter",
351             "dependancies" => "dependencies",
352             "dependancy" => "dependency",
353             "dependant" => "dependent",
354             "depreacted" => "deprecated",
355             "depreacte" => "deprecate",
356             "desactivate" => "deactivate",
357             "detabase" => "database",
358             "developement" => "development",
359             "developped" => "developed",
360             "developpement" => "development",
361             "developper" => "developer",
362             "developpment" => "development",
363             "deveolpment" => "development",
364             "devided" => "divided",
365             "dictionnary" => "dictionary",
366             "diplay" => "display",
367             "disapeared" => "disappeared",
368             "dispertion" => "dispersion",
369             "dissapears" => "disappears",
370             "docuentation" => "documentation",
371             "documantation" => "documentation",
372             "documentaion" => "documentation",
373             "dont" => "don't",
374             "downlad" => "download",
375             "downlads" => "downloads",
376             "easilly" => "easily",
377             "ecspecially" => "especially",
378             "edditable" => "editable",
379             "editting" => "editing",
380             "efficently" => "efficiently",
381             "eletronic" => "electronic",
382             "enchanced" => "enhanced",
383             "encorporating" => "incorporating",
384             "endianess" => "endianness",
385             "enhaced" => "enhanced",
386             "enlightnment" => "enlightenment",
387             "enocded" => "encoded",
388             "enterily" => "entirely",
389             "envireonment" => "environment",
390             "enviroiment" => "environment",
391             "enviroment" => "environment",
392             "environement" => "environment",
393             "environent" => "environment",
394             "equiped" => "equipped",
395             "equivelant" => "equivalent",
396             "equivilant" => "equivalent",
397             "estbalishment" => "establishment",
398             "etsablishment" => "establishment",
399             "etsbalishment" => "establishment",
400             "excecutable" => "executable",
401             "exceded" => "exceeded",
402             "excellant" => "excellent",
403             "exlcude" => "exclude",
404             "exlcusive" => "exclusive",
405             "expecially" => "especially",
406             "explicitely" => "explicitly",
407             "explict" => "explicit",
408             "explictly" => "explicitly",
409             "expresion" => "expression",
410             "exprimental" => "experimental",
411             "extensability" => "extensibility",
412             "extention" => "extension",
413             "extracter" => "extractor",
414             "failuer" => "failure",
415             "familar" => "familiar",
416             "fatser" => "faster",
417             "feauture" => "feature",
418             "feautures" => "features",
419             "fetaure" => "feature",
420             "fetaures" => "features",
421             "forse" => "force",
422             "fortan" => "fortran",
423             "forwardig" => "forwarding",
424             "framwork" => "framework",
425             "fuction" => "function",
426             "fuctions" => "functions",
427             "functionallity" => "functionality",
428             "functionaly" => "functionally",
429             "functionnality" => "functionality",
430             "functiosn" => "functions",
431             "functonality" => "functionality",
432             "futhermore" => "furthermore",
433             "generiously" => "generously",
434             "grabing" => "grabbing",
435             "grahical" => "graphical",
436             "grahpical" => "graphical",
437             "grapic" => "graphic",
438             "guage" => "gauge",
439             "halfs" => "halves",
440             "handfull" => "handful",
441             "heirarchically" => "hierarchically",
442             "helpfull" => "helpful",
443             "hierachy" => "hierarchy",
444             "hierarchie" => "hierarchy",
445             "howver" => "however",
446             "immeadiately" => "immediately",
447             "implemantation" => "implementation",
448             "implemention" => "implementation",
449             "incomming" => "incoming",
450             "incompatabilities" => "incompatibilities",
451             "incompatable" => "incompatible",
452             "inconsistant" => "inconsistent",
453             "indendation" => "indentation",
454             "indended" => "intended",
455             "independant" => "independent",
456             "independed" => "independent",
457             "informatiom" => "information",
458             "informations" => "information",
459             "infromation" => "information",
460             "initalize" => "initialize",
461             "initators" => "initiators",
462             "initializiation" => "initialization",
463             "inofficial" => "unofficial",
464             "integreated" => "integrated",
465             "integrety" => "integrity",
466             "integrey" => "integrity",
467             "intendet" => "intended",
468             "interchangable" => "interchangeable",
469             "intermittant" => "intermittent",
470             "interupted" => "interrupted",
471             "intial" => "initial",
472             "intregral" => "integral",
473             "intuative" => "intuitive",
474             "invokation" => "invocation",
475             "invokations" => "invocations",
476             "jave" => "java",
477             "langage" => "language",
478             "langauage" => "language",
479             "langauge" => "language",
480             "langugage" => "language",
481             "lauch" => "launch",
482             "leightweight" => "lightweight",
483             "lenght" => "length",
484             "lesstiff" => "lesstif",
485             "libaries" => "libraries",
486             "libary" => "library",
487             "librairies" => "libraries",
488             "libraris" => "libraries",
489             "licenceing" => "licencing",
490             "loggging" => "logging",
491             "loggin" => "login",
492             "logile" => "logfile",
493             "machinary" => "machinery",
494             "maintainance" => "maintenance",
495             "maintainence" => "maintenance",
496             "maintan" => "maintain",
497             "makeing" => "making",
498             "malplaced" => "misplaced",
499             "malplace" => "misplace",
500             "managable" => "manageable",
501             "managment" => "management",
502             "manoeuvering" => "maneuvering",
503             "mathimatical" => "mathematical",
504             "mathimatic" => "mathematic",
505             "mathimatics" => "mathematics",
506             "ment" => "meant",
507             "messsage" => "message",
508             "messsages" => "messages",
509             "microprocesspr" => "microprocessor",
510             "milliseonds" => "milliseconds",
511             "miscelleneous" => "miscellaneous",
512             "misformed" => "malformed",
513             "mispelled" => "misspelled",
514             "mispelt" => "misspelt",
515             "mmnemonic" => "mnemonic",
516             "modulues" => "modules",
517             "monochorome" => "monochrome",
518             "monochromo" => "monochrome",
519             "monocrome" => "monochrome",
520             "mroe" => "more",
521             "mulitplied" => "multiplied",
522             "multidimensionnal" => "multidimensional",
523             "mutiple" => "multiple",
524             "nam" => "name",
525             "nams" => "names",
526             "navagating" => "navigating",
527             "nead" => "need",
528             "neccesary" => "necessary",
529             "neccessary" => "necessary",
530             "necesary" => "necessary",
531             "negotation" => "negotiation",
532             "nescessary" => "necessary",
533             "nessessary" => "necessary",
534             "noticable" => "noticeable",
535             "notications" => "notifications",
536             "o'caml" => "OCaml",
537             "occationally" => "occasionally",
538             "omitt" => "omit",
539             "ommitted" => "omitted",
540             "onself" => "oneself",
541             "optionnal" => "optional",
542             "optmizations" => "optimizations",
543             "orientatied" => "orientated",
544             "orientied" => "oriented",
545             "ouput" => "output",
546             "overaall" => "overall",
547             "overriden" => "overridden",
548             "pacakge" => "package",
549             "pachage" => "package",
550             "packacge" => "package",
551             "packege" => "package",
552             "packge" => "package",
553             "pakage" => "package",
554             "pallette" => "palette",
555             "paramameters" => "parameters",
556             "paramater" => "parameter",
557             "parametes" => "parameters",
558             "parametised" => "parametrised",
559             "paramter" => "parameter",
560             "paramters" => "parameters",
561             "particularily" => "particularly",
562             "pased" => "passed",
563             "pendantic" => "pedantic",
564             "peprocessor" => "preprocessor",
565             "perfoming" => "performing",
566             "permissons" => "permissions",
567             "persistant" => "persistent",
568             "plattform" => "platform",
569             "pleaes" => "please",
570             "ploting" => "plotting",
571             "poinnter" => "pointer",
572             "posible" => "possible",
573             "possibilites" => "possibilities",
574             "postgressql" => "PostgreSQL",
575             "powerfull" => "powerful",
576             "preceeded" => "preceded",
577             "preceeding" => "preceding",
578             "precendence" => "precedence",
579             "precission" => "precision",
580             "prefered" => "preferred",
581             "prefferably" => "preferably",
582             "prepaired" => "prepared",
583             "primative" => "primitive",
584             "princliple" => "principle",
585             "priorty" => "priority",
586             "priviledge" => "privilege",
587             "priviledges" => "privileges",
588             "procceed" => "proceed",
589             "proccesors" => "processors",
590             "proces" => "process",
591             "processessing" => "processing",
592             "processess" => "processes",
593             "processpr" => "processor",
594             "processsing" => "processing",
595             "progams" => "programs",
596             "programers" => "programmers",
597             "programm" => "program",
598             "programms" => "programs",
599             "promps" => "prompts",
600             "pronnounced" => "pronounced",
601             "prononciation" => "pronunciation",
602             "pronouce" => "pronounce",
603             "pronunce" => "pronounce",
604             "propery" => "property",
605             "propigate" => "propagate",
606             "propigation" => "propagation",
607             "prosess" => "process",
608             "protable" => "portable",
609             "protcol" => "protocol",
610             "protecion" => "protection",
611             "protocoll" => "protocol",
612             "psychadelic" => "psychedelic",
613             "quering" => "querying",
614             "reasearcher" => "researcher",
615             "reasearchers" => "researchers",
616             "reasearch" => "research",
617             "recieved" => "received",
618             "recieve" => "receive",
619             "reciever" => "receiver",
620             "recogniced" => "recognised",
621             "recognizeable" => "recognizable",
622             "recommanded" => "recommended",
623             "redircet" => "redirect",
624             "redirectrion" => "redirection",
625             "reenabled" => "re-enabled",
626             "reenable" => "re-enable",
627             "reencode" => "re-encode",
628             "refence" => "reference",
629             "registerd" => "registered",
630             "registraration" => "registration",
631             "regulamentations" => "regulations",
632             "remoote" => "remote",
633             "removeable" => "removable",
634             "repectively" => "respectively",
635             "replacments" => "replacements",
636             "replys" => "replies",
637             "requiere" => "require",
638             "requred" => "required",
639             "requried" => "required",
640             "resizeable" => "resizable",
641             "ressize" => "resize",
642             "ressource" => "resource",
643             "ressources" => "resources",
644             "retransmited" => "retransmitted",
645             "retreive" => "retrieve",
646             "retreived" => "retrieved",
647             "rmeoved" => "removed",
648             "rmeove" => "remove",
649             "rmeoves" => "removes",
650             "runned" => "ran",
651             "runnning" => "running",
652             "sacrifying" => "sacrificing",
653             "safly" => "safely",
654             "savable" => "saveable",
655             "searchs" => "searches",
656             "secund" => "second",
657             "separatly" => "separately",
658             "sepcify" => "specify",
659             "seperated" => "separated",
660             "seperately" => "separately",
661             "seperate" => "separate",
662             "seperatly" => "separately",
663             "seperator" => "separator",
664             "sepperate" => "separate",
665             "sequencial" => "sequential",
666             "serveral" => "several",
667             "setts" => "sets",
668             "similiar" => "similar",
669             "simliar" => "similar",
670             "softwares" => "software",
671             "speach" => "speech",
672             "speciefied" => "specified",
673             "specifed" => "specified",
674             "specificatin" => "specification",
675             "specificaton" => "specification",
676             "specifing" => "specifying",
677             "speficied" => "specified",
678             "speling" => "spelling",
679             "splitted" => "split",
680             "spreaded" => "spread",
681             "staically" => "statically",
682             "standardss" => "standards",
683             "standart" => "standard",
684             "staticly" => "statically",
685             "subdirectoires" => "subdirectories",
686             "suble" => "subtle",
687             "succesfully" => "successfully",
688             "succesful" => "successful",
689             "sucessfully" => "successfully",
690             "superflous" => "superfluous",
691             "superseeded" => "superseded",
692             "suplied" => "supplied",
693             "suport" => "support",
694             "suppored" => "supported",
695             "supportin" => "supporting",
696             "suppoted" => "supported",
697             "suppported" => "supported",
698             "suppport" => "support",
699             "supress" => "suppress",
700             "surpresses" => "suppresses",
701             "suspicously" => "suspiciously",
702             "synax" => "syntax",
703             "synchonized" => "synchronized",
704             "syncronize" => "synchronize",
705             "syncronizing" => "synchronizing",
706             "syncronus" => "synchronous",
707             "syste" => "system",
708             "sytem" => "system",
709             "sythesis" => "synthesis",
710             "taht" => "that",
711             "targetted" => "targeted",
712             "targetting" => "targeting",
713             "teh" => "the",
714             "throught" => "through",
715             "transfered" => "transferred",
716             "transfering" => "transferring",
717             "trasmission" => "transmission",
718             "treshold" => "threshold",
719             "trigerring" => "triggering",
720             "unconditionaly" => "unconditionally",
721             "unecessary" => "unnecessary",
722             "unexecpted" => "unexpected",
723             "unfortunatelly" => "unfortunately",
724             "unknonw" => "unknown",
725             "unkown" => "unknown",
726             "unneedingly" => "unnecessarily",
727             "unuseful" => "useless",
728             "usefule" => "useful",
729             "usefull" => "useful",
730             "usege" => "usage",
731             "usera" => "users",
732             "usetnet" => "Usenet",
733             "usualy" => "usually",
734             "utilites" => "utilities",
735             "utillities" => "utilities",
736             "utilties" => "utilities",
737             "utiltity" => "utility",
738             "utitlty" => "utility",
739             "variantions" => "variations",
740             "varient" => "variant",
741             "verbse" => "verbose",
742             "verisons" => "versions",
743             "verison" => "version",
744             "verson" => "version",
745             "vicefersa" => "vice-versa",
746             "visiters" => "visitors",
747             "vitual" => "virtual",
748             "whataver" => "whatever",
749             "wheter" => "whether",
750             "wierd" => "weird",
751             "writting" => "writing",
752             "xwindows" => "X",
753             "yur" => "your",
754             );
755              
756             # extra words contributed by CPAN users, thanks!
757             # split it up for easier maintenance of Lintian data
758             my %common_cpan = (
759             "refering" => "referring",
760             "writeable" => "writable",
761             "nineth" => "ninth",
762             "ommited" => "omitted",
763             "omited" => "omitted",
764             "requrie" => "require",
765             "existant" => "existent",
766             "explict" => "explicit",
767             "agument" => "augument",
768             "destionation" => "destination",
769             );
770              
771             %common = ( %common, %common_cpan );
772              
773             sub _check_common {
774 20     20   19 my $words = shift;
775              
776             # Holds the failures we saw
777 20         19 my %err;
778              
779             # Logic taken from Lintian::Check::check_spelling(), thanks!
780 20         27 foreach my $w ( @$words ) {
781 77         65 my $lcw = lc( $w );
782 77 100       141 if ( exists $common{ $lcw } ) {
783             # Determine what kind of correction we need
784 1 50       7 if ( $w =~ /^[[:upper:]]+$/ ) {
    50          
785 0         0 $err{ $w } = uc( $common{ $lcw } );
786             } elsif ( $w =~ /^[[:upper:]]/ ) {
787 0         0 $err{ $w } = ucfirst( $common{ $lcw } );
788             } else {
789 1         3 $err{ $w } = $common{ $lcw };
790             }
791             }
792             }
793              
794 20         40 return \%err;
795             }
796              
797             1;
798              
799             __END__