Example #1
0
 def gerund_form(self, ctxt) :
     if len(self.args) == 1 :
         return self.gerund
     elif len(self.args) == 2 :
         if self.dereference_dobj :
             dobj = str_with_objs("[the $x]", x=self.args[1])
         else :
             dobj = self.args[1]
         return self.gerund + " " + dobj
     elif len(self.args) == 3 :
         if self.dereference_dobj :
             dobj = str_with_objs("[the $x]", x=self.args[1])
         else :
             dobj = self.args[1]
         if self.dereference_iobj :
             iobj = str_with_objs("[the $x]", x=self.args[2])
         else :
             iobj = self.args[1]
         return (self.gerund[0] + " " + dobj + " " + self.gerund[1] + " " + iobj)
     else :
         raise Exception("Default gerund form only works with 1-3 args")
Example #2
0
 def infinitive_form(self, ctxt) :
     """Doesn't prepend "to"."""
     if len(self.args) == 1 :
         return self.verb
     elif len(self.args) == 2 :
         if self.dereference_dobj :
             dobj = str_with_objs("[the $x]", x=self.args[1])
         else :
             dobj = self.args[1]
         return self.verb + " " + dobj
     elif len(self.args) == 3 :
         if self.dereference_dobj :
             dobj = str_with_objs("[the $x]", x=self.args[1])
         else :
             dobj = self.args[1]
         if self.dereference_iobj :
             iobj = str_with_objs("[the $x]", x=self.args[2])
         else :
             iobj = self.args[1]
         return (self.verb[0] + " " + dobj + " " + self.verb[1] + " " + iobj)
     else :
         raise Exception("Default gerund form only works with 1-3 args")