Datasets:
Tasks:
Token Classification
Languages:
Slovenian
Size:
1K - 10K
Tags:
metaphor-classification
metonymy-classification
metaphor-frame-classification
multiword-expression-detection
License:
Matej Klemen
commited on
Commit
•
6e8e9d6
1
Parent(s):
b8e1a39
Fix bug in parsing of deeper level nested segments
Browse files
gkomet.py
CHANGED
@@ -114,7 +114,8 @@ def seg_info(sent_el):
|
|
114 |
if res[0] == EL_LEAF:
|
115 |
latest_element.extend(res[2])
|
116 |
else:
|
117 |
-
deeper_elements.
|
|
|
118 |
latest_element.extend(res[3])
|
119 |
|
120 |
return ann_type, subtype, deeper_elements, latest_element
|
@@ -125,7 +126,7 @@ def seg_info(sent_el):
|
|
125 |
continue
|
126 |
|
127 |
ann_type, subtype, deeper_elements, latest_element = _resolve_recursively(child_el)
|
128 |
-
annotations.extend(
|
129 |
annotations.append((ann_type, subtype, latest_element))
|
130 |
|
131 |
return annotations
|
|
|
114 |
if res[0] == EL_LEAF:
|
115 |
latest_element.extend(res[2])
|
116 |
else:
|
117 |
+
deeper_elements.extend(res[2])
|
118 |
+
deeper_elements.append((res[0], res[1], res[3]))
|
119 |
latest_element.extend(res[3])
|
120 |
|
121 |
return ann_type, subtype, deeper_elements, latest_element
|
|
|
126 |
continue
|
127 |
|
128 |
ann_type, subtype, deeper_elements, latest_element = _resolve_recursively(child_el)
|
129 |
+
annotations.extend(deeper_elements)
|
130 |
annotations.append((ann_type, subtype, latest_element))
|
131 |
|
132 |
return annotations
|