segment_count

package module
v0.0.0-...-bc2c721 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2015 License: MIT Imports: 8 Imported by: 0

README

segment_count

中文分词词频统计工具

功能

  • 对mysql数据表中的源数据表的源字段进行分词,然后把词频统计结果存到目标数据表

应用场景

  • 分析搜索短语中最热门的词

使用说明

  • 使用 github.com/huichen/sego 作为中文分词库
  • 修改config.go,配置数据库
  • 参照 bin/main.go 构建程序 segment_count
  • 输入格式: segment_count -srcDB 源数据库 -srctable 源数据表名 -srcfield 源数据表字段名 -disttable 目标数据表名

Documentation

Index

Constants

View Source
const (
	MYSQL_HOST = "127.0.0.1"

	MYSQL_PORT = "3306"

	MYSQL_USER = "test"

	MYSQL_PWD = "123456"

	SRC_DB = "segment"

	SRC_TABLE = "source"

	SRC_FIELD = "title"

	DIST_TABLE = "dist"

	GROUP_COUNT = 2000

	DICT_FILE = "dict/dictionary.txt"
)

Variables

This section is empty.

Functions

func Exec

func Exec(srcDB string, srcTable string, srcField string, distTable string) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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