tire

package
v0.94.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package tire TireTree 实现

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTire

func NewTire() *tire

NewTire new TireTree

Types

type Option

type Option struct {
	// 匹配次数限制, -1 不限制
	Limit int
	// 贪婪模式, 尽可能的多匹配词语. 如关键词定义 ["上海", "上海游玩"], 对于句子 "他到上海游玩". true 则匹配 ["上海", "上海游玩"], false 则只会匹配 ["上海"]
	Greed bool
	// 密度, 匹配出词中词. 如关键词定义 ["到上海", "上海"], 对于句子 "他到上海游玩". true 则匹配 ["到上海", "上海"], false 则只会匹配 ["到上海"]
	Density bool
	// 是否是单词语系
	WordMode bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL