Changeset 919

Show
Ignore:
Timestamp:
04/06/2008 12:15:44 (3 months ago)
Author:
james
Message:

update plugin

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/plugins/en/output_demon.tcl

    r838 r919  
    2121        bMotion_putloglev 4 * "bMotion_plugin_output_demon $channel $line" 
    2222 
    23  
    2423  set newLine "" 
    2524         
     
    2827  set words [split $line " "] 
    2928 
    30   foreach word $words { 
     29        foreach word $words { 
    3130                regsub -all {o([b-df-hj-np-tv-xz])e(s|ing)?\M} $word {oa\1\2} word 
     31 
     32                # undo one -> oan (only if entire word) 
     33                if {$word == "oan"} { 
     34                        set word "one" 
     35                } 
     36 
     37                #other special cases to fix 
     38                set word [string map -nocase { soam some } $word] 
     39 
     40                # moving on... 
     41                set word [string map -nocase { ain ane } $word] 
    3242                regsub -all {([a-z][aeiou])ck\M} $word {\1q} word 
    3343                regsub -all "don'?t" $word "doan" word 
    3444                regsub -all "didn'?t" $word "din" word 
    3545                append newLine "$word " 
    36   } 
     46        } 
    3747 
    38   set line [string trim $newLine] 
     48        set line [string trim $newLine] 
    3949 
    40   return $line 
     50        return $line 
    4151} 
    4252