Changeset 1917


Ignore:
Timestamp:
2001-02-07T13:09:29+13:00 (23 years ago)
Author:
kjm18
Message:

minor changes

Location:
trunk/gsdl/perllib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/perllib/mgppbuilder.pm

    r1852 r1917  
    135135    }
    136136
     137    # make sure that the same index isn't specified more than once
     138    my %tmphash = ();
     139    my @tmparray = @{$self->{'collect_cfg'}->{'indexes'}};
     140    $self->{'collect_cfg'}->{'indexes'} = [];
     141    foreach my $i (@tmparray) {
     142    if (!defined ($tmphash{$i})) {
     143        push (@{$self->{'collect_cfg'}->{'indexes'}}, $i);
     144        $tmphash{$i} = 1;
     145    }
     146    }
     147
     148
    137149    # get the levels (Section, Paragraph) for indexing and compression
    138150    $self->{'levels'} = {};
     
    150162   
    151163    # load all the plugins
    152     $self->{'pluginfo'} = &plugin::load_plugins ($plugins);
     164    $self->{'pluginfo'} = &plugin::load_plugins ($plugins, $verbosity, $outhandle);
    153165    if (scalar(@{$self->{'pluginfo'}}) == 0) {
    154166    print $outhandle "No plugins were loaded.\n";
     
    163175   
    164176    # load all the classifiers
    165     $self->{'classifiers'} = &classify::load_classifiers ($classifiers, $outhandle);
     177    $self->{'classifiers'} = &classify::load_classifiers ($classifiers, $build_dir, $outhandle);
    166178
    167179    # load up any dontgdbm fields
  • trunk/gsdl/perllib/mgppbuildproc.pm

    r1852 r1917  
    324324    # output all the section metadata
    325325    my $metadata = $doc_obj->get_all_metadata ($section);
    326     foreach $pair (@$metadata) {
     326    foreach my $pair (@$metadata) {
    327327        my ($field, $value) = (@$pair);
    328328
     
    482482
    483483    # see if this document belongs to this subcollection
    484     foreach $indexexp (@{$self->{'indexexparr'}}) {
     484    foreach my $indexexp (@{$self->{'indexexparr'}}) {
    485485    $indexed_doc = 0;
    486486    my ($field, $exp, $options) = split /\//, $indexexp;
     
    525525    }
    526526    my $doc_section = 0; # just for this document
    527     my $text = "";
    528     if ($self->{'num_docs'} == 1) {
    529     $text = "<Document>\n";
    530     }
    531     else {
    532     $text = "</Document><Document>\n";
    533     }
    534     my $text_extra = "";
    535 
     527    my $text = "<Document>\n";
     528   
    536529    # get the text for this document
    537530    my $section = $doc_obj->get_top_section();
     
    544537    if ($indexed_doc) {
    545538        $self->{'num_bytes'} += $doc_obj->get_text_length ($section);
    546         foreach $field (split (/,/, $fields)) {
     539        foreach my $field (split (/,/, $fields)) {
    547540        # only deal with this field if it doesn't start with top or
    548541        # this is the first section
     
    618611            $self->filter_text ($field, $new_text);
    619612
    620             #????????????????????
    621             if ($self->{'indexing_text'} &&
    622             $new_text =~ /[\(\)\{\}]/) {
    623             }
    624613            $self->{'num_processed_bytes'} += length ($new_text);
    625614            $text .= "$new_text";
     
    630619    $section = $doc_obj->get_next_section($section);
    631620    } #while defined section
    632     print $handle "$text";
     621    print $handle "$text\n</Document>\n";
    633622}
    634623
Note: See TracChangeset for help on using the changeset viewer.