wordlist 0.1.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (152) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ruby.yml +28 -0
  3. data/.gitignore +6 -3
  4. data/ChangeLog.md +55 -1
  5. data/Gemfile +15 -0
  6. data/LICENSE.txt +1 -3
  7. data/README.md +301 -60
  8. data/Rakefile +7 -32
  9. data/benchmarks.rb +115 -0
  10. data/bin/wordlist +4 -7
  11. data/data/stop_words/ar.txt +104 -0
  12. data/data/stop_words/bg.txt +259 -0
  13. data/data/stop_words/bn.txt +363 -0
  14. data/data/stop_words/ca.txt +126 -0
  15. data/data/stop_words/cs.txt +138 -0
  16. data/data/stop_words/da.txt +101 -0
  17. data/data/stop_words/de.txt +129 -0
  18. data/data/stop_words/el.txt +79 -0
  19. data/data/stop_words/en.txt +175 -0
  20. data/data/stop_words/es.txt +178 -0
  21. data/data/stop_words/eu.txt +98 -0
  22. data/data/stop_words/fa.txt +332 -0
  23. data/data/stop_words/fi.txt +747 -0
  24. data/data/stop_words/fr.txt +116 -0
  25. data/data/stop_words/ga.txt +109 -0
  26. data/data/stop_words/gl.txt +160 -0
  27. data/data/stop_words/he.txt +499 -0
  28. data/data/stop_words/hi.txt +97 -0
  29. data/data/stop_words/hr.txt +179 -0
  30. data/data/stop_words/hu.txt +35 -0
  31. data/data/stop_words/hy.txt +45 -0
  32. data/data/stop_words/id.txt +357 -0
  33. data/data/stop_words/it.txt +134 -0
  34. data/data/stop_words/ja.txt +44 -0
  35. data/data/stop_words/ko.txt +677 -0
  36. data/data/stop_words/ku.txt +63 -0
  37. data/data/stop_words/lt.txt +507 -0
  38. data/data/stop_words/lv.txt +163 -0
  39. data/data/stop_words/mr.txt +99 -0
  40. data/data/stop_words/nl.txt +48 -0
  41. data/data/stop_words/no.txt +172 -0
  42. data/data/stop_words/pl.txt +138 -0
  43. data/data/stop_words/pt.txt +147 -0
  44. data/data/stop_words/ro.txt +281 -0
  45. data/data/stop_words/ru.txt +421 -0
  46. data/data/stop_words/sk.txt +173 -0
  47. data/data/stop_words/sv.txt +386 -0
  48. data/data/stop_words/th.txt +115 -0
  49. data/data/stop_words/tr.txt +114 -0
  50. data/data/stop_words/uk.txt +28 -0
  51. data/data/stop_words/ur.txt +513 -0
  52. data/data/stop_words/zh.txt +125 -0
  53. data/gemspec.yml +13 -12
  54. data/lib/wordlist/abstract_wordlist.rb +25 -0
  55. data/lib/wordlist/builder.rb +172 -138
  56. data/lib/wordlist/cli.rb +459 -0
  57. data/lib/wordlist/compression/reader.rb +72 -0
  58. data/lib/wordlist/compression/writer.rb +80 -0
  59. data/lib/wordlist/exceptions.rb +31 -0
  60. data/lib/wordlist/file.rb +177 -0
  61. data/lib/wordlist/format.rb +39 -0
  62. data/lib/wordlist/lexer/lang.rb +34 -0
  63. data/lib/wordlist/lexer/stop_words.rb +69 -0
  64. data/lib/wordlist/lexer.rb +221 -0
  65. data/lib/wordlist/list_methods.rb +462 -0
  66. data/lib/wordlist/modifiers/capitalize.rb +46 -0
  67. data/lib/wordlist/modifiers/downcase.rb +46 -0
  68. data/lib/wordlist/modifiers/gsub.rb +52 -0
  69. data/lib/wordlist/modifiers/modifier.rb +44 -0
  70. data/lib/wordlist/modifiers/mutate.rb +134 -0
  71. data/lib/wordlist/modifiers/mutate_case.rb +26 -0
  72. data/lib/wordlist/modifiers/sub.rb +98 -0
  73. data/lib/wordlist/modifiers/tr.rb +72 -0
  74. data/lib/wordlist/modifiers/upcase.rb +46 -0
  75. data/lib/wordlist/modifiers.rb +9 -0
  76. data/lib/wordlist/operators/binary_operator.rb +39 -0
  77. data/lib/wordlist/operators/concat.rb +48 -0
  78. data/lib/wordlist/operators/intersect.rb +56 -0
  79. data/lib/wordlist/operators/operator.rb +29 -0
  80. data/lib/wordlist/operators/power.rb +73 -0
  81. data/lib/wordlist/operators/product.rb +51 -0
  82. data/lib/wordlist/operators/subtract.rb +55 -0
  83. data/lib/wordlist/operators/unary_operator.rb +30 -0
  84. data/lib/wordlist/operators/union.rb +62 -0
  85. data/lib/wordlist/operators/unique.rb +53 -0
  86. data/lib/wordlist/operators.rb +8 -0
  87. data/lib/wordlist/unique_filter.rb +41 -61
  88. data/lib/wordlist/version.rb +4 -2
  89. data/lib/wordlist/words.rb +72 -0
  90. data/lib/wordlist.rb +104 -2
  91. data/spec/abstract_list_spec.rb +18 -0
  92. data/spec/builder_spec.rb +220 -76
  93. data/spec/cli_spec.rb +802 -0
  94. data/spec/compression/reader_spec.rb +137 -0
  95. data/spec/compression/writer_spec.rb +194 -0
  96. data/spec/file_spec.rb +269 -0
  97. data/spec/fixtures/wordlist.txt +15 -0
  98. data/spec/fixtures/wordlist.txt.bz2 +0 -0
  99. data/spec/fixtures/wordlist.txt.gz +0 -0
  100. data/spec/fixtures/wordlist.txt.xz +0 -0
  101. data/spec/fixtures/wordlist_with_ambiguous_format +3 -0
  102. data/spec/fixtures/wordlist_with_comments.txt +19 -0
  103. data/spec/fixtures/wordlist_with_empty_lines.txt +19 -0
  104. data/spec/format_spec.rb +50 -0
  105. data/spec/helpers/text.rb +3 -3
  106. data/spec/helpers/wordlist.rb +2 -2
  107. data/spec/lexer/lang_spec.rb +70 -0
  108. data/spec/lexer/stop_words_spec.rb +77 -0
  109. data/spec/lexer_spec.rb +718 -0
  110. data/spec/list_methods_spec.rb +181 -0
  111. data/spec/modifiers/capitalize_spec.rb +27 -0
  112. data/spec/modifiers/downcase_spec.rb +27 -0
  113. data/spec/modifiers/gsub_spec.rb +59 -0
  114. data/spec/modifiers/modifier_spec.rb +20 -0
  115. data/spec/modifiers/mutate_case_spec.rb +46 -0
  116. data/spec/modifiers/mutate_spec.rb +39 -0
  117. data/spec/modifiers/sub_spec.rb +98 -0
  118. data/spec/modifiers/tr_spec.rb +46 -0
  119. data/spec/modifiers/upcase_spec.rb +27 -0
  120. data/spec/operators/binary_operator_spec.rb +19 -0
  121. data/spec/operators/concat_spec.rb +26 -0
  122. data/spec/operators/intersect_spec.rb +37 -0
  123. data/spec/operators/operator_spec.rb +16 -0
  124. data/spec/operators/power_spec.rb +57 -0
  125. data/spec/operators/product_spec.rb +39 -0
  126. data/spec/operators/subtract_spec.rb +37 -0
  127. data/spec/operators/unary_operator_spec.rb +14 -0
  128. data/spec/operators/union_spec.rb +37 -0
  129. data/spec/operators/unique_spec.rb +25 -0
  130. data/spec/spec_helper.rb +2 -1
  131. data/spec/unique_filter_spec.rb +108 -18
  132. data/spec/wordlist_spec.rb +55 -3
  133. data/spec/words_spec.rb +41 -0
  134. data/wordlist.gemspec +1 -0
  135. metadata +164 -126
  136. data/lib/wordlist/builders/website.rb +0 -216
  137. data/lib/wordlist/builders.rb +0 -1
  138. data/lib/wordlist/flat_file.rb +0 -47
  139. data/lib/wordlist/list.rb +0 -162
  140. data/lib/wordlist/mutator.rb +0 -113
  141. data/lib/wordlist/parsers.rb +0 -74
  142. data/lib/wordlist/runners/list.rb +0 -116
  143. data/lib/wordlist/runners/runner.rb +0 -67
  144. data/lib/wordlist/runners.rb +0 -2
  145. data/scripts/benchmark +0 -59
  146. data/scripts/text/comedy_of_errors.txt +0 -4011
  147. data/spec/classes/parser_class.rb +0 -7
  148. data/spec/classes/test_list.rb +0 -9
  149. data/spec/flat_file_spec.rb +0 -25
  150. data/spec/list_spec.rb +0 -58
  151. data/spec/mutator_spec.rb +0 -43
  152. data/spec/parsers_spec.rb +0 -118
@@ -0,0 +1,126 @@
1
+ de
2
+ es
3
+ i
4
+ a
5
+ o
6
+ un
7
+ una
8
+ unes
9
+ uns
10
+ un
11
+ tot
12
+ també
13
+ altre
14
+ algun
15
+ alguna
16
+ alguns
17
+ algunes
18
+ ser
19
+ és
20
+ soc
21
+ ets
22
+ som
23
+ estic
24
+ està
25
+ estem
26
+ esteu
27
+ estan
28
+ com
29
+ en
30
+ per
31
+ perquè
32
+ per que
33
+ estat
34
+ estava
35
+ ans
36
+ abans
37
+ éssent
38
+ ambdós
39
+ però
40
+ per
41
+ poder
42
+ potser
43
+ puc
44
+ podem
45
+ podeu
46
+ poden
47
+ vaig
48
+ va
49
+ van
50
+ fer
51
+ faig
52
+ fa
53
+ fem
54
+ feu
55
+ fan
56
+ cada
57
+ fi
58
+ inclòs
59
+ primer
60
+ des de
61
+ conseguir
62
+ consegueixo
63
+ consigueix
64
+ consigueixes
65
+ conseguim
66
+ consigueixen
67
+ anar
68
+ haver
69
+ tenir
70
+ tinc
71
+ te
72
+ tenim
73
+ teniu
74
+ tene
75
+ el
76
+ la
77
+ les
78
+ els
79
+ seu
80
+ aquí
81
+ meu
82
+ teu
83
+ ells
84
+ elles
85
+ ens
86
+ nosaltres
87
+ vosaltres
88
+ si
89
+ dins
90
+ sols
91
+ solament
92
+ saber
93
+ saps
94
+ sap
95
+ sabem
96
+ sabeu
97
+ saben
98
+ últim
99
+ llarg
100
+ bastant
101
+ fas
102
+ molts
103
+ aquells
104
+ aquelles
105
+ seus
106
+ llavors
107
+ sota
108
+ dalt
109
+ ús
110
+ molt
111
+ era
112
+ eres
113
+ erem
114
+ eren
115
+ mode
116
+
117
+ quant
118
+ quan
119
+ on
120
+ mentre
121
+ qui
122
+ amb
123
+ entre
124
+ sense
125
+ jo
126
+ aquell
@@ -0,0 +1,138 @@
1
+ dnes
2
+ cz
3
+ timto
4
+ budes
5
+ budem
6
+ byli
7
+ jses
8
+ muj
9
+ svym
10
+ ta
11
+ tomto
12
+ tohle
13
+ tuto
14
+ tyto
15
+ jej
16
+ zda
17
+ proc
18
+ mate
19
+ tato
20
+ kam
21
+ tohoto
22
+ kdo
23
+ kteri
24
+ mi
25
+ nam
26
+ tom
27
+ tomuto
28
+ mit
29
+ nic
30
+ proto
31
+ kterou
32
+ byla
33
+ toho
34
+ protoze
35
+ asi
36
+ ho
37
+ nasi
38
+ napiste
39
+ re
40
+ coz
41
+ tim
42
+ takze
43
+ svych
44
+ jeji
45
+ svymi
46
+ jste
47
+ aj
48
+ tu
49
+ tedy
50
+ teto
51
+ bylo
52
+ kde
53
+ ke
54
+ prave
55
+ ji
56
+ nad
57
+ nejsou
58
+ ci
59
+ pod
60
+ tema
61
+ mezi
62
+ pres
63
+ ty
64
+ pak
65
+ vam
66
+ ani
67
+ kdyz
68
+ vsak
69
+ ne
70
+ jsem
71
+ tento
72
+ clanku
73
+ clanky
74
+ aby
75
+ jsme
76
+ pred
77
+ pta
78
+ jejich
79
+ byl
80
+ jeste
81
+ az
82
+ bez
83
+ take
84
+ pouze
85
+ prvni
86
+ vase
87
+ ktera
88
+ nas
89
+ novy
90
+ tipy
91
+ pokud
92
+ muze
93
+ design
94
+ strana
95
+ jeho
96
+ sve
97
+ jine
98
+ zpravy
99
+ nove
100
+ neni
101
+ vas
102
+ jen
103
+ podle
104
+ zde
105
+ clanek
106
+ uz
107
+ email
108
+ byt
109
+ vice
110
+ bude
111
+ jiz
112
+ nez
113
+ ktery
114
+ by
115
+ ktere
116
+ co
117
+ nebo
118
+ ten
119
+ tak
120
+ ma
121
+ pri
122
+ od
123
+ po
124
+ jsou
125
+ jak
126
+ dalsi
127
+ ale
128
+ si
129
+ ve
130
+ to
131
+ jako
132
+ za
133
+ zpet
134
+ ze
135
+ do
136
+ pro
137
+ je
138
+ na
@@ -0,0 +1,101 @@
1
+ af
2
+ alle
3
+ andet
4
+ andre
5
+ at
6
+ begge
7
+ da
8
+ de
9
+ den
10
+ denne
11
+ der
12
+ deres
13
+ det
14
+ dette
15
+ dig
16
+ din
17
+ dog
18
+ du
19
+ ej
20
+ eller
21
+ en
22
+ end
23
+ ene
24
+ eneste
25
+ enhver
26
+ et
27
+ fem
28
+ fire
29
+ flere
30
+ fleste
31
+ for
32
+ fordi
33
+ forrige
34
+ fra
35
+
36
+ før
37
+ god
38
+ han
39
+ hans
40
+ har
41
+ hendes
42
+ her
43
+ hun
44
+ hvad
45
+ hvem
46
+ hver
47
+ hvilken
48
+ hvis
49
+ hvor
50
+ hvordan
51
+ hvorfor
52
+ hvornår
53
+ i
54
+ ikke
55
+ ind
56
+ ingen
57
+ intet
58
+ jeg
59
+ jeres
60
+ kan
61
+ kom
62
+ kommer
63
+ lav
64
+ lidt
65
+ lille
66
+ man
67
+ mand
68
+ mange
69
+ med
70
+ meget
71
+ men
72
+ mens
73
+ mere
74
+ mig
75
+ ned
76
+ ni
77
+ nogen
78
+ noget
79
+ ny
80
+ nyt
81
+ nær
82
+ næste
83
+ næsten
84
+ og
85
+ op
86
+ otte
87
+ over
88
+
89
+ se
90
+ seks
91
+ ses
92
+ som
93
+ stor
94
+ store
95
+ syv
96
+ ti
97
+ til
98
+ to
99
+ tre
100
+ ud
101
+ var
@@ -0,0 +1,129 @@
1
+ aber
2
+ als
3
+ am
4
+ an
5
+ auch
6
+ auf
7
+ aus
8
+ bei
9
+ bin
10
+ bis
11
+ bist
12
+ da
13
+ dadurch
14
+ daher
15
+ darum
16
+ das
17
+ daß
18
+ dass
19
+ dein
20
+ deine
21
+ dem
22
+ den
23
+ der
24
+ des
25
+ dessen
26
+ deshalb
27
+ die
28
+ dies
29
+ dieser
30
+ dieses
31
+ doch
32
+ dort
33
+ du
34
+ durch
35
+ ein
36
+ eine
37
+ einem
38
+ einen
39
+ einer
40
+ eines
41
+ er
42
+ es
43
+ euer
44
+ eure
45
+ für
46
+ hatte
47
+ hatten
48
+ hattest
49
+ hattet
50
+ hier
51
+ hinter
52
+ ich
53
+ ihr
54
+ ihre
55
+ im
56
+ in
57
+ ist
58
+ ja
59
+ jede
60
+ jedem
61
+ jeden
62
+ jeder
63
+ jedes
64
+ jener
65
+ jenes
66
+ jetzt
67
+ kann
68
+ kannst
69
+ können
70
+ könnt
71
+ machen
72
+ mein
73
+ meine
74
+ mit
75
+ muß
76
+ mußt
77
+ musst
78
+ müssen
79
+ müßt
80
+ nach
81
+ nachdem
82
+ nein
83
+ nicht
84
+ nun
85
+ oder
86
+ seid
87
+ sein
88
+ seine
89
+ sich
90
+ sie
91
+ sind
92
+ soll
93
+ sollen
94
+ sollst
95
+ sollt
96
+ sonst
97
+ soweit
98
+ sowie
99
+ und
100
+ unser
101
+ unsere
102
+ unter
103
+ vom
104
+ von
105
+ vor
106
+ wann
107
+ warum
108
+ was
109
+ weiter
110
+ weitere
111
+ wenn
112
+ wer
113
+ werde
114
+ werden
115
+ werdet
116
+ weshalb
117
+ wie
118
+ wieder
119
+ wieso
120
+ wir
121
+ wird
122
+ wirst
123
+ wo
124
+ woher
125
+ wohin
126
+ zu
127
+ zum
128
+ zur
129
+ über
@@ -0,0 +1,79 @@
1
+ μή
2
+ ἑαυτοῦ
3
+ ἄν
4
+ ἀλλ’
5
+ ἀλλά
6
+ ἄλλοσ
7
+ ἀπό
8
+ ἄρα
9
+ αὐτόσ
10
+ δ’
11
+ δέ
12
+ δή
13
+ διά
14
+ δαί
15
+ δαίσ
16
+ ἔτι
17
+ ἐγώ
18
+ ἐκ
19
+ ἐμόσ
20
+ ἐν
21
+ ἐπί
22
+ εἰ
23
+ εἰμί
24
+ εἴμι
25
+ εἰσ
26
+ γάρ
27
+ γε
28
+ γα^
29
+
30
+
31
+ καί
32
+ κατά
33
+ μέν
34
+ μετά
35
+ μή
36
+
37
+ ὅδε
38
+ ὅσ
39
+ ὅστισ
40
+ ὅτι
41
+ οὕτωσ
42
+ οὗτοσ
43
+ οὔτε
44
+ οὖν
45
+ οὐδείσ
46
+ οἱ
47
+ οὐ
48
+ οὐδέ
49
+ οὐκ
50
+ περί
51
+ πρόσ
52
+ σύ
53
+ σύν
54
+ τά
55
+ τε
56
+ τήν
57
+ τῆσ
58
+ τῇ
59
+ τι
60
+ τί
61
+ τισ
62
+ τίσ
63
+ τό
64
+ τοί
65
+ τοιοῦτοσ
66
+ τόν
67
+ τούσ
68
+ τοῦ
69
+ τῶν
70
+ τῷ
71
+ ὑμόσ
72
+ ὑπέρ
73
+ ὑπό
74
+ ὡσ
75
+
76
+ ὥστε
77
+ ἐάν
78
+ παρά
79
+ σόσ
@@ -0,0 +1,175 @@
1
+ a
2
+ about
3
+ above
4
+ after
5
+ again
6
+ against
7
+ all
8
+ am
9
+ an
10
+ and
11
+ any
12
+ are
13
+ aren't
14
+ as
15
+ at
16
+ be
17
+ because
18
+ been
19
+ before
20
+ being
21
+ below
22
+ between
23
+ both
24
+ but
25
+ by
26
+ can
27
+ can't
28
+ cannot
29
+ could
30
+ couldn't
31
+ did
32
+ didn't
33
+ do
34
+ does
35
+ doesn't
36
+ doing
37
+ don't
38
+ down
39
+ during
40
+ each
41
+ few
42
+ for
43
+ from
44
+ further
45
+ had
46
+ hadn't
47
+ has
48
+ hasn't
49
+ have
50
+ haven't
51
+ having
52
+ he
53
+ he'd
54
+ he'll
55
+ he's
56
+ her
57
+ here
58
+ here's
59
+ hers
60
+ herself
61
+ him
62
+ himself
63
+ his
64
+ how
65
+ how's
66
+ i
67
+ i'd
68
+ i'll
69
+ i'm
70
+ i've
71
+ if
72
+ in
73
+ into
74
+ is
75
+ isn't
76
+ it
77
+ it's
78
+ its
79
+ itself
80
+ let's
81
+ me
82
+ more
83
+ most
84
+ mustn't
85
+ my
86
+ myself
87
+ no
88
+ nor
89
+ not
90
+ of
91
+ off
92
+ on
93
+ once
94
+ only
95
+ or
96
+ other
97
+ ought
98
+ our
99
+ ours
100
+ ourselves
101
+ out
102
+ over
103
+ own
104
+ same
105
+ shan't
106
+ she
107
+ she'd
108
+ she'll
109
+ she's
110
+ should
111
+ shouldn't
112
+ so
113
+ some
114
+ such
115
+ than
116
+ that
117
+ that's
118
+ the
119
+ their
120
+ theirs
121
+ them
122
+ themselves
123
+ then
124
+ there
125
+ there's
126
+ these
127
+ they
128
+ they'd
129
+ they'll
130
+ they're
131
+ they've
132
+ this
133
+ those
134
+ through
135
+ to
136
+ too
137
+ under
138
+ until
139
+ up
140
+ very
141
+ was
142
+ wasn't
143
+ we
144
+ we'd
145
+ we'll
146
+ we're
147
+ we've
148
+ were
149
+ weren't
150
+ what
151
+ what's
152
+ when
153
+ when's
154
+ where
155
+ where's
156
+ which
157
+ while
158
+ who
159
+ who's
160
+ whom
161
+ why
162
+ why's
163
+ with
164
+ won't
165
+ would
166
+ wouldn't
167
+ you
168
+ you'd
169
+ you'll
170
+ you're
171
+ you've
172
+ your
173
+ yours
174
+ yourself
175
+ yourselves