add possessive forms of irregular plurals for en-US, e.g. men's, women's

This commit is contained in:
Caolán McNamara 2012-10-11 14:29:20 +01:00
parent a19d93a344
commit 158199ca35
2 changed files with 25 additions and 1 deletions

View File

@ -0,0 +1,18 @@
--- wordlist.orig/scowl/src/add-affixes 2012-10-11 13:05:58.864864580 +0100
+++ wordlist/scowl/src/add-affixes 2012-10-11 14:11:05.144908897 +0100
@@ -74,6 +74,15 @@
@a = grep {not $remove{"$w:$p:$_"}} @a;
next unless @a;
$lookup{$w} .= join("\n",@a)."\n";
+ next unless $p eq 'N';
+
+ # For irregular nouns that have plurals that do not end in s
+ # then add the possessive form of the plural as well
+ foreach (@a) {
+ next unless (substr($_,-1,1) ne 's');
+ $possessive{$_} = "$_\'s\n";
+ $lookup{$w} .= $possessive{$_};
+ }
}
unless ($no_possessive) {

View File

@ -2,7 +2,7 @@ Name: hunspell-en
Summary: English hunspell dictionaries
%define upstreamid 20110318
Version: 0.%{upstreamid}
Release: 8%{?dist}
Release: 9%{?dist}
#svn co https://wordlist.svn.sourceforge.net/svnroot/wordlist/trunk wordlist
Source0: wordlist-%{upstreamid}.tar.bz2
Source1: http://en-gb.pyxidium.co.uk/dictionary/en_GB.zip
@ -23,6 +23,8 @@ Patch5: hunspell-en-SI_and_IEC.patch
Patch6: hunspell-en-calender.patch
#valid English words that are archaic or rare in en-GB but not in en-IE
Patch7: en_IE.supplemental.patch
#See https://sourceforge.net/tracker/?func=detail&aid=3576342&group_id=10079&atid=1014602 add possessive forms of irregular plurals
Patch8: hunspell-en-irregular-plural-possessive.patch
Group: Applications/Text
URL: http://wordlist.sourceforge.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -63,6 +65,7 @@ UK English hunspell dictionaries
%patch5 -p1 -b .SI_and_IEC
%patch6 -p1 -b .calender
%patch7 -p1 -b .en_IE
%patch8 -p1 -b .possessive-plurals
%build
make
@ -120,6 +123,9 @@ rm -rf $RPM_BUILD_ROOT
%{_datadir}/myspell/en_GB.*
%changelog
* Thu Oct 11 2012 Caolán McNamara <caolanm@redhat.com> - 0.20110318-9
- add possessive forms of irregular plurals for en-US, e.g. men's, women's
* Mon Aug 27 2012 Caolán McNamara <caolanm@redhat.com> - 0.20110318-8
- Related: rhbz#850709 fix requires