determine polnopomenska-beseda components in structure (for now only type='main')
This commit is contained in:
parent
9ae7e1e9f6
commit
30a5e80569
6
wani.py
6
wani.py
|
@ -123,6 +123,10 @@ CATEGORY_BASES = {
|
||||||
"X": ['.'] * 1
|
"X": ['.'] * 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ComponentType(Enum):
|
||||||
|
Other = 0
|
||||||
|
Core = 2
|
||||||
|
Core2w = 3
|
||||||
|
|
||||||
class RestrictionType(Enum):
|
class RestrictionType(Enum):
|
||||||
Morphology = 0
|
Morphology = 0
|
||||||
|
@ -524,6 +528,7 @@ class Component:
|
||||||
def __init__(self, info):
|
def __init__(self, info):
|
||||||
idx = info['cid']
|
idx = info['cid']
|
||||||
name = info['name'] if 'name' in info else None
|
name = info['name'] if 'name' in info else None
|
||||||
|
typ = ComponentType.Core if info['type'] == "core" else ComponentType.Other
|
||||||
|
|
||||||
if 'status' not in info:
|
if 'status' not in info:
|
||||||
status = ComponentStatus.Required
|
status = ComponentStatus.Required
|
||||||
|
@ -543,6 +548,7 @@ class Component:
|
||||||
self.next_element = []
|
self.next_element = []
|
||||||
self.representation = []
|
self.representation = []
|
||||||
self.selection = {}
|
self.selection = {}
|
||||||
|
self.type = typ
|
||||||
|
|
||||||
self.iter_ctr = 0
|
self.iter_ctr = 0
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user