@concordance-wiki/nlp 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +7 -0
  3. package/dist/dictionary/build.d.ts +19 -0
  4. package/dist/dictionary/build.d.ts.map +1 -0
  5. package/dist/dictionary/build.js +72 -0
  6. package/dist/dictionary/build.js.map +1 -0
  7. package/dist/dictionary/stopwords.d.ts +16 -0
  8. package/dist/dictionary/stopwords.d.ts.map +1 -0
  9. package/dist/dictionary/stopwords.js +27 -0
  10. package/dist/dictionary/stopwords.js.map +1 -0
  11. package/dist/dictionary/types.d.ts +34 -0
  12. package/dist/dictionary/types.d.ts.map +1 -0
  13. package/dist/dictionary/types.js +2 -0
  14. package/dist/dictionary/types.js.map +1 -0
  15. package/dist/index.d.ts +26 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +24 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/keywords/confidence.d.ts +56 -0
  20. package/dist/keywords/confidence.d.ts.map +1 -0
  21. package/dist/keywords/confidence.js +59 -0
  22. package/dist/keywords/confidence.js.map +1 -0
  23. package/dist/keywords/defined.d.ts +26 -0
  24. package/dist/keywords/defined.d.ts.map +1 -0
  25. package/dist/keywords/defined.js +33 -0
  26. package/dist/keywords/defined.js.map +1 -0
  27. package/dist/keywords/findings.d.ts +13 -0
  28. package/dist/keywords/findings.d.ts.map +1 -0
  29. package/dist/keywords/findings.js +35 -0
  30. package/dist/keywords/findings.js.map +1 -0
  31. package/dist/keywords/ngrams.d.ts +47 -0
  32. package/dist/keywords/ngrams.d.ts.map +1 -0
  33. package/dist/keywords/ngrams.js +64 -0
  34. package/dist/keywords/ngrams.js.map +1 -0
  35. package/dist/keywords/options.d.ts +22 -0
  36. package/dist/keywords/options.d.ts.map +1 -0
  37. package/dist/keywords/options.js +22 -0
  38. package/dist/keywords/options.js.map +1 -0
  39. package/dist/keywords/publish.d.ts +50 -0
  40. package/dist/keywords/publish.d.ts.map +1 -0
  41. package/dist/keywords/publish.js +96 -0
  42. package/dist/keywords/publish.js.map +1 -0
  43. package/dist/keywords/score.d.ts +60 -0
  44. package/dist/keywords/score.d.ts.map +1 -0
  45. package/dist/keywords/score.js +0 -0
  46. package/dist/keywords/score.js.map +1 -0
  47. package/dist/keywords/similar.d.ts +19 -0
  48. package/dist/keywords/similar.d.ts.map +1 -0
  49. package/dist/keywords/similar.js +52 -0
  50. package/dist/keywords/similar.js.map +1 -0
  51. package/dist/locale/load-pack.d.ts +11 -0
  52. package/dist/locale/load-pack.d.ts.map +1 -0
  53. package/dist/locale/load-pack.js +82 -0
  54. package/dist/locale/load-pack.js.map +1 -0
  55. package/dist/locale/normalize.d.ts +3 -0
  56. package/dist/locale/normalize.d.ts.map +1 -0
  57. package/dist/locale/normalize.js +14 -0
  58. package/dist/locale/normalize.js.map +1 -0
  59. package/dist/locale/pack.d.ts +34 -0
  60. package/dist/locale/pack.d.ts.map +1 -0
  61. package/dist/locale/pack.js +2 -0
  62. package/dist/locale/pack.js.map +1 -0
  63. package/dist/locale/registry.d.ts +16 -0
  64. package/dist/locale/registry.d.ts.map +1 -0
  65. package/dist/locale/registry.js +35 -0
  66. package/dist/locale/registry.js.map +1 -0
  67. package/dist/locale/stopwords.d.ts +3 -0
  68. package/dist/locale/stopwords.d.ts.map +1 -0
  69. package/dist/locale/stopwords.js +17 -0
  70. package/dist/locale/stopwords.js.map +1 -0
  71. package/dist/locale/suffixes.d.ts +7 -0
  72. package/dist/locale/suffixes.d.ts.map +1 -0
  73. package/dist/locale/suffixes.js +21 -0
  74. package/dist/locale/suffixes.js.map +1 -0
  75. package/dist/locale/tag.d.ts +4 -0
  76. package/dist/locale/tag.d.ts.map +1 -0
  77. package/dist/locale/tag.js +5 -0
  78. package/dist/locale/tag.js.map +1 -0
  79. package/dist/scan/automaton.d.ts +46 -0
  80. package/dist/scan/automaton.d.ts.map +1 -0
  81. package/dist/scan/automaton.js +92 -0
  82. package/dist/scan/automaton.js.map +1 -0
  83. package/dist/scan/context.d.ts +20 -0
  84. package/dist/scan/context.d.ts.map +1 -0
  85. package/dist/scan/context.js +26 -0
  86. package/dist/scan/context.js.map +1 -0
  87. package/dist/scan/occurrences.d.ts +64 -0
  88. package/dist/scan/occurrences.d.ts.map +1 -0
  89. package/dist/scan/occurrences.js +109 -0
  90. package/dist/scan/occurrences.js.map +1 -0
  91. package/dist/scan/tokens.d.ts +12 -0
  92. package/dist/scan/tokens.d.ts.map +1 -0
  93. package/dist/scan/tokens.js +34 -0
  94. package/dist/scan/tokens.js.map +1 -0
  95. package/dist/text/boundaries.d.ts +12 -0
  96. package/dist/text/boundaries.d.ts.map +1 -0
  97. package/dist/text/boundaries.js +13 -0
  98. package/dist/text/boundaries.js.map +1 -0
  99. package/dist/text/comparison-form.d.ts +9 -0
  100. package/dist/text/comparison-form.d.ts.map +1 -0
  101. package/dist/text/comparison-form.js +23 -0
  102. package/dist/text/comparison-form.js.map +1 -0
  103. package/dist/text/context.d.ts +6 -0
  104. package/dist/text/context.d.ts.map +1 -0
  105. package/dist/text/context.js +12 -0
  106. package/dist/text/context.js.map +1 -0
  107. package/dist/text/search-tokens.d.ts +10 -0
  108. package/dist/text/search-tokens.d.ts.map +1 -0
  109. package/dist/text/search-tokens.js +29 -0
  110. package/dist/text/search-tokens.js.map +1 -0
  111. package/dist/text/singular.d.ts +7 -0
  112. package/dist/text/singular.d.ts.map +1 -0
  113. package/dist/text/singular.js +12 -0
  114. package/dist/text/singular.js.map +1 -0
  115. package/locales/en/pack.yaml +18 -0
  116. package/locales/en/stopwords.txt +536 -0
  117. package/locales/en/suffixes.txt +7 -0
  118. package/locales/fr/pack.yaml +15 -0
  119. package/locales/fr/stopwords.txt +1021 -0
  120. package/locales/fr/suffixes.txt +12 -0
  121. package/package.json +44 -0
@@ -0,0 +1,536 @@
1
+ # Default English stopwords of the `en` language pack: one word per line, lowercase.
2
+ #
3
+ # A stopword is a word that names nothing on its own in any corpus: articles,
4
+ # prepositions, pronouns, conjunctions, the auxiliaries and the light verbs in
5
+ # every form, the adverbs and connectors of prose, quantifiers, numerals, and the
6
+ # few nouns that only count or place ("thing", "way", "time"). A word that could be
7
+ # a business term somewhere ("contract", "rule", "source", "part", "case", "type")
8
+ # or that ends a technical compound ("cold start", "change set", "entry point")
9
+ # never goes here: a project adds it to a file listed under `inference.stopwords`.
10
+ #
11
+ # A title or alias that is a stopword never enters the recognition dictionary, and
12
+ # the keyword discovery drops every n-gram starting or ending with one. Stopwords
13
+ # are compared on the same form as the texts: plurals reduced, so "things" and
14
+ # "thing" are one entry to the engine. One section per class, alphabetical inside a
15
+ # section. The pieces of a contraction ("it's", "don't") are listed as the tokeniser
16
+ # cuts them at the apostrophe: "s", "t", "don".
17
+ # Project files listed under `inference.stopwords` are added on top of this list.
18
+
19
+ # articles and determiners
20
+ a
21
+ all
22
+ an
23
+ another
24
+ any
25
+ both
26
+ certain
27
+ each
28
+ either
29
+ enough
30
+ entire
31
+ every
32
+ few
33
+ fewer
34
+ half
35
+ least
36
+ less
37
+ many
38
+ more
39
+ most
40
+ much
41
+ neither
42
+ no
43
+ none
44
+ other
45
+ others
46
+ own
47
+ same
48
+ several
49
+ some
50
+ such
51
+ the
52
+ these
53
+ this
54
+ those
55
+ various
56
+ whole
57
+
58
+ # conjunctions
59
+ although
60
+ and
61
+ as
62
+ because
63
+ but
64
+ else
65
+ for
66
+ if
67
+ nor
68
+ once
69
+ or
70
+ since
71
+ so
72
+ than
73
+ then
74
+ though
75
+ unless
76
+ until
77
+ whatever
78
+ whenever
79
+ whereas
80
+ wherever
81
+ whether
82
+ which
83
+ whichever
84
+ while
85
+ whoever
86
+ yet
87
+
88
+ # prepositions
89
+ about
90
+ above
91
+ across
92
+ after
93
+ against
94
+ along
95
+ amid
96
+ among
97
+ amongst
98
+ around
99
+ at
100
+ before
101
+ behind
102
+ below
103
+ beneath
104
+ beside
105
+ besides
106
+ between
107
+ beyond
108
+ by
109
+ concerning
110
+ despite
111
+ down
112
+ during
113
+ except
114
+ from
115
+ in
116
+ inside
117
+ into
118
+ near
119
+ of
120
+ off
121
+ on
122
+ onto
123
+ out
124
+ outside
125
+ over
126
+ per
127
+ regarding
128
+ through
129
+ throughout
130
+ till
131
+ to
132
+ toward
133
+ towards
134
+ under
135
+ up
136
+ upon
137
+ via
138
+ with
139
+ within
140
+ without
141
+
142
+ # pronouns
143
+ anybody
144
+ anyone
145
+ anything
146
+ everybody
147
+ everyone
148
+ everything
149
+ he
150
+ her
151
+ hers
152
+ herself
153
+ him
154
+ himself
155
+ his
156
+ how
157
+ i
158
+ it
159
+ its
160
+ itself
161
+ me
162
+ mine
163
+ my
164
+ myself
165
+ nobody
166
+ nothing
167
+ one
168
+ ones
169
+ oneself
170
+ our
171
+ ours
172
+ ourselves
173
+ she
174
+ somebody
175
+ someone
176
+ something
177
+ that
178
+ their
179
+ theirs
180
+ them
181
+ themselves
182
+ they
183
+ us
184
+ we
185
+ what
186
+ when
187
+ where
188
+ who
189
+ whom
190
+ whose
191
+ why
192
+ you
193
+ your
194
+ yours
195
+ yourself
196
+ yourselves
197
+
198
+ # contractions
199
+ aren
200
+ cannot
201
+ couldn
202
+ d
203
+ didn
204
+ doesn
205
+ don
206
+ hadn
207
+ hasn
208
+ haven
209
+ isn
210
+ ll
211
+ m
212
+ mustn
213
+ re
214
+ s
215
+ shouldn
216
+ t
217
+ ve
218
+ wasn
219
+ weren
220
+ won
221
+ wouldn
222
+
223
+ # auxiliaries and modal verbs
224
+ am
225
+ are
226
+ be
227
+ been
228
+ being
229
+ can
230
+ could
231
+ did
232
+ do
233
+ does
234
+ doing
235
+ done
236
+ had
237
+ has
238
+ have
239
+ having
240
+ is
241
+ may
242
+ might
243
+ must
244
+ ought
245
+ shall
246
+ should
247
+ was
248
+ were
249
+ will
250
+ would
251
+
252
+ # light verbs
253
+ able
254
+ allow
255
+ allowed
256
+ allowing
257
+ allows
258
+ became
259
+ become
260
+ becomes
261
+ becoming
262
+ came
263
+ come
264
+ comes
265
+ coming
266
+ gave
267
+ get
268
+ gets
269
+ getting
270
+ give
271
+ given
272
+ gives
273
+ giving
274
+ go
275
+ goes
276
+ going
277
+ gone
278
+ got
279
+ gotten
280
+ keep
281
+ keeping
282
+ keeps
283
+ kept
284
+ knew
285
+ know
286
+ knowing
287
+ known
288
+ knows
289
+ let
290
+ lets
291
+ letting
292
+ made
293
+ make
294
+ makes
295
+ making
296
+ need
297
+ needed
298
+ needing
299
+ needs
300
+ put
301
+ puts
302
+ putting
303
+ said
304
+ saw
305
+ say
306
+ saying
307
+ says
308
+ see
309
+ seeing
310
+ seem
311
+ seemed
312
+ seeming
313
+ seems
314
+ seen
315
+ sees
316
+ take
317
+ taken
318
+ takes
319
+ taking
320
+ tell
321
+ telling
322
+ tells
323
+ told
324
+ took
325
+ tried
326
+ tries
327
+ try
328
+ trying
329
+ unable
330
+ use
331
+ used
332
+ uses
333
+ using
334
+ want
335
+ wanted
336
+ wanting
337
+ wants
338
+ went
339
+
340
+ # adverbs and connectors
341
+ actually
342
+ again
343
+ ago
344
+ alike
345
+ almost
346
+ alone
347
+ already
348
+ also
349
+ altogether
350
+ always
351
+ anyway
352
+ anywhere
353
+ apart
354
+ away
355
+ back
356
+ basically
357
+ certainly
358
+ clearly
359
+ currently
360
+ definitely
361
+ directly
362
+ easily
363
+ elsewhere
364
+ entirely
365
+ especially
366
+ essentially
367
+ even
368
+ eventually
369
+ ever
370
+ exactly
371
+ far
372
+ finally
373
+ forth
374
+ frequently
375
+ further
376
+ generally
377
+ hardly
378
+ hence
379
+ here
380
+ however
381
+ immediately
382
+ indeed
383
+ initially
384
+ instead
385
+ just
386
+ largely
387
+ later
388
+ likely
389
+ likewise
390
+ mainly
391
+ maybe
392
+ meanwhile
393
+ merely
394
+ moreover
395
+ mostly
396
+ namely
397
+ naturally
398
+ nearly
399
+ necessarily
400
+ never
401
+ nevertheless
402
+ nonetheless
403
+ normally
404
+ not
405
+ notably
406
+ now
407
+ nowadays
408
+ obviously
409
+ occasionally
410
+ often
411
+ only
412
+ otherwise
413
+ overall
414
+ particularly
415
+ partly
416
+ perhaps
417
+ possibly
418
+ probably
419
+ properly
420
+ quite
421
+ rarely
422
+ rather
423
+ really
424
+ recently
425
+ regardless
426
+ relatively
427
+ roughly
428
+ seldom
429
+ simply
430
+ slightly
431
+ somehow
432
+ sometimes
433
+ somewhat
434
+ somewhere
435
+ soon
436
+ specifically
437
+ still
438
+ sure
439
+ surely
440
+ there
441
+ therefore
442
+ thus
443
+ together
444
+ too
445
+ totally
446
+ truly
447
+ twice
448
+ typically
449
+ ultimately
450
+ usually
451
+ very
452
+ well
453
+ wholly
454
+ widely
455
+ yes
456
+
457
+ # ordinals and time
458
+ day
459
+ days
460
+ first
461
+ following
462
+ former
463
+ last
464
+ latter
465
+ moment
466
+ month
467
+ months
468
+ next
469
+ previous
470
+ today
471
+ tomorrow
472
+ week
473
+ weeks
474
+ year
475
+ years
476
+ yesterday
477
+
478
+ # numerals
479
+ eight
480
+ five
481
+ four
482
+ hundred
483
+ nine
484
+ seven
485
+ six
486
+ ten
487
+ thousand
488
+ three
489
+ two
490
+
491
+ # generic nouns
492
+ example
493
+ examples
494
+ kind
495
+ kinds
496
+ level
497
+ levels
498
+ manner
499
+ matter
500
+ number
501
+ numbers
502
+ rest
503
+ sort
504
+ sorts
505
+ thing
506
+ things
507
+ time
508
+ times
509
+ way
510
+ ways
511
+
512
+ # generic adjectives
513
+ absent
514
+ actual
515
+ available
516
+ bad
517
+ best
518
+ better
519
+ common
520
+ different
521
+ false
522
+ general
523
+ good
524
+ main
525
+ new
526
+ old
527
+ particular
528
+ possible
529
+ present
530
+ real
531
+ similar
532
+ single
533
+ true
534
+ usual
535
+ worse
536
+ worst
@@ -0,0 +1,7 @@
1
+ # Endings of the inflected forms of English: a candidate expression whose word ends with one
2
+ # is more often an adverb or a verb form of the prose than a term, and its confidence takes
3
+ # a soft penalty, never an elimination ("meeting", "feed" are terms). One suffix per line,
4
+ # the leading hyphen optional; compared on the comparison form of the words.
5
+ -ly
6
+ -ing
7
+ -ed
@@ -0,0 +1,15 @@
1
+ # Language pack: everything the engine needs to know about a language, as data.
2
+ locale: fr
3
+ language: Français
4
+ apostrophes: ["’", "ʼ"]
5
+ collation: { sensitivity: base, numeric: true }
6
+ # The first matching rule wins: -eaux comes before -aux so that "bateaux" gives "bateau".
7
+ # Other words in -x ("prix", "voix", "taux") are invariant and match no rule.
8
+ plural:
9
+ - { ending: eaux, singular: eau, min_length: 6 }
10
+ - { ending: aux, singular: al, min_length: 6 }
11
+ - { ending: eux, singular: eu, min_length: 4 }
12
+ - { ending: oux, singular: ou, min_length: 5 }
13
+ # A word in -ss is a singular ("stress"): this rule keeps it from the -s rule below.
14
+ - { ending: ss, singular: ss }
15
+ - { ending: s, singular: "", min_length: 4 }