Changeset 17212
- Timestamp:
- 2008-09-08T13:37:40+12:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/plugins/BasePlugin.pm
r17026 r17212 625 625 my $best_encoding = undef; 626 626 627 # get the language/encoding of the fileusing textcat627 # get the language/encoding of the textstring using textcat 628 628 $self->{'textcat'} = new textcat() unless defined($self->{'textcat'}); 629 #my $results = $self->{'textcat'}->classify(\$text);630 629 my $results = $self->{'textcat'}->classify_cached_filename(\$text); 631 630 … … 635 634 } 636 635 637 ## print STDERR "**** TEXTCAT RESULTS for $text: ";638 ## print STDERR join(",", @$results);639 ## print STDERR "\n";640 641 636 # We have some results, we choose the first 642 637 my ($language, $encoding) = $results->[0] =~ /^([^-]*)(?:-(.*))?$/;
Note:
See TracChangeset
for help on using the changeset viewer.