Skip to content

Japanese sentence compressor using the 1st algorithm in [Clarke & Lapata, 2008] written in Python3

Notifications You must be signed in to change notification settings

chendongliang87/sentence-compression

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What's this

Python3で書かれた日本語用の文短縮アルゴリズムです。 アルゴリズムとして Global Inference for Sentence Compression An Integer Linear Programming Approach (James Clarke, Mirella Lapata, 2008)で提案されている1つめのアルゴリズムを使いました。 ただしまだ実装途中で現状ではおよそ文とは言えない短縮文しか出力しません…

日本語形態素解析器JUMANと線形計画問題ソルバーのPython用インターフェースpulpに依存しています。

http://nlp.ist.i.kyoto-u.ac.jp/index.php?JUMAN
https://pypi.python.org/pypi/PuLP

Usage

main.py: 標準入力から入力文を受け取り標準出力に短縮文を出力するスクリプト
usage: python3 main.py --lm trigram.pickle --start start-mrphs.pickle

model.sh: プレーンテキストの文章からcompress.py向けの言語モデルを生成するシェルスクリプト
usage: ./model.sh trigram.pickle start-mrphs.pickle

TODO

  • 整数計画問題の言語的制約を追加
  • SRILMへの移行

About

Japanese sentence compressor using the 1st algorithm in [Clarke & Lapata, 2008] written in Python3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.2%
  • Shell 4.8%