【问题标题】:Downloading ML annotations in IBM-Watson Knowledge Studio在 IBM-Watson Knowledge Studio 中下载 ML 注释
【发布时间】:2020-04-06 12:53:03
【问题描述】:

我正在使用 WKS 开发 NLP 应用程序,经过培训,得到了相当低的性能结果。

我想知道是否有办法下载带有实体分类的注释文档,包括训练集和测试集,这样我就可以自动详细识别关键差异在哪里,以便我修复它们。

那些由人工注释的,可以在“资产”/“文档”部分下载 -> 下载文档集(右侧按钮)。

以下 Python 代码,让您可以查看其中的数据:

import json
import zipfile
with zipfile.ZipFile(<YOUR DOWNLOADED FILE>, "r") as zip:
with zip.open('documents.json') as arch:  
    data      = arch.read()  
    documents = json.loads(data)
    print(json.dumps(documents,indent=2,separators=(',',':')))
    df_documentos = pd.DataFrame(None)
i = 0
for documento in documents:
    df_documentos.at[i,'name']         = documento['name']
    df_documentos.at[i,'text']         = documento['text']
    df_documentos.at[i,'status']       = documento['status']
    df_documentos.at[i,'id']           = documento['id']
    df_documentos.at[i,'createdDate']  = '{:14.0f}'.format(documento['createdDate'])
    df_documentos.at[i,'modifiedDate'] = '{:14.0f}'.format(documento['modifiedDate'])
    i += 1
df_documentos

with zipfile.ZipFile(<YOUR DOWNLOADED FILE>, "r") as zip:
    with zip.open('sets.json') as arch:  
        data = arch.read()  
        sets = json.loads(data)
        print(json.dumps(sets,indent=2,separators=(',',':')))

df_sets = pd.DataFrame(None)
i = 0
for set in sets:
    df_sets.at[i,'type']         = set['type']
    df_sets.at[i,'name']         = set['name']
    df_sets.at[i,'count']        = '{:6.0f}'.format(set['count'])
    df_sets.at[i,'id']           = set['id']
    df_sets.at[i,'createdDate']  = '{:14.0f}'.format(set['createdDate'])
    df_sets.at[i,'modifiedDate'] = '{:14.0f}'.format(set['modifiedDate'])
    i += 1

df_sets

然后可以迭代读取压缩文件“gt”文件夹下的每一个JSON文件,得到详细的分句、分词和标注。

我需要的是能够通过 TEST 文档下载机器学习模型产生的注释,这些注释在“机器学习模型”/“性能”/“查看解码结果”中可见。

有了这个,我将能够识别可能导致修改类型字典和注释标准的特定偏差。

【问题讨论】:

    标签: nlp watson-knowledge-studio


    【解决方案1】:

    很抱歉,此功能目前不可用。

    您可以在以下网址提交功能请求: https://ibm-data-and-ai.ideas.aha.io/?project=WKS

    谢谢。

    【讨论】:

    • 非常感谢 k.natsugawa 我刚刚添加了这个想法。暂时有人@IBM给了我这个想法:用NLU实现模型,通过API请求分类。这适用于 TEST 集中的文档以及任何其他文档。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多