Lingua-EN-Grammarian
view release on metacpan or search on metacpan
lib/Lingua/EN/Grammarian.pm view on Meta::CPAN
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
$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 1.084 second using v1.01-cache-2.11-cpan-49f99fa48dc )