Skip to content

POS filter - why 'NOUN' and 'VERB' can be replaced by each other #31

@sharon-gao

Description

@sharon-gao

I read the source code in criteria.py, and found the function of pos_filter. However, I don't understand why you have it set this way by considering set([ori_pos, new_pos]) <= set(['NOUN', 'VERB'] as same = True. Is there anyone could explain it? Thank you so much!
def pos_filter(ori_pos, new_pos_list):
same = [True if ori_pos == new_pos or (set([ori_pos, new_pos]) <= set(['NOUN', 'VERB']))
else False
for new_pos in new_pos_list]
return same

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions