vickumar1981 / stringdistance

A fuzzy matching string distance library for Scala and Java that includes Levenshtein distance, Jaro distance, Jaro-Winkler distance, Dice coefficient, N-Gram similarity, Cosine similarity, Jaccard similarity, Longest common subsequence, Hamming distance, and more..
https://vickumar1981.github.io/stringdistance/api/com/github/vickumar1981/stringdistance/index.html
Other
78 stars 15 forks source link

Restructure/Refactor test cases #25

Open vickumar1981 opened 5 years ago

vickumar1981 commented 5 years ago

The class that stores test case information needs to be refactored:

https://github.com/vickumar1981/stringdistance/blob/master/src/test/scala/fixtures/TestCases.scala#L6

TestCase and TestSoundCase are case classes with value members: Option[T] where T is either an Int or Double depending on whether the test is for a distance or fuzzy score metric. These classes need to be generalized to support adding more test cases with greater flexibility.

String and String sound tests may need to be refactored as well to support any new model:

https://github.com/vickumar1981/stringdistance/blob/master/src/test/scala/TestStringDistance.scala

https://github.com/vickumar1981/stringdistance/blob/master/src/test/scala/TestStringSoundScore.scala