GithubHelp home page GithubHelp logo

ckip_client's Introduction

#CKIP_Client

RubyGems

CKIP_Client是連接**研究院詞庫小組研發之中文斷詞系統中文剖析系統的Ruby程式界面。
感謝**研究院詞庫小組多年來之研究成果!

安裝 Installation

請先至中文斷詞系統網站或中文剖析系統網站申請:帳號/密碼
再安裝本Gem

gem install ckip_client

安裝完成後至Gem所在資料夾中修改帳號密碼資料。
資料夾位置通常在:/usr/local/lib/ruby/gems/1.9.1/gems/
進入:ckip_client-0.0.5/lib/config/
於 segment.yml 檔案中輸入中文斷詞系統之帳號密碼,
於 parser.yml 檔案中輸入中文剖析系統之帳號密碼,
至此安裝設定就緒。

使用 Usage

將文章斷詞:

CKIP.segment( text )

剖析文章:

CKIP.parser( text )

也可以讓輸出結果濾除詞性資料,在輸入時加入第二個參數 'neat'

CKIP.segment( text , 'neat' )
CKIP.parser( text , 'neat' )

文字編碼:
輸入的字串編碼可以是 UTF-8 或 Big5 或是 Big5-UAO 三種其中之一。
而輸出結果一律為 UTF-8 編碼。

範例 Example

require 'ckip_client'
text = File.open('text.txt').read
puts CKIP.segment( text )

參閱 References

ckip_client's People

Contributors

xxxooo 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.