Lingua-EN-Grammarian
view release on metacpan or search on metacpan
lib/Lingua/EN/Grammarian.pm view on Meta::CPAN
154155156157158159160161162163164165166167168169170171172173174
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
374375376377378379380381382383384385386387388389390391392393394
$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 )