diff --git a/main/main.go b/main/main.go index 8deec69..d3217a0 100644 --- a/main/main.go +++ b/main/main.go @@ -1,8 +1,8 @@ package main import ( - "github.com/agonopol/go-stem" "bufio" + "github.com/agonopol/go-stem" "os" ) diff --git a/stemmer.go b/stemmer.go index 2bdb322..c3b9947 100644 --- a/stemmer.go +++ b/stemmer.go @@ -142,7 +142,7 @@ func two(body []byte) []byte { if Measure(body[:len(body)-4]) > 0 { return append(body[:len(body)-4], []byte("able")...) } - // To match the published algorithm, delete the following phrase + // To match the published algorithm, delete the following phrase } else if bytes.HasSuffix(body, []byte("bli")) { if Measure(body[:len(body)-3]) > 0 { return append(body[:len(body)-1], 'e') @@ -203,7 +203,7 @@ func two(body []byte) []byte { if Measure(body[:len(body)-6]) > 0 { return append(body[:len(body)-6], []byte("ble")...) } - // To match the published algorithm, delete the following phrase + // To match the published algorithm, delete the following phrase } else if bytes.HasSuffix(body, []byte("logi")) { if Measure(body[:len(body)-4]) > 0 { return body[:len(body)-1] diff --git a/stemmer_test.go b/stemmer_test.go index 544eca3..9ef0038 100644 --- a/stemmer_test.go +++ b/stemmer_test.go @@ -11,7 +11,6 @@ func compare(t *testing.T, expected, actual interface{}, msg ...string) { } } - func TestConsonant(t *testing.T) { word := []byte("TOY") compare(t, true, Consonant(word, 0), "T") //T