public class KShingling extends Object
Modifier and Type | Field and Description |
---|---|
protected int |
k |
Constructor and Description |
---|
KShingling()
k-shingling is the operation of transforming a string (or text document) into
a set of n-grams, which can be used to measure the similarity between two
strings or documents.
|
KShingling(int k) |
Modifier and Type | Method and Description |
---|---|
int |
getK() |
StringProfile |
getProfile(String s)
Compute and returns the profile of string s
The profiles of different strings can be used to compute cosine similarity
or qgram distance.
|
StringSet |
getSet(String s) |
static void |
main(String[] args) |
public KShingling()
public KShingling(int k)
public static void main(String[] args)
public int getK()
public StringProfile getProfile(String s)
s
- Copyright © 2015. All rights reserved.