cmpstr 1.0.3 → 2.0.1

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.
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Paul Köhler
3
+ Copyright (c) 2025 Paul Köhler (komed3)
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,138 +1,484 @@
1
- # cmpstr
1
+ # CmpStr `v2.0`
2
2
 
3
- This lightweight npm package can be used to __calculate the similarity of strings__. It supports both the best known __Levenshtein distance__ and the slightly more accurate __Sørensen dice coefficient__.
3
+ CmpStr is a lightweight and powerful npm package for calculating string similarity, finding the closest matches in arrays, performing phonetic searches, and more. It supports a variety of built-in algorithms (e.g., Levenshtein, Dice-Sørensen, Damerau-Levenshtein, Soundex) and allows users to add custom algorithms and normalization filters.
4
4
 
5
- ## Install
5
+ **Key Features**
6
6
 
7
- Using __Node.js__, install the package with the following shell command:
7
+ - Built-in support for multiple similarity algorithms.
8
+ - Phonetic search with language-specific configurations (e.g., Soundex).
9
+ - Batch operations and similarity matrices for large datasets.
10
+ - Customizable normalization with global flags and caching.
11
+ - Asynchronous support for non-blocking workflows.
12
+ - Extensible with custom algorithms and filters.
13
+ - TypeScript definitions for better developer experience.
8
14
 
9
- ```sh
15
+ ## Installation
16
+
17
+ Install the package via npm:
18
+
19
+ ```bash
10
20
  npm install cmpstr
11
21
  ```
12
22
 
13
- ## Usage
23
+ ## Basic Usage
14
24
 
15
- Load the package into your project:
25
+ Importing the Package:
16
26
 
17
27
  ```js
18
- const cmpstr = require( 'cmpstr' );
28
+ const { CmpStr } = require( 'cmpstr' );
19
29
  ```
20
30
 
21
- Sample of how to use the package in your code:
31
+ Example 1: Basic String Similarity
22
32
 
23
33
  ```js
24
- let str1 = 'kitten';
25
- let str2 = 'sitting';
26
-
27
- /**
28
- * levenshteinDistance
29
- * expected: 3
30
- */
31
- let distance = cmpstr.levenshteinDistance( str1, str2 );
32
-
33
- /**
34
- * diceCoefficient
35
- * expected: 0.3636363636363636
36
- */
37
- let dice = cmpstr.diceCoefficient( str1, str2 );
38
-
39
- /**
40
- * diceClosest
41
- * expected: bestest
42
- */
43
- let closest = cmpstr.diceClosest( 'best', [
44
- 'better', 'bestest', 'well', 'good'
45
- ] );
46
-
47
- /**
48
- * levenshteinMatch
49
- * expected: [
50
- * { target: 'bestest', match: 0.5714285714285714 },
51
- * { target: 'better', match: 0.5 },
52
- * { target: 'well', match: 0.25 },
53
- * { target: 'good', match: 0 }
54
- * ]
55
- */
56
- let matches = cmpstr.levenshteinMatch( 'best', [
57
- 'better', 'bestest', 'well', 'good'
58
- ] );
34
+ const cmp = new CmpStr( 'levenshtein', 'hello' );
35
+
36
+ console.log( cmp.test( 'Hallo', { flags: 'i' } ) );
37
+ // Output: 0.8
59
38
  ```
60
39
 
61
- ### JavaScript
40
+ Example 2: Phonetic Search
41
+
42
+ ```js
43
+ const cmp = new CmpStr( 'soundex', 'Robert' );
44
+
45
+ console.log( cmp.test( 'Rubin', { options: { raw: true } } ) );
46
+ // Output: { a: 'R163', b: 'R150' }
47
+ ```
48
+
49
+ ## Methods
50
+
51
+ Creating a new instance of `CmpStr` or `CmpStrAsync` allows passing the algorithm to be used and the base string as optional arguments. Alternatively or later in the process, the `setAlgo` and `setStr` methods can be used for this purpose.
52
+
53
+ ### Basics
54
+
55
+ #### `isReady()`
56
+
57
+ Checks whether string and algorithm are set correctly. Returns `true`, if the class is ready to perform similarity checks, false otherwise.
58
+
59
+ #### `setStr( str )`
60
+
61
+ Sets the base string for comparison.
62
+
63
+ Parameters:
64
+
65
+ - `<String> str` – string to set as the base
66
+
67
+ #### `setFlags( [ flags = '' ] )`
68
+
69
+ Set default normalization flags. They will be overwritten by passing `flags` through the configuration object. See description of available flags / normalization options below in the documentation.
70
+
71
+ Parameters:
72
+
73
+ - `<String> flags` – normalization flags
74
+
75
+ #### `clearCache()`
76
+
77
+ Clears the normalization cache.
62
78
 
63
- Using JavaScript load this package by embed this file via [jsDelivr](https://www.jsdelivr.com/package/npm/cmpstr):
79
+ ### Algorithms
80
+
81
+ #### `listAlgo()`
82
+
83
+ List all registered similarity algorithms.
84
+
85
+ #### `isAlgo( algo )`
86
+
87
+ Checks if an algorithm is registered. Returns `true` if so, `false` otherwise.
88
+
89
+ Parameters:
90
+
91
+ - `<String> algo` – name of the algorithm
92
+
93
+ #### `setAlgo( algo )`
94
+
95
+ Sets the current algorithm to use for similarity calculations.
96
+
97
+ Allowed options for build-in althorithms are `cosine`, `damerau`, `dice`, `hamming`, `jaccard`, `jaro`, `lcs`, `levenshtein`, `needlemanWunsch`, `qGram`, `smithWaterman` and `soundex`.
98
+
99
+ Parameters:
100
+
101
+ - `<String> algo` – name of the algorithm
102
+
103
+ #### `addAlgo( algo, callback [, useIt = true ] )`
104
+
105
+ Adding a new similarity algorithm by using the `addAlgo()` method passing the name and a callback function, that must accept at least two strings and return a number. If `useIt` is `true`, the new algorithm will automatically be set as the current one.
106
+
107
+ Parameters:
108
+
109
+ - `<String> algo` – name of the algorithm
110
+ - `<Function> callback` – callback function implementing the algorithm
111
+ - `<Boolean> useIt` – whether to set this algorithm as the current one
112
+
113
+ Example:
64
114
 
65
115
  ```js
66
- import cmpstr from "https://cdn.jsdelivr.net/npm/cmpstr@1.0.3/+esm";
116
+ const cmp = new CmpStr();
117
+
118
+ cmp.addAlgo( 'customAlgo', ( a, b ) => {
119
+ return a === b ? 1 : 0;
120
+ } );
121
+
122
+ console.log( cmp.compare( 'customAlgo', 'hello', 'hello' ) );
123
+ // Output: 1
67
124
  ```
68
125
 
69
- Remember: To use ``import`` you need to load your JavaScript file as ``type="module"``.
126
+ #### `rmvAlgo( algo )`
127
+
128
+ Removing a registered similarity algorithm.
129
+
130
+ Parameters:
131
+
132
+ - `<String> algo` – name of the algorithm
133
+
134
+ ### Filters
135
+
136
+ #### `listFilter()`
137
+
138
+ List all added filters.
139
+
140
+ #### `addFilter( name, callback [, priority = 10 ] )`
141
+
142
+ Adds a custom normalization filter. Needs to be passed a unique name and callback function accepting a string and returns a normalized one. Prioritizing filters by setting higher priority (default is `10`).
143
+
144
+ Parameters:
145
+
146
+ - `<String> name` – filter name
147
+ - `<Function> callback` – callback function implementing the filter
148
+ - `<Int> priority` – priority of the filter
149
+
150
+ Example:
151
+
152
+ ```js
153
+ const cmp = new CmpStr();
154
+
155
+ cmp.addFilter( 'prefix', ( str ) => `prefix_${str}` );
156
+ ```
157
+
158
+ #### `rmvFilter( name )`
159
+
160
+ Removes a custom normalization filter.
161
+
162
+ Parameters:
163
+
164
+ - `<String> name` – filter name
165
+
166
+ #### `pauseFilter( name )`
167
+
168
+ Pauses a custom normalization filter.
169
+
170
+ Parameters:
171
+
172
+ - `<String> name` – filter name
173
+
174
+ #### `resumeFilter( name )`
175
+
176
+ Resumes a custom normalization filter.
177
+
178
+ Parameters:
179
+
180
+ - `<String> name` – filter name
181
+
182
+ #### `clearFilter( name )`
183
+
184
+ Clears normalization filters (removing all of them).
185
+
186
+ ### Similarity Comparison
187
+
188
+ #### `compare( algo, a, b [, config = {} ] )`
189
+
190
+ Compares two strings using the specified algorithm. The method returns either the similarity score as a floating point number between 0 and 1 or raw output, if the algorithm supports it and the user passes `raw=true` through the config options.
191
+
192
+ Parameters:
193
+
194
+ - `<String> algo` – name of the algorithm
195
+ - `<String> a` – first string
196
+ - `<String> b` – second string
197
+ - `<Object> config` – configuration object
198
+
199
+ Example:
200
+
201
+ ```js
202
+ const cmp = new CmpStr();
203
+
204
+ console.log( cmp.compare( 'levenshtein', 'hello', 'hallo' ) );
205
+ // Output: 0.8
206
+ ```
207
+
208
+ #### `test( str [, config = {} ] )`
209
+
210
+ Tests the similarity between the base string and a given target string. Returns the same as ``compare``.
211
+
212
+ Parameters:
213
+
214
+ - `<String> str` – target string
215
+ - `<Object> config` – configuration object
216
+
217
+ Example:
218
+
219
+ ```js
220
+ const cmp = new CmpStr( 'levenshtein', 'hello' );
221
+
222
+ console.log( cmp.test( 'hallo' ) );
223
+ // Output: 0.8
224
+ ```
225
+
226
+ #### `batchTest( arr [, config = {} ] )`
227
+
228
+ Tests the similarity of multiple strings against the base string. Returns an array of objects with the target string and either the similarity score as a floating point number between 0 and 1 or raw output, if the algorithm supports it and the user passes `raw=true` through the config options.
229
+
230
+ Parameters:
231
+
232
+ - `<String[]> arr` – array of strings
233
+ - `<Object> config` – configuration object
234
+
235
+ Example:
236
+
237
+ ```js
238
+ const cmp = new CmpStr( 'levenshtein', 'hello' );
239
+
240
+ console.log( cmp.batchTest( [ 'hallo', 'hola', 'hey' ] ) );
241
+ // Output: [ { target: 'hallo', match: 0.8 }, { target: 'hola', match: 0.4 }, { target: 'hey', match: 0.4 } ]
242
+ ```
243
+
244
+ #### `match( arr [, config = {} ] )`
245
+
246
+ Finds strings in an array that exceed a similarity threshold and sorts them by highest similarity. Returns an array of objects contain target string and similarity score as a floating point number between 0 and 1.
247
+
248
+ Parameters:
249
+
250
+ - `<String[]> arr` – array of strings
251
+ - `<Object> config` – configuration object
252
+
253
+ Example:
254
+
255
+ ```js
256
+ const cmp = new CmpStr( 'levenshtein', 'hello' );
257
+
258
+ console.log( cmp.batchTest( [ 'hallo', 'hola', 'hey' ], {
259
+ threshold: 0.5
260
+ } ) );
261
+ // Output: [ { target: 'hallo', match: 0.8 } ]
262
+ ```
263
+
264
+ #### `closest( arr [, config = {} ] )`
265
+
266
+ Finds the closest matching string from an array and returns them.
267
+
268
+ Parameters:
269
+
270
+ - `<String[]> arr` – array of strings
271
+ - `<Object> config` – configuration object
272
+
273
+ Example:
274
+
275
+ ```js
276
+ const cmp = new CmpStr( 'levenshtein', 'hello' );
277
+
278
+ console.log( cmp.batchTest( [ 'hallo', 'hola', 'hey' ] ) );
279
+ // Output: 'hallo'
280
+ ```
281
+
282
+ #### `similarityMatrix( algo, arr [, config = {} ] )`
283
+
284
+ Generates a similarity matrix for an array of strings. Returns an 2D array that represents the similarity matrix by floating point numbers between 0 and 1.
285
+
286
+ Parameters:
287
+
288
+ - `<String> algo` – name of the algorithm
289
+ - `<String[]> arr` – array of strings
290
+ - `<Object> config` – configuration object
291
+
292
+ Example:
293
+
294
+ ```js
295
+ const cmp = new CmpStr();
296
+
297
+ console.log( cmp.similarityMatrix( 'levenshtein', [
298
+ 'hello', 'hallo', 'hola'
299
+ ] ) );
300
+ // Output: [ [ 1, 0.8, 0.4 ], [ 0.8, 1, 0.4 ], [ 0.4, 0.4, 1 ] ]
301
+ ```
302
+
303
+ ## Customization
304
+
305
+ ### Normalize Strings
306
+
307
+ The `CmpStr` package allows strings to be normalized before the similarity comparison. Options listed below are available for this and can either be set globally via `setFlags` or passed using the config object, which will overwrite the global flags. Flags are passed as a chained string in any order. For improved performance, normalized strings are stored in the cache, which can be freed using the `clearCache` method. Modifying custom filters automatically deletes the cache.
308
+
309
+ #### Supported Flags
310
+
311
+ - `s` – remove special chars
312
+ - `w` – collapse whitespaces
313
+ - `r` – remove repeated chars
314
+ - `k` – keep only letters
315
+ - `n` – ignore numbers
316
+ - `t` – trim whitespaces
317
+ - `i` – case insensitivity
318
+ - `d` – decompose unicode
319
+ - `u` – normalize unicode
320
+
321
+ #### `normalize( str [, flags = '' ] )`
322
+
323
+ The method for normalizing strings can also be called on its own, without comparing the similarity of two strings. This also applies all filters and reads or writes to the cache. This can be helpful if certain strings should be saved beforehand or different normalization options want to be tested.
324
+
325
+ Parameters:
326
+
327
+ - `<String> str` – string to normalize
328
+ - `<String> flags` normalization flags
329
+
330
+ Example:
331
+
332
+ ```js
333
+ const cmp = new CmpStr();
334
+
335
+ console.log( cmp.normalize( ' he123LLo ', 'nti' ) );
336
+ // Output: hello
337
+ ```
338
+
339
+ ### Configuration Object
340
+
341
+ An additional object with optional parameters can be passed to all comparison methods (e.g. `test`, `match`, `closest` etc.) and their asynchronous pendants. This object includes the ability to pass `flags` for normalization to all methods, as well as the `threshold` parameter for `match` and `matchAsync`.
342
+
343
+ It also contains `options` as an object of key-value pairs that are passed to the comparison algorithm. Which additional arguments an algorithm accepts depends on the function exported from the module itself. Further down in this documentation, the various parameters for each algorithm are listed.
344
+
345
+ Global config options:
346
+
347
+ - `<String> flags` – normalization flags
348
+ - `<Number> threshold` – similarity threshold between 0 and 1
349
+ - `<Object> options` – options passed to the algorithm
350
+
351
+ Example:
352
+
353
+ ```js
354
+ const cmp = new CmpStr( 'smithWaterman', 'alignment' );
355
+
356
+ console.log( cmp.match( [
357
+ ' align ment', 'ali gnm ent ', ' alIGNMent'
358
+ ], {
359
+ flags: 'it',
360
+ threshold: 0.8,
361
+ options: {
362
+ mismatch: -4,
363
+ gap: -2
364
+ }
365
+ } ) );
366
+ // Output: [ { target: ' alIGNMent', match: 1 }, { target: ' align ment', match: 0.8... }
367
+ ]
368
+ ```
369
+
370
+ ## Asynchronous Support
371
+
372
+ The `CmpStrAsync` class provides asynchronous versions of all comparison methods. It is ideal for large datasets or non-blocking workflows.
373
+
374
+ The asynchronous class supports the methods `compareAsync`, `testAsync`, `batchTestAsync`, `matchAsync`, `closestAsync` and `similarityMatrixAsync`. Each of these methods returns a `Promise`.
375
+
376
+ For options, arguments and returned values, see the documentation above.
377
+
378
+ Example:
379
+
380
+ ```js
381
+ const { CmpStrAsync } = require( 'cmpstr' );
382
+
383
+ const cmp = new CmpStrAsync( 'dice', 'best' );
384
+
385
+ cmp.batchTestAsync( [
386
+ 'better', 'bestest', 'the best', 'good', ...
387
+ ] ).then( console.log );
388
+ ```
389
+
390
+ ## Supported Algorithms
391
+
392
+ The following algorithms for similarity analysis are natively supported by the CmpStr package. Lazy-loading keeps memory consumption and loading time low, as only the algorithm intended to be used will be loaded as a module.
393
+
394
+ ### Similarity Algorithms
395
+
396
+ #### Levenshtein Distance – `levenshtein`
397
+
398
+ The Levenshtein distance between two strings is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other.
399
+
400
+ Options:
401
+
402
+ - `<Boolean> raw` – if true the raw distance is returned
403
+
404
+ #### Damerau-Levenshtein – `damerau`
405
+
406
+ The Damerau-Levenshtein distance differs from the classical Levenshtein distance by including transpositions among its allowable operations in addition to the three classical single-character edit operations (insertions, deletions and substitutions). Useful for correcting typos.
407
+
408
+ Options:
409
+
410
+ - `<Boolean> raw` – if true the raw distance is returned
411
+
412
+ #### Jaro-Winkler – `jaro`
70
413
 
71
- ## API
414
+ Jaro-Winkler is a string similarity metric that gives more weight to matching characters at the start of the strings.
72
415
 
73
- The npm package ``cmpstr`` supports two different methods for determining the similarity of two strings. The __Levenshtein distance__, as the minimum number of inserting, deleting and replacing operations to convert one string into another, and the __Sørensen-Dice coefficient__ to measure the similarity of two samples.
416
+ Options:
74
417
 
75
- Learn more about both by visiting these links:
418
+ - `<Boolean> raw` if true the raw distance is returned
76
419
 
77
- * [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance)
78
- * [Sørensen-Dice coefficient](https://en.wikipedia.org/wiki/Sørensen–Dice_coefficient)
420
+ #### Cosine Similarity – `cosine`
79
421
 
80
- ### Levenshtein distance
422
+ Cosine similarity is a measure how similar two vectors are. It's often used in text analysis to compare texts based on the words they contain.
81
423
 
82
- #### ``levenshteinDistance( a, b [, flags = null ] )``
424
+ Options:
83
425
 
84
- Calculates the difference between two strings ``a`` and ``b`` and returns the Levenshtein distance as an integer value.
426
+ - `<String> delimiter` term delimiter
85
427
 
86
- #### ``levenshtein( a, b [, flags = null ] )``
428
+ #### Dice Coefficient `dice`
87
429
 
88
- Returns the match percentage of two strings ``a`` and ``b``. The output value is in the range ``0..1`` as a floating point number.
430
+ The Dice-Sørensen index equals twice the number of elements common to both sets divided by the sum of the number of elements in each set. Equivalently the index is the size of the intersection as a fraction of the average size of the two sets.
89
431
 
90
- #### ``levenshteinClosest( str, arr [, flags = null ] )``
432
+ #### Jaccard Index `jaccard`
91
433
 
92
- Returns the best match of the string ``str`` against the array ``arr`` of passed strings. The function returns the most closely matched string found in the array.
434
+ The Jaccard Index measures the similarity between two sets by dividing the size of their intersection by the size of their union.
93
435
 
94
- #### ``levenshteinMatch( str, arr [, flags = null [, threshold = 0 ] ] )``
436
+ #### Hamming Distance `hamming`
95
437
 
96
- Calculates the similarity of all strings contained in the array ``arr`` according to Levenshtein compared to ``str`` and returns an array of all samples sorted by matching in descending order. The ``threshold`` specifies the minimum required similarity.
438
+ The Hamming distance between two equal-length strings of symbols is the number of positions at which the corresponding symbols are different.
97
439
 
98
- ### Sørensen-Dice coefficient
440
+ #### Longest Common Subsequence – `lcs`
99
441
 
100
- #### ``diceCoefficient( a, b [, flags = null ] )``
442
+ LCS measures the length of the longest subsequence common to both strings.
101
443
 
102
- This function evaluates the similarity of two given strings ``a`` and ``b`` as percentage value according to the Sørensen-Dice coefficient and returns the result as floating point number.
444
+ #### Needleman-Wunsch `needlemanWunsch`
103
445
 
104
- #### ``diceClosest( str, arr [, flags = null ] )``
446
+ The Needleman-Wunsch algorithm performs global alignment, aligning two strings entirely, including gaps. It is commonly used in bioinformatics.
105
447
 
106
- As another way to find the best match between the string ``str`` and a given array ``arr`` of samples, this function uses the Sørensen-Dice coefficient. It returns the most matching string as well.
448
+ Options:
107
449
 
108
- #### ``diceMatch( str, arr [, flags = null [, threshold = 0 ] ] )``
450
+ - `<Number> match` score for a match
451
+ - `<Number> mismatch` – penalty for a mismatch
452
+ - `<Number> gap` – penalty for a gap
109
453
 
110
- Calculates the similarity of all strings contained in the array ``arr`` according to Sørensen-Dice coefficient compared to ``str`` and returns an array of all samples sorted by matching in descending order. The ``threshold`` specifies the minimum required similarity.
454
+ #### Smith-Waterman `smithWaterman`
111
455
 
112
- ### Flags
456
+ The Smith-Waterman algorithm performs local alignment, finding the best matching subsequence between two strings. It is commonly used in bioinformatics.
113
457
 
114
- Each method can be passed the ``flags`` options listed below:
458
+ Options:
115
459
 
116
- | Flag | Option |
117
- | ----- | ------------------------------ |
118
- | ``i`` | case insensitive |
119
- | ``s`` | non-whitespace characters only |
460
+ - `<Number> match` – score for a match
461
+ - `<Number> mismatch` penalty for a mismatch
462
+ - `<Number> gap` penalty for a gap
120
463
 
121
- ## Patch notes
464
+ #### q-Gram – `qGram`
122
465
 
123
- ### 1.0.3
466
+ Q-gram similarity is a string-matching algorithm that compares two strings by breaking them into substrings of length Q. It's used to determine how similar the two strings are.
124
467
 
125
- * Add ``threshold`` to specify the minimum required similarity
468
+ Options:
126
469
 
127
- ### 1.0.2
470
+ - `<Int> q` length of substrings
128
471
 
129
- * Add normalize options ``i`` and ``s``
130
- * Minor fixes
472
+ ### Phonetic Algorithms
131
473
 
132
- ### 1.0.1
474
+ #### Soundex – `soundex`
133
475
 
134
- * Minor fixes
476
+ The Soundex algorithm generates a phonetic representation of a string based on how it sounds. It supports predefined setups for English and German and allows users to provide custom options.
135
477
 
136
- ### 1.0.0
478
+ Options:
137
479
 
138
- * Initial release
480
+ - `<String> lang` – language code for predefined setups (e.g., `en`, `de`)
481
+ - `<Boolean> raw` – if true, returns the raw sound index codes
482
+ - `<Object> mapping` – custom phonetic mapping (overrides predefined)
483
+ - `<String> exclude` – characters to exclude from the input (overrides predefined)
484
+ - `<Number> maxLength` – maximum length of the phonetic code
package/package.json CHANGED
@@ -1,25 +1,49 @@
1
- {
2
- "name": "cmpstr",
3
- "description": "lightweight npm package to calculate string similarity",
4
- "author": {
5
- "name" : "komed3 (Paul Köhler)",
6
- "email" : "webmaster@komed3.de",
7
- "url" : "https://komed3.de"
8
- },
9
- "homepage": "https://github.com/komed3/cmpstr#readme",
10
- "version": "1.0.3",
11
- "license": "MIT",
12
- "keywords": [
13
- "string",
14
- "similarity",
15
- "levenshtein-distance",
16
- "dice-coefficient"
17
- ],
18
- "repository": {
19
- "type": "git",
20
- "url": "git+https://github.com/komed3/cmpstr.git"
21
- },
22
- "bugs": {
23
- "url": "https://github.com/komed3/cmpstr/issues"
24
- }
25
- }
1
+ {
2
+ "name": "cmpstr",
3
+ "description": "lightweight npm package to calculate string similarity",
4
+ "author": {
5
+ "name" : "komed3 (Paul Köhler)",
6
+ "email" : "webmaster@komed3.de",
7
+ "url" : "https://komed3.de"
8
+ },
9
+ "homepage": "https://github.com/komed3/cmpstr#readme",
10
+ "version": "2.0.1",
11
+ "main": "src/index.js",
12
+ "types": "src/index.d.ts",
13
+ "license": "MIT",
14
+ "keywords": [
15
+ "string-similarity",
16
+ "string-comparison",
17
+ "similarity-algorithms",
18
+ "phonetic-search",
19
+ "soundex",
20
+ "levenshtein-distance",
21
+ "damerau-levenshtein",
22
+ "jaro-winkler",
23
+ "cosine-similarity",
24
+ "dice-coefficient",
25
+ "jaccard-index",
26
+ "hamming-distance",
27
+ "longest-common-subsequence",
28
+ "needleman-wunsch",
29
+ "smith-waterman",
30
+ "q-gram",
31
+ "similarity-matrix",
32
+ "batch-operations",
33
+ "normalization",
34
+ "asynchronous",
35
+ "custom-algorithms",
36
+ "text-processing",
37
+ "fuzzy-matching",
38
+ "string-matching",
39
+ "text-similarity",
40
+ "typescript-definitions"
41
+ ],
42
+ "repository": {
43
+ "type": "git",
44
+ "url": "git+https://github.com/komed3/cmpstr.git"
45
+ },
46
+ "bugs": {
47
+ "url": "https://github.com/komed3/cmpstr/issues"
48
+ }
49
+ }