Esempio n. 1
0
File: case.py Progetto: sonoisa/pasa
 def __init__(self, yaml):
     self.part = get_or_else(yaml, 'part', "")
     self.causative_part = get_or_else(yaml, 'causative_part', "")
     self.passive_part = get_or_else(yaml, 'passive_part', "")
     self.noun = get_or_else(yaml, 'noun', "")
     self.category = get_or_else(yaml, 'category', "")
     self.semrole = get_or_else(yaml, 'semrole', "")
     self.arg = get_or_else(yaml, 'arg', "")
     self.weight = get_or_else(yaml, 'weight', 0.0)
Esempio n. 2
0
 def __init__(self, yaml):
     self.verb = get_or_else(yaml, 'verb', "")
     self.frame = list(
         map(lambda s: Semantic(s), get_or_else(yaml, 'frame', [])))
Esempio n. 3
0
 def __init__(self, yaml):
     self.entry = get_or_else(yaml, 'entry', "")
     self.phrase = get_or_else(yaml, 'phrase', [])
     self.patterns = list(
         map(lambda p: Pattern(p), get_or_else(yaml, 'patterns', [])))
Esempio n. 4
0
File: case.py Progetto: sonoisa/pasa
 def __init__(self, yaml):
     self.base = get_or_else(yaml, 'base', "")
     self.read = get_or_else(yaml, 'read', "")
     self.pos = get_or_else(yaml, 'pos', "")
Esempio n. 5
0
 def __init__(self, yaml):
     self.cases = list(map(lambda c: Case(c), get_or_else(yaml, 'cases', [])))
Esempio n. 6
0
 def __init__(self, yaml):
     self.head = get_or_else(yaml, 'head', "")
     self.support = get_or_else(yaml, 'support', "")
     self.instance = list(
         map(lambda s: Instance(s), get_or_else(yaml, 'instance', [])))
Esempio n. 7
0
 def __init__(self, yaml):
     self.entry = get_or_else(yaml, 'entry', "")
     self.negative = Feature(get_or_else(yaml, 'negative', {}))
     self.positive = Feature(get_or_else(yaml, 'positive', {}))
Esempio n. 8
0
 def __init__(self, yaml):
     self.category_name = get_or_else(yaml, 'category_name', "")
     self.noun = set(get_or_else(yaml, 'noun', []))
Esempio n. 9
0
 def __init__(self, yaml):
     self.polarity = get_or_else(yaml, 'polarity', "")
     self.category = get_or_else(yaml, 'category', [])
     self.sentelem = get_or_else(yaml, 'sentelem', [])
     self.voice = get_or_else(yaml, 'voice', [])
     self.mood = get_or_else(yaml, 'mood', [])
Esempio n. 10
0
 def __init__(self, yaml):
     self.semantic = get_or_else(yaml, 'semantic', "")
     yinstance = get_or_else(yaml, 'instance', [])
     self.instance = list(map(lambda i: Instance(i), yinstance if yinstance is not None else []))
Esempio n. 11
0
 def __init__(self, yaml):
     self.noun = get_or_else(yaml, 'noun', "")
     self.part = get_or_else(yaml, 'part', "")
     self.category = get_or_else(yaml, 'category', "")
     self.semrole = get_or_else(yaml, 'semrole', "")
     self.arg = get_or_else(yaml, 'arg', "")
Esempio n. 12
0
 def __init__(self, yaml):
     self.form = get_or_else(yaml, 'form', [])
     self.ctype = get_or_else(yaml, 'ctype', "")