Skip to content

结果文件如何解析成数据集的样式 #6

Open
@jiayuchennlp

Description

您好,在尝试用您的模型跑出结果后,得到如:./Exps/try/Output/dee_eval.test.pred_span.GIT.5.pkl的结果文件,其中一条数据是:
'''
(0, [0, 0, 1, 1, 0], [None, None, [[None, None, None, None, None, None]], [[(3330, 1290), None, None, None, None, None]], None], DocSpanInfo(span_token_tup_list=[(121, 121, 121, 127, 121, 126), (3943, 3862, 5500, 819), (4507,), (3330, 1290)], span_dranges_list=[[(0, 5, 11)], [(0, 16, 20)], [(9, 0, 1)], [(12, 10, 12), (13, 8, 10)]], span_mention_range_list=[(0, 1), (1, 2), (2, 3), (3, 5)], mention_drange_list=[(0, 5, 11), (0, 16, 20), (9, 0, 1), (12, 10, 12), (13, 8, 10)], mention_type_list=[1, 3, 5, 7, 7], event_dag_info=[None, None, None, None, [{(): {None}}, {(None,): {None}}, {(None, None): {None}}, {(None, None, None): {None}}, {(None, None, None, None): {None}}, {(None, None, None, None, None): {None}}, {(None, None, None, None, None, None): {None}}, {(None, None, None, None, None, None, None): {None}}, {(None, None, None, None, None, None, None, None): {None}}]], missed_sent_idx_list=[1, 4, 7, 8, 9, 10, 12, 13, 14, 16, 19]), [None, None, [(None, None, None, None, None, None)], [(3, None, None, None, None, None)], None])
'''
请问如何对上述数据进行解析,得到数据集中
'''
"recguid_eventname_eventdict_list": [
[
0,
"EquityPledge",
{
"Pledger": "李华青",
"PledgedShares": "1188600股",
"Pledgee": "海通证券股份有限公司",
"TotalHoldingShares": "22619999股",
"TotalHoldingRatio": "6.41%",
"TotalPledgedShares": "18200000股",
"StartDate": "2018年9月6日",
"EndDate": null,
"ReleasedDate": null
}
],
[
1,
"EquityPledge",
{
"Pledger": "李华青",
"PledgedShares": "12151000股",
"Pledgee": "海通证券股份有限公司",
"TotalHoldingShares": null,
"TotalHoldingRatio": "6.41%",
"TotalPledgedShares": "12151000股",
"StartDate": "2017年12月7日",
"EndDate": null,
"ReleasedDate": null
}
]
]
'''
的结果?
是否有结果解析的相关代码方便提供?
谢谢!

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions