Skip Menu |
 

This queue is for tickets about the Lingua-EN-Inflect-Phrase CPAN distribution.

Report information
The Basics
Id: 118767
Status: resolved
Priority: 0/
Queue: Lingua-EN-Inflect-Phrase

People
Owner: Nobody in particular
Requestors: dolmen [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.18
Fixed in: (no value)



Subject: to_PL("Functionality")
perl -MLingua::EN::Inflect::Phrase=to_PL -E 'say to_PL("functionality")'
functionalities
perl -MLingua::EN::Inflect::Phrase=to_PL -E 'say to_PL("Functionality")'
Functionalitys

I expect the plural to be "Functionalities" (but I'm not a native english writer).

-- 
Olivier Mengué - http://perlresume.org/DOLMEN
Download (untitled) / with headers
text/plain 935b
Looking into this as part of CPAN Pull Request Challenge :) On Mon Nov 14 16:52:49 2016, DOLMEN wrote: Show quoted text
> perl -MLingua::EN::Inflect::Phrase=to_PL -E 'say to_PL("functionality")' > functionalities > perl -MLingua::EN::Inflect::Phrase=to_PL -E 'say to_PL("Functionality")' > Functionalitys > > I expect the plural to be "Functionalities" (but I'm not a native english > writer).
I traced this to Lingua::EN::Inflect treating "Functionality" as a '$classical{name}' -type word, specifically at line 1158: DB<40> s DB::DB(/home/zakame/.plenv/versions/5.26.1/lib/perl5/site_perl/5.26.1/Lingua/EN/Inflect.pm:1158): 1158: $word =~ /([A-Z].*y)$/ and $classical{names} and return "$1s"; DB<40> x $classical{names} 0 1 DB<41> x $word =~ /([A-Z].*y)$/ 0 'Functionality' DB<42> x $word =~ /([A-Z].*y)$/ and "$1s" 0 'Functionalitys' Now I'm not sure how to resolve this in Lingua::EN::Inflect::Phrase, if at all. Cheers, Zak
Download (untitled) / with headers
text/plain 1.1k
On Tue Jan 23 06:48:05 2018, ZAKAME wrote: Show quoted text
> Looking into this as part of CPAN Pull Request Challenge :) > > On Mon Nov 14 16:52:49 2016, DOLMEN wrote:
> > perl -MLingua::EN::Inflect::Phrase=to_PL -E 'say > > to_PL("functionality")' > > functionalities > > perl -MLingua::EN::Inflect::Phrase=to_PL -E 'say > > to_PL("Functionality")' > > Functionalitys > > > > I expect the plural to be "Functionalities" (but I'm not a native > > english > > writer).
> > I traced this to Lingua::EN::Inflect treating "Functionality" as a > '$classical{name}' -type word, specifically at line 1158: > > DB<40> s > DB::DB(/home/zakame/.plenv/versions/5.26.1/lib/perl5/site_perl/5.26.1/Lingua/EN/Inflect.pm:1158): > 1158: $word =~ /([A-Z].*y)$/ and $classical{names} and return > "$1s"; > DB<40> x $classical{names} > 0 1 > DB<41> x $word =~ /([A-Z].*y)$/ > 0 'Functionality' > DB<42> x $word =~ /([A-Z].*y)$/ and "$1s" > 0 'Functionalitys' > > Now I'm not sure how to resolve this in Lingua::EN::Inflect::Phrase, > if at all.
I have a PR for this in https://github.com/rkitover/lingua-en-inflect-phrase/pull/2 though probably still needs work.
Download (untitled) / with headers
text/plain 208b
On Tue Jan 30 02:01:05 2018, ZAKAME wrote: ... Show quoted text
> I have a PR for this in https://github.com/rkitover/lingua-en-inflect- > phrase/pull/2 though probably still needs work.
Uploaded 0.19 with zakame's fixes.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.