Commit d5a75fe6ac9801a9a79ff7b71bc1399c641b8f40

Authored by Bartłomiej Nitoń
1 parent 1ed6921e

Head_vec feature fix.

corneferencer/resolvers/features.py
... ... @@ -7,7 +7,10 @@ from corneferencer.resolvers import constants
7 7  
8 8 # mention features
9 9 def head_vec(mention):
10   - return list(get_wv(W2V_MODEL, mention.head['base']))
  10 + head_base = mention.head_orth
  11 + if mention.head is not None:
  12 + head_base = mention.head['base']
  13 + return list(get_wv(W2V_MODEL, head_base))
11 14  
12 15  
13 16 def first_word_vec(mention):
... ...