Skip to content
Andrew Caines edited this page May 26, 2015 · 3 revisions

Stanford NLP tools for Chinese

Segmenter

  • Download the Stanford Word Segmenter current release (3.5.2 at time of writing, May 2015): link.
  • Decompress the zip file, once downloaded.
  • Move stanford-segmenter-yyyy-mm-dd directory to desired location in your file-system.
  • Change to the stanford-segmenter-yyyy-mm-dd directory.
  • See README-Chinese.txt
  • Example usage: $ bash segment.sh ctb test.simp.utf8 UTF-8 0
  • Example input: 面对新世纪,世界各国人民的共同愿望是:继续发展人类以往创造的一切文明成果,克服20世纪困扰着人类的战争和贫困问题,推进和平与发展的崇高事业,创造一个美好的世界。
  • Example output: 面对 新 世纪 , 世界 各 国 人民 的 共同 愿望 是 : 继续 发展 人类 以往 创造 的 一切 文明 成果 , 克服 20 世纪 困扰 着 人类 的 战争 和 贫困 问题 , 推进 和平 与 发展 的 崇高 事业 , 创造 一 个 美好 的 世界 。

Part-of-speech Tagger

  • Download the Stanford POS Tagger current release (3.5.2 at time of writing, May 2015): link.
  • Decompress the zip file, once downloaded.
  • Move stanford-postagger-full-yyyy-mm-dd directory to desired location in your file-system.
  • Change to the stanford-postagger-full-yyyy-mm-dd directory.
  • See README.txt
  • Example usage: $ java -mx300m -classpath stanford-postagger.jar edu.stanford.nlp.tagger.maxent.MaxentTagger -model models/chinese-distsim.tagger -textFile text.txt
  • Example input: 面对 新 世纪 , 世界 各 国 人民 的 共同 愿望 是 : 继续 发展 人类 以往 创造 的 一切 文明 成果 , 克服 20 世纪 困扰 着 人类 的 战争 和 贫困 问题 , 推进 和平 与 发展 的 崇高 事业 , 创造 一 个 美好 的 世界 。
  • Example output: 面对#VV 新#JJ 世纪#NN ,#PU 世界#NN 各#DT 国#NN 人民#NN 的#DEG 共同#JJ 愿望#NN 是#VC :#PU 继续#VV 发展#VV 人类#NN 以往#NT 创造#VV 的#DEC 一切#DT 文明#NN 成果#NN ,#PU 克服#VV 20#OD 世纪#NN 困扰#VV 着#AS 人类#NN 的#DEC 战争#NN 和#CC 贫困#NN 问题#NN ,#PU 推进#VV 和平#NN 与#CC 发展#NN 的#DEG 崇高#JJ 事业#NN ,#PU 创造#VV 一#CD 个#M 美好#JJ 的#DEG 世界#NN 。#PU
Clone this wiki locally