kinow commented on issue #109: TEXT-155: Add a generic IntersectionSimilarity 
measure
URL: https://github.com/apache/commons-text/pull/109#issuecomment-470703522
 
 
   @aherbert I will have another play with the code later with more time. 
Another library also implemented [helper class/method for the 
intersection](https://github.com/Simmetrics/simmetrics/blob/59dc148f402da6a8a82ad8604a64fa35d1f70460/simmetrics-core/src/main/java/org/simmetrics/metrics/Math.java).
 I think the design here looks similar.
   
   However, I think it would make more sense to have the `IntersectionResult` 
being used in other metrics. 
   
   Wouldn't it be possible to use `IntersectionResult` in the Jaccard and even 
in the new Sorensen-Dice metrics?
   
   We can leave the `IntersectionSimilarity` but maybe use it as an internal or 
package protected class? Moving the F1 score and Jaccard to its own classes (in 
the Jaccard case, I believe it means replacing the code in the existing 
`JaccardSimilarity` by `IntersectionResult` + `IntersectionSimilarity`, then in 
the return of the `JaccardSimilarity#apply` simply have the code we have now in 
`IntersectionResult#getJaccard` ).
   
   What do you think?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to