findword

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package findword 根据文本,利用信息熵做新词发现。

Index

Constants

View Source
const (
	// DEFAULT_MIN_FREQ 默认freq
	DEFAULT_MIN_FREQ int = 10
	// DEFAULT_MIN_MTRO 默认mtro
	DEFAULT_MIN_MTRO float64 = 80
	// DEFALUT_MIN_ENTRO 默认entro
	DEFAULT_MIN_ENTRO float64 = 3
	// MAX_WORD_LENGTH 最大词长度
	MAX_WORD_LENGTH int = 6
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Findword

type Findword struct {
	// contains filtered or unexported fields
}

Findword 根据文本利用信息熵新词发现

func New

func New() *Findword

New 新建Findword

func (*Findword) Find

func (f *Findword) Find(input io.Reader) ([]utils.StringCounterItem, error)

Find 发现新词

func (*Findword) SetMinEntro

func (f *Findword) SetMinEntro(entro float64)

SetMinEntro 设置minEntro

func (*Findword) SetMinFreq

func (f *Findword) SetMinFreq(freq int)

SetMinFreq 设置minFreq

func (*Findword) SetMinMtro

func (f *Findword) SetMinMtro(mTro float64)

SetMinTro 设置minMtro

Jump to

Keyboard shortcuts

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