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

Caolán McNamara caolanm at fedoraproject.org
Thu Oct 11 13:29:36 UTC 2012


commit 158199ca354838fa777bb9ad447d6b3abc1ca70e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Oct 11 14:29:20 2012 +0100

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

 hunspell-en-irregular-plural-possessive.patch |   18 ++++++++++++++++++
 hunspell-en.spec                              |    8 +++++++-
 2 files changed, 25 insertions(+), 1 deletions(-)
---
diff --git a/hunspell-en-irregular-plural-possessive.patch b/hunspell-en-irregular-plural-possessive.patch
new file mode 100644
index 0000000..f6f030d
--- /dev/null
+++ b/hunspell-en-irregular-plural-possessive.patch
@@ -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", at 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) {
diff --git a/hunspell-en.spec b/hunspell-en.spec
index b564258..59ef510 100644
--- a/hunspell-en.spec
+++ b/hunspell-en.spec
@@ -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 at 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 at redhat.com> - 0.20110318-8
 - Related: rhbz#850709 fix requires
 


More information about the scm-commits mailing list