Commit a9a48a44e8ece3f5dc9ef5c3f3c2549e54ece2da

Authored by Bartłomiej Nitoń
1 parent 094a0f2f

Agreement feature fix.

corneferencer/resolvers/features.py
... ... @@ -147,8 +147,8 @@ def ante_contains_rarest_from_ana(ante, ana):
147 147  
148 148 def agreement(ante, ana, tag_name):
149 149 agr_vec = [0] * 3
150   - if (ante.head[tag_name] == 'unk' or ana.head[tag_name] == 'unk'
151   - or ante.head is None or ana.head is None):
  150 + if (ante.head is None or ana.head is None or
  151 + ante.head[tag_name] == 'unk' or ana.head[tag_name] == 'unk'):
152 152 agr_vec[2] = 1
153 153 elif ante.head[tag_name] == ana.head[tag_name]:
154 154 agr_vec[0] = 1
... ...