separated_parenthesis.py 文件源码

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

项目:NLPre 作者: NIHOPA 项目源码 文件源码
def paren_pop(self, parsed_tokens):
        '''
        Args:
            parsed_tokens: a ParseResult object
        Returns:
            content: a list of string sentences
        '''

        # must convert the ParseResult to a list, otherwise adding it to a list
        # causes weird results.
        if isinstance(parsed_tokens, pypar.ParseResults):
            parsed_tokens = parsed_tokens.asList()

        content = self.paren_pop_helper(parsed_tokens)

        return content
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号