Ignore:
Timestamp:
08/10/09 19:27:02 (3 years ago)
Author:
james
Message:

add present participle bits

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/modules/output.tcl

    r1010 r1017  
    830830 
    831831# 
    832 # makes a work past tense... probably best only use it on verbs :P 
     832# makes a word past tense... probably best only use it on verbs :P 
    833833proc bMotion_make_past_tense { word } { 
    834834 
     
    837837        regexp -nocase {^(\w+)( (.+))?} $word matches verb extra 
    838838        set newverb "" 
    839  
    840         putlog "working with $verb" 
    841839 
    842840        # handle irregual verbs 
     
    897895} 
    898896 
     897# 
     898# makes a word into present participle 
     899proc bMotion_make_present_participle { word } { 
     900 
     901        # check if we got passed a multi-part verb (sit on) 
     902        set extra "" 
     903        regexp -nocase {^(\w+)( (.+))?} $word matches verb extra 
     904        set newverb "" 
     905 
     906 
     907        if [regexp -nocase {(.+[^i])e$} $verb matches a] { 
     908                return "${a}ing$extra" 
     909        } 
     910 
     911        if [regexp -nocase {(.+[aeiou])([^aeiouy])$} $verb matches a b] { 
     912                return "${a}${b}${b}ing$extra" 
     913        } 
     914 
     915        return "${verb}ing$extra" 
     916} 
    899917 
    900918# 
Note: See TracChangeset for help on using the changeset viewer.