SHARE
TWEET

Untitled

a guest Mar 26th, 2019 62 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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])
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top