diff --git a/lib/PBot/Plugin/FuncBuiltins.pm b/lib/PBot/Plugin/FuncBuiltins.pm index 5e836b58..3a02c437 100644 --- a/lib/PBot/Plugin/FuncBuiltins.pm +++ b/lib/PBot/Plugin/FuncBuiltins.pm @@ -177,9 +177,14 @@ sub func_maybe_the { return $text; } + # special-case some indefinite nouns that Lingua::EN::Tagger treats as plain nouns + if ($word =~ m/(some|any|every|no)(thing|one|body|how|way|where|when|time|place)/i) { + return $text; + } + my $tagged = $self->{tagger}->add_tags($word); - if ($tagged !~ m/^\s*<(?:det|prps?|cd|in|nnp|to|rb|wdt|vbg|rbr|jjr)>/) { + if ($tagged !~ m/^\s*<(?:det|prps?|cd|in|nnp|to|rb|wdt|rbr|jjr)>/) { $text = "the $text"; } diff --git a/lib/PBot/VERSION.pm b/lib/PBot/VERSION.pm index bf1f228b..a43cd5e0 100644 --- a/lib/PBot/VERSION.pm +++ b/lib/PBot/VERSION.pm @@ -25,8 +25,8 @@ use PBot::Imports; # These are set by the /misc/update_version script use constant { BUILD_NAME => "PBot", - BUILD_REVISION => 4559, - BUILD_DATE => "2022-07-10", + BUILD_REVISION => 4560, + BUILD_DATE => "2022-07-14", }; sub initialize {}