Changeset 2734


Ignore:
Timestamp:
2001-09-10T10:55:01+12:00 (23 years ago)
Author:
sjboddie
Message:

Chinese text segmentation is now done whenever language="zh" instead of
just when encoding="gb"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/plugins/BasPlug.pm

    r2604 r2734  
    291291    # read in file ($text will be in utf8)
    292292    my $text = "";
    293     $self->read_file ($filename, $encoding, \$text);
     293    $self->read_file ($filename, $encoding, $language, \$text);
    294294
    295295    if (!length ($text)) {
     
    333333sub read_file {
    334334    my $self = shift (@_);
    335     my ($filename, $encoding, $textref) = @_;
     335    my ($filename, $encoding, $language, $textref) = @_;
    336336
    337337    if (!-r $filename)
     
    356356    $reader->read_file ($textref);
    357357
    358     if ($encoding eq "gb") {
     358    if ($language eq "zh") {
    359359        # segment the Chinese words
    360360        $$textref = &cnseg::segment($$textref);
Note: See TracChangeset for help on using the changeset viewer.