Пример #1
0
 def apply_cb(self, mt, wf1, wf2):
     try:
         if wf1.get_case() == 'nominative' and wf2.get_case() == 'nominative':
             return independentFalse(self.get_name())
         if wf2.get_case() == 'accusative':
             return independentFalse(self.get_name())
         if wf1.get_case() == 'nominative' and wf2.get_case() != 'nominative':
             return possibleTrue(self.get_name())
         if wf1.get_case() != 'nominative' and wf2.get_case() == 'nominative':
             return independentFalse(self.get_name())
     except:
         pass
     return possibleTrue(self.get_name())
Пример #2
0
 def apply_cb(self, mt, prep, noun):
     try:
         if prep.get_case() == noun.get_case():
             return reliableTrue(self.get_name())
         return independentFalse(self.get_name())
     except:
         pass
     return possibleTrue(self.get_name())
Пример #3
0
 def apply_cb(self, mt, adj, noun):
     try:
         if noun.get_case() not in ["ablative", "prepositional"]:
             return independentFalse(self.get_name())
         return reliableTrue(self.get_name())
     except:
         pass
     return possibleTrue(self.get_name())
Пример #4
0
 def apply_cb(self, mt, v1, v2):
     try:
         if v1['time'] != v2['time'] and (v1['time'] == 'infinite' or v2['time'] == 'infinite'):
             return reliableTrue(self.get_name())
         return independentFalse(self.get_name())
     except:
         pass
     return possibleTrue(self.get_name())
Пример #5
0
 def apply_cb(self, mt, pronoun, verb):
     try:
         if pronoun.get_case() == 'nominative' and pronoun.get_count() == verb.get_count():
             return reliableTrue(self.get_name())
         return independentFalse(self.get_name())
     except:
         print traceback.format_exc()
     return possibleTrue(self.get_name())
Пример #6
0
 def apply_cb(self, mt, participal, noun):
     try:
         if noun.get_case() == 'nominative':
             return independentFalse(self.get_name())
         return reliableTrue(self.get_name())
     except:
         print traceback.format_exc()
     return possibleTrue(self.get_name())
Пример #7
0
 def apply_cb(self, mt, noun, adj):
     try:
         if noun.get_case() != adj.get_case():
             return independentFalse(self.get_name())
         return reliableTrue(self.get_name())
     except:
         pass
     return possibleTrue(self.get_name())
Пример #8
0
 def apply_cb(self, mt, wf1, wf2):
     try:
         if wf1.get_case() == wf2.get_case():
             return possibleTrue(self.get_name())
         if wf2.get_case() == 'genitive':
             return possibleTrue(self.get_name())
         return independentFalse(self.get_name())
     except:
         print traceback.format_exc()
     return possibleTrue(self.get_name())
Пример #9
0
 def apply_cb(self, mt, prep, noun):
     if prep.get_position() > noun.get_position():
         return independentFalse(self.get_name())
     return reliableTrue(self.get_name())
Пример #10
0
 def apply_cb(self, mt, adj, noun):
     if noun.get_position() - adj.get_position() > 0:
         return possibleTrue(self.get_name())
     return independentFalse(self.get_name())
Пример #11
0
 def apply_cb(self, mt, adj, adverb):
     if adj.get_position() - adverb.get_position() == 1:
         return possibleTrue(self.get_name())
     return independentFalse(self.get_name())