Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pymorphy2
- import sys
- morph = pymorphy2.MorphAnalyzer()
- string = ''.join([i if i.isalpha() else ' ' for i in ' '.join(list(map(lambda x: x.strip(),
- sys.stdin)))]).split()
- for j in string:
- if 'NOUN' in morph.tag(j)[0] and morph.parse(j)[0][3] > 0.5:
- print(j, morph.tag(j)[0], morph.parse(j)[0][3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement