mirror of https://github.com/apache/lucene.git
LUCENE-9925: add checksums to snowball-generated files (#80)
This commit is contained in:
parent
b23e261786
commit
0b1d8ccba6
|
@ -17,6 +17,8 @@
|
|||
|
||||
import org.apache.tools.ant.taskdefs.condition.Os
|
||||
|
||||
def resources = scriptResources(buildscript)
|
||||
|
||||
apply plugin: "de.undercouch.download"
|
||||
|
||||
configure(project(":lucene:analysis:common")) {
|
||||
|
@ -34,8 +36,8 @@ configure(project(":lucene:analysis:common")) {
|
|||
snowballWebsiteDir = file("${snowballWorkDir}/website-${snowballWebsiteCommit}")
|
||||
snowballDataDir = file("${snowballWorkDir}/data-${snowballDataCommit}")
|
||||
|
||||
snowballPatchFile = rootProject.file("gradle/generation/snowball.patch")
|
||||
snowballScript = rootProject.file("gradle/generation/snowball.sh")
|
||||
snowballPatchFile = file("${resources}/snowball.patch")
|
||||
snowballScript = file("${resources}/snowball.sh")
|
||||
}
|
||||
|
||||
def unpackFromZip = { zipFile, targetDir ->
|
||||
|
@ -91,14 +93,31 @@ configure(project(":lucene:analysis:common")) {
|
|||
|
||||
// runs shell script to regenerate stemmers, base stemming subclasses, test data, and stopwords.
|
||||
task snowball() {
|
||||
description "Regenerates snowball stemmers."
|
||||
description "Regenerate snowball stemmers."
|
||||
group "generation"
|
||||
|
||||
inputs.files fileTree(
|
||||
dir: "src/java/org/tartarus/snowball",
|
||||
include: [
|
||||
"Among.java",
|
||||
"SnowballStemmer.java",
|
||||
"SnowballProgram.java",
|
||||
"ext/*Stemmer.java"
|
||||
])
|
||||
|
||||
inputs.files fileTree(
|
||||
dir: "src/resources/org/apache/lucene/analysis/snowball",
|
||||
include: "*_stop.txt")
|
||||
|
||||
inputs.files fileTree(
|
||||
dir: "src/test/org/apache/lucene/analysis/snowball",
|
||||
include: "*.zip")
|
||||
|
||||
// Don't even bother adding dependencies on Windows.
|
||||
if (Os.isFamily(Os.FAMILY_WINDOWS)) {
|
||||
doFirst {
|
||||
// Just emit a big fat error message but don't fail the build.
|
||||
logger.error("Snowball generation does not work on Windows (patch and bash must be available).")
|
||||
// Just emit a big fat error message. Fail the build so that checksums are not regenerated.
|
||||
throw GradleException("Snowball generation does not work on Windows (patch and bash must be available).")
|
||||
}
|
||||
} else {
|
||||
dependsOn downloadSnowballStemmers
|
||||
|
@ -114,5 +133,5 @@ configure(project(":lucene:analysis:common")) {
|
|||
}
|
||||
}
|
||||
|
||||
regenerate.dependsOn mustRunInOrder([snowball, "spotlessApply"])
|
||||
regenerate.dependsOn wrapWithPersistentChecksums(snowball, [ andThenTasks: "spotlessApply", ignoreWithSource: [downloadSnowballStemmers, downloadSnowballWebsite, downloadSnowballData] ])
|
||||
}
|
||||
|
|
12
gradle/generation/snowball.sh → gradle/generation/snowball/snowball.sh
Executable file → Normal file
12
gradle/generation/snowball.sh → gradle/generation/snowball/snowball.sh
Executable file → Normal file
|
@ -30,16 +30,6 @@ test $# -eq 4
|
|||
trap 'echo "*** BUILD FAILED ***" $BASH_SOURCE:$LINENO: error: "$BASH_COMMAND" returned $?' ERR
|
||||
set -eEuo pipefail
|
||||
|
||||
# reformats file indentation to kill the crazy space/tabs mix.
|
||||
# prevents early blindness !
|
||||
function reformat_java() {
|
||||
# convert tabs to 8 spaces, then reduce indent from 4 space to 2 space
|
||||
target=$1
|
||||
tmpfile=$(mktemp)
|
||||
cat ${target} | perl -p -e 's/\t/ /g' | perl -p -e 's/ / /g' > ${tmpfile}
|
||||
mv ${tmpfile} ${target}
|
||||
}
|
||||
|
||||
# generate stuff with existing makefile, just 'make' will try to do crazy stuff with e.g. python
|
||||
# and likely fail. so only ask for our specific target.
|
||||
(cd ${SRCDIR} && chmod a+x libstemmer/mkalgorithms.pl && make dist_libstemmer_java)
|
||||
|
@ -50,7 +40,6 @@ for file in "SnowballStemmer.java" "Among.java" "SnowballProgram.java"; do
|
|||
cat ${SRCDIR}/COPYING >> ${DESTDIR}/${file}
|
||||
echo "*/" >> ${DESTDIR}/${file}
|
||||
cat ${SRCDIR}/java/org/tartarus/snowball/${file} >> ${DESTDIR}/${file}
|
||||
reformat_java ${DESTDIR}/${file}
|
||||
done
|
||||
|
||||
rm ${DESTDIR}/ext/*Stemmer.java
|
||||
|
@ -67,7 +56,6 @@ for file in ${SRCDIR}/java/org/tartarus/snowball/ext/*.java; do
|
|||
fi
|
||||
echo ${newclazz} | sed -e 's/Stemmer//' >> ${TESTDSTDIR}/languages.txt
|
||||
cat $file | sed "s/${oldclazz}/${newclazz}/g" > ${DESTDIR}/ext/${newclazz}.java
|
||||
reformat_java ${DESTDIR}/ext/${newclazz}.java
|
||||
done
|
||||
|
||||
# regenerate test data
|
|
@ -50,8 +50,7 @@ configure(project(":lucene").subprojects) { prj ->
|
|||
|
||||
case ":lucene:analysis:common":
|
||||
targetExclude "**/HTMLStripCharFilter.java",
|
||||
"**/UAX29URLEmailTokenizerImpl.java",
|
||||
"**/tartarus/**"
|
||||
"**/UAX29URLEmailTokenizerImpl.java"
|
||||
break
|
||||
|
||||
case ":lucene:test-framework":
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
{
|
||||
"lucene/analysis/common/src/java/org/apache/lucene/analysis/email/ASCIITLD.jflex": "41ecfd19595aaf19fe2ddffd7dadb26202e98fae",
|
||||
"lucene/analysis/common/src/java/org/apache/lucene/analysis/email/ASCIITLD.jflex": "521338e15fbd3fbdd2c1f8fd9c9fc365d4bcce9d",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/email/TLDs.txt": "1c5a201efff431be1c62150aa6bd3dac0f3a21e2"
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"gradle/generation/jflex/skeleton.disable.buffer.expansion.txt": "68263ff0a014904c6e89b040d868d8f399408908",
|
||||
"lucene/analysis/common/src/java/org/apache/lucene/analysis/email/ASCIITLD.jflex": "41ecfd19595aaf19fe2ddffd7dadb26202e98fae",
|
||||
"lucene/analysis/common/src/java/org/apache/lucene/analysis/email/ASCIITLD.jflex": "521338e15fbd3fbdd2c1f8fd9c9fc365d4bcce9d",
|
||||
"lucene/analysis/common/src/java/org/apache/lucene/analysis/email/UAX29URLEmailTokenizerImpl.java": "e437900d9570ca007f9c02c9ea286222b644c329",
|
||||
"lucene/analysis/common/src/java/org/apache/lucene/analysis/email/UAX29URLEmailTokenizerImpl.jflex": "56a751d27e481fb55388f91ebf34f5a0cb8cb1b2"
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
{
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/Among.java": "5371973cc30637273366f042e1cff920e0dd14f6",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/SnowballProgram.java": "4e1caa344c7ac864c467ff0e615c1343e911b06b",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/SnowballStemmer.java": "85bfc728393d7804f86f0def0467a12fd4b82fd3",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/ArabicStemmer.java": "2d43c4606bbaf96d9ac5f8be8ccf28e32164b9f0",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/ArmenianStemmer.java": "0be0949fe1f021ef41e3f9a27280b295ab1e998c",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/BasqueStemmer.java": "79e0f8ef0e20aea2353ce582734c1e4f7c5b2525",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/CatalanStemmer.java": "6566c359074101543ed6dade5c663c0a17041c7c",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/DanishStemmer.java": "0dab70fd5d51c31c6e3903cf8576f9f498308eaf",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/DutchStemmer.java": "cc2f1f6ee58a86b940f77aa0fbabb9de12d7db6e",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/EnglishStemmer.java": "1670c34df4e2b828a7c3502538b884b8e9c8d288",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/EstonianStemmer.java": "8660e2e4e6c378e9734067faaec49da1048b8f11",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/FinnishStemmer.java": "1942477b1bbce53bcc40bc6a7304eeda48711644",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/FrenchStemmer.java": "dd6a1fdfab9ea51e243ec8c9b35b1ad5d6e545cf",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/German2Stemmer.java": "092be62a6d68e4ec939fc56b13fa4e2856aca4e4",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/GermanStemmer.java": "c44cb632b67b2c256b3bddc23edc3cabc36623b4",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/GreekStemmer.java": "95e2e5e2af36b98b5dbbc47f372134661005e462",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/HindiStemmer.java": "b32b64686f3f080850a47563d9c7031c6442febc",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/HungarianStemmer.java": "e45f89173aff28c0becf701970b4b566f92ef78b",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/IndonesianStemmer.java": "5c38af8170ef725834b7d3c21a384958982d5624",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/IrishStemmer.java": "b3aa9f634837724aa4768f928e077e222182e78f",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/ItalianStemmer.java": "b0645057fdabc0bfcfdfdbf5941d0c96533f2999",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/KpStemmer.java": "6d2cf90785d8d040fc85c1a7cc8326265763fd35",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/LithuanianStemmer.java": "d77f3d03b88e2ed84b0205e4d8509f5cbed281fe",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/LovinsStemmer.java": "afd063fc5269d5badf5a1bf050591ce5135434f0",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/NepaliStemmer.java": "2d0da317ec9b8f5342f9c5c7d9ab9b66a1e1d0f5",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/NorwegianStemmer.java": "b9eb10192b45b0e761493f468ff0fbc1e7692d1e",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/PorterStemmer.java": "71cc1e0c2907a3d270ffaf36ef779d7c7eec5049",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/PortugueseStemmer.java": "7b5e01a928c4b1f995bb75699ccf2c8cc3b6cbc2",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/RomanianStemmer.java": "548bab292d8736b898d36271985bf661adb30287",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/RussianStemmer.java": "adfe596a96fef236c52e496f4837d4cd201e2ba5",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/SerbianStemmer.java": "63ea4640ee9a3c392f8c92215b7f88248629fddc",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/SpanishStemmer.java": "8bd1a6545a72ac35d444b08cc79f3ec284064c4e",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/SwedishStemmer.java": "3f833fc609b1c89bcba59d39979aeebd545e60bf",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/TamilStemmer.java": "401bde8628e30ef58e2b6abeb33b8f15f01aff71",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/TurkishStemmer.java": "35723339314291774044d6f01d00a158584c0154",
|
||||
"lucene/analysis/common/src/java/org/tartarus/snowball/ext/YiddishStemmer.java": "bbe4112b65d1d754cf84cf20c7424c3af5a0d6c8",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/danish_stop.txt": "f3627b9037da730534aa008b9edf32582c16866e",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/dutch_stop.txt": "3f84f1c2ae282bd1350fa246baaded095bebdecc",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/english_stop.txt": "5822d03de10b6403512774492508f586ea55a7c7",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/finnish_stop.txt": "f161b9b0e757fa4793272bb5d11fd0c0546f9129",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/french_stop.txt": "315826e66bd1f9ae294f5a1fc7738887706fc9e1",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/german_stop.txt": "301fa879d91631bc30169c12f4045f294aefd7ec",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/hungarian_stop.txt": "81837d5b861a876314b32fdaa2a4cee7c09fbbf8",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/indonesian_stop.txt": "b5e23c7a1b9893ed472bdbf27f952b9ace53d2d6",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/italian_stop.txt": "4df230f3d0f3898d9812b8d08c7b08bfc55477c3",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/norwegian_stop.txt": "b612f3c7df6d3f6fca1aff5d8d9e5c353df423cd",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/portuguese_stop.txt": "e7579ef190edfc939348353dca480d9cedae1d83",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/russian_stop.txt": "cbe87679fbabae13c8ea16be8a11fd78151f8bf7",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/spanish_stop.txt": "852c0b6520a1d2ac9d2ec189c296c2707b5060aa",
|
||||
"lucene/analysis/common/src/resources/org/apache/lucene/analysis/snowball/swedish_stop.txt": "727b5244a67cab224865750451ae4e37139ee234",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/danish.zip": "7b95a90a988efd38a37c9f088d4e5b24e8e680c2",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/dutch.zip": "a49dbb48a736476322f1d6a35e919615d720cffb",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/english.zip": "b679920d98fa209a97a0aac541090c6698045a10",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/finnish.zip": "af5d28a55484999de4ce9311d6e274ff3836f7e7",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/german.zip": "f193576f4e0070d860e7d6dbf71636e08d3cf94a",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/german2.zip": "04334e3d91cda6d99ea64c55bfa39c6733d73795",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/hungarian.zip": "f384349d496bbe3815595a589d6d3650a99b27db",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/irish.zip": "d7cbb9f662cce8b6713eaf4ad1c049ec0b456336",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/italian.zip": "b15d0f8a265e972fcca5ce03e98d8b2d8bf0390b",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/kp.zip": "c2fab3651184017b9d6695fb1fe9520ca64a8ec2",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/lovins.zip": "f688b976ab9bce24317569a10b12f020f81e5a24",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/nepali.zip": "8f5f2cf7c82feaadbab327888d86bd427ba8295e",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/norwegian.zip": "8c195ff5a6519c276e1beccb398264e8b16a82d5",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/porter.zip": "3934b2050b646704a542893e34458e3bab045fa9",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/portuguese.zip": "2a79e01a46a0ad4aff06af1b5b9bb431ebe4b835",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/romanian.zip": "c4d3fe38d1ecec1eac5cec56d69cae724ae98550",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/russian.zip": "d7c5ec3032f16fef0c875a285798a5fbbce446d0",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/spanish.zip": "a5f815b75a44d2a9fdf709eb54f849c4e3abe7a8",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/swedish.zip": "378eab85d54f95115c8c04266716f8479340ad7f",
|
||||
"lucene/analysis/common/src/test/org/apache/lucene/analysis/snowball/turkish.zip": "a10af981f306bdbe39a2b00a6601773a319c4257"
|
||||
}
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
// Generated from IANA TLD Database <https://data.iana.org/TLD/tlds-alpha-by-domain.txt>
|
||||
// file version from 2021 Apr 10, Sat 07:07:01 Coordinated Universal Time
|
||||
// file version from 2021 Apr 12, Mon 07:07:01 Coordinated Universal Time
|
||||
// generated by org.apache.lucene.analysis.standard.GenerateJflexTLDMacros
|
||||
|
||||
// LUCENE-8278: None of the TLDs in {ASCIITLD} is a 1-character-shorter prefix of another TLD
|
||||
|
|
|
@ -10,13 +10,13 @@ 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.
|
||||
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 list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the Snowball project nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
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
|
||||
|
@ -36,32 +36,36 @@ import java.lang.invoke.MethodHandles;
|
|||
import java.lang.invoke.MethodType;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Internal class used by Snowball stemmers
|
||||
*/
|
||||
/** Internal class used by Snowball stemmers */
|
||||
public class Among {
|
||||
public Among (String s, int substring_i, int result) {
|
||||
public Among(String s, int substring_i, int result) {
|
||||
this.s = s.toCharArray();
|
||||
this.substring_i = substring_i;
|
||||
this.result = result;
|
||||
this.method = null;
|
||||
}
|
||||
|
||||
public Among (String s, int substring_i, int result, String methodname,
|
||||
MethodHandles.Lookup methodobject) {
|
||||
public Among(
|
||||
String s, int substring_i, int result, String methodname, MethodHandles.Lookup methodobject) {
|
||||
this.s = s.toCharArray();
|
||||
this.substring_i = substring_i;
|
||||
this.result = result;
|
||||
final Class<? extends SnowballProgram> clazz = methodobject.lookupClass().asSubclass(SnowballProgram.class);
|
||||
final Class<? extends SnowballProgram> clazz =
|
||||
methodobject.lookupClass().asSubclass(SnowballProgram.class);
|
||||
if (methodname.length() > 0) {
|
||||
try {
|
||||
this.method = methodobject.findVirtual(clazz, methodname, MethodType.methodType(boolean.class))
|
||||
.asType(MethodType.methodType(boolean.class, SnowballProgram.class));
|
||||
this.method =
|
||||
methodobject
|
||||
.findVirtual(clazz, methodname, MethodType.methodType(boolean.class))
|
||||
.asType(MethodType.methodType(boolean.class, SnowballProgram.class));
|
||||
} catch (NoSuchMethodException | IllegalAccessException e) {
|
||||
throw new RuntimeException(String.format(Locale.ENGLISH,
|
||||
"Snowball program '%s' is broken, cannot access method: boolean %s()",
|
||||
clazz.getSimpleName(), methodname
|
||||
), e);
|
||||
throw new RuntimeException(
|
||||
String.format(
|
||||
Locale.ENGLISH,
|
||||
"Snowball program '%s' is broken, cannot access method: boolean %s()",
|
||||
clazz.getSimpleName(),
|
||||
methodname),
|
||||
e);
|
||||
}
|
||||
} else {
|
||||
this.method = null;
|
||||
|
@ -74,4 +78,5 @@ public class Among {
|
|||
|
||||
// Make sure this is not accessible outside package for Java security reasons!
|
||||
final MethodHandle method; /* method to use if substring matches */
|
||||
};
|
||||
}
|
||||
;
|
||||
|
|
|
@ -10,13 +10,13 @@ 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.
|
||||
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 list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the Snowball project nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
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
|
||||
|
@ -31,26 +31,21 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
*/
|
||||
|
||||
package org.tartarus.snowball;
|
||||
import java.lang.reflect.UndeclaredThrowableException;
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Base class for a snowball stemmer
|
||||
*/
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.UndeclaredThrowableException;
|
||||
|
||||
/** Base class for a snowball stemmer */
|
||||
public class SnowballProgram implements Serializable {
|
||||
protected SnowballProgram()
|
||||
{
|
||||
protected SnowballProgram() {
|
||||
current = new char[8];
|
||||
setCurrent("");
|
||||
}
|
||||
|
||||
static final long serialVersionUID = 2016072500L;
|
||||
|
||||
/**
|
||||
* Set the current string.
|
||||
*/
|
||||
public void setCurrent(String value)
|
||||
{
|
||||
/** Set the current string. */
|
||||
public void setCurrent(String value) {
|
||||
current = value.toCharArray();
|
||||
cursor = 0;
|
||||
limit = value.length();
|
||||
|
@ -59,16 +54,14 @@ public class SnowballProgram implements Serializable {
|
|||
ket = limit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the current string.
|
||||
*/
|
||||
public String getCurrent()
|
||||
{
|
||||
/** Get the current string. */
|
||||
public String getCurrent() {
|
||||
return new String(current, 0, limit);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the current string.
|
||||
*
|
||||
* @param text character array containing input
|
||||
* @param length valid length of text.
|
||||
*/
|
||||
|
@ -83,16 +76,15 @@ public class SnowballProgram implements Serializable {
|
|||
|
||||
/**
|
||||
* Get the current buffer containing the stem.
|
||||
* <p>
|
||||
* NOTE: this may be a reference to a different character array than the
|
||||
* one originally provided with setCurrent, in the exceptional case that
|
||||
* stemming produced a longer intermediate or result string.
|
||||
* </p>
|
||||
* <p>
|
||||
* It is necessary to use {@link #getCurrentBufferLength()} to determine
|
||||
* the valid length of the returned buffer. For example, many words are
|
||||
* stemmed simply by subtracting from the length to remove suffixes.
|
||||
* </p>
|
||||
*
|
||||
* <p>NOTE: this may be a reference to a different character array than the one originally
|
||||
* provided with setCurrent, in the exceptional case that stemming produced a longer intermediate
|
||||
* or result string.
|
||||
*
|
||||
* <p>It is necessary to use {@link #getCurrentBufferLength()} to determine the valid length of
|
||||
* the returned buffer. For example, many words are stemmed simply by subtracting from the length
|
||||
* to remove suffixes.
|
||||
*
|
||||
* @see #getCurrentBufferLength()
|
||||
*/
|
||||
public char[] getCurrentBuffer() {
|
||||
|
@ -100,8 +92,8 @@ public class SnowballProgram implements Serializable {
|
|||
}
|
||||
|
||||
/**
|
||||
* Get the valid length of the character array in
|
||||
* {@link #getCurrentBuffer()}.
|
||||
* Get the valid length of the character array in {@link #getCurrentBuffer()}.
|
||||
*
|
||||
* @return valid length of the array.
|
||||
*/
|
||||
public int getCurrentBufferLength() {
|
||||
|
@ -118,26 +110,24 @@ public class SnowballProgram implements Serializable {
|
|||
protected int ket;
|
||||
|
||||
public SnowballProgram(SnowballProgram other) {
|
||||
current = other.current;
|
||||
cursor = other.cursor;
|
||||
limit = other.limit;
|
||||
limit_backward = other.limit_backward;
|
||||
bra = other.bra;
|
||||
ket = other.ket;
|
||||
current = other.current;
|
||||
cursor = other.cursor;
|
||||
limit = other.limit;
|
||||
limit_backward = other.limit_backward;
|
||||
bra = other.bra;
|
||||
ket = other.ket;
|
||||
}
|
||||
|
||||
protected void copy_from(SnowballProgram other)
|
||||
{
|
||||
current = other.current;
|
||||
cursor = other.cursor;
|
||||
limit = other.limit;
|
||||
limit_backward = other.limit_backward;
|
||||
bra = other.bra;
|
||||
ket = other.ket;
|
||||
protected void copy_from(SnowballProgram other) {
|
||||
current = other.current;
|
||||
cursor = other.cursor;
|
||||
limit = other.limit;
|
||||
limit_backward = other.limit_backward;
|
||||
bra = other.bra;
|
||||
ket = other.ket;
|
||||
}
|
||||
|
||||
protected boolean in_grouping(char [] s, int min, int max)
|
||||
{
|
||||
protected boolean in_grouping(char[] s, int min, int max) {
|
||||
if (cursor >= limit) return false;
|
||||
char ch = current[cursor];
|
||||
if (ch > max || ch < min) return false;
|
||||
|
@ -147,8 +137,7 @@ public class SnowballProgram implements Serializable {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected boolean in_grouping_b(char [] s, int min, int max)
|
||||
{
|
||||
protected boolean in_grouping_b(char[] s, int min, int max) {
|
||||
if (cursor <= limit_backward) return false;
|
||||
char ch = current[cursor - 1];
|
||||
if (ch > max || ch < min) return false;
|
||||
|
@ -158,8 +147,7 @@ public class SnowballProgram implements Serializable {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected boolean out_grouping(char [] s, int min, int max)
|
||||
{
|
||||
protected boolean out_grouping(char[] s, int min, int max) {
|
||||
if (cursor >= limit) return false;
|
||||
char ch = current[cursor];
|
||||
if (ch > max || ch < min) {
|
||||
|
@ -174,8 +162,7 @@ public class SnowballProgram implements Serializable {
|
|||
return false;
|
||||
}
|
||||
|
||||
protected boolean out_grouping_b(char [] s, int min, int max)
|
||||
{
|
||||
protected boolean out_grouping_b(char[] s, int min, int max) {
|
||||
if (cursor <= limit_backward) return false;
|
||||
char ch = current[cursor - 1];
|
||||
if (ch > max || ch < min) {
|
||||
|
@ -190,8 +177,7 @@ public class SnowballProgram implements Serializable {
|
|||
return false;
|
||||
}
|
||||
|
||||
protected boolean eq_s(CharSequence s)
|
||||
{
|
||||
protected boolean eq_s(CharSequence s) {
|
||||
if (limit - cursor < s.length()) return false;
|
||||
int i;
|
||||
for (i = 0; i != s.length(); i++) {
|
||||
|
@ -201,8 +187,7 @@ public class SnowballProgram implements Serializable {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected boolean eq_s_b(CharSequence s)
|
||||
{
|
||||
protected boolean eq_s_b(CharSequence s) {
|
||||
if (cursor - limit_backward < s.length()) return false;
|
||||
int i;
|
||||
for (i = 0; i != s.length(); i++) {
|
||||
|
@ -212,8 +197,7 @@ public class SnowballProgram implements Serializable {
|
|||
return true;
|
||||
}
|
||||
|
||||
protected int find_among(Among v[])
|
||||
{
|
||||
protected int find_among(Among v[]) {
|
||||
int i = 0;
|
||||
int j = v.length;
|
||||
|
||||
|
@ -281,8 +265,7 @@ public class SnowballProgram implements Serializable {
|
|||
}
|
||||
|
||||
// find_among_b is for backwards processing. Same comments apply
|
||||
protected int find_among_b(Among v[])
|
||||
{
|
||||
protected int find_among_b(Among v[]) {
|
||||
int i = 0;
|
||||
int j = v.length;
|
||||
|
||||
|
@ -358,11 +341,10 @@ public class SnowballProgram implements Serializable {
|
|||
/* to replace chars between c_bra and c_ket in current by the
|
||||
* chars in s.
|
||||
*/
|
||||
protected int replace_s(int c_bra, int c_ket, CharSequence s)
|
||||
{
|
||||
protected int replace_s(int c_bra, int c_ket, CharSequence s) {
|
||||
final int adjustment = s.length() - (c_ket - c_bra);
|
||||
final int newLength = limit + adjustment;
|
||||
//resize if necessary
|
||||
// resize if necessary
|
||||
if (newLength > current.length) {
|
||||
char newBuffer[] = new char[oversize(newLength)];
|
||||
System.arraycopy(current, 0, newBuffer, 0, limit);
|
||||
|
@ -371,14 +353,12 @@ public class SnowballProgram implements Serializable {
|
|||
// if the substring being replaced is longer or shorter than the
|
||||
// replacement, need to shift things around
|
||||
if (adjustment != 0 && c_ket < limit) {
|
||||
System.arraycopy(current, c_ket, current, c_bra + s.length(),
|
||||
limit - c_ket);
|
||||
System.arraycopy(current, c_ket, current, c_bra + s.length(), limit - c_ket);
|
||||
}
|
||||
// insert the replacement text
|
||||
// Note, faster is s.getChars(0, s.length(), current, c_bra);
|
||||
// but would have to duplicate this method for both String and StringBuilder
|
||||
for (int i = 0; i < s.length(); i++)
|
||||
current[c_bra + i] = s.charAt(i);
|
||||
for (int i = 0; i < s.length(); i++) current[c_bra + i] = s.charAt(i);
|
||||
|
||||
limit += adjustment;
|
||||
if (cursor >= c_ket) cursor += adjustment;
|
||||
|
@ -386,69 +366,62 @@ public class SnowballProgram implements Serializable {
|
|||
return adjustment;
|
||||
}
|
||||
|
||||
protected void slice_check()
|
||||
{
|
||||
if (bra < 0 ||
|
||||
bra > ket ||
|
||||
ket > limit)
|
||||
{
|
||||
throw new IllegalArgumentException("faulty slice operation: bra=" + bra + ",ket=" + ket + ",limit=" + limit);
|
||||
protected void slice_check() {
|
||||
if (bra < 0 || bra > ket || ket > limit) {
|
||||
throw new IllegalArgumentException(
|
||||
"faulty slice operation: bra=" + bra + ",ket=" + ket + ",limit=" + limit);
|
||||
}
|
||||
}
|
||||
|
||||
protected void slice_from(CharSequence s)
|
||||
{
|
||||
protected void slice_from(CharSequence s) {
|
||||
slice_check();
|
||||
replace_s(bra, ket, s);
|
||||
}
|
||||
|
||||
protected void slice_del()
|
||||
{
|
||||
protected void slice_del() {
|
||||
slice_from("");
|
||||
}
|
||||
|
||||
protected void insert(int c_bra, int c_ket, CharSequence s)
|
||||
{
|
||||
protected void insert(int c_bra, int c_ket, CharSequence s) {
|
||||
int adjustment = replace_s(c_bra, c_ket, s);
|
||||
if (c_bra <= bra) bra += adjustment;
|
||||
if (c_bra <= ket) ket += adjustment;
|
||||
}
|
||||
|
||||
/* Copy the slice into the supplied StringBuilder */
|
||||
protected void slice_to(StringBuilder s)
|
||||
{
|
||||
protected void slice_to(StringBuilder s) {
|
||||
slice_check();
|
||||
int len = ket - bra;
|
||||
s.setLength(0);
|
||||
s.append(current, bra, len);
|
||||
}
|
||||
|
||||
protected void assign_to(StringBuilder s)
|
||||
{
|
||||
protected void assign_to(StringBuilder s) {
|
||||
s.setLength(0);
|
||||
s.append(current, 0, limit);
|
||||
}
|
||||
|
||||
/*
|
||||
extern void debug(struct SN_env * z, int number, int line_count)
|
||||
{ int i;
|
||||
int limit = SIZE(z->p);
|
||||
//if (number >= 0) printf("%3d (line %4d): '", number, line_count);
|
||||
if (number >= 0) printf("%3d (line %4d): [%d]'", number, line_count,limit);
|
||||
for (i = 0; i <= limit; i++)
|
||||
{ if (z->lb == i) printf("{");
|
||||
if (z->bra == i) printf("[");
|
||||
if (z->c == i) printf("|");
|
||||
if (z->ket == i) printf("]");
|
||||
if (z->l == i) printf("}");
|
||||
if (i < limit)
|
||||
{ int ch = z->p[i];
|
||||
if (ch == 0) ch = '#';
|
||||
printf("%c", ch);
|
||||
}
|
||||
/*
|
||||
extern void debug(struct SN_env * z, int number, int line_count)
|
||||
{ int i;
|
||||
int limit = SIZE(z->p);
|
||||
//if (number >= 0) printf("%3d (line %4d): '", number, line_count);
|
||||
if (number >= 0) printf("%3d (line %4d): [%d]'", number, line_count,limit);
|
||||
for (i = 0; i <= limit; i++)
|
||||
{ if (z->lb == i) printf("{");
|
||||
if (z->bra == i) printf("[");
|
||||
if (z->c == i) printf("|");
|
||||
if (z->ket == i) printf("]");
|
||||
if (z->l == i) printf("}");
|
||||
if (i < limit)
|
||||
{ int ch = z->p[i];
|
||||
if (ch == 0) ch = '#';
|
||||
printf("%c", ch);
|
||||
}
|
||||
}
|
||||
printf("'\n");
|
||||
}
|
||||
printf("'\n");
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
};
|
||||
}
|
||||
;
|
||||
|
|
|
@ -10,13 +10,13 @@ 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.
|
||||
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 list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
3. Neither the name of the Snowball project nor the names of its contributors
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
may be used to endorse or promote products derived from this software
|
||||
without specific prior written permission.
|
||||
|
||||
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
|
||||
|
@ -32,11 +32,10 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
|
||||
package org.tartarus.snowball;
|
||||
|
||||
/**
|
||||
* Parent class of all snowball stemmers, which must implement <code>stem</code>
|
||||
*/
|
||||
/** Parent class of all snowball stemmers, which must implement <code>stem</code> */
|
||||
public abstract class SnowballStemmer extends SnowballProgram {
|
||||
public abstract boolean stem();
|
||||
|
||||
static final long serialVersionUID = 2016072500L;
|
||||
};
|
||||
}
|
||||
;
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,392 +6,377 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class ArmenianStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("\u0580\u0578\u0580\u0564", -1, 1),
|
||||
new Among("\u0565\u0580\u0578\u0580\u0564", 0, 1),
|
||||
new Among("\u0561\u056C\u056B", -1, 1),
|
||||
new Among("\u0561\u056F\u056B", -1, 1),
|
||||
new Among("\u0578\u0580\u0561\u056F", -1, 1),
|
||||
new Among("\u0565\u0572", -1, 1),
|
||||
new Among("\u0561\u056F\u0561\u0576", -1, 1),
|
||||
new Among("\u0561\u0580\u0561\u0576", -1, 1),
|
||||
new Among("\u0565\u0576", -1, 1),
|
||||
new Among("\u0565\u056F\u0565\u0576", 8, 1),
|
||||
new Among("\u0565\u0580\u0565\u0576", 8, 1),
|
||||
new Among("\u0578\u0580\u0567\u0576", -1, 1),
|
||||
new Among("\u056B\u0576", -1, 1),
|
||||
new Among("\u0563\u056B\u0576", 12, 1),
|
||||
new Among("\u0578\u057E\u056B\u0576", 12, 1),
|
||||
new Among("\u056C\u0561\u0575\u0576", -1, 1),
|
||||
new Among("\u057E\u0578\u0582\u0576", -1, 1),
|
||||
new Among("\u057A\u0565\u057D", -1, 1),
|
||||
new Among("\u056B\u057E", -1, 1),
|
||||
new Among("\u0561\u057F", -1, 1),
|
||||
new Among("\u0561\u057E\u0565\u057F", -1, 1),
|
||||
new Among("\u056F\u0578\u057F", -1, 1),
|
||||
new Among("\u0562\u0561\u0580", -1, 1)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("\u0580\u0578\u0580\u0564", -1, 1),
|
||||
new Among("\u0565\u0580\u0578\u0580\u0564", 0, 1),
|
||||
new Among("\u0561\u056C\u056B", -1, 1),
|
||||
new Among("\u0561\u056F\u056B", -1, 1),
|
||||
new Among("\u0578\u0580\u0561\u056F", -1, 1),
|
||||
new Among("\u0565\u0572", -1, 1),
|
||||
new Among("\u0561\u056F\u0561\u0576", -1, 1),
|
||||
new Among("\u0561\u0580\u0561\u0576", -1, 1),
|
||||
new Among("\u0565\u0576", -1, 1),
|
||||
new Among("\u0565\u056F\u0565\u0576", 8, 1),
|
||||
new Among("\u0565\u0580\u0565\u0576", 8, 1),
|
||||
new Among("\u0578\u0580\u0567\u0576", -1, 1),
|
||||
new Among("\u056B\u0576", -1, 1),
|
||||
new Among("\u0563\u056B\u0576", 12, 1),
|
||||
new Among("\u0578\u057E\u056B\u0576", 12, 1),
|
||||
new Among("\u056C\u0561\u0575\u0576", -1, 1),
|
||||
new Among("\u057E\u0578\u0582\u0576", -1, 1),
|
||||
new Among("\u057A\u0565\u057D", -1, 1),
|
||||
new Among("\u056B\u057E", -1, 1),
|
||||
new Among("\u0561\u057F", -1, 1),
|
||||
new Among("\u0561\u057E\u0565\u057F", -1, 1),
|
||||
new Among("\u056F\u0578\u057F", -1, 1),
|
||||
new Among("\u0562\u0561\u0580", -1, 1)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("\u0561", -1, 1),
|
||||
new Among("\u0561\u0581\u0561", 0, 1),
|
||||
new Among("\u0565\u0581\u0561", 0, 1),
|
||||
new Among("\u057E\u0565", -1, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B", -1, 1),
|
||||
new Among("\u0561\u0581\u056B", -1, 1),
|
||||
new Among("\u0565\u0581\u056B", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B", 6, 1),
|
||||
new Among("\u0561\u056C", -1, 1),
|
||||
new Among("\u0568\u0561\u056C", 8, 1),
|
||||
new Among("\u0561\u0576\u0561\u056C", 8, 1),
|
||||
new Among("\u0565\u0576\u0561\u056C", 8, 1),
|
||||
new Among("\u0561\u0581\u0576\u0561\u056C", 8, 1),
|
||||
new Among("\u0565\u056C", -1, 1),
|
||||
new Among("\u0568\u0565\u056C", 13, 1),
|
||||
new Among("\u0576\u0565\u056C", 13, 1),
|
||||
new Among("\u0581\u0576\u0565\u056C", 15, 1),
|
||||
new Among("\u0565\u0581\u0576\u0565\u056C", 16, 1),
|
||||
new Among("\u0579\u0565\u056C", 13, 1),
|
||||
new Among("\u057E\u0565\u056C", 13, 1),
|
||||
new Among("\u0561\u0581\u057E\u0565\u056C", 19, 1),
|
||||
new Among("\u0565\u0581\u057E\u0565\u056C", 19, 1),
|
||||
new Among("\u057F\u0565\u056C", 13, 1),
|
||||
new Among("\u0561\u057F\u0565\u056C", 22, 1),
|
||||
new Among("\u0578\u057F\u0565\u056C", 22, 1),
|
||||
new Among("\u056F\u0578\u057F\u0565\u056C", 24, 1),
|
||||
new Among("\u057E\u0561\u056E", -1, 1),
|
||||
new Among("\u0578\u0582\u0574", -1, 1),
|
||||
new Among("\u057E\u0578\u0582\u0574", 27, 1),
|
||||
new Among("\u0561\u0576", -1, 1),
|
||||
new Among("\u0581\u0561\u0576", 29, 1),
|
||||
new Among("\u0561\u0581\u0561\u0576", 30, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0576", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0576", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0576", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0576", 34, 1),
|
||||
new Among("\u0561\u056C\u056B\u057D", -1, 1),
|
||||
new Among("\u0565\u056C\u056B\u057D", -1, 1),
|
||||
new Among("\u0561\u057E", -1, 1),
|
||||
new Among("\u0561\u0581\u0561\u057E", 38, 1),
|
||||
new Among("\u0565\u0581\u0561\u057E", 38, 1),
|
||||
new Among("\u0561\u056C\u0578\u057E", -1, 1),
|
||||
new Among("\u0565\u056C\u0578\u057E", -1, 1),
|
||||
new Among("\u0561\u0580", -1, 1),
|
||||
new Among("\u0561\u0581\u0561\u0580", 43, 1),
|
||||
new Among("\u0565\u0581\u0561\u0580", 43, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0580", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0580", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0580", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0580", 48, 1),
|
||||
new Among("\u0561\u0581", -1, 1),
|
||||
new Among("\u0565\u0581", -1, 1),
|
||||
new Among("\u0561\u0581\u0580\u0565\u0581", 51, 1),
|
||||
new Among("\u0561\u056C\u0578\u0582\u0581", -1, 1),
|
||||
new Among("\u0565\u056C\u0578\u0582\u0581", -1, 1),
|
||||
new Among("\u0561\u056C\u0578\u0582", -1, 1),
|
||||
new Among("\u0565\u056C\u0578\u0582", -1, 1),
|
||||
new Among("\u0561\u0584", -1, 1),
|
||||
new Among("\u0581\u0561\u0584", 57, 1),
|
||||
new Among("\u0561\u0581\u0561\u0584", 58, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0584", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0584", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0584", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0584", 62, 1),
|
||||
new Among("\u0561\u0576\u0584", -1, 1),
|
||||
new Among("\u0581\u0561\u0576\u0584", 64, 1),
|
||||
new Among("\u0561\u0581\u0561\u0576\u0584", 65, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0576\u0584", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0576\u0584", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0576\u0584", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0576\u0584", 69, 1)
|
||||
};
|
||||
private static final Among a_1[] = {
|
||||
new Among("\u0561", -1, 1),
|
||||
new Among("\u0561\u0581\u0561", 0, 1),
|
||||
new Among("\u0565\u0581\u0561", 0, 1),
|
||||
new Among("\u057E\u0565", -1, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B", -1, 1),
|
||||
new Among("\u0561\u0581\u056B", -1, 1),
|
||||
new Among("\u0565\u0581\u056B", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B", 6, 1),
|
||||
new Among("\u0561\u056C", -1, 1),
|
||||
new Among("\u0568\u0561\u056C", 8, 1),
|
||||
new Among("\u0561\u0576\u0561\u056C", 8, 1),
|
||||
new Among("\u0565\u0576\u0561\u056C", 8, 1),
|
||||
new Among("\u0561\u0581\u0576\u0561\u056C", 8, 1),
|
||||
new Among("\u0565\u056C", -1, 1),
|
||||
new Among("\u0568\u0565\u056C", 13, 1),
|
||||
new Among("\u0576\u0565\u056C", 13, 1),
|
||||
new Among("\u0581\u0576\u0565\u056C", 15, 1),
|
||||
new Among("\u0565\u0581\u0576\u0565\u056C", 16, 1),
|
||||
new Among("\u0579\u0565\u056C", 13, 1),
|
||||
new Among("\u057E\u0565\u056C", 13, 1),
|
||||
new Among("\u0561\u0581\u057E\u0565\u056C", 19, 1),
|
||||
new Among("\u0565\u0581\u057E\u0565\u056C", 19, 1),
|
||||
new Among("\u057F\u0565\u056C", 13, 1),
|
||||
new Among("\u0561\u057F\u0565\u056C", 22, 1),
|
||||
new Among("\u0578\u057F\u0565\u056C", 22, 1),
|
||||
new Among("\u056F\u0578\u057F\u0565\u056C", 24, 1),
|
||||
new Among("\u057E\u0561\u056E", -1, 1),
|
||||
new Among("\u0578\u0582\u0574", -1, 1),
|
||||
new Among("\u057E\u0578\u0582\u0574", 27, 1),
|
||||
new Among("\u0561\u0576", -1, 1),
|
||||
new Among("\u0581\u0561\u0576", 29, 1),
|
||||
new Among("\u0561\u0581\u0561\u0576", 30, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0576", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0576", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0576", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0576", 34, 1),
|
||||
new Among("\u0561\u056C\u056B\u057D", -1, 1),
|
||||
new Among("\u0565\u056C\u056B\u057D", -1, 1),
|
||||
new Among("\u0561\u057E", -1, 1),
|
||||
new Among("\u0561\u0581\u0561\u057E", 38, 1),
|
||||
new Among("\u0565\u0581\u0561\u057E", 38, 1),
|
||||
new Among("\u0561\u056C\u0578\u057E", -1, 1),
|
||||
new Among("\u0565\u056C\u0578\u057E", -1, 1),
|
||||
new Among("\u0561\u0580", -1, 1),
|
||||
new Among("\u0561\u0581\u0561\u0580", 43, 1),
|
||||
new Among("\u0565\u0581\u0561\u0580", 43, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0580", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0580", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0580", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0580", 48, 1),
|
||||
new Among("\u0561\u0581", -1, 1),
|
||||
new Among("\u0565\u0581", -1, 1),
|
||||
new Among("\u0561\u0581\u0580\u0565\u0581", 51, 1),
|
||||
new Among("\u0561\u056C\u0578\u0582\u0581", -1, 1),
|
||||
new Among("\u0565\u056C\u0578\u0582\u0581", -1, 1),
|
||||
new Among("\u0561\u056C\u0578\u0582", -1, 1),
|
||||
new Among("\u0565\u056C\u0578\u0582", -1, 1),
|
||||
new Among("\u0561\u0584", -1, 1),
|
||||
new Among("\u0581\u0561\u0584", 57, 1),
|
||||
new Among("\u0561\u0581\u0561\u0584", 58, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0584", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0584", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0584", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0584", 62, 1),
|
||||
new Among("\u0561\u0576\u0584", -1, 1),
|
||||
new Among("\u0581\u0561\u0576\u0584", 64, 1),
|
||||
new Among("\u0561\u0581\u0561\u0576\u0584", 65, 1),
|
||||
new Among("\u0561\u0581\u0580\u056B\u0576\u0584", -1, 1),
|
||||
new Among("\u0561\u0581\u056B\u0576\u0584", -1, 1),
|
||||
new Among("\u0565\u0581\u056B\u0576\u0584", -1, 1),
|
||||
new Among("\u057E\u0565\u0581\u056B\u0576\u0584", 69, 1)
|
||||
};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("\u0578\u0580\u0564", -1, 1),
|
||||
new Among("\u0578\u0582\u0575\u0569", -1, 1),
|
||||
new Among("\u0578\u0582\u0570\u056B", -1, 1),
|
||||
new Among("\u0581\u056B", -1, 1),
|
||||
new Among("\u056B\u056C", -1, 1),
|
||||
new Among("\u0561\u056F", -1, 1),
|
||||
new Among("\u0575\u0561\u056F", 5, 1),
|
||||
new Among("\u0561\u0576\u0561\u056F", 5, 1),
|
||||
new Among("\u056B\u056F", -1, 1),
|
||||
new Among("\u0578\u0582\u056F", -1, 1),
|
||||
new Among("\u0561\u0576", -1, 1),
|
||||
new Among("\u057A\u0561\u0576", 10, 1),
|
||||
new Among("\u057D\u057F\u0561\u0576", 10, 1),
|
||||
new Among("\u0561\u0580\u0561\u0576", 10, 1),
|
||||
new Among("\u0565\u0572\u0567\u0576", -1, 1),
|
||||
new Among("\u0575\u0578\u0582\u0576", -1, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0578\u0582\u0576", 15, 1),
|
||||
new Among("\u0561\u056E\u0578", -1, 1),
|
||||
new Among("\u056B\u0579", -1, 1),
|
||||
new Among("\u0578\u0582\u057D", -1, 1),
|
||||
new Among("\u0578\u0582\u057D\u057F", -1, 1),
|
||||
new Among("\u0563\u0561\u0580", -1, 1),
|
||||
new Among("\u057E\u0578\u0580", -1, 1),
|
||||
new Among("\u0561\u057E\u0578\u0580", 22, 1),
|
||||
new Among("\u0578\u0581", -1, 1),
|
||||
new Among("\u0561\u0576\u0585\u0581", -1, 1),
|
||||
new Among("\u0578\u0582", -1, 1),
|
||||
new Among("\u0584", -1, 1),
|
||||
new Among("\u0579\u0565\u0584", 27, 1),
|
||||
new Among("\u056B\u0584", 27, 1),
|
||||
new Among("\u0561\u056C\u056B\u0584", 29, 1),
|
||||
new Among("\u0561\u0576\u056B\u0584", 29, 1),
|
||||
new Among("\u057E\u0561\u056E\u0584", 27, 1),
|
||||
new Among("\u0578\u0582\u0575\u0584", 27, 1),
|
||||
new Among("\u0565\u0576\u0584", 27, 1),
|
||||
new Among("\u0578\u0576\u0584", 27, 1),
|
||||
new Among("\u0578\u0582\u0576\u0584", 27, 1),
|
||||
new Among("\u0574\u0578\u0582\u0576\u0584", 36, 1),
|
||||
new Among("\u056B\u0579\u0584", 27, 1),
|
||||
new Among("\u0561\u0580\u0584", 27, 1)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("\u0578\u0580\u0564", -1, 1),
|
||||
new Among("\u0578\u0582\u0575\u0569", -1, 1),
|
||||
new Among("\u0578\u0582\u0570\u056B", -1, 1),
|
||||
new Among("\u0581\u056B", -1, 1),
|
||||
new Among("\u056B\u056C", -1, 1),
|
||||
new Among("\u0561\u056F", -1, 1),
|
||||
new Among("\u0575\u0561\u056F", 5, 1),
|
||||
new Among("\u0561\u0576\u0561\u056F", 5, 1),
|
||||
new Among("\u056B\u056F", -1, 1),
|
||||
new Among("\u0578\u0582\u056F", -1, 1),
|
||||
new Among("\u0561\u0576", -1, 1),
|
||||
new Among("\u057A\u0561\u0576", 10, 1),
|
||||
new Among("\u057D\u057F\u0561\u0576", 10, 1),
|
||||
new Among("\u0561\u0580\u0561\u0576", 10, 1),
|
||||
new Among("\u0565\u0572\u0567\u0576", -1, 1),
|
||||
new Among("\u0575\u0578\u0582\u0576", -1, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0578\u0582\u0576", 15, 1),
|
||||
new Among("\u0561\u056E\u0578", -1, 1),
|
||||
new Among("\u056B\u0579", -1, 1),
|
||||
new Among("\u0578\u0582\u057D", -1, 1),
|
||||
new Among("\u0578\u0582\u057D\u057F", -1, 1),
|
||||
new Among("\u0563\u0561\u0580", -1, 1),
|
||||
new Among("\u057E\u0578\u0580", -1, 1),
|
||||
new Among("\u0561\u057E\u0578\u0580", 22, 1),
|
||||
new Among("\u0578\u0581", -1, 1),
|
||||
new Among("\u0561\u0576\u0585\u0581", -1, 1),
|
||||
new Among("\u0578\u0582", -1, 1),
|
||||
new Among("\u0584", -1, 1),
|
||||
new Among("\u0579\u0565\u0584", 27, 1),
|
||||
new Among("\u056B\u0584", 27, 1),
|
||||
new Among("\u0561\u056C\u056B\u0584", 29, 1),
|
||||
new Among("\u0561\u0576\u056B\u0584", 29, 1),
|
||||
new Among("\u057E\u0561\u056E\u0584", 27, 1),
|
||||
new Among("\u0578\u0582\u0575\u0584", 27, 1),
|
||||
new Among("\u0565\u0576\u0584", 27, 1),
|
||||
new Among("\u0578\u0576\u0584", 27, 1),
|
||||
new Among("\u0578\u0582\u0576\u0584", 27, 1),
|
||||
new Among("\u0574\u0578\u0582\u0576\u0584", 36, 1),
|
||||
new Among("\u056B\u0579\u0584", 27, 1),
|
||||
new Among("\u0561\u0580\u0584", 27, 1)
|
||||
};
|
||||
|
||||
private final static Among a_3[] = {
|
||||
new Among("\u057D\u0561", -1, 1),
|
||||
new Among("\u057E\u0561", -1, 1),
|
||||
new Among("\u0561\u0574\u0562", -1, 1),
|
||||
new Among("\u0564", -1, 1),
|
||||
new Among("\u0561\u0576\u0564", 3, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0564", 4, 1),
|
||||
new Among("\u057E\u0561\u0576\u0564", 4, 1),
|
||||
new Among("\u0578\u057B\u0564", 3, 1),
|
||||
new Among("\u0565\u0580\u0564", 3, 1),
|
||||
new Among("\u0576\u0565\u0580\u0564", 8, 1),
|
||||
new Among("\u0578\u0582\u0564", 3, 1),
|
||||
new Among("\u0568", -1, 1),
|
||||
new Among("\u0561\u0576\u0568", 11, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0568", 12, 1),
|
||||
new Among("\u057E\u0561\u0576\u0568", 12, 1),
|
||||
new Among("\u0578\u057B\u0568", 11, 1),
|
||||
new Among("\u0565\u0580\u0568", 11, 1),
|
||||
new Among("\u0576\u0565\u0580\u0568", 16, 1),
|
||||
new Among("\u056B", -1, 1),
|
||||
new Among("\u057E\u056B", 18, 1),
|
||||
new Among("\u0565\u0580\u056B", 18, 1),
|
||||
new Among("\u0576\u0565\u0580\u056B", 20, 1),
|
||||
new Among("\u0561\u0576\u0578\u0582\u0574", -1, 1),
|
||||
new Among("\u0565\u0580\u0578\u0582\u0574", -1, 1),
|
||||
new Among("\u0576\u0565\u0580\u0578\u0582\u0574", 23, 1),
|
||||
new Among("\u0576", -1, 1),
|
||||
new Among("\u0561\u0576", 25, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576", 26, 1),
|
||||
new Among("\u057E\u0561\u0576", 26, 1),
|
||||
new Among("\u056B\u0576", 25, 1),
|
||||
new Among("\u0565\u0580\u056B\u0576", 29, 1),
|
||||
new Among("\u0576\u0565\u0580\u056B\u0576", 30, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0576", 25, 1),
|
||||
new Among("\u0565\u0580\u0576", 25, 1),
|
||||
new Among("\u0576\u0565\u0580\u0576", 33, 1),
|
||||
new Among("\u0578\u0582\u0576", 25, 1),
|
||||
new Among("\u0578\u057B", -1, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u057D", -1, 1),
|
||||
new Among("\u057E\u0561\u0576\u057D", -1, 1),
|
||||
new Among("\u0578\u057B\u057D", -1, 1),
|
||||
new Among("\u0578\u057E", -1, 1),
|
||||
new Among("\u0561\u0576\u0578\u057E", 40, 1),
|
||||
new Among("\u057E\u0578\u057E", 40, 1),
|
||||
new Among("\u0565\u0580\u0578\u057E", 40, 1),
|
||||
new Among("\u0576\u0565\u0580\u0578\u057E", 43, 1),
|
||||
new Among("\u0565\u0580", -1, 1),
|
||||
new Among("\u0576\u0565\u0580", 45, 1),
|
||||
new Among("\u0581", -1, 1),
|
||||
new Among("\u056B\u0581", 47, 1),
|
||||
new Among("\u057E\u0561\u0576\u056B\u0581", 48, 1),
|
||||
new Among("\u0578\u057B\u056B\u0581", 48, 1),
|
||||
new Among("\u057E\u056B\u0581", 48, 1),
|
||||
new Among("\u0565\u0580\u056B\u0581", 48, 1),
|
||||
new Among("\u0576\u0565\u0580\u056B\u0581", 52, 1),
|
||||
new Among("\u0581\u056B\u0581", 48, 1),
|
||||
new Among("\u0578\u0581", 47, 1),
|
||||
new Among("\u0578\u0582\u0581", 47, 1)
|
||||
};
|
||||
private static final Among a_3[] = {
|
||||
new Among("\u057D\u0561", -1, 1),
|
||||
new Among("\u057E\u0561", -1, 1),
|
||||
new Among("\u0561\u0574\u0562", -1, 1),
|
||||
new Among("\u0564", -1, 1),
|
||||
new Among("\u0561\u0576\u0564", 3, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0564", 4, 1),
|
||||
new Among("\u057E\u0561\u0576\u0564", 4, 1),
|
||||
new Among("\u0578\u057B\u0564", 3, 1),
|
||||
new Among("\u0565\u0580\u0564", 3, 1),
|
||||
new Among("\u0576\u0565\u0580\u0564", 8, 1),
|
||||
new Among("\u0578\u0582\u0564", 3, 1),
|
||||
new Among("\u0568", -1, 1),
|
||||
new Among("\u0561\u0576\u0568", 11, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0568", 12, 1),
|
||||
new Among("\u057E\u0561\u0576\u0568", 12, 1),
|
||||
new Among("\u0578\u057B\u0568", 11, 1),
|
||||
new Among("\u0565\u0580\u0568", 11, 1),
|
||||
new Among("\u0576\u0565\u0580\u0568", 16, 1),
|
||||
new Among("\u056B", -1, 1),
|
||||
new Among("\u057E\u056B", 18, 1),
|
||||
new Among("\u0565\u0580\u056B", 18, 1),
|
||||
new Among("\u0576\u0565\u0580\u056B", 20, 1),
|
||||
new Among("\u0561\u0576\u0578\u0582\u0574", -1, 1),
|
||||
new Among("\u0565\u0580\u0578\u0582\u0574", -1, 1),
|
||||
new Among("\u0576\u0565\u0580\u0578\u0582\u0574", 23, 1),
|
||||
new Among("\u0576", -1, 1),
|
||||
new Among("\u0561\u0576", 25, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576", 26, 1),
|
||||
new Among("\u057E\u0561\u0576", 26, 1),
|
||||
new Among("\u056B\u0576", 25, 1),
|
||||
new Among("\u0565\u0580\u056B\u0576", 29, 1),
|
||||
new Among("\u0576\u0565\u0580\u056B\u0576", 30, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u0576", 25, 1),
|
||||
new Among("\u0565\u0580\u0576", 25, 1),
|
||||
new Among("\u0576\u0565\u0580\u0576", 33, 1),
|
||||
new Among("\u0578\u0582\u0576", 25, 1),
|
||||
new Among("\u0578\u057B", -1, 1),
|
||||
new Among("\u0578\u0582\u0569\u0575\u0561\u0576\u057D", -1, 1),
|
||||
new Among("\u057E\u0561\u0576\u057D", -1, 1),
|
||||
new Among("\u0578\u057B\u057D", -1, 1),
|
||||
new Among("\u0578\u057E", -1, 1),
|
||||
new Among("\u0561\u0576\u0578\u057E", 40, 1),
|
||||
new Among("\u057E\u0578\u057E", 40, 1),
|
||||
new Among("\u0565\u0580\u0578\u057E", 40, 1),
|
||||
new Among("\u0576\u0565\u0580\u0578\u057E", 43, 1),
|
||||
new Among("\u0565\u0580", -1, 1),
|
||||
new Among("\u0576\u0565\u0580", 45, 1),
|
||||
new Among("\u0581", -1, 1),
|
||||
new Among("\u056B\u0581", 47, 1),
|
||||
new Among("\u057E\u0561\u0576\u056B\u0581", 48, 1),
|
||||
new Among("\u0578\u057B\u056B\u0581", 48, 1),
|
||||
new Among("\u057E\u056B\u0581", 48, 1),
|
||||
new Among("\u0565\u0580\u056B\u0581", 48, 1),
|
||||
new Among("\u0576\u0565\u0580\u056B\u0581", 52, 1),
|
||||
new Among("\u0581\u056B\u0581", 48, 1),
|
||||
new Among("\u0578\u0581", 47, 1),
|
||||
new Among("\u0578\u0582\u0581", 47, 1)
|
||||
};
|
||||
|
||||
private static final char g_v[] = {209, 4, 128, 0, 18 };
|
||||
private static final char g_v[] = {209, 4, 128, 0, 18};
|
||||
|
||||
private int I_p2;
|
||||
private int I_pV;
|
||||
private int I_p2;
|
||||
private int I_pV;
|
||||
|
||||
|
||||
private boolean r_mark_regions() {
|
||||
I_pV = limit;
|
||||
I_p2 = limit;
|
||||
int v_1 = cursor;
|
||||
lab0: {
|
||||
golab1: while(true)
|
||||
private boolean r_mark_regions() {
|
||||
I_pV = limit;
|
||||
I_p2 = limit;
|
||||
int v_1 = cursor;
|
||||
lab0:
|
||||
{
|
||||
lab2: {
|
||||
if (!(in_grouping(g_v, 1377, 1413)))
|
||||
golab1:
|
||||
while (true) {
|
||||
lab2:
|
||||
{
|
||||
break lab2;
|
||||
if (!(in_grouping(g_v, 1377, 1413))) {
|
||||
break lab2;
|
||||
}
|
||||
break golab1;
|
||||
}
|
||||
break golab1;
|
||||
if (cursor >= limit) {
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_pV = cursor;
|
||||
golab3: while(true)
|
||||
{
|
||||
lab4: {
|
||||
if (!(out_grouping(g_v, 1377, 1413)))
|
||||
I_pV = cursor;
|
||||
golab3:
|
||||
while (true) {
|
||||
lab4:
|
||||
{
|
||||
break lab4;
|
||||
if (!(out_grouping(g_v, 1377, 1413))) {
|
||||
break lab4;
|
||||
}
|
||||
break golab3;
|
||||
}
|
||||
break golab3;
|
||||
if (cursor >= limit) {
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab5: while(true)
|
||||
{
|
||||
lab6: {
|
||||
if (!(in_grouping(g_v, 1377, 1413)))
|
||||
golab5:
|
||||
while (true) {
|
||||
lab6:
|
||||
{
|
||||
break lab6;
|
||||
if (!(in_grouping(g_v, 1377, 1413))) {
|
||||
break lab6;
|
||||
}
|
||||
break golab5;
|
||||
}
|
||||
break golab5;
|
||||
if (cursor >= limit) {
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab7: while(true)
|
||||
{
|
||||
lab8: {
|
||||
if (!(out_grouping(g_v, 1377, 1413)))
|
||||
golab7:
|
||||
while (true) {
|
||||
lab8:
|
||||
{
|
||||
break lab8;
|
||||
if (!(out_grouping(g_v, 1377, 1413))) {
|
||||
break lab8;
|
||||
}
|
||||
break golab7;
|
||||
}
|
||||
break golab7;
|
||||
if (cursor >= limit) {
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
I_p2 = cursor;
|
||||
}
|
||||
I_p2 = cursor;
|
||||
cursor = v_1;
|
||||
return true;
|
||||
}
|
||||
cursor = v_1;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_R2() {
|
||||
if (!(I_p2 <= cursor))
|
||||
{
|
||||
return false;
|
||||
private boolean r_R2() {
|
||||
if (!(I_p2 <= cursor)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_adjective() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_0) == 0)
|
||||
{
|
||||
return false;
|
||||
private boolean r_adjective() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_0) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_verb() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0)
|
||||
{
|
||||
return false;
|
||||
private boolean r_verb() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_noun() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_2) == 0)
|
||||
{
|
||||
return false;
|
||||
private boolean r_noun() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_2) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_ending() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_3) == 0)
|
||||
{
|
||||
return false;
|
||||
private boolean r_ending() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_3) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R2()) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R2())
|
||||
{
|
||||
return false;
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
r_mark_regions();
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
if (cursor < I_pV) {
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_pV;
|
||||
int v_4 = limit - cursor;
|
||||
r_ending();
|
||||
cursor = limit - v_4;
|
||||
int v_5 = limit - cursor;
|
||||
r_verb();
|
||||
cursor = limit - v_5;
|
||||
int v_6 = limit - cursor;
|
||||
r_adjective();
|
||||
cursor = limit - v_6;
|
||||
int v_7 = limit - cursor;
|
||||
r_noun();
|
||||
cursor = limit - v_7;
|
||||
limit_backward = v_3;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
r_mark_regions();
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
if (cursor < I_pV)
|
||||
{
|
||||
return false;
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof ArmenianStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ArmenianStemmer.class.getName().hashCode();
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_pV;
|
||||
int v_4 = limit - cursor;
|
||||
r_ending();
|
||||
cursor = limit - v_4;
|
||||
int v_5 = limit - cursor;
|
||||
r_verb();
|
||||
cursor = limit - v_5;
|
||||
int v_6 = limit - cursor;
|
||||
r_adjective();
|
||||
cursor = limit - v_6;
|
||||
int v_7 = limit - cursor;
|
||||
r_noun();
|
||||
cursor = limit - v_7;
|
||||
limit_backward = v_3;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof ArmenianStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return ArmenianStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -6,297 +6,279 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class DanishStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("hed", -1, 1),
|
||||
new Among("ethed", 0, 1),
|
||||
new Among("ered", -1, 1),
|
||||
new Among("e", -1, 1),
|
||||
new Among("erede", 3, 1),
|
||||
new Among("ende", 3, 1),
|
||||
new Among("erende", 5, 1),
|
||||
new Among("ene", 3, 1),
|
||||
new Among("erne", 3, 1),
|
||||
new Among("ere", 3, 1),
|
||||
new Among("en", -1, 1),
|
||||
new Among("heden", 10, 1),
|
||||
new Among("eren", 10, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("heder", 13, 1),
|
||||
new Among("erer", 13, 1),
|
||||
new Among("s", -1, 2),
|
||||
new Among("heds", 16, 1),
|
||||
new Among("es", 16, 1),
|
||||
new Among("endes", 18, 1),
|
||||
new Among("erendes", 19, 1),
|
||||
new Among("enes", 18, 1),
|
||||
new Among("ernes", 18, 1),
|
||||
new Among("eres", 18, 1),
|
||||
new Among("ens", 16, 1),
|
||||
new Among("hedens", 24, 1),
|
||||
new Among("erens", 24, 1),
|
||||
new Among("ers", 16, 1),
|
||||
new Among("ets", 16, 1),
|
||||
new Among("erets", 28, 1),
|
||||
new Among("et", -1, 1),
|
||||
new Among("eret", 30, 1)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("hed", -1, 1),
|
||||
new Among("ethed", 0, 1),
|
||||
new Among("ered", -1, 1),
|
||||
new Among("e", -1, 1),
|
||||
new Among("erede", 3, 1),
|
||||
new Among("ende", 3, 1),
|
||||
new Among("erende", 5, 1),
|
||||
new Among("ene", 3, 1),
|
||||
new Among("erne", 3, 1),
|
||||
new Among("ere", 3, 1),
|
||||
new Among("en", -1, 1),
|
||||
new Among("heden", 10, 1),
|
||||
new Among("eren", 10, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("heder", 13, 1),
|
||||
new Among("erer", 13, 1),
|
||||
new Among("s", -1, 2),
|
||||
new Among("heds", 16, 1),
|
||||
new Among("es", 16, 1),
|
||||
new Among("endes", 18, 1),
|
||||
new Among("erendes", 19, 1),
|
||||
new Among("enes", 18, 1),
|
||||
new Among("ernes", 18, 1),
|
||||
new Among("eres", 18, 1),
|
||||
new Among("ens", 16, 1),
|
||||
new Among("hedens", 24, 1),
|
||||
new Among("erens", 24, 1),
|
||||
new Among("ers", 16, 1),
|
||||
new Among("ets", 16, 1),
|
||||
new Among("erets", 28, 1),
|
||||
new Among("et", -1, 1),
|
||||
new Among("eret", 30, 1)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("gd", -1, -1),
|
||||
new Among("dt", -1, -1),
|
||||
new Among("gt", -1, -1),
|
||||
new Among("kt", -1, -1)
|
||||
};
|
||||
private static final Among a_1[] = {
|
||||
new Among("gd", -1, -1),
|
||||
new Among("dt", -1, -1),
|
||||
new Among("gt", -1, -1),
|
||||
new Among("kt", -1, -1)
|
||||
};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("ig", -1, 1),
|
||||
new Among("lig", 0, 1),
|
||||
new Among("elig", 1, 1),
|
||||
new Among("els", -1, 1),
|
||||
new Among("l\u00F8st", -1, 2)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("ig", -1, 1),
|
||||
new Among("lig", 0, 1),
|
||||
new Among("elig", 1, 1),
|
||||
new Among("els", -1, 1),
|
||||
new Among("l\u00F8st", -1, 2)
|
||||
};
|
||||
|
||||
private static final char g_c[] = {119, 223, 119, 1 };
|
||||
private static final char g_c[] = {119, 223, 119, 1};
|
||||
|
||||
private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
|
||||
private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128};
|
||||
|
||||
private static final char g_s_ending[] = {239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16 };
|
||||
private static final char g_s_ending[] = {
|
||||
239, 254, 42, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16
|
||||
};
|
||||
|
||||
private int I_x;
|
||||
private int I_p1;
|
||||
private java.lang.StringBuilder S_ch = new java.lang.StringBuilder();
|
||||
private int I_x;
|
||||
private int I_p1;
|
||||
private java.lang.StringBuilder S_ch = new java.lang.StringBuilder();
|
||||
|
||||
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit)
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0: while(true)
|
||||
{
|
||||
int v_2 = cursor;
|
||||
lab1: {
|
||||
if (!(in_grouping(g_v, 97, 248)))
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_2;
|
||||
break golab0;
|
||||
}
|
||||
cursor = v_2;
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab2: while(true)
|
||||
{
|
||||
lab3: {
|
||||
if (!(out_grouping(g_v, 97, 248)))
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
lab4: {
|
||||
if (!(I_p1 < I_x))
|
||||
{
|
||||
break lab4;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_main_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0)
|
||||
{
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_2;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!(in_grouping_b(g_s_ending, 97, 229)))
|
||||
{
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_consonant_pair() {
|
||||
int v_1 = limit - cursor;
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0)
|
||||
{
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
cursor = limit - v_1;
|
||||
if (cursor <= limit_backward)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor--;
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_other_suffix() {
|
||||
int among_var;
|
||||
int v_1 = limit - cursor;
|
||||
lab0: {
|
||||
ket = cursor;
|
||||
if (!(eq_s_b("st")))
|
||||
cursor = c;
|
||||
}
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0:
|
||||
while (true) {
|
||||
int v_2 = cursor;
|
||||
lab1:
|
||||
{
|
||||
if (!(in_grouping(g_v, 97, 248))) {
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_2;
|
||||
break golab0;
|
||||
}
|
||||
cursor = v_2;
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab2:
|
||||
while (true) {
|
||||
lab3:
|
||||
{
|
||||
if (!(out_grouping(g_v, 97, 248))) {
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
lab4:
|
||||
{
|
||||
break lab0;
|
||||
if (!(I_p1 < I_x)) {
|
||||
break lab4;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_main_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!(eq_s_b("ig")))
|
||||
limit_backward = v_2;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!(in_grouping_b(g_s_ending, 97, 229))) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_consonant_pair() {
|
||||
int v_1 = limit - cursor;
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0) {
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
cursor = limit - v_1;
|
||||
if (cursor <= limit_backward) {
|
||||
return false;
|
||||
}
|
||||
cursor--;
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_other_suffix() {
|
||||
int among_var;
|
||||
int v_1 = limit - cursor;
|
||||
lab0:
|
||||
{
|
||||
break lab0;
|
||||
ket = cursor;
|
||||
if (!(eq_s_b("st"))) {
|
||||
break lab0;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!(eq_s_b("ig"))) {
|
||||
break lab0;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0) {
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
int v_4 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_4;
|
||||
break;
|
||||
case 2:
|
||||
slice_from("l\u00F8s");
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_undouble() {
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (!(in_grouping_b(g_c, 98, 122))) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_to(S_ch);
|
||||
limit_backward = v_2;
|
||||
if (!(eq_s_b(S_ch))) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_2 = limit - cursor;
|
||||
r_main_suffix();
|
||||
cursor = limit - v_2;
|
||||
int v_3 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_other_suffix();
|
||||
cursor = limit - v_4;
|
||||
int v_5 = limit - cursor;
|
||||
r_undouble();
|
||||
cursor = limit - v_5;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0)
|
||||
{
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof DanishStemmer;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
int v_4 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_4;
|
||||
break;
|
||||
case 2:
|
||||
slice_from("l\u00F8s");
|
||||
break;
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return DanishStemmer.class.getName().hashCode();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_undouble() {
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (!(in_grouping_b(g_c, 98, 122)))
|
||||
{
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_to(S_ch);
|
||||
limit_backward = v_2;
|
||||
if (!(eq_s_b(S_ch)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_2 = limit - cursor;
|
||||
r_main_suffix();
|
||||
cursor = limit - v_2;
|
||||
int v_3 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_other_suffix();
|
||||
cursor = limit - v_4;
|
||||
int v_5 = limit - cursor;
|
||||
r_undouble();
|
||||
cursor = limit - v_5;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof DanishStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return DanishStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -6,528 +6,498 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class GermanStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("", -1, 5),
|
||||
new Among("U", 0, 2),
|
||||
new Among("Y", 0, 1),
|
||||
new Among("\u00E4", 0, 3),
|
||||
new Among("\u00F6", 0, 4),
|
||||
new Among("\u00FC", 0, 2)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("", -1, 5),
|
||||
new Among("U", 0, 2),
|
||||
new Among("Y", 0, 1),
|
||||
new Among("\u00E4", 0, 3),
|
||||
new Among("\u00F6", 0, 4),
|
||||
new Among("\u00FC", 0, 2)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("e", -1, 2),
|
||||
new Among("em", -1, 1),
|
||||
new Among("en", -1, 2),
|
||||
new Among("ern", -1, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("s", -1, 3),
|
||||
new Among("es", 5, 2)
|
||||
};
|
||||
private static final Among a_1[] = {
|
||||
new Among("e", -1, 2),
|
||||
new Among("em", -1, 1),
|
||||
new Among("en", -1, 2),
|
||||
new Among("ern", -1, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("s", -1, 3),
|
||||
new Among("es", 5, 2)
|
||||
};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("en", -1, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("st", -1, 2),
|
||||
new Among("est", 2, 1)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("en", -1, 1), new Among("er", -1, 1), new Among("st", -1, 2), new Among("est", 2, 1)
|
||||
};
|
||||
|
||||
private final static Among a_3[] = {
|
||||
new Among("ig", -1, 1),
|
||||
new Among("lich", -1, 1)
|
||||
};
|
||||
private static final Among a_3[] = {new Among("ig", -1, 1), new Among("lich", -1, 1)};
|
||||
|
||||
private final static Among a_4[] = {
|
||||
new Among("end", -1, 1),
|
||||
new Among("ig", -1, 2),
|
||||
new Among("ung", -1, 1),
|
||||
new Among("lich", -1, 3),
|
||||
new Among("isch", -1, 2),
|
||||
new Among("ik", -1, 2),
|
||||
new Among("heit", -1, 3),
|
||||
new Among("keit", -1, 4)
|
||||
};
|
||||
private static final Among a_4[] = {
|
||||
new Among("end", -1, 1),
|
||||
new Among("ig", -1, 2),
|
||||
new Among("ung", -1, 1),
|
||||
new Among("lich", -1, 3),
|
||||
new Among("isch", -1, 2),
|
||||
new Among("ik", -1, 2),
|
||||
new Among("heit", -1, 3),
|
||||
new Among("keit", -1, 4)
|
||||
};
|
||||
|
||||
private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8 };
|
||||
private static final char g_v[] = {
|
||||
17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 32, 8
|
||||
};
|
||||
|
||||
private static final char g_s_ending[] = {117, 30, 5 };
|
||||
private static final char g_s_ending[] = {117, 30, 5};
|
||||
|
||||
private static final char g_st_ending[] = {117, 30, 4 };
|
||||
private static final char g_st_ending[] = {117, 30, 4};
|
||||
|
||||
private int I_x;
|
||||
private int I_p2;
|
||||
private int I_p1;
|
||||
private int I_x;
|
||||
private int I_p2;
|
||||
private int I_p1;
|
||||
|
||||
|
||||
private boolean r_prelude() {
|
||||
int v_1 = cursor;
|
||||
while(true)
|
||||
{
|
||||
int v_2 = cursor;
|
||||
lab0: {
|
||||
lab1: {
|
||||
int v_3 = cursor;
|
||||
lab2: {
|
||||
bra = cursor;
|
||||
if (!(eq_s("\u00DF")))
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
ket = cursor;
|
||||
slice_from("ss");
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_3;
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
cursor = v_2;
|
||||
break;
|
||||
}
|
||||
cursor = v_1;
|
||||
while(true)
|
||||
{
|
||||
int v_4 = cursor;
|
||||
lab3: {
|
||||
golab4: while(true)
|
||||
private boolean r_prelude() {
|
||||
int v_1 = cursor;
|
||||
while (true) {
|
||||
int v_2 = cursor;
|
||||
lab0:
|
||||
{
|
||||
int v_5 = cursor;
|
||||
lab5: {
|
||||
if (!(in_grouping(g_v, 97, 252)))
|
||||
lab1:
|
||||
{
|
||||
int v_3 = cursor;
|
||||
lab2:
|
||||
{
|
||||
break lab5;
|
||||
}
|
||||
bra = cursor;
|
||||
lab6: {
|
||||
int v_6 = cursor;
|
||||
lab7: {
|
||||
if (!(eq_s("u")))
|
||||
{
|
||||
break lab7;
|
||||
}
|
||||
ket = cursor;
|
||||
if (!(in_grouping(g_v, 97, 252)))
|
||||
{
|
||||
break lab7;
|
||||
}
|
||||
slice_from("U");
|
||||
break lab6;
|
||||
}
|
||||
cursor = v_6;
|
||||
if (!(eq_s("y")))
|
||||
{
|
||||
break lab5;
|
||||
bra = cursor;
|
||||
if (!(eq_s("\u00DF"))) {
|
||||
break lab2;
|
||||
}
|
||||
ket = cursor;
|
||||
if (!(in_grouping(g_v, 97, 252)))
|
||||
{
|
||||
break lab5;
|
||||
}
|
||||
slice_from("Y");
|
||||
slice_from("ss");
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_5;
|
||||
break golab4;
|
||||
}
|
||||
cursor = v_5;
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
cursor = v_4;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
I_p2 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0: while(true)
|
||||
{
|
||||
lab1: {
|
||||
if (!(in_grouping(g_v, 97, 252)))
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
break golab0;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab2: while(true)
|
||||
{
|
||||
lab3: {
|
||||
if (!(out_grouping(g_v, 97, 252)))
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
lab4: {
|
||||
if (!(I_p1 < I_x))
|
||||
{
|
||||
break lab4;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
golab5: while(true)
|
||||
{
|
||||
lab6: {
|
||||
if (!(in_grouping(g_v, 97, 252)))
|
||||
{
|
||||
break lab6;
|
||||
}
|
||||
break golab5;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab7: while(true)
|
||||
{
|
||||
lab8: {
|
||||
if (!(out_grouping(g_v, 97, 252)))
|
||||
{
|
||||
break lab8;
|
||||
}
|
||||
break golab7;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p2 = cursor;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_postlude() {
|
||||
int among_var;
|
||||
while(true)
|
||||
{
|
||||
int v_1 = cursor;
|
||||
lab0: {
|
||||
bra = cursor;
|
||||
among_var = find_among(a_0);
|
||||
if (among_var == 0)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_from("y");
|
||||
break;
|
||||
case 2:
|
||||
slice_from("u");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("a");
|
||||
break;
|
||||
case 4:
|
||||
slice_from("o");
|
||||
break;
|
||||
case 5:
|
||||
if (cursor >= limit)
|
||||
{
|
||||
cursor = v_3;
|
||||
if (cursor >= limit) {
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
cursor = v_2;
|
||||
break;
|
||||
}
|
||||
cursor = v_1;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_R1() {
|
||||
if (!(I_p1 <= cursor))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_R2() {
|
||||
if (!(I_p2 <= cursor))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_standard_suffix() {
|
||||
int among_var;
|
||||
int v_1 = limit - cursor;
|
||||
lab0: {
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_1);
|
||||
if (among_var == 0)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R1())
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_del();
|
||||
int v_2 = limit - cursor;
|
||||
lab1: {
|
||||
ket = cursor;
|
||||
if (!(eq_s_b("s")))
|
||||
while (true) {
|
||||
int v_4 = cursor;
|
||||
lab3:
|
||||
{
|
||||
golab4:
|
||||
while (true) {
|
||||
int v_5 = cursor;
|
||||
lab5:
|
||||
{
|
||||
cursor = limit - v_2;
|
||||
break lab1;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!(eq_s_b("nis")))
|
||||
{
|
||||
cursor = limit - v_2;
|
||||
break lab1;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!(in_grouping_b(g_s_ending, 98, 116)))
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
int v_3 = limit - cursor;
|
||||
lab2: {
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0)
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R1())
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!(in_grouping_b(g_st_ending, 98, 116)))
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
{
|
||||
int c = cursor - 3;
|
||||
if (limit_backward > c || c > limit)
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
lab3: {
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_4);
|
||||
if (among_var == 0)
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R2())
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
int v_5 = limit - cursor;
|
||||
lab4: {
|
||||
ket = cursor;
|
||||
if (!(eq_s_b("ig")))
|
||||
{
|
||||
cursor = limit - v_5;
|
||||
break lab4;
|
||||
}
|
||||
bra = cursor;
|
||||
{
|
||||
int v_6 = limit - cursor;
|
||||
lab5: {
|
||||
if (!(eq_s_b("e")))
|
||||
if (!(in_grouping(g_v, 97, 252))) {
|
||||
break lab5;
|
||||
}
|
||||
bra = cursor;
|
||||
lab6:
|
||||
{
|
||||
int v_6 = cursor;
|
||||
lab7:
|
||||
{
|
||||
if (!(eq_s("u"))) {
|
||||
break lab7;
|
||||
}
|
||||
ket = cursor;
|
||||
if (!(in_grouping(g_v, 97, 252))) {
|
||||
break lab7;
|
||||
}
|
||||
slice_from("U");
|
||||
break lab6;
|
||||
}
|
||||
cursor = v_6;
|
||||
if (!(eq_s("y"))) {
|
||||
break lab5;
|
||||
}
|
||||
ket = cursor;
|
||||
if (!(in_grouping(g_v, 97, 252))) {
|
||||
break lab5;
|
||||
}
|
||||
slice_from("Y");
|
||||
}
|
||||
cursor = v_5;
|
||||
break golab4;
|
||||
}
|
||||
cursor = v_5;
|
||||
if (cursor >= limit) {
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
cursor = v_4;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
I_p2 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit) {
|
||||
return false;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0:
|
||||
while (true) {
|
||||
lab1:
|
||||
{
|
||||
if (!(in_grouping(g_v, 97, 252))) {
|
||||
break lab1;
|
||||
}
|
||||
break golab0;
|
||||
}
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab2:
|
||||
while (true) {
|
||||
lab3:
|
||||
{
|
||||
if (!(out_grouping(g_v, 97, 252))) {
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
lab4:
|
||||
{
|
||||
if (!(I_p1 < I_x)) {
|
||||
break lab4;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
golab5:
|
||||
while (true) {
|
||||
lab6:
|
||||
{
|
||||
if (!(in_grouping(g_v, 97, 252))) {
|
||||
break lab6;
|
||||
}
|
||||
break golab5;
|
||||
}
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab7:
|
||||
while (true) {
|
||||
lab8:
|
||||
{
|
||||
if (!(out_grouping(g_v, 97, 252))) {
|
||||
break lab8;
|
||||
}
|
||||
break golab7;
|
||||
}
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p2 = cursor;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_postlude() {
|
||||
int among_var;
|
||||
while (true) {
|
||||
int v_1 = cursor;
|
||||
lab0:
|
||||
{
|
||||
bra = cursor;
|
||||
among_var = find_among(a_0);
|
||||
if (among_var == 0) {
|
||||
break lab0;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_from("y");
|
||||
break;
|
||||
case 2:
|
||||
slice_from("u");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("a");
|
||||
break;
|
||||
case 4:
|
||||
slice_from("o");
|
||||
break;
|
||||
case 5:
|
||||
if (cursor >= limit) {
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
break;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
cursor = v_1;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_R1() {
|
||||
if (!(I_p1 <= cursor)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_R2() {
|
||||
if (!(I_p2 <= cursor)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_standard_suffix() {
|
||||
int among_var;
|
||||
int v_1 = limit - cursor;
|
||||
lab0:
|
||||
{
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_1);
|
||||
if (among_var == 0) {
|
||||
break lab0;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R1()) {
|
||||
break lab0;
|
||||
}
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_del();
|
||||
int v_2 = limit - cursor;
|
||||
lab1:
|
||||
{
|
||||
ket = cursor;
|
||||
if (!(eq_s_b("s"))) {
|
||||
cursor = limit - v_2;
|
||||
break lab1;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!(eq_s_b("nis"))) {
|
||||
cursor = limit - v_2;
|
||||
break lab1;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
if (!(in_grouping_b(g_s_ending, 98, 116))) {
|
||||
break lab0;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
int v_3 = limit - cursor;
|
||||
lab2:
|
||||
{
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0) {
|
||||
break lab2;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R1()) {
|
||||
break lab2;
|
||||
}
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!(in_grouping_b(g_st_ending, 98, 116))) {
|
||||
break lab2;
|
||||
}
|
||||
{
|
||||
int c = cursor - 3;
|
||||
if (limit_backward > c || c > limit) {
|
||||
break lab2;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
lab3:
|
||||
{
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_4);
|
||||
if (among_var == 0) {
|
||||
break lab3;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R2()) {
|
||||
break lab3;
|
||||
}
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
int v_5 = limit - cursor;
|
||||
lab4:
|
||||
{
|
||||
ket = cursor;
|
||||
if (!(eq_s_b("ig"))) {
|
||||
cursor = limit - v_5;
|
||||
break lab4;
|
||||
}
|
||||
cursor = limit - v_6;
|
||||
bra = cursor;
|
||||
{
|
||||
int v_6 = limit - cursor;
|
||||
lab5:
|
||||
{
|
||||
if (!(eq_s_b("e"))) {
|
||||
break lab5;
|
||||
}
|
||||
cursor = limit - v_5;
|
||||
break lab4;
|
||||
}
|
||||
cursor = limit - v_6;
|
||||
}
|
||||
if (!r_R2()) {
|
||||
cursor = limit - v_5;
|
||||
break lab4;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
if (!r_R2())
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
cursor = limit - v_5;
|
||||
break lab4;
|
||||
int v_7 = limit - cursor;
|
||||
lab6:
|
||||
{
|
||||
if (!(eq_s_b("e"))) {
|
||||
break lab6;
|
||||
}
|
||||
break lab3;
|
||||
}
|
||||
cursor = limit - v_7;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
{
|
||||
int v_7 = limit - cursor;
|
||||
lab6: {
|
||||
if (!(eq_s_b("e")))
|
||||
break;
|
||||
case 3:
|
||||
slice_del();
|
||||
int v_8 = limit - cursor;
|
||||
lab7:
|
||||
{
|
||||
ket = cursor;
|
||||
lab8:
|
||||
{
|
||||
break lab6;
|
||||
}
|
||||
break lab3;
|
||||
}
|
||||
cursor = limit - v_7;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 3:
|
||||
slice_del();
|
||||
int v_8 = limit - cursor;
|
||||
lab7: {
|
||||
ket = cursor;
|
||||
lab8: {
|
||||
int v_9 = limit - cursor;
|
||||
lab9: {
|
||||
if (!(eq_s_b("er")))
|
||||
int v_9 = limit - cursor;
|
||||
lab9:
|
||||
{
|
||||
break lab9;
|
||||
if (!(eq_s_b("er"))) {
|
||||
break lab9;
|
||||
}
|
||||
break lab8;
|
||||
}
|
||||
cursor = limit - v_9;
|
||||
if (!(eq_s_b("en"))) {
|
||||
cursor = limit - v_8;
|
||||
break lab7;
|
||||
}
|
||||
break lab8;
|
||||
}
|
||||
cursor = limit - v_9;
|
||||
if (!(eq_s_b("en")))
|
||||
{
|
||||
bra = cursor;
|
||||
if (!r_R1()) {
|
||||
cursor = limit - v_8;
|
||||
break lab7;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R1())
|
||||
{
|
||||
cursor = limit - v_8;
|
||||
break lab7;
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
case 4:
|
||||
slice_del();
|
||||
int v_10 = limit - cursor;
|
||||
lab10: {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_3) == 0)
|
||||
int v_10 = limit - cursor;
|
||||
lab10:
|
||||
{
|
||||
cursor = limit - v_10;
|
||||
break lab10;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_3) == 0) {
|
||||
cursor = limit - v_10;
|
||||
break lab10;
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R2()) {
|
||||
cursor = limit - v_10;
|
||||
break lab10;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
bra = cursor;
|
||||
if (!r_R2())
|
||||
{
|
||||
cursor = limit - v_10;
|
||||
break lab10;
|
||||
}
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_4;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_prelude();
|
||||
cursor = v_1;
|
||||
int v_2 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_2;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
r_standard_suffix();
|
||||
cursor = limit_backward;
|
||||
int v_4 = cursor;
|
||||
r_postlude();
|
||||
cursor = v_4;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof GermanStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return GermanStemmer.class.getName().hashCode();
|
||||
}
|
||||
cursor = limit - v_4;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_prelude();
|
||||
cursor = v_1;
|
||||
int v_2 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_2;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
r_standard_suffix();
|
||||
cursor = limit_backward;
|
||||
int v_4 = cursor;
|
||||
r_postlude();
|
||||
cursor = v_4;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof GermanStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return GermanStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,206 +6,197 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class HindiStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("\u0906\u0901", -1, -1),
|
||||
new Among("\u093E\u0901", -1, -1),
|
||||
new Among("\u0907\u092F\u093E\u0901", 1, -1),
|
||||
new Among("\u0906\u0907\u092F\u093E\u0901", 2, -1),
|
||||
new Among("\u093E\u0907\u092F\u093E\u0901", 2, -1),
|
||||
new Among("\u093F\u092F\u093E\u0901", 1, -1),
|
||||
new Among("\u0906\u0902", -1, -1),
|
||||
new Among("\u0909\u0906\u0902", 6, -1),
|
||||
new Among("\u0941\u0906\u0902", 6, -1),
|
||||
new Among("\u0908\u0902", -1, -1),
|
||||
new Among("\u0906\u0908\u0902", 9, -1),
|
||||
new Among("\u093E\u0908\u0902", 9, -1),
|
||||
new Among("\u090F\u0902", -1, -1),
|
||||
new Among("\u0906\u090F\u0902", 12, -1),
|
||||
new Among("\u0909\u090F\u0902", 12, -1),
|
||||
new Among("\u093E\u090F\u0902", 12, -1),
|
||||
new Among("\u0924\u093E\u090F\u0902", 15, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u093E\u090F\u0902", 16, -1),
|
||||
new Among("\u0928\u093E\u090F\u0902", 15, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u093E\u090F\u0902", 18, -1),
|
||||
new Among("\u0941\u090F\u0902", 12, -1),
|
||||
new Among("\u0913\u0902", -1, -1),
|
||||
new Among("\u0906\u0913\u0902", 21, -1),
|
||||
new Among("\u0909\u0913\u0902", 21, -1),
|
||||
new Among("\u093E\u0913\u0902", 21, -1),
|
||||
new Among("\u0924\u093E\u0913\u0902", 24, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u093E\u0913\u0902", 25, -1),
|
||||
new Among("\u0928\u093E\u0913\u0902", 24, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u093E\u0913\u0902", 27, -1),
|
||||
new Among("\u0941\u0913\u0902", 21, -1),
|
||||
new Among("\u093E\u0902", -1, -1),
|
||||
new Among("\u0907\u092F\u093E\u0902", 30, -1),
|
||||
new Among("\u0906\u0907\u092F\u093E\u0902", 31, -1),
|
||||
new Among("\u093E\u0907\u092F\u093E\u0902", 31, -1),
|
||||
new Among("\u093F\u092F\u093E\u0902", 30, -1),
|
||||
new Among("\u0940\u0902", -1, -1),
|
||||
new Among("\u0924\u0940\u0902", 35, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u0940\u0902", 36, -1),
|
||||
new Among("\u0906\u0924\u0940\u0902", 36, -1),
|
||||
new Among("\u093E\u0924\u0940\u0902", 36, -1),
|
||||
new Among("\u0947\u0902", -1, -1),
|
||||
new Among("\u094B\u0902", -1, -1),
|
||||
new Among("\u0907\u092F\u094B\u0902", 41, -1),
|
||||
new Among("\u0906\u0907\u092F\u094B\u0902", 42, -1),
|
||||
new Among("\u093E\u0907\u092F\u094B\u0902", 42, -1),
|
||||
new Among("\u093F\u092F\u094B\u0902", 41, -1),
|
||||
new Among("\u0905", -1, -1),
|
||||
new Among("\u0906", -1, -1),
|
||||
new Among("\u0907", -1, -1),
|
||||
new Among("\u0908", -1, -1),
|
||||
new Among("\u0906\u0908", 49, -1),
|
||||
new Among("\u093E\u0908", 49, -1),
|
||||
new Among("\u0909", -1, -1),
|
||||
new Among("\u090A", -1, -1),
|
||||
new Among("\u090F", -1, -1),
|
||||
new Among("\u0906\u090F", 54, -1),
|
||||
new Among("\u0907\u090F", 54, -1),
|
||||
new Among("\u0906\u0907\u090F", 56, -1),
|
||||
new Among("\u093E\u0907\u090F", 56, -1),
|
||||
new Among("\u093E\u090F", 54, -1),
|
||||
new Among("\u093F\u090F", 54, -1),
|
||||
new Among("\u0913", -1, -1),
|
||||
new Among("\u0906\u0913", 61, -1),
|
||||
new Among("\u093E\u0913", 61, -1),
|
||||
new Among("\u0915\u0930", -1, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0915\u0930", 64, -1),
|
||||
new Among("\u0906\u0915\u0930", 64, -1),
|
||||
new Among("\u093E\u0915\u0930", 64, -1),
|
||||
new Among("\u093E", -1, -1),
|
||||
new Among("\u090A\u0902\u0917\u093E", 68, -1),
|
||||
new Among("\u0906\u090A\u0902\u0917\u093E", 69, -1),
|
||||
new Among("\u093E\u090A\u0902\u0917\u093E", 69, -1),
|
||||
new Among("\u0942\u0902\u0917\u093E", 68, -1),
|
||||
new Among("\u090F\u0917\u093E", 68, -1),
|
||||
new Among("\u0906\u090F\u0917\u093E", 73, -1),
|
||||
new Among("\u093E\u090F\u0917\u093E", 73, -1),
|
||||
new Among("\u0947\u0917\u093E", 68, -1),
|
||||
new Among("\u0924\u093E", 68, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u093E", 77, -1),
|
||||
new Among("\u0906\u0924\u093E", 77, -1),
|
||||
new Among("\u093E\u0924\u093E", 77, -1),
|
||||
new Among("\u0928\u093E", 68, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u093E", 81, -1),
|
||||
new Among("\u0906\u0928\u093E", 81, -1),
|
||||
new Among("\u093E\u0928\u093E", 81, -1),
|
||||
new Among("\u0906\u092F\u093E", 68, -1),
|
||||
new Among("\u093E\u092F\u093E", 68, -1),
|
||||
new Among("\u093F", -1, -1),
|
||||
new Among("\u0940", -1, -1),
|
||||
new Among("\u090A\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u090A\u0902\u0917\u0940", 89, -1),
|
||||
new Among("\u093E\u090A\u0902\u0917\u0940", 89, -1),
|
||||
new Among("\u090F\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u090F\u0902\u0917\u0940", 92, -1),
|
||||
new Among("\u093E\u090F\u0902\u0917\u0940", 92, -1),
|
||||
new Among("\u0942\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u0947\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u090F\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u090F\u0917\u0940", 97, -1),
|
||||
new Among("\u093E\u090F\u0917\u0940", 97, -1),
|
||||
new Among("\u0913\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u0913\u0917\u0940", 100, -1),
|
||||
new Among("\u093E\u0913\u0917\u0940", 100, -1),
|
||||
new Among("\u0947\u0917\u0940", 88, -1),
|
||||
new Among("\u094B\u0917\u0940", 88, -1),
|
||||
new Among("\u0924\u0940", 88, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u0940", 105, -1),
|
||||
new Among("\u0906\u0924\u0940", 105, -1),
|
||||
new Among("\u093E\u0924\u0940", 105, -1),
|
||||
new Among("\u0928\u0940", 88, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u0940", 109, -1),
|
||||
new Among("\u0941", -1, -1),
|
||||
new Among("\u0942", -1, -1),
|
||||
new Among("\u0947", -1, -1),
|
||||
new Among("\u090F\u0902\u0917\u0947", 113, -1),
|
||||
new Among("\u0906\u090F\u0902\u0917\u0947", 114, -1),
|
||||
new Among("\u093E\u090F\u0902\u0917\u0947", 114, -1),
|
||||
new Among("\u0947\u0902\u0917\u0947", 113, -1),
|
||||
new Among("\u0913\u0917\u0947", 113, -1),
|
||||
new Among("\u0906\u0913\u0917\u0947", 118, -1),
|
||||
new Among("\u093E\u0913\u0917\u0947", 118, -1),
|
||||
new Among("\u094B\u0917\u0947", 113, -1),
|
||||
new Among("\u0924\u0947", 113, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u0947", 122, -1),
|
||||
new Among("\u0906\u0924\u0947", 122, -1),
|
||||
new Among("\u093E\u0924\u0947", 122, -1),
|
||||
new Among("\u0928\u0947", 113, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u0947", 126, -1),
|
||||
new Among("\u0906\u0928\u0947", 126, -1),
|
||||
new Among("\u093E\u0928\u0947", 126, -1),
|
||||
new Among("\u094B", -1, -1),
|
||||
new Among("\u094D", -1, -1)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("\u0906\u0901", -1, -1),
|
||||
new Among("\u093E\u0901", -1, -1),
|
||||
new Among("\u0907\u092F\u093E\u0901", 1, -1),
|
||||
new Among("\u0906\u0907\u092F\u093E\u0901", 2, -1),
|
||||
new Among("\u093E\u0907\u092F\u093E\u0901", 2, -1),
|
||||
new Among("\u093F\u092F\u093E\u0901", 1, -1),
|
||||
new Among("\u0906\u0902", -1, -1),
|
||||
new Among("\u0909\u0906\u0902", 6, -1),
|
||||
new Among("\u0941\u0906\u0902", 6, -1),
|
||||
new Among("\u0908\u0902", -1, -1),
|
||||
new Among("\u0906\u0908\u0902", 9, -1),
|
||||
new Among("\u093E\u0908\u0902", 9, -1),
|
||||
new Among("\u090F\u0902", -1, -1),
|
||||
new Among("\u0906\u090F\u0902", 12, -1),
|
||||
new Among("\u0909\u090F\u0902", 12, -1),
|
||||
new Among("\u093E\u090F\u0902", 12, -1),
|
||||
new Among("\u0924\u093E\u090F\u0902", 15, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u093E\u090F\u0902", 16, -1),
|
||||
new Among("\u0928\u093E\u090F\u0902", 15, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u093E\u090F\u0902", 18, -1),
|
||||
new Among("\u0941\u090F\u0902", 12, -1),
|
||||
new Among("\u0913\u0902", -1, -1),
|
||||
new Among("\u0906\u0913\u0902", 21, -1),
|
||||
new Among("\u0909\u0913\u0902", 21, -1),
|
||||
new Among("\u093E\u0913\u0902", 21, -1),
|
||||
new Among("\u0924\u093E\u0913\u0902", 24, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u093E\u0913\u0902", 25, -1),
|
||||
new Among("\u0928\u093E\u0913\u0902", 24, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u093E\u0913\u0902", 27, -1),
|
||||
new Among("\u0941\u0913\u0902", 21, -1),
|
||||
new Among("\u093E\u0902", -1, -1),
|
||||
new Among("\u0907\u092F\u093E\u0902", 30, -1),
|
||||
new Among("\u0906\u0907\u092F\u093E\u0902", 31, -1),
|
||||
new Among("\u093E\u0907\u092F\u093E\u0902", 31, -1),
|
||||
new Among("\u093F\u092F\u093E\u0902", 30, -1),
|
||||
new Among("\u0940\u0902", -1, -1),
|
||||
new Among("\u0924\u0940\u0902", 35, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u0940\u0902", 36, -1),
|
||||
new Among("\u0906\u0924\u0940\u0902", 36, -1),
|
||||
new Among("\u093E\u0924\u0940\u0902", 36, -1),
|
||||
new Among("\u0947\u0902", -1, -1),
|
||||
new Among("\u094B\u0902", -1, -1),
|
||||
new Among("\u0907\u092F\u094B\u0902", 41, -1),
|
||||
new Among("\u0906\u0907\u092F\u094B\u0902", 42, -1),
|
||||
new Among("\u093E\u0907\u092F\u094B\u0902", 42, -1),
|
||||
new Among("\u093F\u092F\u094B\u0902", 41, -1),
|
||||
new Among("\u0905", -1, -1),
|
||||
new Among("\u0906", -1, -1),
|
||||
new Among("\u0907", -1, -1),
|
||||
new Among("\u0908", -1, -1),
|
||||
new Among("\u0906\u0908", 49, -1),
|
||||
new Among("\u093E\u0908", 49, -1),
|
||||
new Among("\u0909", -1, -1),
|
||||
new Among("\u090A", -1, -1),
|
||||
new Among("\u090F", -1, -1),
|
||||
new Among("\u0906\u090F", 54, -1),
|
||||
new Among("\u0907\u090F", 54, -1),
|
||||
new Among("\u0906\u0907\u090F", 56, -1),
|
||||
new Among("\u093E\u0907\u090F", 56, -1),
|
||||
new Among("\u093E\u090F", 54, -1),
|
||||
new Among("\u093F\u090F", 54, -1),
|
||||
new Among("\u0913", -1, -1),
|
||||
new Among("\u0906\u0913", 61, -1),
|
||||
new Among("\u093E\u0913", 61, -1),
|
||||
new Among("\u0915\u0930", -1, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0915\u0930", 64, -1),
|
||||
new Among("\u0906\u0915\u0930", 64, -1),
|
||||
new Among("\u093E\u0915\u0930", 64, -1),
|
||||
new Among("\u093E", -1, -1),
|
||||
new Among("\u090A\u0902\u0917\u093E", 68, -1),
|
||||
new Among("\u0906\u090A\u0902\u0917\u093E", 69, -1),
|
||||
new Among("\u093E\u090A\u0902\u0917\u093E", 69, -1),
|
||||
new Among("\u0942\u0902\u0917\u093E", 68, -1),
|
||||
new Among("\u090F\u0917\u093E", 68, -1),
|
||||
new Among("\u0906\u090F\u0917\u093E", 73, -1),
|
||||
new Among("\u093E\u090F\u0917\u093E", 73, -1),
|
||||
new Among("\u0947\u0917\u093E", 68, -1),
|
||||
new Among("\u0924\u093E", 68, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u093E", 77, -1),
|
||||
new Among("\u0906\u0924\u093E", 77, -1),
|
||||
new Among("\u093E\u0924\u093E", 77, -1),
|
||||
new Among("\u0928\u093E", 68, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u093E", 81, -1),
|
||||
new Among("\u0906\u0928\u093E", 81, -1),
|
||||
new Among("\u093E\u0928\u093E", 81, -1),
|
||||
new Among("\u0906\u092F\u093E", 68, -1),
|
||||
new Among("\u093E\u092F\u093E", 68, -1),
|
||||
new Among("\u093F", -1, -1),
|
||||
new Among("\u0940", -1, -1),
|
||||
new Among("\u090A\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u090A\u0902\u0917\u0940", 89, -1),
|
||||
new Among("\u093E\u090A\u0902\u0917\u0940", 89, -1),
|
||||
new Among("\u090F\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u090F\u0902\u0917\u0940", 92, -1),
|
||||
new Among("\u093E\u090F\u0902\u0917\u0940", 92, -1),
|
||||
new Among("\u0942\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u0947\u0902\u0917\u0940", 88, -1),
|
||||
new Among("\u090F\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u090F\u0917\u0940", 97, -1),
|
||||
new Among("\u093E\u090F\u0917\u0940", 97, -1),
|
||||
new Among("\u0913\u0917\u0940", 88, -1),
|
||||
new Among("\u0906\u0913\u0917\u0940", 100, -1),
|
||||
new Among("\u093E\u0913\u0917\u0940", 100, -1),
|
||||
new Among("\u0947\u0917\u0940", 88, -1),
|
||||
new Among("\u094B\u0917\u0940", 88, -1),
|
||||
new Among("\u0924\u0940", 88, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u0940", 105, -1),
|
||||
new Among("\u0906\u0924\u0940", 105, -1),
|
||||
new Among("\u093E\u0924\u0940", 105, -1),
|
||||
new Among("\u0928\u0940", 88, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u0940", 109, -1),
|
||||
new Among("\u0941", -1, -1),
|
||||
new Among("\u0942", -1, -1),
|
||||
new Among("\u0947", -1, -1),
|
||||
new Among("\u090F\u0902\u0917\u0947", 113, -1),
|
||||
new Among("\u0906\u090F\u0902\u0917\u0947", 114, -1),
|
||||
new Among("\u093E\u090F\u0902\u0917\u0947", 114, -1),
|
||||
new Among("\u0947\u0902\u0917\u0947", 113, -1),
|
||||
new Among("\u0913\u0917\u0947", 113, -1),
|
||||
new Among("\u0906\u0913\u0917\u0947", 118, -1),
|
||||
new Among("\u093E\u0913\u0917\u0947", 118, -1),
|
||||
new Among("\u094B\u0917\u0947", 113, -1),
|
||||
new Among("\u0924\u0947", 113, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0924\u0947", 122, -1),
|
||||
new Among("\u0906\u0924\u0947", 122, -1),
|
||||
new Among("\u093E\u0924\u0947", 122, -1),
|
||||
new Among("\u0928\u0947", 113, -1, "r_CONSONANT", methodObject),
|
||||
new Among("\u0905\u0928\u0947", 126, -1),
|
||||
new Among("\u0906\u0928\u0947", 126, -1),
|
||||
new Among("\u093E\u0928\u0947", 126, -1),
|
||||
new Among("\u094B", -1, -1),
|
||||
new Among("\u094D", -1, -1)
|
||||
};
|
||||
|
||||
private static final char g_consonant[] = {255, 255, 255, 255, 159, 0, 0, 0, 248, 7 };
|
||||
private static final char g_consonant[] = {255, 255, 255, 255, 159, 0, 0, 0, 248, 7};
|
||||
|
||||
private int I_p;
|
||||
private int I_p;
|
||||
|
||||
|
||||
public boolean r_CONSONANT() {
|
||||
if (!(in_grouping_b(g_consonant, 2325, 2399)))
|
||||
{
|
||||
return false;
|
||||
public boolean r_CONSONANT() {
|
||||
if (!(in_grouping_b(g_consonant, 2325, 2399))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
I_p = cursor;
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
if (cursor < I_p)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_0) == 0)
|
||||
{
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
I_p = cursor;
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
if (cursor < I_p) {
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_0) == 0) {
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
slice_del();
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof HindiStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HindiStemmer.class.getName().hashCode();
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
slice_del();
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof HindiStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return HindiStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -6,388 +6,363 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class IndonesianStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("kah", -1, 1),
|
||||
new Among("lah", -1, 1),
|
||||
new Among("pun", -1, 1)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("kah", -1, 1), new Among("lah", -1, 1), new Among("pun", -1, 1)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("nya", -1, 1),
|
||||
new Among("ku", -1, 1),
|
||||
new Among("mu", -1, 1)
|
||||
};
|
||||
private static final Among a_1[] = {
|
||||
new Among("nya", -1, 1), new Among("ku", -1, 1), new Among("mu", -1, 1)
|
||||
};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("i", -1, 1, "r_SUFFIX_I_OK", methodObject),
|
||||
new Among("an", -1, 1, "r_SUFFIX_AN_OK", methodObject),
|
||||
new Among("kan", 1, 1, "r_SUFFIX_KAN_OK", methodObject)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("i", -1, 1, "r_SUFFIX_I_OK", methodObject),
|
||||
new Among("an", -1, 1, "r_SUFFIX_AN_OK", methodObject),
|
||||
new Among("kan", 1, 1, "r_SUFFIX_KAN_OK", methodObject)
|
||||
};
|
||||
|
||||
private final static Among a_3[] = {
|
||||
new Among("di", -1, 1),
|
||||
new Among("ke", -1, 2),
|
||||
new Among("me", -1, 1),
|
||||
new Among("mem", 2, 5),
|
||||
new Among("men", 2, 1),
|
||||
new Among("meng", 4, 1),
|
||||
new Among("meny", 4, 3, "r_VOWEL", methodObject),
|
||||
new Among("pem", -1, 6),
|
||||
new Among("pen", -1, 2),
|
||||
new Among("peng", 8, 2),
|
||||
new Among("peny", 8, 4, "r_VOWEL", methodObject),
|
||||
new Among("ter", -1, 1)
|
||||
};
|
||||
private static final Among a_3[] = {
|
||||
new Among("di", -1, 1),
|
||||
new Among("ke", -1, 2),
|
||||
new Among("me", -1, 1),
|
||||
new Among("mem", 2, 5),
|
||||
new Among("men", 2, 1),
|
||||
new Among("meng", 4, 1),
|
||||
new Among("meny", 4, 3, "r_VOWEL", methodObject),
|
||||
new Among("pem", -1, 6),
|
||||
new Among("pen", -1, 2),
|
||||
new Among("peng", 8, 2),
|
||||
new Among("peny", 8, 4, "r_VOWEL", methodObject),
|
||||
new Among("ter", -1, 1)
|
||||
};
|
||||
|
||||
private final static Among a_4[] = {
|
||||
new Among("be", -1, 3, "r_KER", methodObject),
|
||||
new Among("belajar", 0, 4),
|
||||
new Among("ber", 0, 3),
|
||||
new Among("pe", -1, 1),
|
||||
new Among("pelajar", 3, 2),
|
||||
new Among("per", 3, 1)
|
||||
};
|
||||
private static final Among a_4[] = {
|
||||
new Among("be", -1, 3, "r_KER", methodObject),
|
||||
new Among("belajar", 0, 4),
|
||||
new Among("ber", 0, 3),
|
||||
new Among("pe", -1, 1),
|
||||
new Among("pelajar", 3, 2),
|
||||
new Among("per", 3, 1)
|
||||
};
|
||||
|
||||
private static final char g_vowel[] = {17, 65, 16 };
|
||||
private static final char g_vowel[] = {17, 65, 16};
|
||||
|
||||
private int I_prefix;
|
||||
private int I_measure;
|
||||
private int I_prefix;
|
||||
private int I_measure;
|
||||
|
||||
|
||||
private boolean r_remove_particle() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_0) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
I_measure -= 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_possessive_pronoun() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
I_measure -= 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean r_SUFFIX_KAN_OK() {
|
||||
if (!(I_prefix != 3))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!(I_prefix != 2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean r_SUFFIX_AN_OK() {
|
||||
if (!(I_prefix != 1))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean r_SUFFIX_I_OK() {
|
||||
if (!(I_prefix <= 2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
{
|
||||
int v_1 = limit - cursor;
|
||||
lab0: {
|
||||
if (!(eq_s_b("s")))
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
private boolean r_remove_particle() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_0) == 0) {
|
||||
return false;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
I_measure -= 1;
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_suffix() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_2) == 0)
|
||||
{
|
||||
return false;
|
||||
private boolean r_remove_possessive_pronoun() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
I_measure -= 1;
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
I_measure -= 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean r_VOWEL() {
|
||||
if (!(in_grouping(g_vowel, 97, 117)))
|
||||
{
|
||||
return false;
|
||||
public boolean r_SUFFIX_KAN_OK() {
|
||||
if (!(I_prefix != 3)) {
|
||||
return false;
|
||||
}
|
||||
if (!(I_prefix != 2)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean r_KER() {
|
||||
if (!(out_grouping(g_vowel, 97, 117)))
|
||||
{
|
||||
return false;
|
||||
public boolean r_SUFFIX_AN_OK() {
|
||||
if (!(I_prefix != 1)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
if (!(eq_s("er")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_first_order_prefix() {
|
||||
int among_var;
|
||||
bra = cursor;
|
||||
among_var = find_among(a_3);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
I_prefix = 1;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 2:
|
||||
slice_del();
|
||||
I_prefix = 3;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 3:
|
||||
I_prefix = 1;
|
||||
slice_from("s");
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 4:
|
||||
I_prefix = 3;
|
||||
slice_from("s");
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 5:
|
||||
I_prefix = 1;
|
||||
I_measure -= 1;
|
||||
lab0: {
|
||||
int v_1 = cursor;
|
||||
lab1: {
|
||||
int v_2 = cursor;
|
||||
if (!(in_grouping(g_vowel, 97, 117)))
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_2;
|
||||
slice_from("p");
|
||||
public boolean r_SUFFIX_I_OK() {
|
||||
if (!(I_prefix <= 2)) {
|
||||
return false;
|
||||
}
|
||||
{
|
||||
int v_1 = limit - cursor;
|
||||
lab0:
|
||||
{
|
||||
if (!(eq_s_b("s"))) {
|
||||
break lab0;
|
||||
}
|
||||
cursor = v_1;
|
||||
slice_del();
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
I_prefix = 3;
|
||||
I_measure -= 1;
|
||||
lab2: {
|
||||
int v_3 = cursor;
|
||||
lab3: {
|
||||
int v_4 = cursor;
|
||||
if (!(in_grouping(g_vowel, 97, 117)))
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
cursor = v_4;
|
||||
slice_from("p");
|
||||
break lab2;
|
||||
}
|
||||
cursor = v_3;
|
||||
cursor = limit - v_1;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_suffix() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_2) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
I_measure -= 1;
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean r_VOWEL() {
|
||||
if (!(in_grouping(g_vowel, 97, 117))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean r_KER() {
|
||||
if (!(out_grouping(g_vowel, 97, 117))) {
|
||||
return false;
|
||||
}
|
||||
if (!(eq_s("er"))) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_first_order_prefix() {
|
||||
int among_var;
|
||||
bra = cursor;
|
||||
among_var = find_among(a_3);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_second_order_prefix() {
|
||||
int among_var;
|
||||
bra = cursor;
|
||||
among_var = find_among(a_4);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
I_prefix = 2;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 2:
|
||||
slice_from("ajar");
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 3:
|
||||
slice_del();
|
||||
I_prefix = 4;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 4:
|
||||
slice_from("ajar");
|
||||
I_prefix = 4;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
I_measure = 0;
|
||||
int v_1 = cursor;
|
||||
lab0: {
|
||||
while(true)
|
||||
{
|
||||
int v_2 = cursor;
|
||||
lab1: {
|
||||
golab2: while(true)
|
||||
I_prefix = 1;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 2:
|
||||
slice_del();
|
||||
I_prefix = 3;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 3:
|
||||
I_prefix = 1;
|
||||
slice_from("s");
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 4:
|
||||
I_prefix = 3;
|
||||
slice_from("s");
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 5:
|
||||
I_prefix = 1;
|
||||
I_measure -= 1;
|
||||
lab0:
|
||||
{
|
||||
lab3: {
|
||||
if (!(in_grouping(g_vowel, 97, 117)))
|
||||
{
|
||||
int v_1 = cursor;
|
||||
lab1:
|
||||
{
|
||||
int v_2 = cursor;
|
||||
if (!(in_grouping(g_vowel, 97, 117))) {
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_2;
|
||||
slice_from("p");
|
||||
break lab0;
|
||||
}
|
||||
cursor = v_1;
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
case 6:
|
||||
I_prefix = 3;
|
||||
I_measure -= 1;
|
||||
lab2:
|
||||
{
|
||||
int v_3 = cursor;
|
||||
lab3:
|
||||
{
|
||||
int v_4 = cursor;
|
||||
if (!(in_grouping(g_vowel, 97, 117))) {
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
cursor = v_4;
|
||||
slice_from("p");
|
||||
break lab2;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
cursor++;
|
||||
cursor = v_3;
|
||||
slice_del();
|
||||
}
|
||||
I_measure += 1;
|
||||
continue;
|
||||
}
|
||||
cursor = v_2;
|
||||
break;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
cursor = v_1;
|
||||
if (!(I_measure > 2))
|
||||
{
|
||||
return false;
|
||||
|
||||
private boolean r_remove_second_order_prefix() {
|
||||
int among_var;
|
||||
bra = cursor;
|
||||
among_var = find_among(a_4);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
I_prefix = 2;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 2:
|
||||
slice_from("ajar");
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 3:
|
||||
slice_del();
|
||||
I_prefix = 4;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
case 4:
|
||||
slice_from("ajar");
|
||||
I_prefix = 4;
|
||||
I_measure -= 1;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
I_prefix = 0;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_4 = limit - cursor;
|
||||
r_remove_particle();
|
||||
cursor = limit - v_4;
|
||||
if (!(I_measure > 2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_5 = limit - cursor;
|
||||
r_remove_possessive_pronoun();
|
||||
cursor = limit - v_5;
|
||||
cursor = limit_backward;
|
||||
if (!(I_measure > 2))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
lab4: {
|
||||
int v_6 = cursor;
|
||||
lab5: {
|
||||
int v_7 = cursor;
|
||||
if (!r_remove_first_order_prefix())
|
||||
{
|
||||
break lab5;
|
||||
}
|
||||
int v_8 = cursor;
|
||||
lab6: {
|
||||
int v_9 = cursor;
|
||||
if (!(I_measure > 2))
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
I_measure = 0;
|
||||
int v_1 = cursor;
|
||||
lab0:
|
||||
{
|
||||
while (true) {
|
||||
int v_2 = cursor;
|
||||
lab1:
|
||||
{
|
||||
break lab6;
|
||||
golab2:
|
||||
while (true) {
|
||||
lab3:
|
||||
{
|
||||
if (!(in_grouping(g_vowel, 97, 117))) {
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
if (cursor >= limit) {
|
||||
break lab1;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_measure += 1;
|
||||
continue;
|
||||
}
|
||||
cursor = v_2;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cursor = v_1;
|
||||
if (!(I_measure > 2)) {
|
||||
return false;
|
||||
}
|
||||
I_prefix = 0;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_4 = limit - cursor;
|
||||
r_remove_particle();
|
||||
cursor = limit - v_4;
|
||||
if (!(I_measure > 2)) {
|
||||
return false;
|
||||
}
|
||||
int v_5 = limit - cursor;
|
||||
r_remove_possessive_pronoun();
|
||||
cursor = limit - v_5;
|
||||
cursor = limit_backward;
|
||||
if (!(I_measure > 2)) {
|
||||
return false;
|
||||
}
|
||||
lab4:
|
||||
{
|
||||
int v_6 = cursor;
|
||||
lab5:
|
||||
{
|
||||
int v_7 = cursor;
|
||||
if (!r_remove_first_order_prefix()) {
|
||||
break lab5;
|
||||
}
|
||||
int v_8 = cursor;
|
||||
lab6:
|
||||
{
|
||||
int v_9 = cursor;
|
||||
if (!(I_measure > 2)) {
|
||||
break lab6;
|
||||
}
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
if (!r_remove_suffix()) {
|
||||
break lab6;
|
||||
}
|
||||
cursor = limit_backward;
|
||||
cursor = v_9;
|
||||
if (!(I_measure > 2)) {
|
||||
break lab6;
|
||||
}
|
||||
if (!r_remove_second_order_prefix()) {
|
||||
break lab6;
|
||||
}
|
||||
}
|
||||
cursor = v_8;
|
||||
cursor = v_7;
|
||||
break lab4;
|
||||
}
|
||||
cursor = v_6;
|
||||
int v_10 = cursor;
|
||||
r_remove_second_order_prefix();
|
||||
cursor = v_10;
|
||||
int v_11 = cursor;
|
||||
lab7:
|
||||
{
|
||||
if (!(I_measure > 2)) {
|
||||
break lab7;
|
||||
}
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
if (!r_remove_suffix())
|
||||
{
|
||||
break lab6;
|
||||
if (!r_remove_suffix()) {
|
||||
break lab7;
|
||||
}
|
||||
cursor = limit_backward;
|
||||
cursor = v_9;
|
||||
if (!(I_measure > 2))
|
||||
{
|
||||
break lab6;
|
||||
}
|
||||
if (!r_remove_second_order_prefix())
|
||||
{
|
||||
break lab6;
|
||||
}
|
||||
}
|
||||
cursor = v_8;
|
||||
cursor = v_7;
|
||||
break lab4;
|
||||
cursor = v_11;
|
||||
}
|
||||
cursor = v_6;
|
||||
int v_10 = cursor;
|
||||
r_remove_second_order_prefix();
|
||||
cursor = v_10;
|
||||
int v_11 = cursor;
|
||||
lab7: {
|
||||
if (!(I_measure > 2))
|
||||
{
|
||||
break lab7;
|
||||
}
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
if (!r_remove_suffix())
|
||||
{
|
||||
break lab7;
|
||||
}
|
||||
cursor = limit_backward;
|
||||
}
|
||||
cursor = v_11;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof IndonesianStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return IndonesianStemmer.class.getName().hashCode();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof IndonesianStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return IndonesianStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,397 +6,379 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class IrishStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("b'", -1, 1),
|
||||
new Among("bh", -1, 4),
|
||||
new Among("bhf", 1, 2),
|
||||
new Among("bp", -1, 8),
|
||||
new Among("ch", -1, 5),
|
||||
new Among("d'", -1, 1),
|
||||
new Among("d'fh", 5, 2),
|
||||
new Among("dh", -1, 6),
|
||||
new Among("dt", -1, 9),
|
||||
new Among("fh", -1, 2),
|
||||
new Among("gc", -1, 5),
|
||||
new Among("gh", -1, 7),
|
||||
new Among("h-", -1, 1),
|
||||
new Among("m'", -1, 1),
|
||||
new Among("mb", -1, 4),
|
||||
new Among("mh", -1, 10),
|
||||
new Among("n-", -1, 1),
|
||||
new Among("nd", -1, 6),
|
||||
new Among("ng", -1, 7),
|
||||
new Among("ph", -1, 8),
|
||||
new Among("sh", -1, 3),
|
||||
new Among("t-", -1, 1),
|
||||
new Among("th", -1, 9),
|
||||
new Among("ts", -1, 3)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("b'", -1, 1),
|
||||
new Among("bh", -1, 4),
|
||||
new Among("bhf", 1, 2),
|
||||
new Among("bp", -1, 8),
|
||||
new Among("ch", -1, 5),
|
||||
new Among("d'", -1, 1),
|
||||
new Among("d'fh", 5, 2),
|
||||
new Among("dh", -1, 6),
|
||||
new Among("dt", -1, 9),
|
||||
new Among("fh", -1, 2),
|
||||
new Among("gc", -1, 5),
|
||||
new Among("gh", -1, 7),
|
||||
new Among("h-", -1, 1),
|
||||
new Among("m'", -1, 1),
|
||||
new Among("mb", -1, 4),
|
||||
new Among("mh", -1, 10),
|
||||
new Among("n-", -1, 1),
|
||||
new Among("nd", -1, 6),
|
||||
new Among("ng", -1, 7),
|
||||
new Among("ph", -1, 8),
|
||||
new Among("sh", -1, 3),
|
||||
new Among("t-", -1, 1),
|
||||
new Among("th", -1, 9),
|
||||
new Among("ts", -1, 3)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("\u00EDochta", -1, 1),
|
||||
new Among("a\u00EDochta", 0, 1),
|
||||
new Among("ire", -1, 2),
|
||||
new Among("aire", 2, 2),
|
||||
new Among("abh", -1, 1),
|
||||
new Among("eabh", 4, 1),
|
||||
new Among("ibh", -1, 1),
|
||||
new Among("aibh", 6, 1),
|
||||
new Among("amh", -1, 1),
|
||||
new Among("eamh", 8, 1),
|
||||
new Among("imh", -1, 1),
|
||||
new Among("aimh", 10, 1),
|
||||
new Among("\u00EDocht", -1, 1),
|
||||
new Among("a\u00EDocht", 12, 1),
|
||||
new Among("ir\u00ED", -1, 2),
|
||||
new Among("air\u00ED", 14, 2)
|
||||
};
|
||||
private static final Among a_1[] = {
|
||||
new Among("\u00EDochta", -1, 1),
|
||||
new Among("a\u00EDochta", 0, 1),
|
||||
new Among("ire", -1, 2),
|
||||
new Among("aire", 2, 2),
|
||||
new Among("abh", -1, 1),
|
||||
new Among("eabh", 4, 1),
|
||||
new Among("ibh", -1, 1),
|
||||
new Among("aibh", 6, 1),
|
||||
new Among("amh", -1, 1),
|
||||
new Among("eamh", 8, 1),
|
||||
new Among("imh", -1, 1),
|
||||
new Among("aimh", 10, 1),
|
||||
new Among("\u00EDocht", -1, 1),
|
||||
new Among("a\u00EDocht", 12, 1),
|
||||
new Among("ir\u00ED", -1, 2),
|
||||
new Among("air\u00ED", 14, 2)
|
||||
};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("\u00F3ideacha", -1, 6),
|
||||
new Among("patacha", -1, 5),
|
||||
new Among("achta", -1, 1),
|
||||
new Among("arcachta", 2, 2),
|
||||
new Among("eachta", 2, 1),
|
||||
new Among("grafa\u00EDochta", -1, 4),
|
||||
new Among("paite", -1, 5),
|
||||
new Among("ach", -1, 1),
|
||||
new Among("each", 7, 1),
|
||||
new Among("\u00F3ideach", 8, 6),
|
||||
new Among("gineach", 8, 3),
|
||||
new Among("patach", 7, 5),
|
||||
new Among("grafa\u00EDoch", -1, 4),
|
||||
new Among("pataigh", -1, 5),
|
||||
new Among("\u00F3idigh", -1, 6),
|
||||
new Among("acht\u00FAil", -1, 1),
|
||||
new Among("eacht\u00FAil", 15, 1),
|
||||
new Among("gineas", -1, 3),
|
||||
new Among("ginis", -1, 3),
|
||||
new Among("acht", -1, 1),
|
||||
new Among("arcacht", 19, 2),
|
||||
new Among("eacht", 19, 1),
|
||||
new Among("grafa\u00EDocht", -1, 4),
|
||||
new Among("arcachta\u00ED", -1, 2),
|
||||
new Among("grafa\u00EDochta\u00ED", -1, 4)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("\u00F3ideacha", -1, 6),
|
||||
new Among("patacha", -1, 5),
|
||||
new Among("achta", -1, 1),
|
||||
new Among("arcachta", 2, 2),
|
||||
new Among("eachta", 2, 1),
|
||||
new Among("grafa\u00EDochta", -1, 4),
|
||||
new Among("paite", -1, 5),
|
||||
new Among("ach", -1, 1),
|
||||
new Among("each", 7, 1),
|
||||
new Among("\u00F3ideach", 8, 6),
|
||||
new Among("gineach", 8, 3),
|
||||
new Among("patach", 7, 5),
|
||||
new Among("grafa\u00EDoch", -1, 4),
|
||||
new Among("pataigh", -1, 5),
|
||||
new Among("\u00F3idigh", -1, 6),
|
||||
new Among("acht\u00FAil", -1, 1),
|
||||
new Among("eacht\u00FAil", 15, 1),
|
||||
new Among("gineas", -1, 3),
|
||||
new Among("ginis", -1, 3),
|
||||
new Among("acht", -1, 1),
|
||||
new Among("arcacht", 19, 2),
|
||||
new Among("eacht", 19, 1),
|
||||
new Among("grafa\u00EDocht", -1, 4),
|
||||
new Among("arcachta\u00ED", -1, 2),
|
||||
new Among("grafa\u00EDochta\u00ED", -1, 4)
|
||||
};
|
||||
|
||||
private final static Among a_3[] = {
|
||||
new Among("imid", -1, 1),
|
||||
new Among("aimid", 0, 1),
|
||||
new Among("\u00EDmid", -1, 1),
|
||||
new Among("a\u00EDmid", 2, 1),
|
||||
new Among("adh", -1, 2),
|
||||
new Among("eadh", 4, 2),
|
||||
new Among("faidh", -1, 1),
|
||||
new Among("fidh", -1, 1),
|
||||
new Among("\u00E1il", -1, 2),
|
||||
new Among("ain", -1, 2),
|
||||
new Among("tear", -1, 2),
|
||||
new Among("tar", -1, 2)
|
||||
};
|
||||
private static final Among a_3[] = {
|
||||
new Among("imid", -1, 1),
|
||||
new Among("aimid", 0, 1),
|
||||
new Among("\u00EDmid", -1, 1),
|
||||
new Among("a\u00EDmid", 2, 1),
|
||||
new Among("adh", -1, 2),
|
||||
new Among("eadh", 4, 2),
|
||||
new Among("faidh", -1, 1),
|
||||
new Among("fidh", -1, 1),
|
||||
new Among("\u00E1il", -1, 2),
|
||||
new Among("ain", -1, 2),
|
||||
new Among("tear", -1, 2),
|
||||
new Among("tar", -1, 2)
|
||||
};
|
||||
|
||||
private static final char g_v[] = {17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 2 };
|
||||
private static final char g_v[] = {
|
||||
17, 65, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 4, 2
|
||||
};
|
||||
|
||||
private int I_p2;
|
||||
private int I_p1;
|
||||
private int I_pV;
|
||||
private int I_p2;
|
||||
private int I_p1;
|
||||
private int I_pV;
|
||||
|
||||
|
||||
private boolean r_mark_regions() {
|
||||
I_pV = limit;
|
||||
I_p1 = limit;
|
||||
I_p2 = limit;
|
||||
int v_1 = cursor;
|
||||
lab0: {
|
||||
golab1: while(true)
|
||||
private boolean r_mark_regions() {
|
||||
I_pV = limit;
|
||||
I_p1 = limit;
|
||||
I_p2 = limit;
|
||||
int v_1 = cursor;
|
||||
lab0:
|
||||
{
|
||||
lab2: {
|
||||
if (!(in_grouping(g_v, 97, 250)))
|
||||
golab1:
|
||||
while (true) {
|
||||
lab2:
|
||||
{
|
||||
break lab2;
|
||||
if (!(in_grouping(g_v, 97, 250))) {
|
||||
break lab2;
|
||||
}
|
||||
break golab1;
|
||||
}
|
||||
break golab1;
|
||||
if (cursor >= limit) {
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab0;
|
||||
}
|
||||
cursor++;
|
||||
I_pV = cursor;
|
||||
}
|
||||
I_pV = cursor;
|
||||
}
|
||||
cursor = v_1;
|
||||
int v_3 = cursor;
|
||||
lab3: {
|
||||
golab4: while(true)
|
||||
cursor = v_1;
|
||||
int v_3 = cursor;
|
||||
lab3:
|
||||
{
|
||||
lab5: {
|
||||
if (!(in_grouping(g_v, 97, 250)))
|
||||
golab4:
|
||||
while (true) {
|
||||
lab5:
|
||||
{
|
||||
break lab5;
|
||||
if (!(in_grouping(g_v, 97, 250))) {
|
||||
break lab5;
|
||||
}
|
||||
break golab4;
|
||||
}
|
||||
break golab4;
|
||||
if (cursor >= limit) {
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab6: while(true)
|
||||
{
|
||||
lab7: {
|
||||
if (!(out_grouping(g_v, 97, 250)))
|
||||
golab6:
|
||||
while (true) {
|
||||
lab7:
|
||||
{
|
||||
break lab7;
|
||||
if (!(out_grouping(g_v, 97, 250))) {
|
||||
break lab7;
|
||||
}
|
||||
break golab6;
|
||||
}
|
||||
break golab6;
|
||||
if (cursor >= limit) {
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
golab8: while(true)
|
||||
{
|
||||
lab9: {
|
||||
if (!(in_grouping(g_v, 97, 250)))
|
||||
I_p1 = cursor;
|
||||
golab8:
|
||||
while (true) {
|
||||
lab9:
|
||||
{
|
||||
break lab9;
|
||||
if (!(in_grouping(g_v, 97, 250))) {
|
||||
break lab9;
|
||||
}
|
||||
break golab8;
|
||||
}
|
||||
break golab8;
|
||||
if (cursor >= limit) {
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab10: while(true)
|
||||
{
|
||||
lab11: {
|
||||
if (!(out_grouping(g_v, 97, 250)))
|
||||
golab10:
|
||||
while (true) {
|
||||
lab11:
|
||||
{
|
||||
break lab11;
|
||||
if (!(out_grouping(g_v, 97, 250))) {
|
||||
break lab11;
|
||||
}
|
||||
break golab10;
|
||||
}
|
||||
break golab10;
|
||||
if (cursor >= limit) {
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
cursor++;
|
||||
I_p2 = cursor;
|
||||
}
|
||||
I_p2 = cursor;
|
||||
cursor = v_3;
|
||||
return true;
|
||||
}
|
||||
cursor = v_3;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_initial_morph() {
|
||||
int among_var;
|
||||
bra = cursor;
|
||||
among_var = find_among(a_0);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
private boolean r_initial_morph() {
|
||||
int among_var;
|
||||
bra = cursor;
|
||||
among_var = find_among(a_0);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_from("f");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("s");
|
||||
break;
|
||||
case 4:
|
||||
slice_from("b");
|
||||
break;
|
||||
case 5:
|
||||
slice_from("c");
|
||||
break;
|
||||
case 6:
|
||||
slice_from("d");
|
||||
break;
|
||||
case 7:
|
||||
slice_from("g");
|
||||
break;
|
||||
case 8:
|
||||
slice_from("p");
|
||||
break;
|
||||
case 9:
|
||||
slice_from("t");
|
||||
break;
|
||||
case 10:
|
||||
slice_from("m");
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
ket = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_from("f");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("s");
|
||||
break;
|
||||
case 4:
|
||||
slice_from("b");
|
||||
break;
|
||||
case 5:
|
||||
slice_from("c");
|
||||
break;
|
||||
case 6:
|
||||
slice_from("d");
|
||||
break;
|
||||
case 7:
|
||||
slice_from("g");
|
||||
break;
|
||||
case 8:
|
||||
slice_from("p");
|
||||
break;
|
||||
case 9:
|
||||
slice_from("t");
|
||||
break;
|
||||
case 10:
|
||||
slice_from("m");
|
||||
break;
|
||||
|
||||
private boolean r_RV() {
|
||||
if (!(I_pV <= cursor)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_RV() {
|
||||
if (!(I_pV <= cursor))
|
||||
{
|
||||
return false;
|
||||
private boolean r_R1() {
|
||||
if (!(I_p1 <= cursor)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_R1() {
|
||||
if (!(I_p1 <= cursor))
|
||||
{
|
||||
return false;
|
||||
private boolean r_R2() {
|
||||
if (!(I_p2 <= cursor)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_R2() {
|
||||
if (!(I_p2 <= cursor))
|
||||
{
|
||||
return false;
|
||||
private boolean r_noun_sfx() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_1);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
if (!r_R1()) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!r_R2()) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_noun_sfx() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_1);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
private boolean r_deriv() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
if (!r_R2()) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_from("arc");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("gin");
|
||||
break;
|
||||
case 4:
|
||||
slice_from("graf");
|
||||
break;
|
||||
case 5:
|
||||
slice_from("paite");
|
||||
break;
|
||||
case 6:
|
||||
slice_from("\u00F3id");
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
if (!r_R1())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!r_R2())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
|
||||
private boolean r_verb_sfx() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_3);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
if (!r_RV()) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!r_R1()) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_deriv() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_initial_morph();
|
||||
cursor = v_1;
|
||||
r_mark_regions();
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_3 = limit - cursor;
|
||||
r_noun_sfx();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_deriv();
|
||||
cursor = limit - v_4;
|
||||
int v_5 = limit - cursor;
|
||||
r_verb_sfx();
|
||||
cursor = limit - v_5;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
if (!r_R2())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_from("arc");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("gin");
|
||||
break;
|
||||
case 4:
|
||||
slice_from("graf");
|
||||
break;
|
||||
case 5:
|
||||
slice_from("paite");
|
||||
break;
|
||||
case 6:
|
||||
slice_from("\u00F3id");
|
||||
break;
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof IrishStemmer;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_verb_sfx() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_3);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return IrishStemmer.class.getName().hashCode();
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
if (!r_RV())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!r_R1())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_initial_morph();
|
||||
cursor = v_1;
|
||||
r_mark_regions();
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_3 = limit - cursor;
|
||||
r_noun_sfx();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_deriv();
|
||||
cursor = limit - v_4;
|
||||
int v_5 = limit - cursor;
|
||||
r_verb_sfx();
|
||||
cursor = limit - v_5;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof IrishStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return IrishStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -6,315 +6,301 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class NepaliStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("\u0932\u093E\u0907", -1, 1),
|
||||
new Among("\u0932\u093E\u0908", -1, 1),
|
||||
new Among("\u0938\u0901\u0917", -1, 1),
|
||||
new Among("\u0938\u0902\u0917", -1, 1),
|
||||
new Among("\u092E\u093E\u0930\u094D\u092B\u0924", -1, 1),
|
||||
new Among("\u0930\u0924", -1, 1),
|
||||
new Among("\u0915\u093E", -1, 2),
|
||||
new Among("\u092E\u093E", -1, 1),
|
||||
new Among("\u0926\u094D\u0935\u093E\u0930\u093E", -1, 1),
|
||||
new Among("\u0915\u093F", -1, 2),
|
||||
new Among("\u092A\u091B\u093F", -1, 1),
|
||||
new Among("\u0915\u0940", -1, 2),
|
||||
new Among("\u0932\u0947", -1, 1),
|
||||
new Among("\u0915\u0948", -1, 2),
|
||||
new Among("\u0938\u0901\u0917\u0948", -1, 1),
|
||||
new Among("\u092E\u0948", -1, 1),
|
||||
new Among("\u0915\u094B", -1, 2)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("\u0932\u093E\u0907", -1, 1),
|
||||
new Among("\u0932\u093E\u0908", -1, 1),
|
||||
new Among("\u0938\u0901\u0917", -1, 1),
|
||||
new Among("\u0938\u0902\u0917", -1, 1),
|
||||
new Among("\u092E\u093E\u0930\u094D\u092B\u0924", -1, 1),
|
||||
new Among("\u0930\u0924", -1, 1),
|
||||
new Among("\u0915\u093E", -1, 2),
|
||||
new Among("\u092E\u093E", -1, 1),
|
||||
new Among("\u0926\u094D\u0935\u093E\u0930\u093E", -1, 1),
|
||||
new Among("\u0915\u093F", -1, 2),
|
||||
new Among("\u092A\u091B\u093F", -1, 1),
|
||||
new Among("\u0915\u0940", -1, 2),
|
||||
new Among("\u0932\u0947", -1, 1),
|
||||
new Among("\u0915\u0948", -1, 2),
|
||||
new Among("\u0938\u0901\u0917\u0948", -1, 1),
|
||||
new Among("\u092E\u0948", -1, 1),
|
||||
new Among("\u0915\u094B", -1, 2)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("\u0901", -1, -1),
|
||||
new Among("\u0902", -1, -1),
|
||||
new Among("\u0948", -1, -1)
|
||||
};
|
||||
private static final Among a_1[] = {
|
||||
new Among("\u0901", -1, -1), new Among("\u0902", -1, -1), new Among("\u0948", -1, -1)
|
||||
};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("\u0901", -1, 1),
|
||||
new Among("\u0902", -1, 1),
|
||||
new Among("\u0948", -1, 2)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("\u0901", -1, 1), new Among("\u0902", -1, 1), new Among("\u0948", -1, 2)
|
||||
};
|
||||
|
||||
private final static Among a_3[] = {
|
||||
new Among("\u0925\u093F\u090F", -1, 1),
|
||||
new Among("\u091B", -1, 1),
|
||||
new Among("\u0907\u091B", 1, 1),
|
||||
new Among("\u090F\u091B", 1, 1),
|
||||
new Among("\u093F\u091B", 1, 1),
|
||||
new Among("\u0947\u091B", 1, 1),
|
||||
new Among("\u0928\u0947\u091B", 5, 1),
|
||||
new Among("\u0939\u0941\u0928\u0947\u091B", 6, 1),
|
||||
new Among("\u0907\u0928\u094D\u091B", 1, 1),
|
||||
new Among("\u093F\u0928\u094D\u091B", 1, 1),
|
||||
new Among("\u0939\u0941\u0928\u094D\u091B", 1, 1),
|
||||
new Among("\u090F\u0915\u093E", -1, 1),
|
||||
new Among("\u0907\u090F\u0915\u093E", 11, 1),
|
||||
new Among("\u093F\u090F\u0915\u093E", 11, 1),
|
||||
new Among("\u0947\u0915\u093E", -1, 1),
|
||||
new Among("\u0928\u0947\u0915\u093E", 14, 1),
|
||||
new Among("\u0926\u093E", -1, 1),
|
||||
new Among("\u0907\u0926\u093E", 16, 1),
|
||||
new Among("\u093F\u0926\u093E", 16, 1),
|
||||
new Among("\u0926\u0947\u0916\u093F", -1, 1),
|
||||
new Among("\u092E\u093E\u0925\u093F", -1, 1),
|
||||
new Among("\u090F\u0915\u0940", -1, 1),
|
||||
new Among("\u0907\u090F\u0915\u0940", 21, 1),
|
||||
new Among("\u093F\u090F\u0915\u0940", 21, 1),
|
||||
new Among("\u0947\u0915\u0940", -1, 1),
|
||||
new Among("\u0926\u0947\u0916\u0940", -1, 1),
|
||||
new Among("\u0925\u0940", -1, 1),
|
||||
new Among("\u0926\u0940", -1, 1),
|
||||
new Among("\u091B\u0941", -1, 1),
|
||||
new Among("\u090F\u091B\u0941", 28, 1),
|
||||
new Among("\u0947\u091B\u0941", 28, 1),
|
||||
new Among("\u0928\u0947\u091B\u0941", 30, 1),
|
||||
new Among("\u0928\u0941", -1, 1),
|
||||
new Among("\u0939\u0930\u0941", -1, 1),
|
||||
new Among("\u0939\u0930\u0942", -1, 1),
|
||||
new Among("\u091B\u0947", -1, 1),
|
||||
new Among("\u0925\u0947", -1, 1),
|
||||
new Among("\u0928\u0947", -1, 1),
|
||||
new Among("\u090F\u0915\u0948", -1, 1),
|
||||
new Among("\u0947\u0915\u0948", -1, 1),
|
||||
new Among("\u0928\u0947\u0915\u0948", 39, 1),
|
||||
new Among("\u0926\u0948", -1, 1),
|
||||
new Among("\u0907\u0926\u0948", 41, 1),
|
||||
new Among("\u093F\u0926\u0948", 41, 1),
|
||||
new Among("\u090F\u0915\u094B", -1, 1),
|
||||
new Among("\u0907\u090F\u0915\u094B", 44, 1),
|
||||
new Among("\u093F\u090F\u0915\u094B", 44, 1),
|
||||
new Among("\u0947\u0915\u094B", -1, 1),
|
||||
new Among("\u0928\u0947\u0915\u094B", 47, 1),
|
||||
new Among("\u0926\u094B", -1, 1),
|
||||
new Among("\u0907\u0926\u094B", 49, 1),
|
||||
new Among("\u093F\u0926\u094B", 49, 1),
|
||||
new Among("\u092F\u094B", -1, 1),
|
||||
new Among("\u0907\u092F\u094B", 52, 1),
|
||||
new Among("\u092D\u092F\u094B", 52, 1),
|
||||
new Among("\u093F\u092F\u094B", 52, 1),
|
||||
new Among("\u0925\u093F\u092F\u094B", 55, 1),
|
||||
new Among("\u0926\u093F\u092F\u094B", 55, 1),
|
||||
new Among("\u0925\u094D\u092F\u094B", 52, 1),
|
||||
new Among("\u091B\u094C", -1, 1),
|
||||
new Among("\u0907\u091B\u094C", 59, 1),
|
||||
new Among("\u090F\u091B\u094C", 59, 1),
|
||||
new Among("\u093F\u091B\u094C", 59, 1),
|
||||
new Among("\u0947\u091B\u094C", 59, 1),
|
||||
new Among("\u0928\u0947\u091B\u094C", 63, 1),
|
||||
new Among("\u092F\u094C", -1, 1),
|
||||
new Among("\u0925\u093F\u092F\u094C", 65, 1),
|
||||
new Among("\u091B\u094D\u092F\u094C", 65, 1),
|
||||
new Among("\u0925\u094D\u092F\u094C", 65, 1),
|
||||
new Among("\u091B\u0928\u094D", -1, 1),
|
||||
new Among("\u0907\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u090F\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u093F\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u0947\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u0928\u0947\u091B\u0928\u094D", 73, 1),
|
||||
new Among("\u0932\u093E\u0928\u094D", -1, 1),
|
||||
new Among("\u091B\u093F\u0928\u094D", -1, 1),
|
||||
new Among("\u0925\u093F\u0928\u094D", -1, 1),
|
||||
new Among("\u092A\u0930\u094D", -1, 1),
|
||||
new Among("\u0907\u0938\u094D", -1, 1),
|
||||
new Among("\u0925\u093F\u0907\u0938\u094D", 79, 1),
|
||||
new Among("\u091B\u0938\u094D", -1, 1),
|
||||
new Among("\u0907\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u090F\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u093F\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u0947\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u0928\u0947\u091B\u0938\u094D", 85, 1),
|
||||
new Among("\u093F\u0938\u094D", -1, 1),
|
||||
new Among("\u0925\u093F\u0938\u094D", 87, 1),
|
||||
new Among("\u091B\u0947\u0938\u094D", -1, 1),
|
||||
new Among("\u0939\u094B\u0938\u094D", -1, 1)
|
||||
};
|
||||
private static final Among a_3[] = {
|
||||
new Among("\u0925\u093F\u090F", -1, 1),
|
||||
new Among("\u091B", -1, 1),
|
||||
new Among("\u0907\u091B", 1, 1),
|
||||
new Among("\u090F\u091B", 1, 1),
|
||||
new Among("\u093F\u091B", 1, 1),
|
||||
new Among("\u0947\u091B", 1, 1),
|
||||
new Among("\u0928\u0947\u091B", 5, 1),
|
||||
new Among("\u0939\u0941\u0928\u0947\u091B", 6, 1),
|
||||
new Among("\u0907\u0928\u094D\u091B", 1, 1),
|
||||
new Among("\u093F\u0928\u094D\u091B", 1, 1),
|
||||
new Among("\u0939\u0941\u0928\u094D\u091B", 1, 1),
|
||||
new Among("\u090F\u0915\u093E", -1, 1),
|
||||
new Among("\u0907\u090F\u0915\u093E", 11, 1),
|
||||
new Among("\u093F\u090F\u0915\u093E", 11, 1),
|
||||
new Among("\u0947\u0915\u093E", -1, 1),
|
||||
new Among("\u0928\u0947\u0915\u093E", 14, 1),
|
||||
new Among("\u0926\u093E", -1, 1),
|
||||
new Among("\u0907\u0926\u093E", 16, 1),
|
||||
new Among("\u093F\u0926\u093E", 16, 1),
|
||||
new Among("\u0926\u0947\u0916\u093F", -1, 1),
|
||||
new Among("\u092E\u093E\u0925\u093F", -1, 1),
|
||||
new Among("\u090F\u0915\u0940", -1, 1),
|
||||
new Among("\u0907\u090F\u0915\u0940", 21, 1),
|
||||
new Among("\u093F\u090F\u0915\u0940", 21, 1),
|
||||
new Among("\u0947\u0915\u0940", -1, 1),
|
||||
new Among("\u0926\u0947\u0916\u0940", -1, 1),
|
||||
new Among("\u0925\u0940", -1, 1),
|
||||
new Among("\u0926\u0940", -1, 1),
|
||||
new Among("\u091B\u0941", -1, 1),
|
||||
new Among("\u090F\u091B\u0941", 28, 1),
|
||||
new Among("\u0947\u091B\u0941", 28, 1),
|
||||
new Among("\u0928\u0947\u091B\u0941", 30, 1),
|
||||
new Among("\u0928\u0941", -1, 1),
|
||||
new Among("\u0939\u0930\u0941", -1, 1),
|
||||
new Among("\u0939\u0930\u0942", -1, 1),
|
||||
new Among("\u091B\u0947", -1, 1),
|
||||
new Among("\u0925\u0947", -1, 1),
|
||||
new Among("\u0928\u0947", -1, 1),
|
||||
new Among("\u090F\u0915\u0948", -1, 1),
|
||||
new Among("\u0947\u0915\u0948", -1, 1),
|
||||
new Among("\u0928\u0947\u0915\u0948", 39, 1),
|
||||
new Among("\u0926\u0948", -1, 1),
|
||||
new Among("\u0907\u0926\u0948", 41, 1),
|
||||
new Among("\u093F\u0926\u0948", 41, 1),
|
||||
new Among("\u090F\u0915\u094B", -1, 1),
|
||||
new Among("\u0907\u090F\u0915\u094B", 44, 1),
|
||||
new Among("\u093F\u090F\u0915\u094B", 44, 1),
|
||||
new Among("\u0947\u0915\u094B", -1, 1),
|
||||
new Among("\u0928\u0947\u0915\u094B", 47, 1),
|
||||
new Among("\u0926\u094B", -1, 1),
|
||||
new Among("\u0907\u0926\u094B", 49, 1),
|
||||
new Among("\u093F\u0926\u094B", 49, 1),
|
||||
new Among("\u092F\u094B", -1, 1),
|
||||
new Among("\u0907\u092F\u094B", 52, 1),
|
||||
new Among("\u092D\u092F\u094B", 52, 1),
|
||||
new Among("\u093F\u092F\u094B", 52, 1),
|
||||
new Among("\u0925\u093F\u092F\u094B", 55, 1),
|
||||
new Among("\u0926\u093F\u092F\u094B", 55, 1),
|
||||
new Among("\u0925\u094D\u092F\u094B", 52, 1),
|
||||
new Among("\u091B\u094C", -1, 1),
|
||||
new Among("\u0907\u091B\u094C", 59, 1),
|
||||
new Among("\u090F\u091B\u094C", 59, 1),
|
||||
new Among("\u093F\u091B\u094C", 59, 1),
|
||||
new Among("\u0947\u091B\u094C", 59, 1),
|
||||
new Among("\u0928\u0947\u091B\u094C", 63, 1),
|
||||
new Among("\u092F\u094C", -1, 1),
|
||||
new Among("\u0925\u093F\u092F\u094C", 65, 1),
|
||||
new Among("\u091B\u094D\u092F\u094C", 65, 1),
|
||||
new Among("\u0925\u094D\u092F\u094C", 65, 1),
|
||||
new Among("\u091B\u0928\u094D", -1, 1),
|
||||
new Among("\u0907\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u090F\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u093F\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u0947\u091B\u0928\u094D", 69, 1),
|
||||
new Among("\u0928\u0947\u091B\u0928\u094D", 73, 1),
|
||||
new Among("\u0932\u093E\u0928\u094D", -1, 1),
|
||||
new Among("\u091B\u093F\u0928\u094D", -1, 1),
|
||||
new Among("\u0925\u093F\u0928\u094D", -1, 1),
|
||||
new Among("\u092A\u0930\u094D", -1, 1),
|
||||
new Among("\u0907\u0938\u094D", -1, 1),
|
||||
new Among("\u0925\u093F\u0907\u0938\u094D", 79, 1),
|
||||
new Among("\u091B\u0938\u094D", -1, 1),
|
||||
new Among("\u0907\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u090F\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u093F\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u0947\u091B\u0938\u094D", 81, 1),
|
||||
new Among("\u0928\u0947\u091B\u0938\u094D", 85, 1),
|
||||
new Among("\u093F\u0938\u094D", -1, 1),
|
||||
new Among("\u0925\u093F\u0938\u094D", 87, 1),
|
||||
new Among("\u091B\u0947\u0938\u094D", -1, 1),
|
||||
new Among("\u0939\u094B\u0938\u094D", -1, 1)
|
||||
};
|
||||
|
||||
|
||||
|
||||
private boolean r_remove_category_1() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
lab0: {
|
||||
int v_1 = limit - cursor;
|
||||
lab1: {
|
||||
lab2: {
|
||||
int v_2 = limit - cursor;
|
||||
lab3: {
|
||||
if (!(eq_s_b("\u090F")))
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
break lab2;
|
||||
}
|
||||
cursor = limit - v_2;
|
||||
if (!(eq_s_b("\u0947")))
|
||||
private boolean r_remove_category_1() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
lab0:
|
||||
{
|
||||
int v_1 = limit - cursor;
|
||||
lab1:
|
||||
{
|
||||
lab2:
|
||||
{
|
||||
int v_2 = limit - cursor;
|
||||
lab3:
|
||||
{
|
||||
if (!(eq_s_b("\u090F"))) {
|
||||
break lab3;
|
||||
}
|
||||
break lab2;
|
||||
}
|
||||
cursor = limit - v_2;
|
||||
if (!(eq_s_b("\u0947"))) {
|
||||
break lab1;
|
||||
}
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_check_category_2() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_category_2() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
lab0:
|
||||
{
|
||||
int v_1 = limit - cursor;
|
||||
lab1:
|
||||
{
|
||||
if (!(eq_s_b("\u092F\u094C"))) {
|
||||
break lab1;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
lab2:
|
||||
{
|
||||
if (!(eq_s_b("\u091B\u094C"))) {
|
||||
break lab2;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
lab3:
|
||||
{
|
||||
if (!(eq_s_b("\u0928\u094C"))) {
|
||||
break lab3;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
if (!(eq_s_b("\u0925\u0947"))) {
|
||||
return false;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
slice_del();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_check_category_2() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_category_2() {
|
||||
int among_var;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
lab0: {
|
||||
int v_1 = limit - cursor;
|
||||
lab1: {
|
||||
if (!(eq_s_b("\u092F\u094C")))
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
lab2: {
|
||||
if (!(eq_s_b("\u091B\u094C")))
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
lab3: {
|
||||
if (!(eq_s_b("\u0928\u094C")))
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_1;
|
||||
if (!(eq_s_b("\u0925\u0947")))
|
||||
{
|
||||
break;
|
||||
case 2:
|
||||
if (!(eq_s_b("\u0924\u094D\u0930"))) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!(eq_s_b("\u0924\u094D\u0930")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_category_3() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_3) == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_1 = limit - cursor;
|
||||
r_remove_category_1();
|
||||
cursor = limit - v_1;
|
||||
int v_2 = limit - cursor;
|
||||
lab0: {
|
||||
while(true)
|
||||
{
|
||||
int v_3 = limit - cursor;
|
||||
lab1: {
|
||||
int v_4 = limit - cursor;
|
||||
lab2: {
|
||||
int v_5 = limit - cursor;
|
||||
if (!r_check_category_2())
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
cursor = limit - v_5;
|
||||
if (!r_remove_category_2())
|
||||
{
|
||||
break lab2;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_4;
|
||||
if (!r_remove_category_3())
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
break;
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_remove_category_3() {
|
||||
ket = cursor;
|
||||
if (find_among_b(a_3) == 0) {
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_1 = limit - cursor;
|
||||
r_remove_category_1();
|
||||
cursor = limit - v_1;
|
||||
int v_2 = limit - cursor;
|
||||
lab0:
|
||||
{
|
||||
while (true) {
|
||||
int v_3 = limit - cursor;
|
||||
lab1:
|
||||
{
|
||||
int v_4 = limit - cursor;
|
||||
lab2:
|
||||
{
|
||||
int v_5 = limit - cursor;
|
||||
if (!r_check_category_2()) {
|
||||
break lab2;
|
||||
}
|
||||
cursor = limit - v_5;
|
||||
if (!r_remove_category_2()) {
|
||||
break lab2;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_4;
|
||||
if (!r_remove_category_3()) {
|
||||
break lab1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cursor = limit - v_2;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof NepaliStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return NepaliStemmer.class.getName().hashCode();
|
||||
}
|
||||
cursor = limit - v_2;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof NepaliStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return NepaliStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -6,259 +6,240 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class NorwegianStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("a", -1, 1),
|
||||
new Among("e", -1, 1),
|
||||
new Among("ede", 1, 1),
|
||||
new Among("ande", 1, 1),
|
||||
new Among("ende", 1, 1),
|
||||
new Among("ane", 1, 1),
|
||||
new Among("ene", 1, 1),
|
||||
new Among("hetene", 6, 1),
|
||||
new Among("erte", 1, 3),
|
||||
new Among("en", -1, 1),
|
||||
new Among("heten", 9, 1),
|
||||
new Among("ar", -1, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("heter", 12, 1),
|
||||
new Among("s", -1, 2),
|
||||
new Among("as", 14, 1),
|
||||
new Among("es", 14, 1),
|
||||
new Among("edes", 16, 1),
|
||||
new Among("endes", 16, 1),
|
||||
new Among("enes", 16, 1),
|
||||
new Among("hetenes", 19, 1),
|
||||
new Among("ens", 14, 1),
|
||||
new Among("hetens", 21, 1),
|
||||
new Among("ers", 14, 1),
|
||||
new Among("ets", 14, 1),
|
||||
new Among("et", -1, 1),
|
||||
new Among("het", 25, 1),
|
||||
new Among("ert", -1, 3),
|
||||
new Among("ast", -1, 1)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("a", -1, 1),
|
||||
new Among("e", -1, 1),
|
||||
new Among("ede", 1, 1),
|
||||
new Among("ande", 1, 1),
|
||||
new Among("ende", 1, 1),
|
||||
new Among("ane", 1, 1),
|
||||
new Among("ene", 1, 1),
|
||||
new Among("hetene", 6, 1),
|
||||
new Among("erte", 1, 3),
|
||||
new Among("en", -1, 1),
|
||||
new Among("heten", 9, 1),
|
||||
new Among("ar", -1, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("heter", 12, 1),
|
||||
new Among("s", -1, 2),
|
||||
new Among("as", 14, 1),
|
||||
new Among("es", 14, 1),
|
||||
new Among("edes", 16, 1),
|
||||
new Among("endes", 16, 1),
|
||||
new Among("enes", 16, 1),
|
||||
new Among("hetenes", 19, 1),
|
||||
new Among("ens", 14, 1),
|
||||
new Among("hetens", 21, 1),
|
||||
new Among("ers", 14, 1),
|
||||
new Among("ets", 14, 1),
|
||||
new Among("et", -1, 1),
|
||||
new Among("het", 25, 1),
|
||||
new Among("ert", -1, 3),
|
||||
new Among("ast", -1, 1)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("dt", -1, -1),
|
||||
new Among("vt", -1, -1)
|
||||
};
|
||||
private static final Among a_1[] = {new Among("dt", -1, -1), new Among("vt", -1, -1)};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("leg", -1, 1),
|
||||
new Among("eleg", 0, 1),
|
||||
new Among("ig", -1, 1),
|
||||
new Among("eig", 2, 1),
|
||||
new Among("lig", 2, 1),
|
||||
new Among("elig", 4, 1),
|
||||
new Among("els", -1, 1),
|
||||
new Among("lov", -1, 1),
|
||||
new Among("elov", 7, 1),
|
||||
new Among("slov", 7, 1),
|
||||
new Among("hetslov", 9, 1)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("leg", -1, 1),
|
||||
new Among("eleg", 0, 1),
|
||||
new Among("ig", -1, 1),
|
||||
new Among("eig", 2, 1),
|
||||
new Among("lig", 2, 1),
|
||||
new Among("elig", 4, 1),
|
||||
new Among("els", -1, 1),
|
||||
new Among("lov", -1, 1),
|
||||
new Among("elov", 7, 1),
|
||||
new Among("slov", 7, 1),
|
||||
new Among("hetslov", 9, 1)
|
||||
};
|
||||
|
||||
private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128 };
|
||||
private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 48, 0, 128};
|
||||
|
||||
private static final char g_s_ending[] = {119, 125, 149, 1 };
|
||||
private static final char g_s_ending[] = {119, 125, 149, 1};
|
||||
|
||||
private int I_x;
|
||||
private int I_p1;
|
||||
private int I_x;
|
||||
private int I_p1;
|
||||
|
||||
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit)
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
return false;
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit) {
|
||||
return false;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0: while(true)
|
||||
{
|
||||
int v_2 = cursor;
|
||||
lab1: {
|
||||
if (!(in_grouping(g_v, 97, 248)))
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0:
|
||||
while (true) {
|
||||
int v_2 = cursor;
|
||||
lab1:
|
||||
{
|
||||
break lab1;
|
||||
if (!(in_grouping(g_v, 97, 248))) {
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_2;
|
||||
break golab0;
|
||||
}
|
||||
cursor = v_2;
|
||||
break golab0;
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
cursor = v_2;
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab2: while(true)
|
||||
{
|
||||
lab3: {
|
||||
if (!(out_grouping(g_v, 97, 248)))
|
||||
golab2:
|
||||
while (true) {
|
||||
lab3:
|
||||
{
|
||||
break lab3;
|
||||
if (!(out_grouping(g_v, 97, 248))) {
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
break golab2;
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
I_p1 = cursor;
|
||||
lab4:
|
||||
{
|
||||
if (!(I_p1 < I_x)) {
|
||||
break lab4;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_main_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
lab4: {
|
||||
if (!(I_p1 < I_x))
|
||||
{
|
||||
break lab4;
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_main_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0)
|
||||
{
|
||||
bra = cursor;
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_2;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
lab0: {
|
||||
int v_3 = limit - cursor;
|
||||
lab1: {
|
||||
if (!(in_grouping_b(g_s_ending, 98, 122)))
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
lab0:
|
||||
{
|
||||
int v_3 = limit - cursor;
|
||||
lab1:
|
||||
{
|
||||
break lab1;
|
||||
if (!(in_grouping_b(g_s_ending, 98, 122))) {
|
||||
break lab1;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
if (!(eq_s_b("k"))) {
|
||||
return false;
|
||||
}
|
||||
if (!(out_grouping_b(g_v, 97, 248))) {
|
||||
return false;
|
||||
}
|
||||
break lab0;
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
if (!(eq_s_b("k")))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if (!(out_grouping_b(g_v, 97, 248)))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
case 3:
|
||||
slice_from("er");
|
||||
break;
|
||||
slice_del();
|
||||
break;
|
||||
case 3:
|
||||
slice_from("er");
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_consonant_pair() {
|
||||
int v_1 = limit - cursor;
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0)
|
||||
{
|
||||
private boolean r_consonant_pair() {
|
||||
int v_1 = limit - cursor;
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_3 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_1) == 0) {
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
return false;
|
||||
cursor = limit - v_1;
|
||||
if (cursor <= limit_backward) {
|
||||
return false;
|
||||
}
|
||||
cursor--;
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_3;
|
||||
cursor = limit - v_1;
|
||||
if (cursor <= limit_backward)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor--;
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_other_suffix() {
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_2) == 0)
|
||||
{
|
||||
private boolean r_other_suffix() {
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
if (find_among_b(a_2) == 0) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_2 = limit - cursor;
|
||||
r_main_suffix();
|
||||
cursor = limit - v_2;
|
||||
int v_3 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_other_suffix();
|
||||
cursor = limit - v_4;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof NorwegianStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return NorwegianStemmer.class.getName().hashCode();
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_2;
|
||||
slice_del();
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_2 = limit - cursor;
|
||||
r_main_suffix();
|
||||
cursor = limit - v_2;
|
||||
int v_3 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_other_suffix();
|
||||
cursor = limit - v_4;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof NorwegianStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return NorwegianStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -6,260 +6,244 @@ import org.tartarus.snowball.Among;
|
|||
|
||||
/**
|
||||
* This class implements the stemming algorithm defined by a snowball script.
|
||||
* <p>
|
||||
* Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
* </p>
|
||||
*
|
||||
* <p>Generated by Snowball 2.0.0 - https://snowballstem.org/
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
public class SwedishStemmer extends org.tartarus.snowball.SnowballStemmer {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject = java.lang.invoke.MethodHandles.lookup();
|
||||
private static final java.lang.invoke.MethodHandles.Lookup methodObject =
|
||||
java.lang.invoke.MethodHandles.lookup();
|
||||
|
||||
private final static Among a_0[] = {
|
||||
new Among("a", -1, 1),
|
||||
new Among("arna", 0, 1),
|
||||
new Among("erna", 0, 1),
|
||||
new Among("heterna", 2, 1),
|
||||
new Among("orna", 0, 1),
|
||||
new Among("ad", -1, 1),
|
||||
new Among("e", -1, 1),
|
||||
new Among("ade", 6, 1),
|
||||
new Among("ande", 6, 1),
|
||||
new Among("arne", 6, 1),
|
||||
new Among("are", 6, 1),
|
||||
new Among("aste", 6, 1),
|
||||
new Among("en", -1, 1),
|
||||
new Among("anden", 12, 1),
|
||||
new Among("aren", 12, 1),
|
||||
new Among("heten", 12, 1),
|
||||
new Among("ern", -1, 1),
|
||||
new Among("ar", -1, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("heter", 18, 1),
|
||||
new Among("or", -1, 1),
|
||||
new Among("s", -1, 2),
|
||||
new Among("as", 21, 1),
|
||||
new Among("arnas", 22, 1),
|
||||
new Among("ernas", 22, 1),
|
||||
new Among("ornas", 22, 1),
|
||||
new Among("es", 21, 1),
|
||||
new Among("ades", 26, 1),
|
||||
new Among("andes", 26, 1),
|
||||
new Among("ens", 21, 1),
|
||||
new Among("arens", 29, 1),
|
||||
new Among("hetens", 29, 1),
|
||||
new Among("erns", 21, 1),
|
||||
new Among("at", -1, 1),
|
||||
new Among("andet", -1, 1),
|
||||
new Among("het", -1, 1),
|
||||
new Among("ast", -1, 1)
|
||||
};
|
||||
private static final Among a_0[] = {
|
||||
new Among("a", -1, 1),
|
||||
new Among("arna", 0, 1),
|
||||
new Among("erna", 0, 1),
|
||||
new Among("heterna", 2, 1),
|
||||
new Among("orna", 0, 1),
|
||||
new Among("ad", -1, 1),
|
||||
new Among("e", -1, 1),
|
||||
new Among("ade", 6, 1),
|
||||
new Among("ande", 6, 1),
|
||||
new Among("arne", 6, 1),
|
||||
new Among("are", 6, 1),
|
||||
new Among("aste", 6, 1),
|
||||
new Among("en", -1, 1),
|
||||
new Among("anden", 12, 1),
|
||||
new Among("aren", 12, 1),
|
||||
new Among("heten", 12, 1),
|
||||
new Among("ern", -1, 1),
|
||||
new Among("ar", -1, 1),
|
||||
new Among("er", -1, 1),
|
||||
new Among("heter", 18, 1),
|
||||
new Among("or", -1, 1),
|
||||
new Among("s", -1, 2),
|
||||
new Among("as", 21, 1),
|
||||
new Among("arnas", 22, 1),
|
||||
new Among("ernas", 22, 1),
|
||||
new Among("ornas", 22, 1),
|
||||
new Among("es", 21, 1),
|
||||
new Among("ades", 26, 1),
|
||||
new Among("andes", 26, 1),
|
||||
new Among("ens", 21, 1),
|
||||
new Among("arens", 29, 1),
|
||||
new Among("hetens", 29, 1),
|
||||
new Among("erns", 21, 1),
|
||||
new Among("at", -1, 1),
|
||||
new Among("andet", -1, 1),
|
||||
new Among("het", -1, 1),
|
||||
new Among("ast", -1, 1)
|
||||
};
|
||||
|
||||
private final static Among a_1[] = {
|
||||
new Among("dd", -1, -1),
|
||||
new Among("gd", -1, -1),
|
||||
new Among("nn", -1, -1),
|
||||
new Among("dt", -1, -1),
|
||||
new Among("gt", -1, -1),
|
||||
new Among("kt", -1, -1),
|
||||
new Among("tt", -1, -1)
|
||||
};
|
||||
private static final Among a_1[] = {
|
||||
new Among("dd", -1, -1),
|
||||
new Among("gd", -1, -1),
|
||||
new Among("nn", -1, -1),
|
||||
new Among("dt", -1, -1),
|
||||
new Among("gt", -1, -1),
|
||||
new Among("kt", -1, -1),
|
||||
new Among("tt", -1, -1)
|
||||
};
|
||||
|
||||
private final static Among a_2[] = {
|
||||
new Among("ig", -1, 1),
|
||||
new Among("lig", 0, 1),
|
||||
new Among("els", -1, 1),
|
||||
new Among("fullt", -1, 3),
|
||||
new Among("l\u00F6st", -1, 2)
|
||||
};
|
||||
private static final Among a_2[] = {
|
||||
new Among("ig", -1, 1),
|
||||
new Among("lig", 0, 1),
|
||||
new Among("els", -1, 1),
|
||||
new Among("fullt", -1, 3),
|
||||
new Among("l\u00F6st", -1, 2)
|
||||
};
|
||||
|
||||
private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32 };
|
||||
private static final char g_v[] = {17, 65, 16, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 32};
|
||||
|
||||
private static final char g_s_ending[] = {119, 127, 149 };
|
||||
private static final char g_s_ending[] = {119, 127, 149};
|
||||
|
||||
private int I_x;
|
||||
private int I_p1;
|
||||
private int I_x;
|
||||
private int I_p1;
|
||||
|
||||
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit)
|
||||
private boolean r_mark_regions() {
|
||||
I_p1 = limit;
|
||||
int v_1 = cursor;
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor = c;
|
||||
}
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0: while(true)
|
||||
{
|
||||
int v_2 = cursor;
|
||||
lab1: {
|
||||
if (!(in_grouping(g_v, 97, 246)))
|
||||
{
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_2;
|
||||
break golab0;
|
||||
}
|
||||
cursor = v_2;
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab2: while(true)
|
||||
{
|
||||
lab3: {
|
||||
if (!(out_grouping(g_v, 97, 246)))
|
||||
{
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
if (cursor >= limit)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
lab4: {
|
||||
if (!(I_p1 < I_x))
|
||||
{
|
||||
break lab4;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_main_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0)
|
||||
{
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_2;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!(in_grouping_b(g_s_ending, 98, 121)))
|
||||
{
|
||||
int c = cursor + 3;
|
||||
if (0 > c || c > limit) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
cursor = c;
|
||||
}
|
||||
I_x = cursor;
|
||||
cursor = v_1;
|
||||
golab0:
|
||||
while (true) {
|
||||
int v_2 = cursor;
|
||||
lab1:
|
||||
{
|
||||
if (!(in_grouping(g_v, 97, 246))) {
|
||||
break lab1;
|
||||
}
|
||||
cursor = v_2;
|
||||
break golab0;
|
||||
}
|
||||
cursor = v_2;
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
golab2:
|
||||
while (true) {
|
||||
lab3:
|
||||
{
|
||||
if (!(out_grouping(g_v, 97, 246))) {
|
||||
break lab3;
|
||||
}
|
||||
break golab2;
|
||||
}
|
||||
if (cursor >= limit) {
|
||||
return false;
|
||||
}
|
||||
cursor++;
|
||||
}
|
||||
I_p1 = cursor;
|
||||
lab4:
|
||||
{
|
||||
if (!(I_p1 < I_x)) {
|
||||
break lab4;
|
||||
}
|
||||
I_p1 = I_x;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_consonant_pair() {
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
int v_3 = limit - cursor;
|
||||
if (find_among_b(a_1) == 0)
|
||||
{
|
||||
private boolean r_main_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_0);
|
||||
if (among_var == 0) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
if (!(in_grouping_b(g_s_ending, 98, 121))) {
|
||||
return false;
|
||||
}
|
||||
slice_del();
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
ket = cursor;
|
||||
if (cursor <= limit_backward)
|
||||
{
|
||||
|
||||
private boolean r_consonant_pair() {
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
int v_3 = limit - cursor;
|
||||
if (find_among_b(a_1) == 0) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
cursor = limit - v_3;
|
||||
ket = cursor;
|
||||
if (cursor <= limit_backward) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
cursor--;
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
cursor--;
|
||||
bra = cursor;
|
||||
slice_del();
|
||||
limit_backward = v_2;
|
||||
return true;
|
||||
}
|
||||
|
||||
private boolean r_other_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0)
|
||||
{
|
||||
private boolean r_other_suffix() {
|
||||
int among_var;
|
||||
if (cursor < I_p1) {
|
||||
return false;
|
||||
}
|
||||
int v_2 = limit_backward;
|
||||
limit_backward = I_p1;
|
||||
ket = cursor;
|
||||
among_var = find_among_b(a_2);
|
||||
if (among_var == 0) {
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_from("l\u00F6s");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("full");
|
||||
break;
|
||||
}
|
||||
limit_backward = v_2;
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
bra = cursor;
|
||||
switch (among_var) {
|
||||
case 1:
|
||||
slice_del();
|
||||
break;
|
||||
case 2:
|
||||
slice_from("l\u00F6s");
|
||||
break;
|
||||
case 3:
|
||||
slice_from("full");
|
||||
break;
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_2 = limit - cursor;
|
||||
r_main_suffix();
|
||||
cursor = limit - v_2;
|
||||
int v_3 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_other_suffix();
|
||||
cursor = limit - v_4;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
return o instanceof SwedishStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return SwedishStemmer.class.getName().hashCode();
|
||||
}
|
||||
limit_backward = v_2;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean stem() {
|
||||
int v_1 = cursor;
|
||||
r_mark_regions();
|
||||
cursor = v_1;
|
||||
limit_backward = cursor;
|
||||
cursor = limit;
|
||||
int v_2 = limit - cursor;
|
||||
r_main_suffix();
|
||||
cursor = limit - v_2;
|
||||
int v_3 = limit - cursor;
|
||||
r_consonant_pair();
|
||||
cursor = limit - v_3;
|
||||
int v_4 = limit - cursor;
|
||||
r_other_suffix();
|
||||
cursor = limit - v_4;
|
||||
cursor = limit_backward;
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals( Object o ) {
|
||||
return o instanceof SwedishStemmer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return SwedishStemmer.class.getName().hashCode();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -15,7 +15,5 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Autogenerated snowball stemmer implementations.
|
||||
*/
|
||||
/** Autogenerated snowball stemmer implementations. */
|
||||
package org.tartarus.snowball.ext;
|
||||
|
|
|
@ -15,7 +15,5 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Snowball stemmer API
|
||||
*/
|
||||
/** Snowball stemmer API */
|
||||
package org.tartarus.snowball;
|
||||
|
|
Loading…
Reference in New Issue