From 2c7d4f639b692236602cff10dc31e60d13dbb8a0 Mon Sep 17 00:00:00 2001 From: legend06hvl Date: Tue, 20 Mar 2018 15:51:05 +0800 Subject: [PATCH] Create README.cn.md --- globally_normalized_reader/README.cn.md | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 globally_normalized_reader/README.cn.md diff --git a/globally_normalized_reader/README.cn.md b/globally_normalized_reader/README.cn.md new file mode 100644 index 00000000..a2883f8e --- /dev/null +++ b/globally_normalized_reader/README.cn.md @@ -0,0 +1,58 @@ +此目录中代码示例所需的最小PaddlePad版本为v0.11.0。如果您使用的PaddlePad版本早于v0.11.0的, [请更新](http://www.paddlepaddle.org/docs/develop/documentation/en/build_and_install/pip_install_en.html). + +--- + +# 全球标准化阅读器 + +该模型实现以下功能: + +乔纳森 莱曼和约翰 米勒。全球标准化阅读器。自然语言处理中的实证方法(EMNLP),2017。 + +如果您在研究中使用数据集/代码,请引用上述论文: + +```text +@inproceedings{raiman2015gnr, + author={Raiman, Jonathan and Miller, John}, + booktitle={Empirical Methods in Natural Language Processing (EMNLP)}, + title={Globally Normalized Reader}, + year={2017}, +} +``` +您也可以访问 https://github.com/baidu-research/GloballyNormalizedReader 以获取更多信息。 + +# 安装 + +1. 请使用 [docker image](http://doc.paddlepaddle.org/develop/doc/getstarted/build_and_install/docker_install_en.html) 安装最新的PaddlePad,运行方法: + ```bash + docker pull paddledev/paddle + ``` + +2. 下载所有必要的数据: + ```bash + cd data && ./download.sh && cd .. + ``` + +3. 预处理并特征化数据: + ```bash + python featurize.py --datadir data --outdir data/featurized --glove-path data/glove.840B.300d.txt + ``` + +# 模型训练 + +- 根据需要修改config.py来配置模型,然后运行: + ```bash + python train.py 2>&1 | tee train.log + ``` + +# 使用训练过的模型推断 + +- 运行以下训练模型来推断: + ```bash + python infer.py \ + --model_path models/pass_00000.tar.gz \ + --data_dir data/featurized/ \ + --batch_size 2 \ + --use_gpu 0 \ + --trainer_count 1 \ + 2>&1 | tee infer.log + ``` -- GitLab