Skip to content

Commit 29d56ee

Browse files
authored
update the wordtag doc (#753)
1 parent 6552a58 commit 29d56ee

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/text_to_knowledge/wordtag/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,10 @@ Term-Linking示例程序可以对无标签数据可以启动模型预测, 例如
5555
执行下面的脚本即可快速获取上面两段文本的百科知识树链接的结果
5656

5757
```bash
58-
python -u predict.py \
59-
--max_seq_len 128 \
60-
--batch_size 32 \
61-
--device "gpu"
58+
from paddlenlp.taskflow import TaskFlow
59+
task = TaskFlow("text2knowledge", model="wordtag")
60+
task(["热梅茶是一道以梅子为主要原料制作的茶饮",
61+
"《孤女》是2010年九州出版社出版的小说,作者是余兼羽"])
6262
```
6363
下面是运行WordTag工具后的知识链接的预测结果
6464

0 commit comments

Comments
 (0)