@ckirby/longest-common-substring
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -36,5 +36,10 @@ const { memoizingStemmer: stemmer } = require('porter-stemmer'); | ||
function findCommonPhrases(str1 = ``, str2 = ``, options = {}) { | ||
let { threshold = 3, trimOverlaps = false } = options; | ||
let tk1 = tokenizer(str1, options); | ||
let tk2 = tokenizer(str2, options); | ||
return findCommonTokens(tk1, tk2, options); | ||
} | ||
function findCommonTokens(tk1, tk2, options) { | ||
let { threshold = 3, trimOverlaps = false } = options; | ||
let vocabulary = makeVocabulary(tk1); | ||
@@ -158,2 +163,2 @@ | ||
module.exports = { findCommonSubstrings, findCommonPhrases, stem }; | ||
module.exports = { findCommonSubstrings, findCommonPhrases, findCommonTokens, stem }; |
{ | ||
"name": "@ckirby/longest-common-substring", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "find the longest string that is a substring of two strings", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5677
139