Datasets:
cjvt
/

Modalities:
Text
Languages:
Slovenian
Libraries:
Datasets
License:
Matej Klemen commited on
Commit
43ed7c5
1 Parent(s): 8067832

Handle DERIV-* named ent. tags

Browse files
Files changed (1) hide show
  1. janes_tag.py +2 -0
janes_tag.py CHANGED
@@ -65,6 +65,8 @@ def word_info(wordlike_tag, _namespace):
65
 
66
  if wordlike_tag.tag == f"{_namespace}seg":
67
  ne_tag = wordlike_tag.attrib["subtype"].strip().upper()
 
 
68
 
69
  for _child in wordlike_tag:
70
  _child_words, _child_lemmas, _child_msds, _child_nes = word_info(_child, _namespace)
 
65
 
66
  if wordlike_tag.tag == f"{_namespace}seg":
67
  ne_tag = wordlike_tag.attrib["subtype"].strip().upper()
68
+ if ne_tag.startswith("DERIV-"):
69
+ ne_tag = ne_tag[len("DERIV-"):]
70
 
71
  for _child in wordlike_tag:
72
  _child_words, _child_lemmas, _child_msds, _child_nes = word_info(_child, _namespace)