-
Notifications
You must be signed in to change notification settings - Fork 223
Open
Description
package main
import (
"fmt"
"github.com/go-ego/gse"
)
func main() {
var seg gse.Segmenter
seg, _ = gse.New("./data/dict/zh/s_1.txt,./data/dict/zh/user.txt")
segments := seg.Slice("hello", true)
fmt.Println("segments", segments)
segments = seg.Slice("hello", false)
fmt.Println("segments", segments)
}2025/12/04 16:38:48 Dict files path: [./data/dict/zh/s_1.txt ./data/dict/zh/user.txt]
2025/12/04 16:38:48 Load the gse dictionary: "./data/dict/zh/s_1.txt"
2025/12/04 16:38:49 Load the gse dictionary: "./data/dict/zh/user.txt"
2025/12/04 16:38:49 Gse dictionary loaded finished.
segments []
segments [hello]Metadata
Metadata
Assignees
Labels
No labels