Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Mar 14th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. intransitive_dict = {}
  2.  
  3. def is_intrans(d):
  4.     root = list(filter(lambda x: x.head==x, [t for t in d]))[0]
  5.     if root.pos_ == 'VERB':
  6.         children = list(filter(lambda x: x.root.dep_ == 'dobj' and x.root.head == root, d.noun_chunks))
  7.         if not children:
  8.             # intransitive case
  9.             if root.lemma_ in intransitive_dict.keys(): intransitive_dict[root.lemma_] = intransitive_dict[root.lemma_] + 1
  10.             else: intransitive_dict[root.lemma_] = 1
  11.         elif len(children) == 1:
  12.             # transitive case
  13.             ...
  14.         elif len(children) == 2:
  15.             # bitransitive case
  16.             ...
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
 
Top