From 187a8b10957f178d1f2adb72c4e432ae42d17339 Mon Sep 17 00:00:00 2001 From: Bharat Biradar <62872048+bharat-biradar@users.noreply.github.com> Date: Fri, 20 Aug 2021 12:17:52 +0530 Subject: [PATCH 1/2] Set q=10, for threshold>0.9 --- v2/document.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/document.go b/v2/document.go index 9115a6b..6245b5f 100644 --- a/v2/document.go +++ b/v2/document.go @@ -81,7 +81,7 @@ func computeQ(threshold float64) int { // 20 times. This function returns the minimum token length, or returning // a value of 1 if necessary (since a threshold level below 50% would generate // a run of 0-length, which is meaningless.) - if threshold == 1.0 { + if threshold >= 0.9 { return 10 // avoid divide by 0 } From 95f76cc1c153af267cd655cd80d56d3bccf49976 Mon Sep 17 00:00:00 2001 From: Bharat Biradar <62872048+bharat-biradar@users.noreply.github.com> Date: Fri, 20 Aug 2021 12:19:39 +0530 Subject: [PATCH 2/2] Nit --- v2/document.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v2/document.go b/v2/document.go index 6245b5f..2ece336 100644 --- a/v2/document.go +++ b/v2/document.go @@ -81,7 +81,7 @@ func computeQ(threshold float64) int { // 20 times. This function returns the minimum token length, or returning // a value of 1 if necessary (since a threshold level below 50% would generate // a run of 0-length, which is meaningless.) - if threshold >= 0.9 { + if threshold > 0.9 { return 10 // avoid divide by 0 }