hankcs / HanLP

中文分词 词性标注 命名实体识别 依存句法分析 成分句法分析 语义依存分析 语义角色标注 指代消解 风格转换 语义相似度 新词发现 关键词短语提取 自动摘要 文本分类聚类 拼音简繁转换 自然语言处理
https://hanlp.hankcs.com/
Apache License 2.0
33.97k stars 10.18k forks source link

No module named 'hanlp.datasets.parsing.ctb' #1860

Closed ndyysheep closed 12 months ago

ndyysheep commented 12 months ago

from hanlp.datasets.parsing.ctb import CTB8_SD330_TRAIN, CTB8_SD330_DEV, CTB8_SD330_TEST from hanlp.utils.io_util import get_resource

下载数据集

train_data_path = get_resource(CTB8_SD330_TRAIN) dev_data_path = get_resource(CTB8_SD330_DEV) test_data_path = get_resource(CTB8_SD330_TEST)

打印数据集的本地路径

print(f'Training data saved to: {train_data_path}') print(f'Dev data saved to: {dev_data_path}') print(f'Test data saved to: {test_data_path}') 使用以上代码打算下载依存分析的数据集来查看数据格式的,但是报错: No module named 'hanlp.datasets.parsing.ctb'