Shaltiel commited on
Commit
7914f31
·
verified ·
1 Parent(s): d575ce5

Fix for UD conversion of mark special case

Browse files
Files changed (1) hide show
  1. BertForJointParsing.py +1 -1
BertForJointParsing.py CHANGED
@@ -510,7 +510,7 @@ def ud_get_prefix_dep(pre, word, word_idx):
510
 
511
  # shin goes to the main word for verbs, otherwise follows the word
512
  if pre.endswith('ש'):
513
- does_follow_main = word['morph']['pos'] != 'VERB'
514
  func = 'mark'
515
  # vuv goes to the main word if the function is in the list, otherwise follows
516
  elif pre == 'ו':
 
510
 
511
  # shin goes to the main word for verbs, otherwise follows the word
512
  if pre.endswith('ש'):
513
+ does_follow_main = word['morph']['pos'] != 'VERB' and word['syntax']['dep_head_idx'] > word_idx
514
  func = 'mark'
515
  # vuv goes to the main word if the function is in the list, otherwise follows
516
  elif pre == 'ו':