恢复thesaurus

This commit is contained in:
源文雨
2023-03-25 20:06:49 +08:00
parent aa5c324592
commit f465e78460
5 changed files with 23 additions and 27 deletions

View File

@@ -146,10 +146,7 @@ const (
func match(l []string, seg *jieba.Segmenter) zero.Rule {
return func(ctx *zero.Ctx) bool {
if zero.FullMatchRule(l...)(ctx) {
return true
}
return ctxext.JiebaFullMatch(seg, func(ctx *zero.Ctx) string {
return ctxext.JiebaSimilarity(0.5, seg, func(ctx *zero.Ctx) string {
return ctx.ExtractPlainText()
}, l...)(ctx)
}