cosine similarity returns either zero or one

Help
evi
2013-05-23
2013-07-25
  • evi

    evi - 2013-05-23

    I am trying to use your package for similarity metrics for strings.
    When i use cosineSimilarity, Euclidean distance and Jaccard Similarity i always get zero or one, never in between though i use float type for the results.
    Levenshtein and mongeElkan works fine.

    I just use the simple example file and make changes on the metrics.

     
  • Eden

    Eden - 2013-07-25

    It seems as though some of the metrics require a different Tokeniser on initialization. Simply initialize it with a new Tokiniser and it should work.

    CosineSimilarity cosSim = new CosineSimilarity(new TokeniserQGram2());
    
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks