causal_grammar.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:Causality 作者: vcla 项目源码 文件源码
def get_actions_from_parse(parse):
    actions = []
    if "symbol_type" in parse:
        if parse["symbol_type"] == "event":
            #tmp_event, tmp_event_value = parse["symbol"].rsplit("_",1)
            actions.append(parse["symbol"])
    if "children" in parse:
        for child in parse["children"]:
            child_actions = get_actions_from_parse(child)
            actions += child_actions
    return actions
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号