Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sharon-gao opened this issue Sep 13, 2020 · 1 comment
Open

Comments

@sharon-gao
Copy link

sharon-gao commented Sep 13, 2020

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

@jind11
Copy link
Owner

jind11 commented Sep 13, 2020

This is a good question. i have to admit that this expression is trying to bypass the noun and verb sets so that we do filter if both original and new pos belong to noun and verb sets. this is because at the time of experiments, i did not have time to carefully design the fine-grained pos filtering rule and there are several fine-grained subtypes for noun and verb. we need more complex rules to avoid some false negative examples. fo example, a noun can be replaced by a VBG.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants