Skip to content
This repository was archived by the owner on Dec 19, 2020. It is now read-only.

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

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

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages