Documentation
¶
Index ¶
- Variables
- func HasToPY(sentence string) string
- func ItemAfter(arr []string, item string, index int) (ok bool, i int)
- func OrderCover(sentence1 string, sentence2 string, segTag string, minLen int) (rate float64)
- func OrderCoverWithPyUnlessEnd(sentence1 string, sentence2 string, segTag string, minLen int) (rate float64, sen1 string, sen2 string)
- func OrderCoverWithPyUnlessEndWithWight(sentence1 string, sentence2 string, segTag string, minLen int, weight float64) (rate float64, sen1 string, sen2 string)
- func OrderCoverWithUnlessEnd(sentence1 string, sentence2 string, segTag string, minLen int) (rate float64, sen1 string, sen2 string)
- type CoverRate
- func (c *CoverRate) AddHit()
- func (c *CoverRate) AddNotHit()
- func (c *CoverRate) Arr1LenCount() (start int, mid int, end int)
- func (c *CoverRate) Arr1Rate() (rate float64)
- func (c *CoverRate) Arr2LenCount() (start int, mid int, end int)
- func (c *CoverRate) Arr2Rate() (rate float64)
- func (c *CoverRate) ArrRate() (rate float64)
- func (c *CoverRate) Count() error
- func (c *CoverRate) EndCount()
- func (c *CoverRate) LenCount(arr []string, hiArr [][]int) (start int, mid int, end int)
Constants ¶
This section is empty.
Variables ¶
View Source
var GpyArgs = gpy.NewArgs()
Functions ¶
func OrderCover ¶
句子顺序覆盖率 sentence1 被查询 sentence2 被覆盖 segTag 分隔符 minLen 最小长度,太小的不算
func OrderCoverWithPyUnlessEnd ¶
func OrderCoverWithPyUnlessEnd( sentence1 string, sentence2 string, segTag string, minLen int, ) (rate float64, sen1 string, sen2 string)
顺序覆盖率,返回被覆盖的句子和句尾无效的句子,先转成拼音再比覆盖
func OrderCoverWithPyUnlessEndWithWight ¶ added in v1.0.3
Types ¶
type CoverRate ¶
Click to show internal directories.
Click to hide internal directories.