new fingerprint()
Fingerprint Module.
The concept for fingerprinting is taken from Open refine
https://github.com/OpenRefine/OpenRefine/wiki/Clustering-In-Depth
- Source:
Methods
(static) analyse(data, type, params) → {object}
Analyse an array of previously keyed strings.
Parameters:
Name | Type | Description |
---|---|---|
data |
array | String to be transformed. |
type |
string | normal or phonetic. |
params |
object | if type is === phonetic then {lang:'german'||'other' , stemming:true||false} can be provided. |
- Source:
Returns:
map.
- Type
- object
(static) asciify(str) → {string}
Asciify characters (for special lang chars).
Parameters:
Name | Type | Description |
---|---|---|
str |
string | String to be transformed. |
- Source:
Returns:
Asciified string.
- Type
- string
(static) cluster(map) → {object}
Cluster results of module.analyse.
Parameters:
Name | Type | Description |
---|---|---|
map |
object | created in module.analyse. |
- Source:
Returns:
Clustered map.
- Type
- object
(static) key(str, type, params) → {string}
Transform string into key.
Parameters:
Name | Type | Description |
---|---|---|
str |
string | String to be transformed. |
type |
string | normal or phonetic. |
params |
object | if type is === phonetic then {lang:'german'||'other' , stemming:true||false} can be provided. |
- Source:
Returns:
The key.
- Type
- string
(static) readableCluster(clusters) → {object}
Translates the cluster from module.cluster into an easy to read and edit object.
Parameters:
Name | Type | Description |
---|---|---|
clusters |
object | created in module.cluster. |
- Source:
Returns:
Clustered map.
- Type
- object