Advertisement
Guest User

Untitled

a guest
Mar 26th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.39 KB | None | 0 0
  1. import pymorphy2
  2. import sys
  3.  
  4.  
  5. morph = pymorphy2.MorphAnalyzer()
  6. string = ''.join([i if i.isalpha() else ' ' for i in ' '.join(list(map(lambda x: x.strip(),
  7.                                                                        sys.stdin)))]).split()
  8. for j in string:
  9.     if 'NOUN' in morph.tag(j)[0] and morph.parse(j)[0][3] > 0.5:
  10.         print(j, morph.tag(j)[0], morph.parse(j)[0][3])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement