Giter VIP home page Giter VIP logo

gcws's Introduction

gcws

Build Status Coverage Status Go Report Card GoDoc

gcws是golang版本的CWS(Chinese Word Segmentation) - 一个开源中文分词集成适配管理器

English

安装

go get github.com/WindomZ/gcws/...

支持

  • sego - Go中文分词,用双数组trie(Double-Array Trie)实现[GitHub]
  • jieba - "结巴"中文分词的Golang版本[GitHub]
  • cwsharp - Golang中文分词库,支持多种分词模式,支持自定义字典和扩展[GitHub]
  • segment - golang 版中文分词包, inspired from 盘古分词[GitHub]
  • gse - Go 语言高效分词, 支持英文、中文、日文等[GitHub]

用法

导入

import (
    "github.com/WindomZ/gcws"
)

初始化(以jieba为例)

import (
    _ "github.com/WindomZ/gcws/jieba"
)
...
cws, err := gcws.NewCWS("jieba")

简单易用

cws.Tokenize("喜欢就坚持,爱就别放弃") // 返回[]string{...}

模式

  • ModeDefault - 默认分词模式
  • ModeSearch - 搜索分词模式,sego, jieba, segment, gse支持
  • ModeFast - 快速分词模式,cwsharp支持
  • ModeEnglish - 英文分词模式,sego, jieba支持

gcws's People

Contributors

windomz avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.