diff --git a/setup.py b/setup.py index f28c5cd..2e4298a 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setup(name='structure_assignment', author_email='cyp@cjvt.si', packages=['structure_assignment'], install_requires=['lxml>=4.9', - 'classla>=2.1', + 'classla==2.1.1', 'cjvt_conversion_utils>=0.3', 'cordex>=1.0.0' ], diff --git a/structure_assignment/assign_other_structures.py b/structure_assignment/assign_other_structures.py index 997e343..972e10d 100644 --- a/structure_assignment/assign_other_structures.py +++ b/structure_assignment/assign_other_structures.py @@ -181,7 +181,6 @@ def create_xml_structure(syntactic_structure): component.set('cid', str(index)) component.set('type', 'core') component.set('label', component_map['label']) - structure_element.set('label', '-'.join([c.get('label') for c in components])) dependencies = lxml.SubElement(structure_element, 'dependencies') for dependency_map in syntactic_structure.dependencies: dependency = lxml.SubElement(dependencies, 'dependency') @@ -191,6 +190,7 @@ def create_xml_structure(syntactic_structure): dependency.set('from', from_index) dependency.set('label', label) dependency.set('to', to_index) + structure_element.set('label', '-'.join([c.get('label') for c in components]) + ';' + '-'.join([d.get('from') + '_' + d.get('to') + '_' + d.get('label') for d in dependencies])) definition = lxml.SubElement(structure_element, 'definition') for (index, component_map) in enumerate(syntactic_structure.components, start=1): component = lxml.SubElement(definition, 'component')