Esempio n. 1
0
 def __init__(self, name, bases, attys):
     super(EventMetaclass, self).__init__(name, bases, attys)
     lower_name = lower(name, ' ')
     self.nominative = attys.get('nominative', lower_name)
     self.present = attys.get('present', self.nominative + 's')
     self.past = attys.get('past', self.nominative + 'ed')
     self.past_perfect = attys.get('past_perfect', self.past)
     self.events[name] = self
     self.events_by_nominative[self.nominative] = self
     self.events_by_present[self.present] = self
Esempio n. 2
0
 def event_(self, subject, verb, object = None, *modifiers, **transitives):
     parts = []
     parts.append(self.verb(subject, verb))
     parts.insert(0, self.noun(subject))
     if object is not None:
         parts.append(self.noun(object, subject))
     for modifier in modifiers:
         parts.append(modifier)
     for modifier, object in transitives.items():
         parts.append([lower(modifier, ' '), self.noun(object, subject)])
     return sentential(parts)
Esempio n. 3
0
 def singular(self):
     return lower(self.__class__.__name__, ' ')