diff --git a/PaddleNLP/examples/lexical_analysis/README.md b/PaddleNLP/examples/lexical_analysis/README.md index 6a7c36cb97df72813ab3bb6ec2014c423654503f..28d3e7e74d706d8ded46886cee974afe928d6255 100644 --- a/PaddleNLP/examples/lexical_analysis/README.md +++ b/PaddleNLP/examples/lexical_analysis/README.md @@ -20,7 +20,7 @@ - paddlepaddle >= 2.0.0rc1,安装方式请参考 [快速安装](https://www.paddlepaddle.org.cn/install/quick)。 -- paddlenlp >= 2.0.0b, 安装方式:`pip install paddlenlp>=2.0.0b` +- paddlenlp >= 2.0.0b2, 安装方式:`pip install paddlenlp>=2.0.0b2` ### 2.2 数据准备 diff --git a/PaddleNLP/examples/lexical_analysis/eval.py b/PaddleNLP/examples/lexical_analysis/eval.py index 50742de7c2a0cce15032e6c11c289c463bc90e09..d8b78edae34fa88782004d12c8d69a87930c5ea9 100644 --- a/PaddleNLP/examples/lexical_analysis/eval.py +++ b/PaddleNLP/examples/lexical_analysis/eval.py @@ -69,8 +69,7 @@ def evaluate(args): test_dataset.num_labels) model = paddle.Model(network) chunk_evaluator = ChunkEvaluator( - int(math.ceil((test_dataset.num_labels + 1) / 2.0)), - "IOB") # + 1 for SOS and EOS + label_list=test_dataset.label_vocab.keys(), suffix=True) model.prepare(None, None, chunk_evaluator) # Load the model and start predicting diff --git a/PaddleNLP/examples/named_entity_recognition/express_ner/README.md b/PaddleNLP/examples/named_entity_recognition/express_ner/README.md index f0b61033e3f4028296ffad067fca5257e5a657fd..802c4d92d89aa2b6e15531747137fea638215949 100644 --- a/PaddleNLP/examples/named_entity_recognition/express_ner/README.md +++ b/PaddleNLP/examples/named_entity_recognition/express_ner/README.md @@ -20,10 +20,10 @@ 数据集已经保存在data目录中,示例如下 ``` -16620200077宣荣嗣甘肃省白银市会宁县河畔镇十字街金海超市西行50米 T-BT-IT-IT-IT-IT-IT-IT-IT-IT-IT-IP-BP-IP-IA1-BA1-IA1-IA2-BA2-IA2-IA3-BA3-IA3-IA4-BA4-IA4-IA4-IA4-IA4-IA4-IA4-IA4-IA4-IA4-IA4-IA4-IA4-IA4-I -13552664307姜骏炜云南省德宏傣族景颇族自治州盈江县平原镇蜜回路下段 T-BT-IT-IT-IT-IT-IT-IT-IT-IT-IT-IP-BP-IP-IA1-BA1-IA1-IA2-BA2-IA2-IA2-IA2-IA2-IA2-IA2-IA2-IA2-IA3-BA3-IA3-IA4-BA4-IA4-IA4-IA4-IA4-IA4-IA4-I +1^B6^B6^B2^B0^B2^B0^B0^B0^B7^B7^B宣^B荣^B嗣^B甘^B肃^B省^B白^B银^B市^B会^B宁^B县^B河^B畔^B镇^B十^B字^B街^B金^B海^B超^B市^B西^B行^B5^B0^B米 T-B^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BP-B^BP-I^BP-I^BA1-B^BA1-I^BA1-I^BA2-B^BA2-I^BA2-I^BA3-B^BA3-I^BA3-I^BA4-B^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I +1^B3^B5^B5^B2^B6^B6^B4^B3^B0^B7^B姜^B骏^B炜^B云^B南^B省^B德^B宏^B傣^B族^B景^B颇^B族^B自^B治^B州^B盈^B江^B县^B平^B原^B镇^B蜜^B回^B路^B下^B段 T-B^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BT-I^BP-B^BP-I^BP-I^BA1-B^BA1-I^BA1-I^BA2-B^BA2-I^BA2-I^BA2-I^BA2-I^BA2-I^BA2-I^BA2-I^BA2-I^BA2-I^BA3-B^BA3-I^BA3-I^BA4-B^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I^BA4-I ``` -数据集中以特殊字符"\t"分隔文本、标签,以特殊字符"\002"分隔每个字。标签的定义如下: +数据集中以特殊字符"\t"分隔文本、标签,以特殊字符"\002"(示例中显示为"^B")分隔每个字。标签的定义如下: | 标签 | 定义 | 标签 | 定义 | | -------- | -------- |-------- | -------- |