Lingua-EN-Grammarian

 view release on metacpan or  search on metacpan

lib/Lingua/EN/Grammarian.pm  view on Meta::CPAN

154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
                qq{$+{root}*};
                }xmse;
 
    return @inflexions ? map { my $infl = $term; $infl =~ s{[*]}{$_}; $infl} @inflexions
                       : $term;
}
 
# Parse cautions file and convert to internal data structures...
sub _load_cautions {
    # Gather config from current directory and home directory...
    local @ARGV = grep { -e }
                  map { ("$_.$CAUTIONS_FILE", "$_$CAUTIONS_FILE") }
                  @CONFIG_PATH;
 
    # If no config, we're done...
    return if !@ARGV;
 
    # Store sets of terms together...
    my @term_sets = { terms => [], defns => [], inflexions => [] };
 
    # Parse configuration file...

lib/Lingua/EN/Grammarian.pm  view on Meta::CPAN

374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
            $errors[4] .=  " --> rather $mod $adj";
            $errors[5] .=  " -->   very $mod $adj";
        }
    }
 
    return @errors;
}
 
sub _load_errors {
    # Gather config from search path
    local @ARGV = grep { -e }
                  map { ("$_.$ERRORS_FILE", "$_$ERRORS_FILE") }
                  @CONFIG_PATH;
 
    # If no config, we're done...
    return if !@ARGV;
 
    # Extract corrections...
    my @regex_components;
    my $explanation = '????';
    my $last_was_explanation = 1;



( run in 0.608 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )