diff --git a/libstemmer_java.tgz b/libstemmer_java.tgz new file mode 100644 index 0000000..031300f Binary files /dev/null and b/libstemmer_java.tgz differ diff --git a/snowball-BSD-license.txt b/snowball-BSD-license.txt new file mode 100644 index 0000000..c40db43 --- /dev/null +++ b/snowball-BSD-license.txt @@ -0,0 +1,25 @@ +Copyright (c) 2001, Dr Martin Porter, and (for the Java developments) +Copyright (c) 2002, Richard Boulton. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF +LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. \ No newline at end of file diff --git a/snowball-java.spec b/snowball-java.spec new file mode 100644 index 0000000..0165128 --- /dev/null +++ b/snowball-java.spec @@ -0,0 +1,56 @@ +Name: snowball-java +Version: 0 +Release: 1 +Summary: Java stemming algorithm library +License: BSD +URL: http://snowball.tartarus.org +Source0: http://snowball.tartarus.org/dist/libstemmer_java.tgz +Source1: snowball-template-pom.xml +Source2: snowball-notice.txt +Source3: snowball-BSD-license.txt +Patch0: snowball-remove-unreachable-statement.patch + +BuildArch: noarch +BuildRequires: maven-local + +%description +Snowball is a small string processing language +designed for creating stemming algorithms +for use in Information Retrieval. +This package contains all you need to include the +snowball stemming algorithms into a Java +project of your own. If you use this, +you don't need to use the snowball compiler, +or worry about the internals of the +stemmers in any way. + +%package javadoc +Summary: Javadoc for %{name} +%description javadoc +This package contains javadoc for %{name}. + +%prep +%setup -q -n libstemmer_java +%patch0 -p0 +cp -p %{SOURCE1} pom.xml +sed -i "s|@VERSION@|%{version}|" pom.xml +cp -p %{SOURCE2} notice.txt +cp -p %{SOURCE3} license.txt +sed -i 's/\r//' license.txt notice.txt +%mvn_file : %{name} + +%build +%mvn_build + +%install +%mvn_install + +%files -f .mfiles +%license license.txt notice.txt + +%files javadoc -f .mfiles-javadoc +%license license.txt notice.txt + +%changelog +* Thu Jul 30 2020 maminjie - 0-1 +- package init diff --git a/snowball-java.yaml b/snowball-java.yaml new file mode 100644 index 0000000..4651cc2 --- /dev/null +++ b/snowball-java.yaml @@ -0,0 +1,4 @@ +version_control: git +src_repo: https://github.com/snowballstem/snowball.git +tag_prefix: ^v +seperator: "." diff --git a/snowball-notice.txt b/snowball-notice.txt new file mode 100644 index 0000000..1de37d8 --- /dev/null +++ b/snowball-notice.txt @@ -0,0 +1,11 @@ +All the software given out on this Snowball site is covered by the BSD License +(see http://www.opensource.org/licenses/bsd-license.html ), with Copyright (c) 2001, +Dr Martin Porter, and (for the Java developments) Copyright (c) 2002, Richard Boulton. + +Essentially, all this means is that you can do what you like with the code, +except claim another Copyright for it, or claim that it is issued under a different license. +The software is also issued without warranties, which means that if anyone suffers through its use, +they cannot come back and sue you. You also have to alert anyone to whom you give the +Snowball software to the fact that it is covered by the BSD license. + +We have not bothered to insert the licensing arrangement into the text of the Snowball software. \ No newline at end of file diff --git a/snowball-remove-unreachable-statement.patch b/snowball-remove-unreachable-statement.patch new file mode 100644 index 0000000..46f6be8 --- /dev/null +++ b/snowball-remove-unreachable-statement.patch @@ -0,0 +1,29 @@ +--- java/org/tartarus/snowball/ext/frenchStemmer.java 2013-04-28 08:01:24.000000000 +0200 ++++ java/org/tartarus/snowball/ext/frenchStemmer.java-gil 2013-09-02 18:17:56.055397810 +0200 +@@ -997,7 +997,7 @@ + // <-, line 155 + slice_from("ant"); + return false; +- break; ++ //break; + case 14: + // (, line 156 + // call RV, line 156 +@@ -1010,7 +1010,7 @@ + // <-, line 156 + slice_from("ent"); + return false; +- break; ++ //break; + case 15: + // (, line 158 + // test, line 158 +@@ -1031,7 +1031,7 @@ + // delete, line 158 + slice_del(); + return false; +- break; ++ //break; + } + return true; + } diff --git a/snowball-template-pom.xml b/snowball-template-pom.xml new file mode 100644 index 0000000..ae154a5 --- /dev/null +++ b/snowball-template-pom.xml @@ -0,0 +1,53 @@ + + 4.0.0 + + org.tartarus + snowball + jar + @VERSION@ + + Snowball + 2002 + http://snowball.tartarus.org/ + Snowball is a small string processing language designed for creating stemming algorithms for use in Information Retrieval. + + + UTF-8 + + + + + + + target + + java + java + + target/classes + target/test-classes + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.0 + + true + 128m + 512m + 1.6 + 1.6 + + + + +