Ignore:
Timestamp:
2008-08-04T13:45:45+12:00 (16 years ago)
Author:
kjdon
Message:

now segments all metadata as well as text

File:
1 edited

Legend:

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

    r16640 r16646  
    7373    while (defined $thissection) {
    7474       
     75        # segment the text
    7576        my $text = $doc_obj->get_text($thissection);
    7677        $text = &cnseg::segment($text);
    7778        $doc_obj->add_utf8_text($thissection, $text);
     79
     80        # and now the metadata
     81        my $metadataref = $doc_obj->get_all_metadata($thissection);
     82        foreach my $data (@$metadataref) {
     83        $data->[1] = &cnseg::segment($data->[1]);
     84        }
    7885        $thissection = $doc_obj->get_next_section ($thissection);
    7986    }
Note: See TracChangeset for help on using the changeset viewer.