[PATCH] Add "arsen-" exception to match Snowball version.

Olly Betts <[email protected]>
Newsgroups gmane.comp.search.snowball
Message-ID <20100729022713.GA27039@eisluft>
An "arsen-" exception (for arsenic/arsenal) was added in Nov 2006 to the
Snowball implementation.  Update the C implementation to match this.
---
 output.txt     |    2 ++
 stem_english.c |    3 +++
 voc.txt        |    2 ++
 3 files changed, 7 insertions(+), 0 deletions(-)

_______________________________________________
Snowball-discuss mailing list
[email protected]
http://lists.tartarus.org/mailman/listinfo/snowball-discuss
0001-Add-arsen-exception-to-match-Snowball-version.patch (text/x-patch, 796 B)
diff --git a/output.txt b/output.txt
index 6a15930..d5105c3 100644
--- a/output.txt
+++ b/output.txt
@@ -1410,6 +1410,8 @@ arrow
 arrow
 arrow
 arroyo
+arsenal
+arsenic
 arson
 art
 arter
diff --git a/stem_english.c b/stem_english.c
index 022dd93..ac050c0 100644
--- a/stem_english.c
+++ b/stem_english.c
@@ -433,6 +433,9 @@ static int exception_p1(struct stemmer * z) {
         case 'c':
             if (starts(z, "\06" "commun")) break;
             return FALSE;
+        case 'a':
+            if (starts(z, "\05" "arsen")) break;
+            return FALSE;
         default:
             return FALSE;
     }
diff --git a/voc.txt b/voc.txt
index 0e8df01..77f58d8 100644
--- a/voc.txt
+++ b/voc.txt
@@ -1410,6 +1410,8 @@ arrow
 arrowing
 arrows
 arroyo
+arsenal
+arsenic
 arson
 art
 arter
signature.asc (application/pgp-signature, 835 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iQIcBAEBCAAGBQJMUObzAAoJEBgUewc7rSsHc10P/0Nhm2NSJw9NDjbXiUJl7ZxK
NvgcNv9tZvvwZyinrg3WJI5sGSpye2HLbEtTrG53212zKzFSywRtfxFAv/GhbpiS
l6rhXz1NOGAlMt/rICN+Qj/NZmACMrNa0sFghx39tQRr0xC6H2CyeAEmbgPcFhex
S44WGPZonRoh8/FD3hqajjUN2uij91qrT7MH2u8cDVGCpsUxTCrwfbeQy8osS4jP
wMcLLhE1fJUi/rV/2kL/mHncZXniWCGJX1bsibTXV8V8XDl2xfYiTesL3Twx3efG
HLoS08mpL4a3YrE2UnKqZCwA4uFi9BrgFyksmkfw1OaoqgTNyNsxylSYzurogMCM
0ml7cTWZ63KEfMlBE6URJiiqdaB8ufQloNQOaswvXzFg8IY4/bLXNu572Hr1dX2C
jD8JdXaIFP0XAMVdniGVkrd9oVYi4BUBRxPlha28eG67ecrrEPrSrdr24hwxvKxE
1QLznPFDJW4+5DYRkH/vw85ceBzzJKx2WlTtVeSprmA3K9FTQElkk4mW3hKuv+l2
Lmk5+m+PDDuwghrk6hquYTEclrP9fQoWULgW3Vnlk9DtKSKjrvFA27xXRHUv4a4R
0UyIRjPAUzyIaOUanAYZ1VXrqpkQue/8QpUkV0yfu+2B5uXQO/4aZAGIoZtBO03d
4lF7ts39zgmgv8R8++kK
=lTPy
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.