Changeset 16646

Show
Ignore:
Timestamp:
04.08.2008 13:45:45 (11 years ago)
Author:
kjdon
Message:

now segments all metadata as well as text

Files:
1 modified

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    }