Skip to content

Commit

Permalink
Merge pull request #4 from bluepolarfox/master
Browse files Browse the repository at this point in the history
A bit of code
  • Loading branch information
tansaku committed Feb 6, 2013
2 parents 03943c6 + d6d7b4d commit 05f40ca
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests.js
Expand Up @@ -28,11 +28,12 @@ test( "testing WordPunctTokenizer", function() {
deepEqual( result, [ 'my', 'dog', 'hasn', '\'', 't', 'any', 'flees', '.' ], "We expect value to be tokenised" );
});
test( "testing JaroWinklerDistance", function() {
equal(natural.JaroWinklerDistance("dixon","dicksonx"),0.7466666666666666);
equal(natural.JaroWinklerDistance("dixon","dicksonx"),0.8133333333333332);
equal(natural.JaroWinklerDistance('not', 'same'),0);
});
test( "testing LevenshteinDistance", function() {
equal(natural.LevenshteinDistance("ones","onez"),1);
equal(natural.LevenshteinDistance("ones","oness"),1);
equal(natural.LevenshteinDistance('one', 'one'),0);
});
test( "testing modified LevenshteinDistance", function() {
Expand All @@ -43,7 +44,18 @@ test( "testing Dice co-efficient", function() {
});
test( "testing Porter Stemmer", function() {

stemmer = natural.PorterStemmer;


equal(stemmer.stem('stems'),'stem')

equal(stemmer.stem('stemming'),'stem')

equal(stemmer.stem('stemmed'),'stem')

equal(stemmer.stem('stem'),'stem')
});

test( "testing Porter Stemmer in Russian", function() {

});
Expand Down

0 comments on commit 05f40ca

Please sign in to comment.