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
feature_construction.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录