Skip to content

Commit

Permalink
feat(search): add interface for similarity algorithms
Browse files Browse the repository at this point in the history
Added a new interface `Similarity` for search algorithm implementations. Updated `JaccardSimilarity` class to implement this interface.
  • Loading branch information
phodal committed Jul 17, 2024
1 parent 6af213a commit 27c65c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package com.phodal.shirecore.search.algorithm

import com.phodal.shirecore.search.tokenizer.StopwordsBasedTokenizer

open class JaccardSimilarity {
open class JaccardSimilarity : Similarity {
/**
* The `tokenLevelJaccardSimilarity` method calculates the Jaccard similarity between a query string and an array of string
* arrays (chunks). The Jaccard similarity is a measure of the similarity between two sets and is defined as the size of
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package com.phodal.shirecore.search.algorithm

interface Similarity {

}

0 comments on commit 27c65c1

Please sign in to comment.