# Input: one or more sentences (space-delimited sequences of words) # # The transforms are copied directly from lexfilter. while (<>) { chop; @wordlist = split " "; foreach $word (@wordlist) { $word =~ s/([^A-Za-z0-9])/"_".ord($1)."_"/eg; if (substr($word, 0, 1) =~ /[^a-z]/) { substr($word, 0, 0) = "zz__"; } push @outsent, $word; } print "parse(["; print join(", ", @outsent); print "]).\n"; @outsent = (); }