Exemple #1
0
 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)
Exemple #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', [])))
Exemple #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', [])))
Exemple #4
0
 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', "")
Exemple #5
0
 def __init__(self, yaml):
     self.cases = list(map(lambda c: Case(c), get_or_else(yaml, 'cases', [])))
Exemple #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', [])))
Exemple #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', {}))
Exemple #8
0
 def __init__(self, yaml):
     self.category_name = get_or_else(yaml, 'category_name', "")
     self.noun = set(get_or_else(yaml, 'noun', []))
Exemple #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', [])
Exemple #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 []))
Exemple #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', "")
Exemple #12
0
 def __init__(self, yaml):
     self.form = get_or_else(yaml, 'form', [])
     self.ctype = get_or_else(yaml, 'ctype', "")