causal_grammar.py 文件源码

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

项目:Causality 作者: vcla 项目源码 文件源码
def get_symbol_matches_from_parse(symbol,parse):
    matches = []
    if "symbol_type" in parse:
        if parse["symbol_type"] == symbol:
            matches.append(parse)
    if "children" in parse:
        for child in parse["children"]:
            child_matches = get_symbol_matches_from_parse(symbol,child)
            matches += child_matches
    return matches
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号