2019独角兽企业重金招聘Python工程师标准>>>
分布操作
0. 克隆 tensorflow/models
git clone https://github.com/tensorflow/models.git
// 切换目录到 syntaxnet
cd syntaxnet
推荐在docker下面操作: tensorflow/syntaxnet
1. 下载Chinese模型文件
tensorflow 官网
2. 解压 Chinese.zip
到 syntaxnet
模型主目录
unzip Chinese.zip
3. syntaxnet 目录下运行:
MODEL_DIRECTORY=/opt/tensorflow/syntaxnet/Chinese
echo '你好,我是丁小雨,能告诉我你的名字吗?' | \
syntaxnet/models/parsey_universal/tokenize_zh.sh $MODEL_DIRECTORY | \
syntaxnet/models/parsey_universal/parse.sh $MODEL_DIRECTORY
jupyter 操作
基于
tensorflow/syntaxnet
docker
cd /opt/tensorflow/syntaxnet
wget http://download.tensorflow.org/models/parsey_universal/Chinese.zip
unzip Chinese.zipMODEL_DIRECTORY=/opt/tensorflow/syntaxnet/Chineseecho '你好,我是丁小雨,能告诉我你的名字吗?' | \
syntaxnet/models/parsey_universal/tokenize_zh.sh $MODEL_DIRECTORY | \
syntaxnet/models/parsey_universal/parse.sh $MODEL_DIRECTORY
最后的结果
链接
- AI人工智能系列随笔:syntaxnet 初探(1)
- github:tensorflow/models
- docker:tensorflow/syntaxnet
- 语言模型下载
- [知乎评论]https://www.zhihu.com/question/46272554)