text segmentation
1.0.0
このリポジトリには、ペーパーテキストセグメンテーションで監視された学習タスクとして説明されているように、モデルをトレーニングおよび評価するために必要なコードと補足資料が含まれています
WIKI-727K、WIKI-50データセット:
https://www.dropbox.com/sh/k3jh0fjbyr0gw0a/aadzad9sdtrbnvs1qlcjy5cza?dl=0
word2vec:
https://drive.google.com/a/audioburst.com/uc?export=download&confirm=zrin&id=0b7xkcwpi5kdynlnuttlss21pqmm
configgenerator.pyの関連パスを入力し、スクリプトを実行します(gitリポジトリにはchoiデータセットが含まれます)
conda create -n textseg python=2.7 numpy scipy gensim ipython
source activate textseg
pip install http://download.pytorch.org/whl/cu80/torch-0.3.0-cp27-cp27mu-linux_x86_64.whl
pip install tqdm pathlib2 segeval tensorboard_logger flask flask_wtf nltk
pip install pandas xlrd xlsxwriter termcolor
python run.py --help
例:
python run.py --cuda --model max_sentence_embedding --wiki
python test_accuracy.py --help
例:
python test_accuracy.py --cuda --model <path_to_model> --wiki
python wiki_processor.py --input <input> --temp <temp_files_folder> --output <output_folder> --train <ratio> --test <ratio>
入力はウィキペディアダンプへのフルパスであり、Tempは一時ファイルフォルダーへのパスであり、出力は新しく生成されたウィキペディアデータセットへのパスです。
ウィキペディアダンプは、次のURLからダウンロードできます。
https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles.xml.bz2