Redmine #1487: extended generated structure labels to include dependencies
This commit is contained in:
parent
308164742d
commit
9e98ca4a6c
2
setup.py
2
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'
|
||||
],
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue
Block a user