feature_construction.py 文件源码

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

项目:Automatic-Question-Generation 作者: bwanglzu 项目源码 文件源码
def _pos1_gram_before_answer(self, row, flag):
        """The first POS tag before the answer span is [FLAG]
        - Args:
            row(pandas.dataframe): input pandas dataframe
            flag(string): symbol to match first tagger
        - Returns:
            binary(int): 1 match, 0 not match
        """
        question = row.Question
        if question:
            first_tagger = self._first_tagger_before_answer_span(question)
            if first_tagger == flag:
                return 1
            else:
                return 0
        else:
            return 0
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号