Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion main/main.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package main

import (
"github.com/agonopol/go-stem"
"bufio"
"github.com/agonopol/go-stem"
"os"
)

Expand Down
4 changes: 2 additions & 2 deletions stemmer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down Expand Up @@ -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]
Expand Down
1 change: 0 additions & 1 deletion stemmer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down