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 dataset)
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>
输入是通往Wikipedia转储的完整路径,温度是通往临时文件文件夹的路径,输出是新生成的Wikipedia数据集的路径。
可以从以下URL下载Wikipedia转储:
https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles.xml.bz2