Python 3.8.6で動作を確認しています
$ git clone https://github.com/eeic-ai-01/text2slide --recursive
$ cd text2slide
$ pip install -r requirements.txt
$ python -m spacy download en
pyenv環境の場合fasttextのみ手動でインストールする必要があります.
$ git clone https://github.com/facebookresearch/fastText.git
$ cd fastText
$ pip install .
pandocのインストール
https://pandoc.org/installing.html
BERT日本語Pretrainedモデル — KUROHASHI-KAWAHARA LAB からBASE WWM版(1.6G; 19/11/15公開)をダウンロードして展開し、中身をsummarization/extractive/SlideMan/model/Japanese/に置く。 summarization/extractive/SlideMan/src/LangFactory.pyの46行目にその絶対パスを入力する。 summarization/extractive/SlideMan/config.iniに、vocab.txtの絶対パスを入力する。
Juman++ V2の開発版に記載された通りに2.0.0-rc3をインストールする。 summarization/extractive/SlideMan/config.iniに、jumanpp、jumandic.jppmdl、jumandic.configの絶対パスを入力する。
ここからcp_step_9000.pt
とopt_step_9000.pt
をダウンロードし、summarization/extractive/SlideMan/checkpoint/jp/に置く。
summarization/extractive/SlideMan/src/LangFactory.pyの50行目、51行目にその絶対パスを入力する。
ここからwikipedia_wakati.json
をダウンロードし,scraping/text/
以下に配置する必要があります.
一部の要約に英語向けのモデルを使用しているため.env
にDeepL APIを登録する必要があります.
$ python text2slide.py --input example/test.in