--- loncom/localize/localize/x_chef.pm 2007/11/06 19:35:12 1.3 +++ loncom/localize/localize/x_chef.pm 2007/11/06 20:01:37 1.4 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Russian Localization Lexicon # -# $Id: x_chef.pm,v 1.3 2007/11/06 19:35:12 albertel Exp $ +# $Id: x_chef.pm,v 1.4 2007/11/06 20:01:37 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -96,6 +96,7 @@ sub create_parser { chef: token(s) /\z/ token: end_of_sentence + | quant | Bbork | an | An | au | Au @@ -119,6 +120,7 @@ sub create_parser { end_of_sentence: /[.?!]+/ /\s+/ { $niw = 0; $i_seen = 0; $Apache::localize::x_chef::result .= $item[1] . "\nBork Bork Bork!\n" } Bbork: /([Bb]ork)/ ...NW { $Apache::localize::x_chef::result .= "$1" } + quant: /(\[.+?\])/ { $Apache::localize::x_chef::result .= $1; } an: /an/ { $niw = 1; $Apache::localize::x_chef::result .= 'un' } An: /An/ { $niw = 1; $Apache::localize::x_chef::result .= 'Un' } au: /au/ { $niw = 1; $Apache::localize::x_chef::result .= 'oo' } @@ -154,6 +156,15 @@ sub create_parser { }; } +sub quant { + my $self = shift; + return &chefify2($self->SUPER::quant(@_)); +} +sub numerate { + my $self = shift; + return &chefify2($self->SUPER::numerate(@_)); +} + sub chefify2 { my ($str) = @_; my $backup=$str;