feat!: modularize stemmer models and release infrastructure

Move bundled stemmer dictionaries from the core artifact into independently
versioned model modules. Add model discovery and explicit model-loading APIs,
a standard model aggregate, a model BOM, and dedicated model and catalog
release workflows.

Add full PoliMorf integration, model provenance and licensing validation,
streaming model-input verification, strict dependency verification, consumer
resolution tests, Configuration Cache compatibility, and expanded JMH,
quality, documentation, and release checks.

Upgrade the CycloneDX and JMH Gradle plugins and remove Gradle 10 and Java
compiler deprecations.

BREAKING CHANGE: The core Radixor artifact no longer contains bundled stemmer
dictionaries. Applications must add the required model artifacts, the standard
model aggregate, or model dependencies managed through the Radixor model BOM.
This commit is contained in:
2026-07-22 23:33:28 +02:00
parent 9c5b9e331b
commit e7800b29c9
250 changed files with 7297 additions and 905 deletions

2
.gitattributes vendored
View File

@@ -9,4 +9,4 @@
# Binary files should be left untouched # Binary files should be left untouched
*.jar binary *.jar binary
*.gz binary

View File

@@ -10,6 +10,8 @@ on:
paths: paths:
- 'src/main/**' - 'src/main/**'
- 'src/jmh/**' - 'src/jmh/**'
- 'models/**'
- 'build-logic/**'
- 'build.gradle' - 'build.gradle'
- 'gradle.properties' - 'gradle.properties'
- 'gradle.lockfile' - 'gradle.lockfile'

View File

@@ -51,7 +51,7 @@ jobs:
test -f gradle/verification-metadata.xml test -f gradle/verification-metadata.xml
- name: Execute build, tests, PMD, coverage, Javadoc, distribution packaging, and SBOM generation - name: Execute build, tests, PMD, coverage, Javadoc, distribution packaging, and SBOM generation
run: ./gradlew --no-daemon clean ciRelease distZip pmdMain javadoc jacocoCiReleaseReport cyclonedxBom run: ./gradlew --no-daemon clean ciRelease distZip pmdMain javadoc jacocoCiReleaseReport :cyclonedxDirectBom
- name: Upload SBOM - name: Upload SBOM
if: always() if: always()
@@ -156,11 +156,14 @@ jobs:
test -f gradle.properties test -f gradle.properties
test -f gradle/verification-metadata.xml test -f gradle/verification-metadata.xml
- name: Validate exact core release tag
run: ./tools/parse-model-release-tag.sh "${GITHUB_REF_NAME}" .
- name: Build release inputs, signed Maven bundle, and SBOM - name: Build release inputs, signed Maven bundle, and SBOM
env: env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }} SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew --no-daemon clean ciRelease distZip pmdMain javadoc jacocoCiReleaseReport cyclonedxBom centralBundle run: ./gradlew --no-daemon clean ciRelease distZip pmdMain javadoc jacocoCiReleaseReport :cyclonedxDirectBom centralBundle
- name: Generate release changelog - name: Generate release changelog
shell: bash shell: bash
@@ -177,24 +180,7 @@ jobs:
shell: bash shell: bash
env: env:
CENTRAL_BEARER_TOKEN: ${{ secrets.CENTRAL_BEARER_TOKEN }} CENTRAL_BEARER_TOKEN: ${{ secrets.CENTRAL_BEARER_TOKEN }}
run: | run: ./tools/publish-central-bundle.sh "$(ls build/central-bundle/*.zip)" "org.egothor:radixor:${GITHUB_REF_NAME#release@}"
set -euo pipefail
echo "::add-mask::$CENTRAL_BEARER_TOKEN"
BUNDLE="$(ls build/central-bundle/*.zip)"
HEADER_FILE="$(mktemp)"
trap 'rm -f "$HEADER_FILE"' EXIT
printf 'Authorization: Bearer %s\n' "$CENTRAL_BEARER_TOKEN" > "$HEADER_FILE"
curl \
--fail \
--silent \
--show-error \
--request POST \
--header @"$HEADER_FILE" \
--form "bundle=@${BUNDLE}" \
--form "name=org.egothor:radixor:${GITHUB_REF_NAME#release@}" \
"https://central.sonatype.com/api/v1/publisher/upload?publishingType=AUTOMATIC"
- name: Publish GitHub release assets - name: Publish GitHub release assets
uses: softprops/action-gh-release@v2 uses: softprops/action-gh-release@v2

37
.github/workflows/catalog-release.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
name: Model Catalog Release
on:
push:
tags:
- 'models-catalog@*'
permissions:
contents: read
concurrency:
group: model-catalog-${{ github.ref_name }}
cancel-in-progress: false
jobs:
catalog:
runs-on: ubuntu-latest
environment: maven-central
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- uses: gradle/actions/setup-gradle@v4
- name: Validate catalog tag
run: ./tools/parse-model-release-tag.sh "${GITHUB_REF_NAME}" .
- name: Build only signed catalog metadata
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: ./gradlew --no-daemon verifyModelCatalogReleaseCandidate
- name: Publish only catalog metadata
env:
CENTRAL_BEARER_TOKEN: ${{ secrets.CENTRAL_BEARER_TOKEN }}
run: ./tools/publish-central-bundle.sh "build/model-catalog-release-candidate/radixor-models-catalog-${GITHUB_REF_NAME#models-catalog@}-central-bundle.zip" "org.egothor:radixor-models-catalog:${GITHUB_REF_NAME#models-catalog@}"

147
.github/workflows/model-release.yml vendored Normal file
View File

@@ -0,0 +1,147 @@
name: Model Release
on:
push:
tags:
- 'model/*@*'
workflow_dispatch:
inputs:
tag:
description: Model tag to validate without publishing
required: true
type: string
permissions:
contents: read
concurrency:
group: model-release-${{ github.event_name == 'push' && github.ref_name || inputs.tag }}
cancel-in-progress: false
jobs:
validate:
name: Validate selected model
runs-on: ubuntu-latest
outputs:
model_id: ${{ steps.release.outputs.MODEL_ID }}
model_version: ${{ steps.release.outputs.MODEL_VERSION }}
gradle_project: ${{ steps.release.outputs.GRADLE_PROJECT }}
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Set up Temurin JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle caching and instrumentation
uses: gradle/actions/setup-gradle@v4
- name: Verify reproducibility inputs
shell: bash
run: |
set -euo pipefail
test -f gradle.lockfile
test -f gradle.properties
test -f gradle/verification-metadata.xml
- name: Validate and select exactly one model
id: release
shell: bash
env:
REQUESTED_TAG: ${{ inputs.tag }}
run: |
set -euo pipefail
if [[ "${GITHUB_EVENT_NAME}" == "push" ]]; then
tag="${GITHUB_REF_NAME}"
else
tag="${REQUESTED_TAG}"
fi
./tools/parse-model-release-tag.sh "${tag}" . >> "${GITHUB_OUTPUT}"
git merge-base --is-ancestor "${GITHUB_SHA}" origin/main
- name: Validate one model
shell: bash
run: |
set -euo pipefail
project="${{ steps.release.outputs.GRADLE_PROJECT }}"
version="${{ steps.release.outputs.MODEL_VERSION }}"
./gradlew --no-daemon "${project}:clean"
./gradlew --no-daemon "${project}:check"
./gradlew --no-daemon \
"${project}:validateModelRelease" \
-PmodelReleaseVersion="${version}"
publish:
name: Publish selected model
if: github.event_name == 'push'
needs: validate
runs-on: ubuntu-latest
environment: maven-central
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Validate Gradle wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Set up Temurin JDK 21
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '21'
- name: Set up Gradle caching and instrumentation
uses: gradle/actions/setup-gradle@v4
- name: Verify reproducibility inputs
shell: bash
run: |
set -euo pipefail
test -f gradle.lockfile
test -f gradle.properties
test -f gradle/verification-metadata.xml
- name: Build signed model release candidate
shell: bash
env:
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
set -euo pipefail
project="${{ needs.validate.outputs.gradle_project }}"
version="${{ needs.validate.outputs.model_version }}"
./gradlew --no-daemon \
"${project}:packageModelReleaseCandidate" \
-PmodelReleaseVersion="${version}"
- name: Publish one model
shell: bash
env:
CENTRAL_BEARER_TOKEN: ${{ secrets.CENTRAL_BEARER_TOKEN }}
run: |
set -euo pipefail
model_id="${{ needs.validate.outputs.model_id }}"
version="${{ needs.validate.outputs.model_version }}"
./tools/publish-central-bundle.sh \
"models/${model_id}/build/model-release-candidate/central-bundle.zip" \
"org.egothor:radixor-model-${model_id}:${version}"

View File

@@ -10,6 +10,8 @@ on:
- 'src/main/**' - 'src/main/**'
- 'src/test/**' - 'src/test/**'
- 'src/jmh/**' - 'src/jmh/**'
- 'models/**'
- 'build-logic/**'
- 'build.gradle' - 'build.gradle'
- 'gradle.properties' - 'gradle.properties'
- 'gradle.lockfile' - 'gradle.lockfile'
@@ -70,7 +72,7 @@ jobs:
test -f gradle/verification-metadata.xml test -f gradle/verification-metadata.xml
- name: Build reports for publication - name: Build reports for publication
run: ./gradlew --no-daemon clean ciRelease pmdMain javadoc jacocoCiReleaseReport pitest jmh -Pjmh.includes='.*EnglishStemmerComparisonBenchmark.*' cyclonedxBom run: ./gradlew --no-daemon clean ciRelease pmdMain javadoc jacocoCiReleaseReport pitest jmh -Pjmh.includes='.*EnglishStemmerComparisonBenchmark.*' :cyclonedxDirectBom
- name: Prepare gh-pages worktree - name: Prepare gh-pages worktree
shell: bash shell: bash
@@ -88,6 +90,9 @@ jobs:
cd .. cd ..
fi fi
- name: Prepare staged MkDocs source
run: ./gradlew --no-daemon prepareMkDocsSource verifyModelCatalogDocumentation
- name: Stage published reports - name: Stage published reports
shell: bash shell: bash
run: | run: |
@@ -246,7 +251,7 @@ jobs:
cp "${RUN_DIR}/index.html" "${LATEST_DIR}/index.html" cp "${RUN_DIR}/index.html" "${LATEST_DIR}/index.html"
cat > docs/reports.md <<EOF cat > build/mkdocs-source/reports.md <<EOF
# CI Reports # CI Reports
Radixor publishes durable CI artifacts to GitHub Pages on every qualifying run of \`.github/workflows/pages.yml\`. Radixor publishes durable CI artifacts to GitHub Pages on every qualifying run of \`.github/workflows/pages.yml\`.
@@ -314,19 +319,18 @@ jobs:
| while IFS=$'\t' read -r _ts build published; do | while IFS=$'\t' read -r _ts build published; do
echo "| ${build} | ${published} | [Open](../builds/${build}/) |" echo "| ${build} | ${published} | [Open](../builds/${build}/) |"
done done
} > docs/builds.md } > build/mkdocs-source/builds.md
- name: Build documentation site (MkDocs Material) - name: Build documentation site (MkDocs Material)
shell: bash shell: bash
run: | run: |
set -euo pipefail set -euo pipefail
mkdocs build --strict --site-dir .mkdocs-site mkdocs build --strict --config-file build/mkdocs/mkdocs.yml
rsync -a --delete --exclude '.git' --exclude '.git/' --exclude 'builds/' .mkdocs-site/ .gh-pages/ rsync -a --delete --exclude '.git' --exclude '.git/' --exclude 'builds/' build/mkdocs-site/ .gh-pages/
mkdir -p .gh-pages/builds mkdir -p .gh-pages/builds
cp .mkdocs-site/builds/index.html .gh-pages/builds/index.html cp build/mkdocs-site/builds/index.html .gh-pages/builds/index.html
cat > .gh-pages/.nojekyll <<EOF cat > .gh-pages/.nojekyll <<EOF
EOF EOF
rm -rf .mkdocs-site
- name: Commit and push gh-pages - name: Commit and push gh-pages
shell: bash shell: bash

14
.gitignore vendored
View File

@@ -95,19 +95,17 @@ local.properties
.jqwik-database .jqwik-database
##---------------------------------------------------------------------------------------- Gradle ##---------------------------------------------------------------------------------------- Gradle
.gradle .gradle/
**/build/ **/build/
!src/**/build/
# MkDocs generated site
/site/
# Ignore Gradle GUI config # Ignore Gradle GUI config
gradle-app.setting gradle-app.setting
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) # Avoid ignoring the Gradle Wrapper JAR
!gradle-wrapper.jar !gradle-wrapper.jar
# Cache of project # Gradle task-name cache
.gradletasknamecache .gradletasknamecache
# Ignore Gradle build output directory
build

View File

@@ -22,6 +22,40 @@ It is particularly well suited to systems that need stemming which is:
It also retains the operational advantages of a compiled artifact model: predictable runtime behavior, direct binary loading, and clear separation between preparation-time compilation and live request processing. It also retains the operational advantages of a compiled artifact model: predictable runtime behavior, direct binary loading, and clear separation between preparation-time compilation and live request processing.
## Add Radixor and a model
The core artifact contains the algorithm and registry, but no language dictionary. Add either one minimal model or the optional standard default pack:
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-model-pl-pl-unimorph:1.0.0'
// Or: runtimeOnly 'org.egothor:radixor-models-standard:<catalog-version>'
}
```
```java
final FrequencyTrie<CompiledPatchCommand> polish =
StemmerPatchTrieLoader.loadCompiled(
StemmerPatchTrieLoader.Language.PL_PL,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
```
`Language.PL_PL` selects the documented default `pl-pl-unimorph`. The optional `pl-pl-polimorf` model requires its own runtime artifact and explicit selection; adding it does not change the default. See [Model Selection and Loading](docs/model-selection-and-loading.md) for complete executable examples and [Stemmer Models](docs/stemmer-models.md) for artifact concepts.
`radixor-models-standard` is a POM-only runtime aggregate: it brings the 20 default model JARs transitively but publishes no empty aggregate JAR. `radixor-models-bom` is the separate POM-only Maven dependency BOM for version management; importing it alone adds no model. The root CycloneDX SBOM report is unrelated to that dependency BOM.
```java
final FrequencyTrie<CompiledPatchCommand> polimorf =
StemmerPatchTrieLoader.loadCompiled(
"pl-pl-polimorf",
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
```
Complete PoliMorf construction is supported but unusually memory-intensive: the dedicated verification task uses a 6 GiB maximum heap. Applications should load and retain the resulting immutable trie during startup rather than rebuilding it per request.
## Table of Contents ## Table of Contents
- [Why Radixor](#why-radixor) - [Why Radixor](#why-radixor)
@@ -138,7 +172,7 @@ Compared with the historical baseline, Radixor emphasizes:
- Compressed binary persistence - Compressed binary persistence
- Programmatic compilation and loading - Programmatic compilation and loading
- CLI compilation tool - CLI compilation tool
- Bundled language resources - Independently versioned language-model resources
- Support for extending compiled stemmer tables - Support for extending compiled stemmer tables
- Reproducible and auditable engineering posture - Reproducible and auditable engineering posture
@@ -149,16 +183,16 @@ The repository keeps the front page concise and places detailed documentation un
### Getting Started ### Getting Started
- [Fast Track](docs/fast-track.md) - [Fast Track](docs/fast-track.md)
The shortest path from adding the dependency to getting a first stem from a bundled dictionary. The shortest path from adding core plus a model artifact to getting a first stem.
- [Quick Start](docs/quick-start.md) - [Quick Start](docs/quick-start.md)
A broader developer walkthrough covering loading options, querying, extension, persistence, and metadata. A broader developer walkthrough covering loading options, querying, extension, persistence, and metadata.
- [Integration Deep Dive](docs/integration-deep-dive.md) - [Integration Deep Dive](docs/integration-deep-dive.md)
Dependency setup, bundled dictionary selection, production lifecycle, search-pipeline guidance, and operational checklist. Dependency setup, model selection, production lifecycle, search-pipeline guidance, and operational checklist.
- [Built-in Languages](docs/built-in-languages.md) - [Built-in Languages](docs/built-in-languages.md)
Overview of bundled language resources such as `US_UK`. Language enum values, default model IDs, artifacts, and optional variants.
- [Dictionary Format](docs/dictionary-format.md) - [Dictionary Format](docs/dictionary-format.md)
How to write and normalize stemming dictionaries. How to write and normalize stemming dictionaries.
@@ -171,6 +205,9 @@ The repository keeps the front page concise and places detailed documentation un
- [Programmatic Usage Overview](docs/programmatic-usage.md) - [Programmatic Usage Overview](docs/programmatic-usage.md)
Entry point to the Java API and the overall usage model. Entry point to the Java API and the overall usage model.
- [Model Selection and Loading](docs/model-selection-and-loading.md)
Default, explicit, dual-model, ClassLoader, dependency, and troubleshooting examples.
- [Loading and Building Stemmers](docs/programmatic-loading-and-building.md) - [Loading and Building Stemmers](docs/programmatic-loading-and-building.md)
Loading bundled resources, textual dictionaries, binary artifacts, and direct builder usage. Loading bundled resources, textual dictionaries, binary artifacts, and direct builder usage.
@@ -245,3 +282,19 @@ The goal is to keep the Egothor/Stempel lineage useful as a serious contemporary
## Historical note ## Historical note
Egothor showed that stemming could be both algorithmic and compact. Stempel proved that the approach was practical enough to survive inside major search ecosystems. Radixor continues that tradition with a modernized implementation focused on production use, maintainability, and controlled evolution. Egothor showed that stemming could be both algorithmic and compact. Stempel proved that the approach was practical enough to survive inside major search ecosystems. Radixor continues that tradition with a modernized implementation focused on production use, maintainability, and controlled evolution.
# Radixor 4 artifact architecture
The established `org.egothor:radixor` artifact remains the algorithmic core and contains no language-model data. From version 4 onward, applications explicitly add individual `org.egothor:radixor-model-<model-id>` runtime artifacts or the optional metadata-only `org.egothor:radixor-models-standard` aggregate. Polish defaults to `pl-pl-unimorph`; `pl-pl-polimorf` is opt-in. See [Stemmer Models](docs/stemmer-models.md) and [Migration and Backward Compatibility](docs/migration-and-backward-compatibility.md).
Radixor Java software remains licensed under BSD-3-Clause. UniMorph-derived model data is
distributed under CC BY-SA 3.0, with upstream attribution, the canonical license URI, Radixor
transformations, and Leo Galambos's limited contribution notice carried by each model artifact.
PoliMorf model data retains its separate BSD-2-Clause license. There is no project-wide CC license
directory because the root artifact contains no model data.
```groovy
dependencies {
implementation 'org.egothor:radixor:4.0.0'
runtimeOnly 'org.egothor:radixor-model-pl-pl-polimorf:1.0.0'
}
```

25
build-logic/build.gradle Normal file
View File

@@ -0,0 +1,25 @@
plugins {
id 'groovy-gradle-plugin'
}
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.14.3'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.14.3'
}
tasks.named('test') {
useJUnitPlatform()
}
gradlePlugin {
plugins {
radixorModel {
id = 'org.egothor.radixor.model'
implementationClass = 'org.egothor.radixor.RadixorModelPlugin'
}
radixorBuildSupport {
id = 'org.egothor.radixor.build-support'
implementationClass = 'org.egothor.radixor.RadixorBuildSupportPlugin'
}
}
}

View File

@@ -0,0 +1,8 @@
rootProject.name = 'radixor-build-logic'
dependencyResolutionManagement {
repositories {
gradlePluginPortal()
mavenCentral()
}
}

View File

@@ -0,0 +1,21 @@
package org.egothor.radixor
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.tasks.Classpath
import org.gradle.process.CommandLineArgumentProvider
import javax.inject.Inject
abstract class MockitoAgentArgumentProvider implements CommandLineArgumentProvider {
@Classpath
abstract ConfigurableFileCollection getAgentClasspath()
@Inject
MockitoAgentArgumentProvider() {
}
@Override
Iterable<String> asArguments() {
return ["-javaagent:${agentClasspath.singleFile.absolutePath}"]
}
}

View File

@@ -0,0 +1,105 @@
package org.egothor.radixor
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.file.ConfigurableFileCollection
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.MapProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.InputFiles
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.StandardCopyOption
import java.util.stream.Stream
/** Builds the isolated Maven-layout repository used by consumer resolution tests. */
abstract class PrepareModelConsumerRepositoryTask extends DefaultTask {
@Input abstract Property<String> getCoreVersion()
@Input abstract Property<String> getCatalogVersion()
@Input abstract MapProperty<String, String> getModelVersions()
@InputFile @PathSensitive(PathSensitivity.RELATIVE)
abstract RegularFileProperty getCorePom()
@InputFile @PathSensitive(PathSensitivity.RELATIVE)
abstract RegularFileProperty getCoreJar()
@InputFiles @PathSensitive(PathSensitivity.RELATIVE)
abstract ConfigurableFileCollection getModelPoms()
@InputFiles @PathSensitive(PathSensitivity.RELATIVE)
abstract ConfigurableFileCollection getModelJars()
@InputFile @PathSensitive(PathSensitivity.RELATIVE)
abstract RegularFileProperty getStandardPom()
@InputFile @PathSensitive(PathSensitivity.RELATIVE)
abstract RegularFileProperty getBomPom()
@OutputDirectory
abstract DirectoryProperty getRepositoryDirectory()
/** Creates the repository using only declared task state and Java file APIs. */
@TaskAction
void prepareRepository() {
final Path repository = repositoryDirectory.get().asFile.toPath()
deleteTree(repository)
Files.createDirectories(repository)
install(repository, 'radixor', coreVersion.get(), corePom.get().asFile.toPath(), coreJar.get().asFile.toPath())
final Map<String, Path> pomsByModel = indexModelFiles(modelPoms.files)
final Map<String, Path> jarsByModel = indexModelFiles(modelJars.files)
modelVersions.get().toSorted().each { String modelId, String modelVersion ->
final Path pom = pomsByModel.get(modelId)
final Path jar = jarsByModel.get(modelId)
if (pom == null || jar == null) {
throw new GradleException("Missing generated publication input for model ${modelId}.")
}
PrepareModelConsumerRepositoryTask.install(
repository, "radixor-model-${modelId}", modelVersion, pom, jar)
}
install(repository, 'radixor-models-standard', catalogVersion.get(), standardPom.get().asFile.toPath(), null)
install(repository, 'radixor-models-bom', catalogVersion.get(), bomPom.get().asFile.toPath(), null)
}
private static Map<String, Path> indexModelFiles(final Set<File> files) {
final Map<String, Path> indexed = [:]
files.each { File file ->
Path cursor = file.toPath().toAbsolutePath().parent
while (cursor != null && cursor.fileName.toString() != 'build') cursor = cursor.parent
if (cursor == null || cursor.parent == null) {
throw new GradleException("Cannot determine model ID from generated input ${file}.")
}
final String modelId = cursor.parent.fileName.toString()
if (indexed.put(modelId, file.toPath()) != null) {
throw new GradleException("Duplicate generated publication input for model ${modelId}.")
}
}
return indexed
}
private static void install(final Path repository, final String artifactId, final String version,
final Path pom, final Path jar) {
final Path module = repository.resolve("org/egothor/${artifactId}/${version}")
Files.createDirectories(module)
Files.copy(pom, module.resolve("${artifactId}-${version}.pom"), StandardCopyOption.REPLACE_EXISTING)
if (jar != null) {
Files.copy(jar, module.resolve("${artifactId}-${version}.jar"), StandardCopyOption.REPLACE_EXISTING)
}
}
private static void deleteTree(final Path directory) {
if (!Files.exists(directory)) return
Files.walk(directory).withCloseable { Stream<Path> paths ->
paths.sorted(Comparator.reverseOrder()).forEach(Files::delete)
}
}
}

View File

@@ -0,0 +1,108 @@
package org.egothor.radixor
import org.gradle.api.DefaultTask
import org.gradle.api.file.DirectoryProperty
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.MapProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.OutputDirectory
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
import java.nio.file.Files
import java.nio.file.Path
import java.nio.file.StandardCopyOption
import java.security.MessageDigest
import java.util.stream.Stream
/** Generates one model's deterministic resource tree without retaining Project state. */
abstract class PrepareModelResourcesTask extends DefaultTask {
@InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getDictionaryFile()
@InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getVersionFile()
@Optional @InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getLicenseFile()
@Optional @InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getNoticeFile()
@Input abstract Property<Boolean> getShareAlike()
@Input abstract MapProperty<String, String> getDescriptorValues()
@OutputDirectory abstract DirectoryProperty getGeneratedDirectory()
/** Copies bounded inputs and writes descriptor and index files. */
@TaskAction
void prepareResources() {
final Path generated = generatedDirectory.get().asFile.toPath()
deleteTree(generated)
final Map<String, String> values = descriptorValues.get()
final String id = values['model.id']
final String resource = "org/egothor/stemmer/models/${id}/stemmer.gz"
final Path dictionaryTarget = generated.resolve(resource)
Files.createDirectories(dictionaryTarget.parent)
Files.copy(dictionaryFile.get().asFile.toPath(), dictionaryTarget, StandardCopyOption.REPLACE_EXISTING)
final Path descriptor = generated.resolve("META-INF/radixor/models/${id}.properties")
Files.createDirectories(descriptor.parent)
Files.writeString(descriptor, descriptorText(values,
versionFile.get().asFile.getText('UTF-8').trim(), resource, sha256(dictionaryFile.get().asFile)))
final Path index = generated.resolve('META-INF/radixor/models.index')
Files.createDirectories(index.parent)
Files.writeString(index, "META-INF/radixor/models/${id}.properties\n")
if (shareAlike.get()) {
final Path notice = generated.resolve("META-INF/NOTICE/${id}-data.txt")
Files.createDirectories(notice.parent)
Files.copy(noticeFile.get().asFile.toPath(), notice, StandardCopyOption.REPLACE_EXISTING)
} else {
final Path license = generated.resolve('META-INF/LICENSES/PoliMorf-BSD-2-Clause.txt')
Files.createDirectories(license.parent)
Files.copy(licenseFile.get().asFile.toPath(), license, StandardCopyOption.REPLACE_EXISTING)
}
}
private static String descriptorText(final Map<String, String> value, final String version,
final String resource, final String checksum) {
return """model.id=${value['model.id']}
model.version=${version}
model.language=${value['model.language']}
model.displayName=${value['model.displayName']}
model.resource=${resource}
model.default=${value['model.default']}
model.format=radixor-dictionary-tsv-gzip
model.formatVersion=1
model.sha256=${checksum}
model.rightToLeft=${['FA_IR', 'HE_IL', 'YI'].contains(value['model.language'])}
model.caseProcessing=LOWERCASE_WITH_LOCALE_ROOT
model.diacriticProcessing=AS_IS
model.storeOriginal=true
source.name=${value['source.name']}
source.version=${value['source.version']}
source.project=${value['source.project']}
source.repository=${value['source.repository']}
source.dataset=${value['source.dataset']}
source.revision=${value['source.revision']}
source.revisionStatus=${value['source.revisionStatus']}
source.license=${value['source.license']}
source.licenseUri=${value['source.licenseUri']}
source.attribution=${value['source.attribution']}
source.verificationDate=${value['source.verificationDate']}
transformations.summary=${value['transformations.summary']}
compiler.radixorVersion=3.x
compiler.radixorCommit=unavailable
statistics.groups=unavailable
statistics.forms=unavailable
"""
}
private static String sha256(final File file) {
return MessageDigest.getInstance('SHA-256').digest(file.bytes)
.collect { byte value -> String.format('%02x', value & 0xff) }.join()
}
private static void deleteTree(final Path directory) {
if (!Files.exists(directory)) return
Files.walk(directory).withCloseable { Stream<Path> paths ->
paths.sorted(Comparator.reverseOrder()).forEach(Files::delete)
}
}
}

View File

@@ -0,0 +1,16 @@
package org.egothor.radixor
import org.gradle.api.Plugin
import org.gradle.api.Project
/** Exposes typed repository build-support tasks to the root build. */
final class RadixorBuildSupportPlugin implements Plugin<Project> {
/** Registers build-support tasks without inspecting project state during execution. */
@Override
void apply(final Project project) {
project.tasks.register('prepareModelConsumerTestRepository', PrepareModelConsumerRepositoryTask) {
group = 'verification'
description = 'Creates an isolated local Maven repository for model dependency-resolution integration tests.'
}
}
}

View File

@@ -0,0 +1,73 @@
package org.egothor.radixor
import org.gradle.api.model.ObjectFactory
import org.gradle.api.provider.Property
import javax.inject.Inject
/** Declarative configuration for one independently published Radixor model. */
abstract class RadixorModelExtension {
/** Stable model identifier. */
abstract Property<String> getModelId()
/** Radixor language enum constant. */
abstract Property<String> getLanguage()
/** Human-readable model name. */
abstract Property<String> getDisplayName()
/** Whether this is the documented default for its language. */
abstract Property<Boolean> getDefaultModel()
/** Source dictionary name. */
abstract Property<String> getSourceName()
/** Source dictionary version or explicit unavailable marker. */
abstract Property<String> getSourceVersion()
/** Exact upstream revision or the explicit legacy-import sentinel. */
abstract Property<String> getSourceRevision()
/** Upstream source project. */
abstract Property<String> getSourceProject()
/** Official upstream repository URL. */
abstract Property<String> getSourceRepository()
/** Upstream dataset identity. */
abstract Property<String> getSourceDataset()
/** Whether the source revision is recorded or was not recorded by a legacy import. */
abstract Property<String> getSourceRevisionStatus()
/** SPDX license identifier. */
abstract Property<String> getSourceLicense()
/** Canonical URI for the source-data license. */
abstract Property<String> getSourceLicenseUri()
/** Upstream attribution supplied with the source data. */
abstract Property<String> getSourceAttribution()
/** Date on which the upstream metadata was verified. */
abstract Property<String> getSourceVerificationDate()
/** Material transformations applied by Radixor. */
abstract Property<String> getTransformationsSummary()
/** Model-specific data notice input file name, when required. */
abstract Property<String> getNoticeFileName()
/** License input file name. */
abstract Property<String> getLicenseFileName()
/** Creates the extension. */
@Inject
RadixorModelExtension(final ObjectFactory objects) {
defaultModel.convention(false)
sourceVersion.convention('unavailable')
sourceLicense.convention('LicenseRef-Radixor-Stemmer-Data')
licenseFileName.convention('LICENSE-stemmer-data.txt')
noticeFileName.convention('NOTICE-model-data.txt')
}
}

View File

@@ -0,0 +1,505 @@
package org.egothor.radixor
import org.gradle.api.GradleException
import org.gradle.api.Plugin
import org.gradle.api.Project
import org.gradle.api.file.DuplicatesStrategy
import org.gradle.api.plugins.JavaPlugin
import org.gradle.api.publish.PublishingExtension
import org.gradle.api.publish.maven.MavenPublication
import org.gradle.api.tasks.Copy
import org.gradle.api.tasks.bundling.Jar
import org.gradle.api.tasks.bundling.Zip
import org.gradle.plugins.signing.SigningExtension
import java.nio.charset.CodingErrorAction
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.security.MessageDigest
import java.util.zip.GZIPInputStream
/** Configures validation, generation, packaging, and publication for one model artifact. */
final class RadixorModelPlugin implements Plugin<Project> {
/** Applies the model convention to a project. */
@Override
void apply(final Project project) {
project.pluginManager.apply(JavaPlugin)
project.pluginManager.apply('maven-publish')
project.pluginManager.apply('signing')
project.java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = org.gradle.api.JavaVersion.VERSION_21
targetCompatibility = org.gradle.api.JavaVersion.VERSION_21
}
final RadixorModelExtension model = project.extensions.create('radixorModel', RadixorModelExtension)
project.group = 'org.egothor'
project.version = project.providers.gradleProperty('modelReleaseVersion')
.orElse(project.providers.fileContents(project.layout.projectDirectory.file('model-version.txt')).asText.map(String::trim))
.get()
final File input = project.file('src/modelInput/stemmer.gz')
final File generated = project.layout.buildDirectory.dir('generated/modelResources').get().asFile
project.sourceSets.main.resources.setSrcDirs([generated])
final def validate = project.tasks.register('validateModelInput', ValidateModelInputTask) {
group = 'verification'
description = 'Validates the immutable source dictionary, metadata, version, and model-specific licensing material.'
dictionaryFile = project.layout.projectDirectory.file('src/modelInput/stemmer.gz')
versionFile = project.layout.projectDirectory.file('model-version.txt')
modelId = model.modelId
moduleName = project.name
shareAlike = model.sourceLicense.map { String license -> license == 'CC-BY-SA-3.0' }
metadata.put('source.project', model.sourceProject)
metadata.put('source.repository', model.sourceRepository)
metadata.put('source.dataset', model.sourceDataset)
metadata.put('source.revision', model.sourceRevision)
metadata.put('source.revisionStatus', model.sourceRevisionStatus)
metadata.put('source.license', model.sourceLicense)
metadata.put('source.licenseUri', model.sourceLicenseUri)
metadata.put('source.attribution', model.sourceAttribution)
metadata.put('source.verificationDate', model.sourceVerificationDate)
metadata.put('transformations.summary', model.transformationsSummary)
}
final def prepare = project.tasks.register('prepareModelResources', PrepareModelResourcesTask) {
group = 'build'
description = 'Copies validated dictionary bytes and generates the immutable model descriptor and index.'
dependsOn(validate)
dictionaryFile = project.layout.projectDirectory.file('src/modelInput/stemmer.gz')
versionFile = project.layout.projectDirectory.file('model-version.txt')
shareAlike = model.sourceLicense.map { String license -> license == 'CC-BY-SA-3.0' }
generatedDirectory = project.layout.buildDirectory.dir('generated/modelResources')
descriptorValues.put('model.id', model.modelId)
descriptorValues.put('model.language', model.language)
descriptorValues.put('model.displayName', model.displayName)
descriptorValues.put('model.default', model.defaultModel.map(String::valueOf))
descriptorValues.put('source.name', model.sourceName)
descriptorValues.put('source.version', model.sourceVersion)
descriptorValues.put('source.project', model.sourceProject)
descriptorValues.put('source.repository', model.sourceRepository)
descriptorValues.put('source.dataset', model.sourceDataset)
descriptorValues.put('source.revision', model.sourceRevision)
descriptorValues.put('source.revisionStatus', model.sourceRevisionStatus)
descriptorValues.put('source.license', model.sourceLicense)
descriptorValues.put('source.licenseUri', model.sourceLicenseUri)
descriptorValues.put('source.attribution', model.sourceAttribution)
descriptorValues.put('source.verificationDate', model.sourceVerificationDate)
descriptorValues.put('transformations.summary', model.transformationsSummary)
}
project.afterEvaluate {
final boolean shareAlike = model.sourceLicense.get() == 'CC-BY-SA-3.0'
if (shareAlike) {
final def notice = project.layout.projectDirectory.file("src/modelInput/${model.noticeFileName.get()}")
validate.configure { noticeFile = notice }
prepare.configure { noticeFile = notice }
} else {
final def license = project.layout.projectDirectory.file("src/modelInput/${model.licenseFileName.get()}")
validate.configure { licenseFile = license }
prepare.configure { licenseFile = license }
}
}
project.tasks.named('processResources', Copy).configure { dependsOn(prepare); duplicatesStrategy = DuplicatesStrategy.FAIL }
project.tasks.named('sourcesJar', Jar).configure { dependsOn(prepare); exclude('**/stemmer.gz') }
project.tasks.named('javadocJar', Jar).configure { exclude('**/stemmer.gz') }
project.tasks.named('jar', Jar).configure {
archiveBaseName.set("radixor-model-${project.name}")
preserveFileTimestamps = false
reproducibleFileOrder = true
}
final def verifyDescriptor = project.tasks.register('verifyModelDescriptor') {
group = 'verification'; description = 'Verifies generated descriptor identity and checksum.'; dependsOn(prepare)
doLast {
final Properties properties = new Properties()
new File(generated, "META-INF/radixor/models/${model.modelId.get()}.properties").withInputStream(properties::load)
if (properties.getProperty('model.sha256') != sha256(input)) {
throw new GradleException('Generated descriptor checksum does not match the immutable source input.')
}
}
}
final def verifyJar = project.tasks.register('verifyModelJar') {
group = 'verification'; description = 'Verifies the model JAR checksum, layout, metadata, and dictionary-free documentation artifacts.'
dependsOn(project.tasks.named('jar'), project.tasks.named('sourcesJar'), project.tasks.named('javadocJar'))
doLast {
final File archive = project.tasks.named('jar', Jar).get().archiveFile.get().asFile
final List<String> names = []
final String resource = "org/egothor/stemmer/models/${model.modelId.get()}/stemmer.gz"
final boolean shareAlike = model.sourceLicense.get() == 'CC-BY-SA-3.0'
final String licenseResource = 'META-INF/LICENSES/PoliMorf-BSD-2-Clause.txt'
final File sourceLicense = shareAlike ? null : project.file("src/modelInput/${model.licenseFileName.get()}")
final File sourceNotice = shareAlike
? project.file("src/modelInput/${model.noticeFileName.get()}") : null
final String noticeResource = "META-INF/NOTICE/${model.modelId.get()}-data.txt"
String packagedChecksum
String packagedLicenseChecksum
String packagedNoticeChecksum
new java.util.zip.ZipFile(archive).withCloseable { zip ->
zip.entries().each { names.add(it.name) }
final def entry = zip.getEntry(resource)
if (entry != null) {
packagedChecksum = sha256(zip.getInputStream(entry).bytes)
}
final def licenseEntry = zip.getEntry(licenseResource)
if (licenseEntry != null) {
packagedLicenseChecksum = sha256(zip.getInputStream(licenseEntry).bytes)
}
final def noticeEntry = zip.getEntry(noticeResource)
if (noticeEntry != null) {
packagedNoticeChecksum = sha256(zip.getInputStream(noticeEntry).bytes)
}
}
if (names.count { String name -> name.endsWith('/stemmer.gz') } != 1 || !names.contains(resource)) {
throw new GradleException("Model JAR must contain exactly one dictionary at ${resource}.")
}
if (packagedChecksum != sha256(input)) {
throw new GradleException("Packaged dictionary checksum does not match the immutable source input at ${resource}.")
}
if (shareAlike) {
requireMatchingChecksum('notice', noticeResource, sha256(sourceNotice), packagedNoticeChecksum)
validateUniMorphJarContents(names)
} else {
requireMatchingChecksum('license', licenseResource, sha256(sourceLicense), packagedLicenseChecksum)
validatePoliMorfJarContents(names)
}
['META-INF/radixor/models.index', "META-INF/radixor/models/${model.modelId.get()}.properties"].each { String name ->
if (!names.contains(name)) throw new GradleException("Model JAR is missing ${name}.")
}
[project.tasks.named('sourcesJar', Jar).get(), project.tasks.named('javadocJar', Jar).get()].each { Jar task ->
final File documentationArchive = task.archiveFile.get().asFile
new java.util.zip.ZipFile(documentationArchive).withCloseable { zip ->
if (zip.entries().any { entry -> entry.name.endsWith('/stemmer.gz') || entry.name == 'stemmer.gz' }) {
throw new GradleException("Documentation artifact ${documentationArchive.name} must not contain a model dictionary.")
}
}
}
}
}
project.tasks.register('validateModelRelease') {
group = 'verification'; description = 'Validates a tag-supplied model release version.'; dependsOn(verifyDescriptor, verifyJar)
doLast {
if (!project.hasProperty('modelReleaseVersion')) throw new GradleException('Model release validation requires -PmodelReleaseVersion=<version>.')
final String recorded = project.file('model-version.txt').text.trim()
if (project.property('modelReleaseVersion').toString() != recorded) throw new GradleException("Release version does not match model-version.txt: ${recorded}")
}
}
project.tasks.named('check').configure { dependsOn(verifyDescriptor, verifyJar) }
project.extensions.configure(PublishingExtension) { PublishingExtension publishing ->
publishing.publications.create('model', MavenPublication) { MavenPublication publication ->
publication.from(project.components.java)
publication.artifactId = "radixor-model-${project.name}"
publication.pom {
name.set("Radixor model ${project.name}")
description.set(model.displayName.zip(model.sourceLicense) { String displayName, String licenseId ->
final String material = licenseId == 'CC-BY-SA-3.0'
? 'See the packaged model-specific notice.'
: 'See the packaged model-data license.'
return "${displayName}. This artifact contains Radixor-derived model data licensed under ${licenseId}; "
.concat("Radixor software is licensed separately under BSD-3-Clause. ${material}")
})
url.set('https://github.com/leogalambos/Radixor')
licenses {
license {
name.set(model.sourceLicense)
url.set(model.sourceLicenseUri)
distribution.set('repo')
}
}
developers {
developer {
id.set('egothor')
name.set('Leo Galambos')
email.set('egothor@gmail.com')
}
}
scm {
url.set('https://github.com/leogalambos/Radixor')
connection.set('scm:git:https://github.com/leogalambos/Radixor.git')
developerConnection.set('scm:git:ssh://git@github.com/leogalambos/Radixor.git')
}
}
}
publishing.repositories.maven {
name = 'modelStaging'
url = project.layout.buildDirectory.dir('model-staging-repository').get().asFile.toURI()
}
}
final String signingKey = project.providers.environmentVariable('SIGNING_KEY').orNull
final String signingPassword = project.providers.environmentVariable('SIGNING_PASSWORD').orNull
project.extensions.configure(SigningExtension) { SigningExtension signing ->
signing.required = {
project.providers.environmentVariable('GITHUB_REF_TYPE').orNull == 'tag'
}
if (signingKey != null && !signingKey.isBlank()) {
signing.useInMemoryPgpKeys(signingKey, signingPassword)
signing.sign(project.extensions.getByType(PublishingExtension).publications.getByName('model'))
}
}
final def checksums = project.tasks.register('createModelCentralChecksums') {
group = 'publishing'
description = 'Creates Maven Central checksums for this model staging repository.'
dependsOn(project.tasks.named('publishModelPublicationToModelStagingRepository'))
doLast {
final File repository = project.layout.buildDirectory.dir('model-staging-repository').get().asFile
repository.eachFileRecurse { File artifact ->
if (artifact.isFile() && !['.md5', '.sha1', '.sha256', '.sha512'].any {
String extension -> artifact.name.endsWith(extension)
}) {
new File(artifact.absolutePath + '.md5').setText(sha256WithAlgorithm(artifact, 'MD5'), 'US-ASCII')
new File(artifact.absolutePath + '.sha1').setText(sha256WithAlgorithm(artifact, 'SHA-1'), 'US-ASCII')
}
}
}
}
project.tasks.register('packageModelReleaseCandidate', Zip) {
group = 'distribution'
description = 'Packages only this model publication as a Maven-layout local release candidate.'
dependsOn(checksums)
from(project.layout.buildDirectory.dir('model-staging-repository')) {
exclude('**/maven-metadata*.xml*')
}
destinationDirectory.set(project.layout.buildDirectory.dir('model-release-candidate'))
archiveFileName.set('central-bundle.zip')
doFirst {
if (project.providers.environmentVariable('GITHUB_REF_TYPE').orNull == 'tag'
&& (signingKey == null || signingKey.isBlank()
|| signingPassword == null || signingPassword.isBlank())) {
throw new GradleException('A tagged model release requires SIGNING_KEY and SIGNING_PASSWORD.')
}
}
}
}
/** Ensures a required file exists. */
static void requireFile(final File file, final String diagnostic) {
if (!file.isFile()) throw new GradleException(diagnostic)
}
/** Rejects a missing or byte-different packaged licensing resource. */
static void requireMatchingChecksum(final String kind, final String resource,
final String sourceChecksum, final String packagedChecksum) {
if (packagedChecksum != sourceChecksum) {
throw new GradleException("Packaged ${kind} does not match the source ${kind} at ${resource}.")
}
}
/** Validates complete source, licensing, attribution, revision-status, and transformation metadata. */
private static void validateMetadata(final RadixorModelExtension model) {
final Map<String, String> required = [
'source.project': model.sourceProject.orNull,
'source.repository': model.sourceRepository.orNull,
'source.dataset': model.sourceDataset.orNull,
'source.revision': model.sourceRevision.orNull,
'source.revisionStatus': model.sourceRevisionStatus.orNull,
'source.license': model.sourceLicense.orNull,
'source.licenseUri': model.sourceLicenseUri.orNull,
'source.attribution': model.sourceAttribution.orNull,
'source.verificationDate': model.sourceVerificationDate.orNull,
'transformations.summary': model.transformationsSummary.orNull]
required.each { String key, String value ->
if (value == null || value.isBlank()) {
throw new GradleException("Required model metadata is missing: ${key}")
}
}
validateRevisionMetadata(model.sourceRevision.get(), model.sourceRevisionStatus.get())
}
/** Accepts an exact recorded revision or the explicit legacy-import sentinel, but never an absent status. */
static void validateRevisionMetadata(final String revision, final String status) {
if (revision == null || revision.isBlank()) {
throw new GradleException('Required model metadata is missing: source.revision')
}
if (status == null || status.isBlank()) {
throw new GradleException('Required model metadata is missing: source.revisionStatus')
}
final String sentinel = 'not-recorded-in-legacy-import'
if (revision == sentinel && status != sentinel) {
throw new GradleException('The legacy revision sentinel requires source.revisionStatus=not-recorded-in-legacy-import.')
}
if (revision != sentinel && status != 'recorded') {
throw new GradleException('An exact source revision requires source.revisionStatus=recorded.')
}
}
/** Validates the model-specific attribution and ShareAlike notice. */
static void validateShareAlikeNotice(final File notice, final RadixorModelExtension model) {
validateShareAlikeNoticeText(notice.getText('UTF-8'), notice.toString(), model.modelId.get(),
model.sourceRepository.get(), model.sourceLicenseUri.get(), model.sourceRevision.get(),
model.sourceRevisionStatus.get())
}
/** Validates required content in one UniMorph model-data notice. */
static void validateShareAlikeNoticeText(final String text, final String noticeName,
final String modelId, final String repository, final String licenseUri,
final String revision, final String revisionStatus) {
final List<String> required = [
"Model ID: ${modelId}",
"Official repository: ${repository}",
'Attribution:',
'License:\nCreative Commons Attribution-ShareAlike 3.0 Unported',
"Canonical license URI: ${licenseUri}",
'Radixor modifications:',
"Revision status: ${revisionStatus}",
'Copyright (C) 2026, Leo Galambos.',
'Radixor-specific selection, verification, cleaning, normalization,',
'to the extent protected by applicable law.',
'The underlying morphological data remains attributed to UniMorph and',
"This derived model data, including Radixor's protectable contributions,",
'is distributed under Creative Commons Attribution-ShareAlike 3.0',
'Neither UniMorph nor any upstream contributor endorses Radixor.']
if (revision == 'not-recorded-in-legacy-import') {
required.add('The exact UniMorph commit used for the original Radixor import was not recorded.')
}
final List<String> missing = required.findAll { String value -> !text.contains(value) }
if (!missing.isEmpty()) {
throw new GradleException("Model notice ${noticeName} is missing required content: ${missing.join(', ')}")
}
}
/** Rejects generic license files and foreign notices in a UniMorph model artifact. */
static void validateUniMorphJarContents(final List<String> names) {
if (names.any { String name -> name.startsWith('META-INF/LICENSES/') }) {
throw new GradleException('A UniMorph model artifact must use only its model-specific notice for data licensing.')
}
if (names.count { String name -> name.startsWith('META-INF/NOTICE/') && !name.endsWith('/') } != 1) {
throw new GradleException('A UniMorph model artifact must contain exactly one model-specific notice.')
}
}
/** Rejects UniMorph licensing material in the separately licensed PoliMorf artifact. */
static void validatePoliMorfJarContents(final List<String> names) {
if (names.any { String name -> name.startsWith('META-INF/NOTICE/')
|| name.contains('CC-BY-SA') }) {
throw new GradleException('The PoliMorf artifact must not contain UniMorph CC BY-SA material.')
}
}
/** Memory-bounded validation statistics for one dictionary input. */
static final class DictionaryValidationResult {
final long acceptedGroupCount
final long acceptedFormCount
final long ignoredEmptyVariantCount
DictionaryValidationResult(final long acceptedGroupCount, final long acceptedFormCount,
final long ignoredEmptyVariantCount) {
this.acceptedGroupCount = acceptedGroupCount
this.acceptedFormCount = acceptedFormCount
this.ignoredEmptyVariantCount = ignoredEmptyVariantCount
}
}
/** Validates GZip, strict UTF-8, and dictionary rows without retaining decompressed input. */
static DictionaryValidationResult validateDictionary(final File file) {
long acceptedGroups = 0L
long acceptedForms = 0L
long ignoredEmptyVariants = 0L
try {
final def decoder = StandardCharsets.UTF_8.newDecoder()
.onMalformedInput(CodingErrorAction.REPORT)
.onUnmappableCharacter(CodingErrorAction.REPORT)
Files.newInputStream(file.toPath()).withCloseable { InputStream source ->
new BufferedInputStream(source).withCloseable { BufferedInputStream bufferedInput ->
new GZIPInputStream(bufferedInput).withCloseable { GZIPInputStream gzipInput ->
new BufferedReader(new InputStreamReader(gzipInput, decoder)).withCloseable { BufferedReader reader ->
String line
long lineNumber = 0L
while ((line = reader.readLine()) != null) {
lineNumber++
final String trimmed = line.trim()
if (trimmed && !trimmed.startsWith('#') && !trimmed.startsWith('//')) {
final String[] columns = line.split('\\t', -1)
if (columns[0].isEmpty()) {
throw new GradleException("Invalid Radixor dictionary row ${lineNumber} in ${file}.")
}
if (containsUnicodeWhitespace(columns[0])) continue
long acceptedRowForms = 1L
for (int index = 1; index < columns.length; index++) {
final String variant = columns[index]
if (variant.isEmpty()) {
ignoredEmptyVariants++
} else if (!containsUnicodeWhitespace(variant)) {
acceptedRowForms++
}
}
acceptedGroups++
acceptedForms += acceptedRowForms
}
}
}
}
}
}
} catch (GradleException exception) {
throw exception
} catch (Exception exception) {
throw new GradleException("Invalid GZip or UTF-8 model input: ${file}", exception)
}
if (acceptedGroups == 0L) throw new GradleException("Model dictionary contains no valid rows: ${file}")
if (ignoredEmptyVariants > 0L) {
println("Model validation warning: " + file + " contains " + ignoredEmptyVariants
+ " empty variant columns; the production parser intentionally ignores empty variants.")
}
return new DictionaryValidationResult(acceptedGroups, acceptedForms, ignoredEmptyVariants)
}
/** Detects Unicode whitespace in one bounded dictionary field. */
private static boolean containsUnicodeWhitespace(final String value) {
for (int index = 0; index < value.length(); index++) {
if (Character.isWhitespace(value.charAt(index))) return true
}
return false
}
/** Builds deterministic descriptor text. */
private static String descriptorText(final RadixorModelExtension model, final String version,
final String resource, final String checksum) {
return """model.id=${model.modelId.get()}
model.version=${version}
model.language=${model.language.get()}
model.displayName=${model.displayName.get()}
model.resource=${resource}
model.default=${model.defaultModel.get()}
model.format=radixor-dictionary-tsv-gzip
model.formatVersion=1
model.sha256=${checksum}
model.rightToLeft=${['FA_IR', 'HE_IL', 'YI'].contains(model.language.get())}
model.caseProcessing=LOWERCASE_WITH_LOCALE_ROOT
model.diacriticProcessing=AS_IS
model.storeOriginal=true
source.name=${model.sourceName.get()}
source.version=${model.sourceVersion.get()}
source.project=${model.sourceProject.get()}
source.repository=${model.sourceRepository.get()}
source.dataset=${model.sourceDataset.get()}
source.revision=${model.sourceRevision.get()}
source.revisionStatus=${model.sourceRevisionStatus.get()}
source.license=${model.sourceLicense.get()}
source.licenseUri=${model.sourceLicenseUri.get()}
source.attribution=${model.sourceAttribution.get()}
source.verificationDate=${model.sourceVerificationDate.get()}
transformations.summary=${model.transformationsSummary.get()}
compiler.radixorVersion=3.x
compiler.radixorCommit=unavailable
statistics.groups=unavailable
statistics.forms=unavailable
"""
}
/** Calculates the lowercase hexadecimal SHA-256 digest. */
private static String sha256(final File file) {
return sha256(file.bytes)
}
/** Calculates the lowercase hexadecimal SHA-256 digest of bytes. */
private static String sha256(final byte[] bytes) {
return MessageDigest.getInstance('SHA-256').digest(bytes).collect { byte value -> String.format('%02x', value & 0xff) }.join()
}
/** Calculates a lowercase hexadecimal digest using the requested algorithm. */
private static String sha256WithAlgorithm(final File file, final String algorithm) {
return MessageDigest.getInstance(algorithm).digest(file.bytes)
.collect { byte value -> String.format('%02x', value & 0xff) }.join()
}
}

View File

@@ -0,0 +1,57 @@
package org.egothor.radixor
import org.gradle.api.DefaultTask
import org.gradle.api.GradleException
import org.gradle.api.file.RegularFileProperty
import org.gradle.api.provider.MapProperty
import org.gradle.api.provider.Property
import org.gradle.api.tasks.Input
import org.gradle.api.tasks.InputFile
import org.gradle.api.tasks.Optional
import org.gradle.api.tasks.PathSensitive
import org.gradle.api.tasks.PathSensitivity
import org.gradle.api.tasks.TaskAction
/** Validates one immutable model input without retaining Project state. */
abstract class ValidateModelInputTask extends DefaultTask {
@InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getDictionaryFile()
@InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getVersionFile()
@Optional @InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getLicenseFile()
@Optional @InputFile @PathSensitive(PathSensitivity.RELATIVE) abstract RegularFileProperty getNoticeFile()
@Input abstract Property<String> getModelId()
@Input abstract Property<String> getModuleName()
@Input abstract Property<Boolean> getShareAlike()
@Input abstract MapProperty<String, String> getMetadata()
/** Performs deterministic metadata, licensing, and streaming dictionary validation. */
@TaskAction
void validateInput() {
final File dictionary = dictionaryFile.get().asFile
final String id = modelId.get()
final String version = versionFile.get().asFile.getText('UTF-8').trim()
if (id != moduleName.get() || !(id ==~ /[a-z]{2}(?:-[a-z]{2})?-[a-z0-9]+(?:-[a-z0-9]+)*/)) {
throw new GradleException("Model ID '${id}' must equal module '${moduleName.get()}' and use the safe model-ID syntax.")
}
if (!(version ==~ /[0-9]+\.[0-9]+\.[0-9]+(?:[-+][0-9A-Za-z.-]+)?/)) {
throw new GradleException("Invalid semantic model version '${version}'.")
}
final Map<String, String> values = metadata.get()
values.each { String key, String value ->
if (value == null || value.isBlank()) throw new GradleException("Required model metadata is missing: ${key}")
}
RadixorModelPlugin.validateRevisionMetadata(values['source.revision'], values['source.revisionStatus'])
if (shareAlike.get()) {
final File notice = noticeFile.get().asFile
RadixorModelPlugin.validateShareAlikeNoticeText(notice.getText('UTF-8'), notice.toString(), id,
values['source.repository'], values['source.licenseUri'], values['source.revision'],
values['source.revisionStatus'])
} else {
final String text = licenseFile.get().asFile.getText('UTF-8')
if (!text.contains('SPDX-License-Identifier: BSD-2-Clause')
|| !text.contains('Copyright (c) 2016, Marcin Miłkowski')) {
throw new GradleException('The PoliMorf license must contain the complete BSD-2-Clause text and upstream attribution.')
}
}
RadixorModelPlugin.validateDictionary(dictionary)
}
}

View File

@@ -0,0 +1,205 @@
package org.egothor.radixor
import org.gradle.api.GradleException
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.io.TempDir
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.Path
import java.util.zip.GZIPOutputStream
import static org.junit.jupiter.api.Assertions.assertEquals
import static org.junit.jupiter.api.Assertions.assertThrows
import static org.junit.jupiter.api.Assertions.assertTrue
/** Tests model licensing metadata and packaged-resource validation boundaries. */
final class RadixorModelPluginTest {
@TempDir
Path temporaryDirectory
/** Accepts a known exact source revision. */
@Test
void acceptsKnownExactRevision() {
RadixorModelPlugin.validateRevisionMetadata('6e63b53', 'recorded')
}
/** Accepts the explicit legacy-import sentinel without fabricating a revision. */
@Test
void acceptsUnknownLegacyRevision() {
RadixorModelPlugin.validateRevisionMetadata(
'not-recorded-in-legacy-import', 'not-recorded-in-legacy-import')
}
/** Rejects a missing revision-status declaration. */
@Test
void rejectsMissingRevisionStatus() {
assertThrows(GradleException) {
RadixorModelPlugin.validateRevisionMetadata('6e63b53', '')
}
}
/** Rejects a missing model-specific notice input. */
@Test
void rejectsMissingLicensingInputs() {
File missing = new File('build/nonexistent-model-licensing-input')
assertThrows(GradleException) {
RadixorModelPlugin.requireFile(missing, 'Required model notice is missing')
}
}
/** Accepts a complete model-specific UniMorph notice. */
@Test
void acceptsCompleteUniMorphNotice() {
validateNotice(validNotice())
}
/** Rejects each independently required notice statement. */
@Test
void rejectsIncompleteUniMorphNotices() {
[
'Copyright (C) 2026, Leo Galambos.',
'Attribution:',
'Creative Commons Attribution-ShareAlike 3.0 Unported',
'Canonical license URI:',
"This derived model data, including Radixor's protectable contributions,",
'Radixor modifications:',
'Revision status:',
'Neither UniMorph nor any upstream contributor endorses Radixor.'
].each { String required ->
assertThrows(GradleException) {
validateNotice(validNotice().replace(required, 'omitted'))
}
}
}
/** Rejects packaged notice bytes that differ from their model-module source. */
@Test
void rejectsIncorrectPackagedNotice() {
assertThrows(GradleException) {
RadixorModelPlugin.requireMatchingChecksum(
'notice', 'META-INF/NOTICE/test-model-data.txt', 'source', 'different')
}
}
/** Rejects UniMorph CC material in the separately licensed PoliMorf artifact. */
@Test
void rejectsUniMorphMaterialInPoliMorf() {
assertThrows(GradleException) {
RadixorModelPlugin.validatePoliMorfJarContents(
['META-INF/LICENSES/PoliMorf-BSD-2-Clause.txt', 'META-INF/NOTICE/test-data.txt'])
}
assertThrows(GradleException) {
RadixorModelPlugin.validatePoliMorfJarContents(
['META-INF/LICENSES/PoliMorf-BSD-2-Clause.txt', 'META-INF/LICENSES/CC-BY-SA-3.0.txt'])
}
}
/** Streams a large dictionary while retaining only aggregate counters and the current row. */
@Test
void validatesLargeDictionaryWithBoundedState() {
final int groups = 250_000
final File dictionary = temporaryDirectory.resolve('large.gz').toFile()
writeGzip(dictionary) { BufferedWriter writer ->
for (int index = 0; index < groups; index++) {
writer.write("stem${index}\tvariant${index}\t\n")
}
}
final RadixorModelPlugin.DictionaryValidationResult result =
RadixorModelPlugin.validateDictionary(dictionary)
assertEquals(groups, result.acceptedGroupCount)
assertEquals(groups * 2L, result.acceptedFormCount)
assertEquals(groups, result.ignoredEmptyVariantCount)
}
/** Rejects a source that is not a GZip stream. */
@Test
void rejectsInvalidGzip() {
final File dictionary = temporaryDirectory.resolve('invalid.gz').toFile()
Files.writeString(dictionary.toPath(), 'not gzip', StandardCharsets.UTF_8)
assertThrows(GradleException) { RadixorModelPlugin.validateDictionary(dictionary) }
}
/** Rejects malformed UTF-8 through the strict incremental decoder. */
@Test
void rejectsMalformedUtf8() {
final File dictionary = temporaryDirectory.resolve('malformed-utf8.gz').toFile()
new GZIPOutputStream(Files.newOutputStream(dictionary.toPath())).withCloseable { OutputStream output ->
output.write([0x73, 0x74, 0x65, 0x6d, 0x09, 0xc3, 0x28, 0x0a] as byte[])
}
assertThrows(GradleException) { RadixorModelPlugin.validateDictionary(dictionary) }
}
/** Rejects structurally invalid rows with an empty stem. */
@Test
void rejectsInvalidRows() {
final File dictionary = temporaryDirectory.resolve('invalid-row.gz').toFile()
writeGzip(dictionary) { BufferedWriter writer -> writer.write("\tvariant\n") }
assertThrows(GradleException) { RadixorModelPlugin.validateDictionary(dictionary) }
}
/** Preserves the production parser policy for Unicode-whitespace items. */
@Test
void rejectsUnicodeWhitespaceItemsWithoutRejectingTheSource() {
final File dictionary = temporaryDirectory.resolve('whitespace-items.gz').toFile()
writeGzip(dictionary) { BufferedWriter writer ->
writer.write("invalid stem\tvariant\n")
writer.write("valid\taccepted\tinvalid variant\n")
}
final RadixorModelPlugin.DictionaryValidationResult result =
RadixorModelPlugin.validateDictionary(dictionary)
assertEquals(1L, result.acceptedGroupCount)
assertEquals(2L, result.acceptedFormCount)
}
/** Streams the complete maintained PoliMorf model input successfully. */
@Test
void validatesFullPoliMorfInput() {
final List<File> candidates = [
new File('models/pl-pl-polimorf/src/modelInput/stemmer.gz'),
new File('../models/pl-pl-polimorf/src/modelInput/stemmer.gz')]
final File dictionary = candidates.find { File candidate -> candidate.isFile() }
assertTrue(dictionary != null, 'The complete PoliMorf model input must be available to build-logic tests.')
final RadixorModelPlugin.DictionaryValidationResult result =
RadixorModelPlugin.validateDictionary(dictionary)
assertTrue(result.acceptedGroupCount > 0L)
assertTrue(result.acceptedFormCount > result.acceptedGroupCount)
}
private static void writeGzip(final File target, final Closure<Void> content) {
new GZIPOutputStream(Files.newOutputStream(target.toPath())).withCloseable { OutputStream gzip ->
new BufferedWriter(new OutputStreamWriter(gzip, StandardCharsets.UTF_8)).withCloseable {
BufferedWriter writer -> content.call(writer)
}
}
}
private static void validateNotice(final String text) {
RadixorModelPlugin.validateShareAlikeNoticeText(text, 'test notice', 'test-model',
'https://github.com/unimorph/test', 'https://creativecommons.org/licenses/by-sa/3.0/',
'not-recorded-in-legacy-import', 'not-recorded-in-legacy-import')
}
private static String validNotice() {
return '''Model ID: test-model
Official repository: https://github.com/unimorph/test
Attribution: UniMorph and upstream contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Radixor modifications: Cleaning and packaging.
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded.
Copyright (C) 2026, Leo Galambos.
Radixor-specific selection, verification, cleaning, normalization,
to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Neither UniMorph nor any upstream contributor endorses Radixor.
'''
}
}

View File

@@ -1,4 +1,5 @@
plugins { plugins {
id 'org.egothor.radixor.build-support'
id 'java' id 'java'
id 'eclipse' id 'eclipse'
id 'application' id 'application'
@@ -7,9 +8,9 @@ plugins {
id 'pmd' id 'pmd'
id 'jacoco' id 'jacoco'
id 'info.solidsoft.pitest' version '1.19.0' id 'info.solidsoft.pitest' version '1.19.0'
id 'me.champeau.jmh' version '0.7.2' id 'me.champeau.jmh' version '0.7.3'
id 'org.owasp.dependencycheck' version '12.2.1' id 'org.owasp.dependencycheck' version '12.2.1'
id 'org.cyclonedx.bom' version '3.2.4' id 'org.cyclonedx.bom' version '3.3.0'
id 'com.palantir.git-version' version '4.0.0' id 'com.palantir.git-version' version '4.0.0'
} }
@@ -45,6 +46,10 @@ java {
targetCompatibility = JavaVersion.VERSION_21 targetCompatibility = JavaVersion.VERSION_21
} }
tasks.withType(JavaCompile).configureEach {
options.compilerArgs.addAll(['-Xlint:deprecation', '-Xlint:unchecked'])
}
tasks.withType(AbstractArchiveTask).configureEach { tasks.withType(AbstractArchiveTask).configureEach {
preserveFileTimestamps = false preserveFileTimestamps = false
reproducibleFileOrder = true reproducibleFileOrder = true
@@ -70,6 +75,11 @@ dependencyLocking {
dependencies { dependencies {
jmhImplementation sourceSets.main.output jmhImplementation sourceSets.main.output
modelProjects().each { Project modelProject ->
testRuntimeOnly project(modelProject.path)
jmhRuntimeOnly project(modelProject.path)
}
testImplementation platform(libs.junit.bom) testImplementation platform(libs.junit.bom)
testImplementation libs.junit.jupiter testImplementation libs.junit.jupiter
testRuntimeOnly libs.junit.platform.launcher testRuntimeOnly libs.junit.platform.launcher
@@ -77,12 +87,45 @@ dependencies {
testImplementation libs.mockito.core testImplementation libs.mockito.core
testImplementation libs.mockito.junit.jupiter testImplementation libs.mockito.junit.jupiter
testImplementation libs.jqwik testImplementation libs.jqwik
testImplementation gradleTestKit()
mockitoAgent(libs.mockito.core) { mockitoAgent(libs.mockito.core) {
transitive = false transitive = false
} }
} }
def modelProjects() {
Properties topology = new Properties()
rootProject.file('models/model-projects.properties').withInputStream { InputStream input ->
topology.load(input)
}
return topology.stringPropertyNames().toList().sort().collect { String modelId ->
project(":models:${modelId}")
}
}
def defaultModelProjects() {
Properties topology = new Properties()
rootProject.file('models/model-projects.properties').withInputStream { InputStream input ->
topology.load(input)
}
return topology.stringPropertyNames().findAll { String modelId ->
topology.getProperty(modelId) == 'default'
}.sort().collect { String modelId -> project(":models:${modelId}") }
}
tasks.named('projects') {
actions.clear()
doLast {
logger.lifecycle('Root project \'{}\'', rootProject.name)
rootProject.allprojects.findAll { Project candidate -> candidate != rootProject }
.sort { Project left, Project right -> left.path <=> right.path }
.each { Project candidate -> logger.lifecycle('+--- Project \'{}\'', candidate.path) }
gradle.includedBuilds.toList().sort { left, right -> left.name <=> right.name }
.each { includedBuild -> logger.lifecycle('Included build \'{}\'', includedBuild.name) }
}
}
sourceSets.jmh.compileClasspath = sourceSets.jmh.compileClasspath - sourceSets.test.output sourceSets.jmh.compileClasspath = sourceSets.jmh.compileClasspath - sourceSets.test.output
sourceSets.jmh.runtimeClasspath = sourceSets.jmh.runtimeClasspath - sourceSets.test.output sourceSets.jmh.runtimeClasspath = sourceSets.jmh.runtimeClasspath - sourceSets.test.output
sourceSets.test.compileClasspath += sourceSets.jmh.output + configurations.jmhCompileClasspath sourceSets.test.compileClasspath += sourceSets.jmh.output + configurations.jmhCompileClasspath
@@ -138,9 +181,10 @@ def splitTagExpression = { String tagsExpr ->
} }
tasks.withType(Test).configureEach { tasks.withType(Test).configureEach {
doFirst { final def mockitoAgentArguments = objects.newInstance(
jvmArgs "-javaagent:${configurations.mockitoAgent.singleFile}" org.egothor.radixor.MockitoAgentArgumentProvider)
} mockitoAgentArguments.agentClasspath.from(configurations.mockitoAgent)
jvmArgumentProviders.add(mockitoAgentArguments)
/* /*
* Bundled dictionary integration tests compile and reload large real-world * Bundled dictionary integration tests compile and reload large real-world
@@ -156,6 +200,30 @@ tasks.withType(Test).configureEach {
} }
} }
tasks.named('test', Test) {
dependsOn('prepareModelConsumerTestRepository')
systemProperty('radixor.consumer.repository',
layout.buildDirectory.dir('model-consumer-repository').get().asFile.absolutePath)
systemProperty('radixor.core.version', version.toString())
systemProperty('radixor.catalog.version', project(':models:standard').version.toString())
}
tasks.register('modelDependencyResolutionTest', Test) {
group = 'verification'
description = 'Verifies that published model coordinates resolve from the generated consumer repository.'
dependsOn(tasks.named('prepareModelConsumerTestRepository'))
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.runtimeClasspath
useJUnitPlatform()
filter {
includeTestsMatching('org.egothor.stemmer.ModelDependencyResolutionTest')
}
systemProperty('radixor.consumer.repository',
layout.buildDirectory.dir('model-consumer-repository').get().asFile.absolutePath)
systemProperty('radixor.core.version', version.toString())
systemProperty('radixor.catalog.version', project(':models:standard').version.toString())
}
def configureJUnitPlatformTags = { Test task, String includeTagsExpr, String excludeTagsExpr -> def configureJUnitPlatformTags = { Test task, String includeTagsExpr, String excludeTagsExpr ->
task.useJUnitPlatform { task.useJUnitPlatform {
final def includes = splitTagExpression(includeTagsExpr) final def includes = splitTagExpression(includeTagsExpr)
@@ -173,11 +241,47 @@ def configureJUnitPlatformTags = { Test task, String includeTagsExpr, String exc
tasks.named('test', Test) { tasks.named('test', Test) {
final def requestedIncludes = splitTagExpression(cliIncludeTags) final def requestedIncludes = splitTagExpression(cliIncludeTags)
final boolean slowExplicitlyIncluded = requestedIncludes.contains('slow') final boolean slowExplicitlyIncluded = requestedIncludes.contains('slow')
final String defaultExcludeTags = cliExcludeTags ?: (slowExplicitlyIncluded ? null : 'slow') final String defaultExcludeTags = cliExcludeTags ?: (slowExplicitlyIncluded ? 'large-model' : 'slow,large-model')
configureJUnitPlatformTags(it, cliIncludeTags, defaultExcludeTags) configureJUnitPlatformTags(it, cliIncludeTags, defaultExcludeTags)
finalizedBy(tasks.named('jacocoTestReport')) finalizedBy(tasks.named('jacocoTestReport'))
} }
def largeModelMaxHeap = providers.gradleProperty('radixorLargeModelMaxHeap').orElse('6g')
def runtimeModelId = providers.gradleProperty('modelId').orElse('pl-pl-polimorf')
def runtimeModelClasspath = configurations.testRuntimeClasspath.incoming.artifactView {
componentFilter { componentIdentifier ->
if (!(componentIdentifier instanceof org.gradle.api.artifacts.component.ProjectComponentIdentifier)) {
return true
}
final String projectPath = componentIdentifier.projectPath
return !projectPath.startsWith(':models:') || projectPath == ":models:${runtimeModelId.get()}"
}
}.files
tasks.register('runtimeModelIntegrationTest', Test) {
group = 'verification'
description = 'Constructs one complete selected runtime model in an isolated, memory-sized JVM.'
testClassesDirs = sourceSets.test.output.classesDirs
classpath = sourceSets.test.output + sourceSets.main.output + sourceSets.jmh.output + runtimeModelClasspath
dependsOn(tasks.named('compileTestJava'))
useJUnitPlatform {
includeTags('large-model')
}
systemProperty('radixor.test.modelId', runtimeModelId.get())
minHeapSize = '1g'
maxHeapSize = largeModelMaxHeap.get()
maxParallelForks = 1
forkEvery = 1
reports {
junitXml.required = true
html.required = true
}
doFirst {
logger.lifecycle("Runtime model integration uses model '{}' with maximum heap {}.",
systemProperties.get('radixor.test.modelId'), maxHeapSize)
}
}
def configureTaggedTestProfile = { String taskName, String includeTagsExpr, String excludeTagsExpr = null, def configureTaggedTestProfile = { String taskName, String includeTagsExpr, String excludeTagsExpr = null,
String taskDescription = null, String testNameExcludePatterns = null -> String taskDescription = null, String testNameExcludePatterns = null ->
tasks.register(taskName, Test) { tasks.register(taskName, Test) {
@@ -189,10 +293,6 @@ def configureTaggedTestProfile = { String taskName, String includeTagsExpr, Stri
classpath = sourceSets.test.runtimeClasspath classpath = sourceSets.test.runtimeClasspath
dependsOn(tasks.named('compileTestJava')) dependsOn(tasks.named('compileTestJava'))
doFirst {
jvmArgs "-javaagent:${configurations.mockitoAgent.singleFile}"
}
if (testNameExcludePatterns != null && !testNameExcludePatterns.isBlank()) { if (testNameExcludePatterns != null && !testNameExcludePatterns.isBlank()) {
filter { filter {
testNameExcludePatterns.split(',').each { String pattern -> testNameExcludePatterns.split(',').each { String pattern ->
@@ -253,11 +353,19 @@ configureTaggedTestProfile(
configureTaggedTestProfile( configureTaggedTestProfile(
'ciRelease', 'ciRelease',
null, null,
'slow', 'slow,large-model',
'Release-profile validation of all non-slow tests.', 'Release-profile validation of all non-slow tests.',
'org.egothor.stemmer.CompileIntegrationTest*,org.egothor.stemmer.StemmerPatchTrieLoaderTest$BundledDictionaryTests*' 'org.egothor.stemmer.CompileIntegrationTest*,org.egothor.stemmer.StemmerPatchTrieLoaderTest$BundledDictionaryTests*'
) )
tasks.named('ciRelease', Test) {
dependsOn('prepareModelConsumerTestRepository')
systemProperty('radixor.consumer.repository',
layout.buildDirectory.dir('model-consumer-repository').get().asFile.absolutePath)
systemProperty('radixor.core.version', version.toString())
systemProperty('radixor.catalog.version', project(':models:standard').version.toString())
}
configureTaggedTestProfile( configureTaggedTestProfile(
'ciNightly', 'ciNightly',
'fuzz', 'fuzz',
@@ -333,25 +441,393 @@ tasks.named('check') {
// no-default, only on-demand: dependsOn(tasks.named('dependencyCheckAnalyze')) // no-default, only on-demand: dependsOn(tasks.named('dependencyCheckAnalyze'))
} }
allprojects { tasks.register('verifyCoreJarExcludesModels') {
tasks.matching { it.name == 'cyclonedxDirectBom' }.configureEach { group = 'verification'
description = 'Verifies that the root Radixor JAR contains no language dictionary bytes.'
dependsOn(tasks.named('jar'))
doLast {
File archive = tasks.named('jar', Jar).get().archiveFile.get().asFile
List<String> dictionaries = []
new java.util.zip.ZipFile(archive).withCloseable { zip ->
zip.entries().each { entry -> if (entry.name.endsWith('/stemmer.gz')) dictionaries.add(entry.name) }
}
if (!dictionaries.isEmpty()) {
throw new GradleException('The org.egothor:radixor JAR must not contain model data: ' + dictionaries)
}
}
}
tasks.register('verifyJavaLicenseHeaders') {
group = 'verification'
description = 'Verifies deterministic license classification for every maintained Java source file.'
inputs.file(layout.projectDirectory.file('gradle/java-license-header.txt'))
inputs.files(fileTree('src/main/java') { include '**/*.java' })
inputs.files(fileTree('src/test/java') { include '**/*.java' })
inputs.files(fileTree('src/jmh/java') { include '**/*.java' })
outputs.file(layout.buildDirectory.file('reports/license/java-license-headers.txt'))
doLast {
String canonicalHeader = layout.projectDirectory.file('gradle/java-license-header.txt')
.asFile.getText('UTF-8')
File canonicalSource = file('src/main/java/org/egothor/stemmer/CaseProcessingMode.java')
if (!canonicalSource.getText('UTF-8').startsWith(canonicalHeader)) {
throw new GradleException('CaseProcessingMode.java does not begin with the canonical Radixor license template.')
}
List<File> maintainedSources = files(
fileTree('src/main/java') { include '**/*.java' },
fileTree('src/test/java') { include '**/*.java' },
fileTree('src/jmh/java') { include '**/*.java' })
.files.toList().sort { File left, File right ->
relativePath(left) <=> relativePath(right)
}
List<String> classifications = []
List<String> failures = []
maintainedSources.each { File sourceFile ->
String relative = relativePath(sourceFile)
String content = sourceFile.getText('UTF-8')
if (content.startsWith(canonicalHeader)) {
classifications.add("RADIXOR_CANONICAL_HEADER ${relative}")
return
}
String leadingNotice = ''
if (content.startsWith('/*')) {
int closingIndex = content.indexOf('*/')
if (closingIndex >= 0) {
leadingNotice = content.substring(0, closingIndex + 2)
}
} else if (content.startsWith('//')) {
leadingNotice = content.readLines().takeWhile { String line ->
line.startsWith('//') || line.isBlank()
}.join('\n')
}
String remainder = content.substring(leadingNotice.length()).stripLeading()
boolean duplicateNotice = !leadingNotice.isEmpty()
&& (remainder.startsWith('/*') || remainder.startsWith('//'))
boolean historicalRadixor = leadingNotice =~ /(?s)Copyright \(C\) \d{4}(?:-\d{4})?, Leo Galambos/
&& leadingNotice.contains('All rights reserved.')
&& leadingNotice.contains('Redistribution and use in source and binary forms')
&& leadingNotice.contains('THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS')
boolean thirdPartyOrProvenance = leadingNotice =~ /(?is)(SPDX-License-Identifier|Licensed under|MIT License|Apache License|Permission is hereby granted|Original source|Adapted from|Ported from|Source:\s*\S)/
if (duplicateNotice) {
classifications.add("AMBIGUOUS_AUTHORSHIP ${relative}")
failures.add("${relative}: duplicate leading comment blocks")
} else if (historicalRadixor) {
classifications.add("RADIXOR_HISTORICAL_HEADER ${relative}")
} else if (thirdPartyOrProvenance) {
classifications.add("THIRD_PARTY_OR_PROVENANCE_HEADER ${relative}")
} else {
classifications.add("AMBIGUOUS_AUTHORSHIP ${relative}")
failures.add("${relative}: no recognized governing license or provenance header")
}
}
File report = layout.buildDirectory.file('reports/license/java-license-headers.txt').get().asFile
report.parentFile.mkdirs()
report.setText(classifications.join('\n') + '\n', 'UTF-8')
if (!failures.isEmpty()) {
throw new GradleException('Maintained Java license verification failed: '
+ failures.sort().join(', '))
}
}
}
tasks.register('verifyAllDefaultModels') {
group = 'verification'
description = 'Verifies that every language default model project is configured.'
dependsOn(defaultModelProjects().collect { Project modelProject ->
modelProject.path + ':verifyModelDescriptor'
})
}
tasks.register('verifyAllModels') {
group = 'verification'
description = 'Runs complete validation and artifact verification for every independently versioned model module.'
dependsOn(modelProjects().collect { Project modelProject -> modelProject.tasks.named('check') })
}
tasks.register('verifyJmhModelClasspath') {
group = 'verification'
description = 'Verifies that JMH receives each individual model JAR exactly once and embeds no dictionary.'
dependsOn(tasks.named('jmhJar'))
dependsOn(modelProjects().collect { Project modelProject -> modelProject.tasks.named('jar') })
outputs.file(layout.buildDirectory.file('reports/models/jmh-model-classpath.txt'))
doLast {
List<File> modelJars = configurations.jmhRuntimeClasspath.files.findAll { File dependency ->
dependency.name.startsWith('radixor-model-') && dependency.name.endsWith('.jar')
}.sort { File left, File right -> left.name <=> right.name }
List<String> expectedPrefixes = modelProjects().collect { Project modelProject ->
"radixor-model-${modelProject.name}-"
}
expectedPrefixes.each { String prefix ->
List<File> matches = modelJars.findAll { File dependency -> dependency.name.startsWith(prefix) }
if (matches.size() != 1) {
throw new GradleException("JMH must resolve exactly one model JAR with prefix ${prefix}; resolved ${matches}.")
}
}
if (modelJars.any { File dependency -> dependency.name.contains('benchmark-pack') }) {
throw new GradleException('JMH must not resolve a benchmark-pack artifact.')
}
File executable = tasks.named('jmhJar', Jar).get().archiveFile.get().asFile
if (!zipTree(executable).matching { include '**/stemmer.gz' }.isEmpty()) {
throw new GradleException('The JMH executable JAR must not embed model dictionaries.')
}
File report = layout.buildDirectory.file('reports/models/jmh-model-classpath.txt').get().asFile
report.parentFile.mkdirs()
report.setText(modelJars.collect { File dependency -> dependency.name }.join('\n') + '\n', 'UTF-8')
}
}
tasks.named('prepareModelConsumerTestRepository') {
coreVersion = version.toString()
catalogVersion = project(':models:standard').version.toString()
modelVersions = modelProjects().collectEntries { Project modelProject ->
final String modelVersion = providers.gradleProperty('modelReleaseVersion')
.orElse(providers.fileContents(modelProject.layout.projectDirectory.file('model-version.txt'))
.asText.map(String::trim))
.get()
[(modelProject.name): modelVersion]
}
corePom = layout.file(tasks.named('generatePomFileForMavenJavaPublication').map { it.destination })
coreJar = tasks.named('jar', Jar).flatMap { it.archiveFile }
modelPoms.from(modelProjects().collect { Project modelProject ->
modelProject.tasks.named('generatePomFileForModelPublication').map { it.destination }
})
modelJars.from(modelProjects().collect { Project modelProject ->
modelProject.tasks.named('jar', Jar).flatMap { it.archiveFile }
})
standardPom = layout.file(project(':models:standard').tasks.named('generatePomFileForStandardPublication')
.map { it.destination })
bomPom = layout.file(project(':models:bom').tasks.named('generatePomFileForBomPublication')
.map { it.destination })
repositoryDirectory = layout.buildDirectory.dir('model-consumer-repository')
}
def cleanModelCatalogStaging = tasks.register('cleanModelCatalogStaging') {
group = 'publishing'
description = 'Cleans the isolated model catalog Maven staging repository.'
doLast {
project.delete(layout.buildDirectory.dir('model-catalog-staging-repository'))
}
}
gradle.projectsEvaluated {
project(':models:standard').tasks.named('publishStandardPublicationToCatalogStagingRepository') {
dependsOn(cleanModelCatalogStaging)
}
project(':models:bom').tasks.named('publishBomPublicationToCatalogStagingRepository') {
dependsOn(cleanModelCatalogStaging)
}
}
tasks.register('prepareModelCatalogReleaseCandidate') {
group = 'publishing'
description = 'Stages the POM-only standard aggregate and model BOM with Central checksums.'
dependsOn(project(':models:standard').tasks.named('check'))
dependsOn(project(':models:bom').tasks.named('check'))
dependsOn(':models:standard:publishStandardPublicationToCatalogStagingRepository')
dependsOn(':models:bom:publishBomPublicationToCatalogStagingRepository')
outputs.dir(layout.buildDirectory.dir('model-catalog-staging-repository'))
doLast {
File repository = layout.buildDirectory.dir('model-catalog-staging-repository').get().asFile
repository.eachFileRecurse { File artifact ->
if (artifact.isFile() && !['.md5', '.sha1', '.sha256', '.sha512'].any {
String extension -> artifact.name.endsWith(extension)
}) {
['MD5': 'md5', 'SHA-1': 'sha1'].each { String algorithm, String extension ->
String digest = java.security.MessageDigest.getInstance(algorithm)
.digest(artifact.bytes).encodeHex().toString()
new File(artifact.absolutePath + ".${extension}").setText(digest, 'US-ASCII')
}
}
}
}
}
tasks.register('modelCatalogCentralBundle', Zip) {
group = 'publishing'
description = 'Builds the local POM-only model catalog bundle without remote publication.'
dependsOn(tasks.named('prepareModelCatalogReleaseCandidate'))
from(layout.buildDirectory.dir('model-catalog-staging-repository')) {
exclude('**/maven-metadata*.xml*', '**/*.module*')
}
destinationDirectory = layout.buildDirectory.dir('model-catalog-release-candidate')
archiveFileName = "radixor-models-catalog-${project(':models:standard').version}-central-bundle.zip"
doFirst {
if (providers.environmentVariable('GITHUB_REF_TYPE').orNull == 'tag'
&& (providers.environmentVariable('SIGNING_KEY').orNull?.isBlank() != false
|| providers.environmentVariable('SIGNING_PASSWORD').orNull?.isBlank() != false)) {
throw new GradleException('A tagged model catalog release requires SIGNING_KEY and SIGNING_PASSWORD.')
}
}
}
tasks.register('verifyModelCatalogReleaseCandidate') {
group = 'verification'
description = 'Verifies that the local catalog bundle contains only two POM publications, signatures when configured, and checksums.'
dependsOn(tasks.named('modelCatalogCentralBundle'))
outputs.file(layout.buildDirectory.file('reports/models/catalog-release-candidate.txt'))
doLast {
File bundle = tasks.named('modelCatalogCentralBundle', Zip).get().archiveFile.get().asFile
List<String> entries = []
new java.util.zip.ZipFile(bundle).withCloseable { java.util.zip.ZipFile archive ->
archive.entries().each { java.util.zip.ZipEntry entry ->
if (!entry.directory) entries.add(entry.name)
}
}
entries.sort()
List<String> poms = entries.findAll { String entry -> entry.endsWith('.pom') }
if (poms.size() != 2 || entries.any { String entry ->
entry.endsWith('.jar') || entry.endsWith('/stemmer.gz') || entry.contains('benchmark-pack')
}) {
throw new GradleException('The model catalog bundle must contain only the standard and BOM POM publications.')
}
List<String> unsupported = entries.findAll { String entry ->
!(entry.endsWith('.pom') || entry.endsWith('.pom.md5') || entry.endsWith('.pom.sha1')
|| entry.endsWith('.pom.sha256') || entry.endsWith('.pom.sha512')
|| entry.endsWith('.pom.asc') || entry.endsWith('.pom.asc.md5')
|| entry.endsWith('.pom.asc.sha1') || entry.endsWith('.pom.asc.sha256')
|| entry.endsWith('.pom.asc.sha512'))
}
if (!unsupported.isEmpty()) {
throw new GradleException("The model catalog bundle contains unsupported files: ${unsupported}.")
}
poms.each { String pom ->
if (!entries.contains(pom + '.md5') || !entries.contains(pom + '.sha1')) {
throw new GradleException("The model catalog POM is missing Central checksums: ${pom}.")
}
}
File report = layout.buildDirectory.file('reports/models/catalog-release-candidate.txt').get().asFile
report.parentFile.mkdirs()
report.setText("Bundle: ${bundle.name}\nBytes: ${bundle.length()}\n" + entries.join('\n') + '\n', 'UTF-8')
}
}
tasks.register('verifyArtifactSizes') {
group = 'verification'
description = 'Reports artifact sizes and rejects dictionary bytes in core.'
dependsOn(tasks.named('verifyCoreJarExcludesModels'))
doLast {
File archive = tasks.named('jar', Jar).get().archiveFile.get().asFile
println('org.egothor:radixor:' + version + ' ' + archive.length() + ' bytes')
}
}
tasks.named('check') {
dependsOn(tasks.named('verifyCoreJarExcludesModels'))
dependsOn(tasks.named('verifyAllDefaultModels'))
dependsOn(tasks.named('verifyJmhModelClasspath'))
dependsOn(tasks.named('verifyJavaLicenseHeaders'))
}
def modelCatalogText = providers.provider {
StringBuilder output = new StringBuilder()
output.append('| Model ID | Language | Default | Coordinates | Version | Source | Repository | Source version | Revision | Revision status | License | Attribution | SHA-256 | Bytes |\n')
output.append('|---|---|---:|---|---:|---|---|---|---|---|---|---|---|---:|\n')
modelProjects().each { Project modelProject ->
String script = modelProject.file('build.gradle').getText('UTF-8')
def value = { String key ->
def matcher = script =~ /(?m)^\s*${key}\s*=\s*(?:'([^']+)'|([^\s]+))\s*$/
if (!matcher.find()) return 'unavailable'
return matcher.group(1) != null ? matcher.group(1) : matcher.group(2)
}
File input = modelProject.file('src/modelInput/stemmer.gz')
String checksum = java.security.MessageDigest.getInstance('SHA-256').digest(input.bytes).encodeHex().toString()
output.append('| ').append(modelProject.name)
.append(' | ').append(value('language'))
.append(' | ').append(value('defaultModel'))
.append(' | org.egothor:radixor-model-').append(modelProject.name)
.append(' | ').append(modelProject.file('model-version.txt').text.trim())
.append(' | ').append(value('sourceName'))
.append(' | ').append(value('sourceRepository'))
.append(' | ').append(value('sourceVersion'))
.append(' | ').append(value('sourceRevision'))
.append(' | ').append(value('sourceRevisionStatus'))
.append(' | ').append(value('sourceLicense'))
.append(' | ').append(value('sourceAttribution'))
.append(' | ').append(checksum)
.append(' | ').append(input.length()).append(' |\n')
}
return output.toString()
}
tasks.register('generateModelCatalogDocumentation') {
group = 'documentation'
description = 'Generates the deterministic model catalog in the build documentation staging tree.'
outputs.file(layout.buildDirectory.file('mkdocs-source/stemmer-model-catalog.md'))
doLast {
File catalog = layout.buildDirectory.file('mkdocs-source/stemmer-model-catalog.md').get().asFile
catalog.parentFile.mkdirs()
catalog.setText('# Published Stemmer Model Catalog\n\n' + modelCatalogText.get(), 'UTF-8')
}
}
tasks.register('prepareMkDocsSource', Sync) {
group = 'documentation'
description = 'Stages maintained documentation, generated catalog, and MkDocs configuration under build/.'
dependsOn(modelProjects().collect { Project modelProject -> modelProject.path + ':verifyModelDescriptor' })
into(layout.buildDirectory.dir('mkdocs-source'))
from(layout.projectDirectory.dir('docs'))
doLast {
File catalog = layout.buildDirectory.file('mkdocs-source/stemmer-model-catalog.md').get().asFile
catalog.setText('# Published Stemmer Model Catalog\n\n' + modelCatalogText.get(), 'UTF-8')
File buildsPage = layout.buildDirectory.file('mkdocs-source/builds.md').get().asFile
buildsPage.setText('# Historical Builds\n\nThe Pages publication workflow replaces this staging placeholder with the retained build index.\n', 'UTF-8')
File configuration = layout.buildDirectory.file('mkdocs/mkdocs.yml').get().asFile
configuration.parentFile.mkdirs()
configuration.setText(layout.projectDirectory.file('mkdocs.yml').asFile.getText('UTF-8')
+ '\ndocs_dir: ../mkdocs-source\nsite_dir: ../mkdocs-site\n', 'UTF-8')
}
}
tasks.register('verifyModelCatalogDocumentation') {
group = 'verification'
description = 'Validates model metadata and the generated build-directory MkDocs catalog.'
dependsOn(tasks.named('prepareMkDocsSource'))
dependsOn(tasks.named('verifyAllDefaultModels'))
doLast {
File catalog = layout.buildDirectory.file('mkdocs-source/stemmer-model-catalog.md').get().asFile
String expected = '# Published Stemmer Model Catalog\n\n' + modelCatalogText.get()
if (!catalog.isFile() || catalog.getText('UTF-8') != expected) {
throw new GradleException('The staged model catalog is missing or nondeterministic.')
}
List<String> identifiers = modelProjects().collect { Project modelProject -> modelProject.name }
if (identifiers != identifiers.sort()) {
throw new GradleException('Published model projects are not in deterministic model-ID order.')
}
identifiers.each { String identifier ->
if (!expected.contains('org.egothor:radixor-model-' + identifier)) {
throw new GradleException('The staged model catalog omits published model ' + identifier + '.')
}
}
if (!layout.buildDirectory.file('mkdocs/mkdocs.yml').get().asFile.isFile()) {
throw new GradleException('The staged MkDocs configuration is missing.')
}
}
}
tasks.named('check') {
dependsOn(tasks.named('verifyModelCatalogDocumentation'))
}
tasks.named('cyclonedxDirectBom') {
includeConfigs = ['runtimeClasspath', 'compileClasspath'] includeConfigs = ['runtimeClasspath', 'compileClasspath']
skipConfigs = ['testRuntimeClasspath', 'testCompileClasspath', 'jmh.*', 'mockitoAgent'] skipConfigs = ['testRuntimeClasspath', 'testCompileClasspath', 'jmh.*', 'mockitoAgent']
includeBomSerialNumber = true includeBomSerialNumber = true
includeLicenseText = false includeLicenseText = false
includeMetadataResolution = true includeMetadataResolution = true
includeBuildSystem = true includeBuildSystem = true
}
}
tasks.named('cyclonedxBom') {
includeBomSerialNumber = true
includeLicenseText = false
includeBuildSystem = true
jsonOutput.set(sbomReportsDirectory.map { it.file('radixor-sbom.json') }) jsonOutput.set(sbomReportsDirectory.map { it.file('radixor-sbom.json') })
xmlOutput.set(sbomReportsDirectory.map { it.file('radixor-sbom.xml') }) xmlOutput.set(sbomReportsDirectory.map { it.file('radixor-sbom.xml') })
} }
subprojects {
tasks.matching { Task candidate -> candidate.name == 'cyclonedxDirectBom' }.configureEach {
enabled = false
description = 'Disabled because the root project exclusively owns CycloneDX SBOM generation.'
}
}
pitest { pitest {
pitestVersion = '1.22.1' pitestVersion = '1.22.1'
junit5PluginVersion = '1.2.3' junit5PluginVersion = '1.2.3'
@@ -461,6 +937,13 @@ tasks.named('jmh') {
description = 'Runs JMH benchmarks for the Radixor algorithmic core and external stemmer comparison suites.' description = 'Runs JMH benchmarks for the Radixor algorithmic core and external stemmer comparison suites.'
} }
tasks.named('jmhJar', Jar) {
exclude 'META-INF/radixor/models.index'
exclude 'META-INF/radixor/models/**'
exclude 'org/egothor/stemmer/models/**'
exclude 'META-INF/LICENSES/**'
}
apply from: 'gradle/lucene-benchmarks.gradle' apply from: 'gradle/lucene-benchmarks.gradle'
tasks.register('regressionArtifactGenerator', JavaExec) { tasks.register('regressionArtifactGenerator', JavaExec) {
@@ -486,13 +969,14 @@ tasks.register('regressionArtifactGenerator', JavaExec) {
tasks.register('stemmingQuality', JavaExec) { tasks.register('stemmingQuality', JavaExec) {
group = 'verification' group = 'verification'
description = 'Evaluates pairwise over-stemming and under-stemming against bundled dictionary groups.' description = 'Evaluates pairwise over-stemming and under-stemming against registered model dictionary groups.'
dependsOn(tasks.named('testClasses')) dependsOn(tasks.named('testClasses'))
dependsOn(tasks.named('jmhClasses')) dependsOn(tasks.named('jmhClasses'))
dependsOn(tasks.named('prepareBenchmarkModelInputs'))
classpath = files(sourceSets.test.runtimeClasspath, configurations.stemmingQualityJmhRuntime) classpath = files(sourceSets.test.runtimeClasspath, configurations.stemmingQualityJmhRuntime)
mainClass = 'org.egothor.stemmer.benchmark.quality.StemmingQualityApplication' mainClass = 'org.egothor.stemmer.benchmark.quality.StemmingQualityApplication'
args layout.buildDirectory.dir('reports/stemming-quality').get().asFile.absolutePath, args layout.buildDirectory.dir('reports/stemming-quality').get().asFile.absolutePath,
layout.projectDirectory.dir('src/main/resources').asFile.absolutePath, layout.buildDirectory.dir('generated/benchmark-model-inputs').get().asFile.absolutePath,
providers.gradleProperty('stemmingQualityLanguage').getOrElse(''), providers.gradleProperty('stemmingQualityLanguage').getOrElse(''),
providers.gradleProperty('stemmingQualityStemmer').getOrElse(''), providers.gradleProperty('stemmingQualityStemmer').getOrElse(''),
providers.gradleProperty('stemmingQualityMode').getOrElse(''), providers.gradleProperty('stemmingQualityMode').getOrElse(''),
@@ -503,6 +987,20 @@ tasks.register('stemmingQuality', JavaExec) {
maxHeapSize = '6g' maxHeapSize = '6g'
} }
tasks.register('prepareBenchmarkModelInputs', Sync) {
group = 'verification'
description = 'Prepares default model inputs for JMH and quality evaluation without changing source data.'
into(layout.buildDirectory.dir('generated/benchmark-model-inputs'))
defaultModelProjects().each { Project modelProject ->
String languageDirectory = modelProject.name == 'pl-pl-unimorph'
? 'pl_pl'
: modelProject.name.replace('-default', '').replace('-', '_')
from(modelProject.file('src/modelInput/stemmer.gz')) {
into(languageDirectory)
}
}
}
tasks.register('publishStemmingQualityDocumentation', JavaExec) { tasks.register('publishStemmingQualityDocumentation', JavaExec) {
group = 'documentation' group = 'documentation'
description = 'Publishes validated complete stemming-quality results on the language benchmark pages.' description = 'Publishes validated complete stemming-quality results on the language benchmark pages.'

View File

@@ -17,6 +17,10 @@ The build-time flow is:
Dictionary -> Mutable trie -> Reduced trie -> Compiled trie Dictionary -> Mutable trie -> Reduced trie -> Compiled trie
``` ```
For registered models, the dictionary is an independently versioned GZip resource discovered through a descriptor and verified before this flow begins. The model resource is input to trie construction, not a precompiled trie. See [Model Selection and Loading](model-selection-and-loading.md) for discovery and [Architecture](architecture.md) for component and release boundaries.
Explicit descriptors and stable model IDs now use the same compiled-value path as language defaults. `loadCompiled(descriptor, ...)` and `loadCompiled(modelId, ...)` first build with serialized patch commands and then map those values to `CompiledPatchCommand` while preserving metadata, reduction semantics, and ranked `getAll` order. Very large inputs can have a high temporary construction peak; PoliMorf is verified in an isolated 6 GiB JVM rather than increasing ordinary test or Gradle daemon heaps.
At runtime, the compiled trie does not directly return the final stem string. It returns one or more stored patch commands for the addressed key, and those commands are then applied to the original input word. At runtime, the compiled trie does not directly return the final stem string. It returns one or more stored patch commands for the addressed key, and those commands are then applied to the original input word.
## Why this matters ## Why this matters
@@ -50,3 +54,5 @@ For most readers, the best order is:
- [Programmatic usage](programmatic-usage.md) - [Programmatic usage](programmatic-usage.md)
- [CLI compilation](cli-compilation.md) - [CLI compilation](cli-compilation.md)
- [Dictionary format](dictionary-format.md) - [Dictionary format](dictionary-format.md)
- [Model selection and loading](model-selection-and-loading.md)
- [Stemmer models](stemmer-models.md)

View File

@@ -2,6 +2,92 @@
This document explains the structural architecture of **Radixor**: what data is stored, how it flows through the build pipeline, and how runtime lookup works once a compiled trie has been produced. This document explains the structural architecture of **Radixor**: what data is stored, how it flows through the build pipeline, and how runtime lookup works once a compiled trie has been produced.
## Component boundaries
| Component | Responsibility |
|---|---|
| Root Radixor core | Patch commands, dictionary parser, trie construction/lookup, descriptor and registry APIs, loaders; no language data |
| Individual model module | Immutable source input and license; publishes one independently versioned resource JAR |
| `StemmerModelRegistry` | Deterministic index/descriptor discovery and selection by model ID or language default |
| `StemmerModelDescriptor` | Immutable public view of validated runtime identity, format, resource, checksum, and source URL |
| Model convention plugin | Validates inputs and generates the resource namespace, descriptor, index, license, and publication |
| Standard aggregate | POM-only transitive runtime dependencies for one default per language |
| Verification classpaths | Direct individual-model dependencies for tests, quality evaluation, and JMH, including optional PoliMorf |
| Models BOM | POM-only recommended individual model versions in Maven dependency management |
| Documentation staging | Maintained `docs/` plus generated catalog under `build/mkdocs-source/` |
| Release workflows | Independent core, one-model, and catalog publication boundaries |
Read [Model Selection and Loading](model-selection-and-loading.md) for executable application examples and [Stemmer Models](stemmer-models.md) for artifact maintenance.
## Runtime model discovery and loading
The implemented sequence is:
1. use the thread context `ClassLoader`, or an explicit non-null loader;
2. enumerate every `META-INF/radixor/models.index` with `ClassLoader.getResources(...)`;
3. sort index URLs and validate every descriptor path;
4. read descriptor resources and required properties;
5. validate model ID, language, exact resource namespace, checksum syntax, format name, and format version;
6. sort descriptors by model ID and reject duplicate IDs;
7. resolve either `Language.defaultModelId()` or an exact explicit model ID;
8. open the declared model resource with the descriptor's discovering loader;
9. compare SHA-256 over the compressed bytes;
10. decompress GZip and parse UTF-8 Radixor dictionary rows;
11. build and reduce a `FrequencyTrie`;
12. optionally compile stored patch strings into `CompiledPatchCommand` values for the language-oriented compiled API.
Descriptor discovery verifies resource presence before selection. Byte-level checksum verification happens when the selected model is loaded. The registry never scans arbitrary JAR contents and never selects “the first model for a language.”
### Default Polish resolution
`StemmerPatchTrieLoader.Language.PL_PL` declares `pl-pl-unimorph` in the enum constructor. A language-oriented load creates a context-loader registry and calls `requireDefault(PL_PL)`. If that ID is absent, loading stops with `StemmerModelNotFoundException` naming `org.egothor:radixor-model-pl-pl-unimorph:<version>`.
### Explicit PoliMorf resolution
`registry.require("pl-pl-polimorf")` addresses the alternative directly. It neither changes nor consults the Polish default. Both descriptors may coexist; duplicate declarations of either same ID are rejected.
## Version axes
| Version | Owned by | Compatibility purpose |
|---|---|---|
| Core version | Root Git-derived release | Java implementation and public API |
| Model artifact version | Each `model-version.txt` | One independently published model JAR |
| Catalog version | `models/catalog-version.txt` | Standard aggregate and BOM recommendation set |
| Source dictionary version | Module provenance | Upstream lexical data lineage |
| Model format version | Descriptor and registry | Loader compatibility for packaged dictionary representation |
No equality relationship is implied between these values.
## Build topology and generated output
`models/model-projects.properties` is the single Gradle-readable topology list for the 21 individual model projects and their default or optional aggregate role. Per-model build scripts and generated descriptors remain authoritative for language, resource, provenance, checksum, and model-specific metadata. `settings.gradle`, root verification classpaths, the standard POM, and BOM constraints all derive membership from the topology list.
Gradle implicitly creates the lifecycle parent `:models` because child paths are nested. It has no build script, applied project plugin, Maven coordinate, publication, or archive. The root CycloneDX plugin exposes direct-task instances to subprojects internally; every subproject instance is disabled, so only root `:cyclonedxDirectBom` can generate an SBOM. The ignored path `models/build/` is generated output, not a module, and the supported build does not write reports there. Root aggregate reports, including `verifyJmhModelClasspath`, belong under `build/reports/models/`; each individual model retains its own outputs under `models/<model-id>/build/`.
`models/bom` is a Maven dependency BOM: it controls recommended dependency versions and adds no runtime artifacts. The root CycloneDX task produces a software bill of materials (SBOM) under `build/reports/sbom/`. These artifacts have different purposes and output locations.
## Build-time model packaging
The `org.egothor.radixor.model` convention plugin treats `src/modelInput` as immutable. `validateModelInput` checks the GZip stream, strict UTF-8, dictionary rows, ID, semantic model version, and license. `prepareModelResources` copies identical compressed bytes under `org/egothor/stemmer/models/<model-id>/stemmer.gz` and generates the descriptor, index, and packaged license under `build/`. `verifyModelDescriptor` checks the digest, while `verifyModelJar` checks the unique resource, packaged-byte digest, metadata, and dictionary-free documentation artifacts. The root `runtimeModelIntegrationTest` accepts `-PmodelId=<id>` and verifies transformation of a packaged resource into `FrequencyTrie<CompiledPatchCommand>`; PoliMorf release validation depends on this complete runtime test.
For UniMorph models, the convention validates and packages one model-specific attribution,
licensing, provenance, and contribution notice. Source and packaged notice bytes must match. The
notice identifies CC BY-SA 3.0 through its canonical URI; no project-wide CC license directory or
duplicated full legal text is used. Descriptors distinguish exact revisions from the explicit
legacy-import sentinel. UniMorph supplies morphological data; runtime patch commands and tries are
constructed by Radixor. The Java software remains BSD-3-Clause, while PoliMorf data remains under
its separately packaged BSD-2-Clause license.
## Release and security boundaries
| Tag | Publication boundary |
|---|---|
| `release@<core-version>` | Root `org.egothor:radixor` artifacts only; never model JARs |
| `model/<model-id>@<model-version>` | Exactly one matching model; never core, catalog, or other models |
| `models-catalog@<catalog-version>` | BOM and standard aggregate only; never model bytes |
License inclusion, strict metadata paths, resource presence, SHA-256 verification, unsupported-format rejection, and duplicate-ID rejection form the model integrity boundary. These checks detect packaging mistakes and corruption; model data remains non-executable dictionary input.
## The central idea ## The central idea
Radixor does not store final stems directly as a large flat lookup table. Instead, it stores **patch commands** that describe how a word form should be transformed into a canonical stem. Radixor does not store final stems directly as a large flat lookup table. Instead, it stores **patch commands** that describe how a word form should be transformed into a canonical stem.
@@ -10,7 +96,7 @@ For example, if a dictionary states that `running` should reduce to `run`, the f
That matters because many words share similar transformation patterns. Once those mappings are organized in a trie and compiled into a canonical structure, the result is much smaller and more reusable than a naive direct-output table. That matters because many words share similar transformation patterns. Once those mappings are organized in a trie and compiled into a canonical structure, the result is much smaller and more reusable than a naive direct-output table.
## End-to-end build flow ## Trie construction flow
The full build-time flow is: The full build-time flow is:
@@ -191,7 +277,7 @@ This is why a very large dictionary can still produce a manageable deployable ru
The compactness of the final artifact should not be confused with the memory usage of preparation. The compactness of the final artifact should not be confused with the memory usage of preparation.
Before reduction has completed, the mutable build-time structure must exist in memory. For large dictionaries, that temporary preparation cost can be noticeably higher than the size of the final persisted artifact or the loaded compiled trie. Before reduction has completed, the mutable build-time structure must exist in memory. For large dictionaries, that temporary preparation cost can be noticeably higher than the size of the final persisted artifact or the loaded compiled trie. PoliMorf is the exceptional current case: two complete test constructions took 23.7 and 23.5 seconds, produced 358,993 canonical nodes, and used a task-specific 6 GiB maximum heap. The process peak does not establish the retained heap of the final trie, which is not currently measured separately.
That is why the preferred operational model is usually: That is why the preferred operational model is usually:
@@ -218,3 +304,5 @@ Determinism matters not only for tests, but also for operational trust. It makes
- [Reduction Semantics](reduction-semantics.md) - [Reduction Semantics](reduction-semantics.md)
- [Programmatic usage](programmatic-usage.md) - [Programmatic usage](programmatic-usage.md)
- [CLI compilation](cli-compilation.md) - [CLI compilation](cli-compilation.md)
- [Model selection and loading](model-selection-and-loading.md)
- [Stemmer models](stemmer-models.md)

View File

@@ -2,6 +2,10 @@
Radixor contains internal trie microbenchmarks, a separate stemmer comparison suite, and a dictionary coverage benchmark for Radixor itself. Published stemmer comparison results must come only from benchmark classes matching `.*StemmerComparisonBenchmark.*`; internal `FrequencyTrie*` microbenchmarks are not part of those results. Radixor contains internal trie microbenchmarks, a separate stemmer comparison suite, and a dictionary coverage benchmark for Radixor itself. Published stemmer comparison results must come only from benchmark classes matching `.*StemmerComparisonBenchmark.*`; internal `FrequencyTrie*` microbenchmarks are not part of those results.
Every current default Radixor benchmark scenario uses the model ID declared by its `Language.defaultModelId()`. The root JMH runtime configuration depends directly on all default model projects plus optional `pl-pl-polimorf`; no benchmark-pack project or artifact exists. These dependencies are benchmark-only and never enter the root published POM. A PoliMorf comparison must be labeled with model ID `pl-pl-polimorf`, while the default Polish row remains `pl-pl-unimorph`.
The optional model now has a verified complete compiled loading path. This does not alter existing benchmark rows or make PoliMorf part of the representative English JMH run. Any future full PoliMorf benchmark must provision its documented startup heap independently and record the exact model artifact version and checksum.
This page is the entry point for benchmark interpretation. Detailed tables and long reference material are split into focused subpages so that important points do not get buried. This page is the entry point for benchmark interpretation. Detailed tables and long reference material are split into focused subpages so that important points do not get buried.
## Key Takeaways ## Key Takeaways
@@ -40,3 +44,4 @@ The [English dictionary coverage benchmark](benchmarks/reference/english-coverag
The current measured language results are published in [Language Benchmark Pages](benchmarks/languages/index.md). Generated local report files for this benchmark update are listed in [Benchmark environment and reports](benchmarks/reference/environment.md). The current measured language results are published in [Language Benchmark Pages](benchmarks/languages/index.md). Generated local report files for this benchmark update are listed in [Benchmark environment and reports](benchmarks/reference/environment.md).
JMH TXT and CSV reports are still published as benchmark artifacts. They are no longer converted into a Shields endpoint benchmark badge. JMH TXT and CSV reports are still published as benchmark artifacts. They are no longer converted into a Shields endpoint benchmark badge.
Model IDs, independent artifact versions, and descriptor checksums identify inputs for future reproducibility. Historical snapshots remain tied to the model inputs used when measured; the optional PoliMorf model must not be retroactively attributed to results that predate it. See [Model Selection and Loading](model-selection-and-loading.md) and [Reproducibility](benchmarks/reference/reproducibility.md).

View File

@@ -4,7 +4,9 @@ This evaluation measures agreement between the relation predicted by a stemmer a
## Scope and fair-comparison rules ## Scope and fair-comparison rules
The authoritative Radixor language universe is the reconciled set of `stemmer.gz` resources under `src/main/resources` and `StemmerPatchTrieLoader.Language`. Radixor is evaluated for every reconciled language. A third-party adapter is evaluated only for languages supported by its tested implementation and having a compatible Radixor dictionary; unsupported combinations are absent rather than assigned zero quality. The authoritative Radixor language universe is the reconciliation of registered default model descriptors and `StemmerPatchTrieLoader.Language`. Radixor is evaluated for every reconciled language. Optional models are separate comparison rows. A third-party adapter is evaluated only for languages supported by its tested implementation and having a compatible Radixor dictionary; unsupported combinations are absent rather than assigned zero quality.
Model identity is part of the candidate identity. Default Polish means `pl-pl-unimorph`; optional PoliMorf means `pl-pl-polimorf`. Results for those inputs must not be combined or relabeled, and historical snapshots cannot acquire a newer model identity retroactively.
Within one language and dictionary mode, every adapter receives the same original included forms. Exact duplicates are removed only within one dictionary row. Identical surface forms in different rows remain distinct entries. Candidate strings use exact `String.equals`, with no evaluation-only lowercasing, normalization, accent removal, or gold-label-aware selection. Adapter preprocessing and lifecycle match the JMH comparison path. Within one language and dictionary mode, every adapter receives the same original included forms. Exact duplicates are removed only within one dictionary row. Identical surface forms in different rows remain distinct entries. Candidate strings use exact `String.equals`, with no evaluation-only lowercasing, normalization, accent removal, or gold-label-aware selection. Adapter preprocessing and lifecycle match the JMH comparison path.

View File

@@ -1,6 +1,6 @@
# Benchmark Methodology # Benchmark Methodology
The stemmer comparison suite measures Radixor and Java stemmers on the same language and deterministic Radixor dictionary-derived data. Published Radixor rows in this refresh use contracted compiled patch tries, where uniform preferred-command subtrees are collapsed into accepting leaves before the trie is frozen for lookup. For each language, the bundled dictionary resource stores the expected root as the first tab-separated field on a line and its surface forms on the same line. Every single-token field on that line can therefore be paired with the same expected root. The stemmer comparison suite measures Radixor and Java stemmers on the same language and deterministic Radixor model dictionary-derived data. Published Radixor rows in this refresh use contracted compiled patch tries, where uniform preferred-command subtrees are collapsed into accepting leaves before the trie is frozen for lookup. For each language, the registered default model resource stores the expected root as the first tab-separated field on a line and its surface forms on the same line. Every single-token field on that line can therefore be paired with the same expected root.
Published stemmer comparison results must come only from benchmark classes matching `.*StemmerComparisonBenchmark.*`. Internal `FrequencyTrie*` microbenchmarks are not part of those results. Published stemmer comparison results must come only from benchmark classes matching `.*StemmerComparisonBenchmark.*`. Internal `FrequencyTrie*` microbenchmarks are not part of those results.
@@ -33,7 +33,7 @@ Radixor is measured over dictionary tokens from its own resources: lower-case wi
Lucene TokenFilter paths include required normalization in the measured pipeline. Examples include lower-case normalization for filters requiring lower-case input, German normalization before German light/minimal stemming, and Persian decimal, Arabic, and Persian normalization before Persian stemming. No ASCII folding is applied to Czech or Polish paths, because those Lucene stemmers are diacritic-aware or dictionary/table-backed for those languages. TokenFilter throughput methods materialize each emitted `CharTermAttribute` as a `String` before passing it to the JMH `Blackhole`, so output consumption is easier to inspect and closer to the direct stemmer methods. Lucene TokenFilter paths include required normalization in the measured pipeline. Examples include lower-case normalization for filters requiring lower-case input, German normalization before German light/minimal stemming, and Persian decimal, Arabic, and Persian normalization before Persian stemming. No ASCII folding is applied to Czech or Polish paths, because those Lucene stemmers are diacritic-aware or dictionary/table-backed for those languages. TokenFilter throughput methods materialize each emitted `CharTermAttribute` as a `String` before passing it to the JMH `Blackhole`, so output consumption is easier to inspect and closer to the direct stemmer methods.
For right-to-left Radixor languages, patch application uses the traversal direction stored in trie metadata. This is required because static backward patch application is not correct for all bundled languages. For right-to-left Radixor languages, patch application uses the traversal direction stored in trie metadata. This is required because static backward patch application is not correct for all registered language models.
## Quality Metric ## Quality Metric
@@ -57,3 +57,4 @@ Morfologik can emit multiple terms for one input token. The quality benchmark us
Quality reports use JMH auxiliary counter rows. Exact-root accounting is deterministic for a fixed corpus and stemmer, so repeated measurement samples duplicate the same counters; documentation uses the counter ratios and does not interpret quality benchmark timing scores. Quality reports use JMH auxiliary counter rows. Exact-root accounting is deterministic for a fixed corpus and stemmer, so repeated measurement samples duplicate the same counters; documentation uses the counter ratios and does not interpret quality benchmark timing scores.
Pairwise over-stemming, under-stemming, candidate-aware policies, balanced accuracy, and partition comparison are a separate analytical evaluation. See [Linguistic Quality Methodology](linguistic-quality.md); exact-root accuracy must not be interpreted as the complement of pairwise under-stemming. Pairwise over-stemming, under-stemming, candidate-aware policies, balanced accuracy, and partition comparison are a separate analytical evaluation. See [Linguistic Quality Methodology](linguistic-quality.md); exact-root accuracy must not be interpreted as the complement of pairwise under-stemming.
Default rows use `Language.defaultModelId()`. Optional variants require a separate model field; `pl-pl-unimorph` and `pl-pl-polimorf` must never share an ambiguous Polish label. The benchmark runtime receives each resource exactly once from its individual model JAR through direct JMH runtime dependencies. See [Model Selection and Loading](../../model-selection-and-loading.md).

View File

@@ -20,7 +20,8 @@ The CSV contains raw TP, FP, FN, and TN counts; raw over/under numerators and de
./gradlew publishStemmingQualityDocumentation ./gradlew publishStemmingQualityDocumentation
./gradlew verifyStemmingQualityDocumentation ./gradlew verifyStemmingQualityDocumentation
./gradlew test ./gradlew test
mkdocs build --strict ./gradlew prepareMkDocsSource
mkdocs build --strict --config-file build/mkdocs/mkdocs.yml
``` ```
`stemmingQuality` performs the expensive complete evaluation and is intentionally not attached to `test` or `check`. It prepares JMH third-party dependencies automatically and writes: `stemmingQuality` performs the expensive complete evaluation and is intentionally not attached to `test` or `check`. It prepares JMH third-party dependencies automatically and writes:
@@ -34,6 +35,26 @@ Audit mode is enabled with `-PstemmingQualityAudit=true`. Language, stemmer, dic
`publishStemmingQualityDocumentation` validates the complete build CSV, copies a versioned documentation snapshot, and replaces only marked generated sections. `verifyStemmingQualityDocumentation` re-renders from the checked-in snapshot and fails on changed values, ordering, missing pages, duplicate keys, arithmetic inconsistencies, policy violations, or stale sections. `publishStemmingQualityDocumentation` validates the complete build CSV, copies a versioned documentation snapshot, and replaces only marked generated sections. `verifyStemmingQualityDocumentation` re-renders from the checked-in snapshot and fails on changed values, ordering, missing pages, duplicate keys, arithmetic inconsistencies, policy violations, or stale sections.
The model catalog and rendered site are build outputs under `build/`. They are generated for publication and are never maintained in Git.
For new measurements, record language, stable model ID, model artifact version, descriptor checksum, source dictionary identity/version, core revision, and benchmark configuration. JMH resolves the required default models and optional PoliMorf directly from their individual model JARs; these benchmark-only dependencies are not transitive to ordinary users.
Current model descriptors also record the official repository, dataset, license, attribution,
verification date, transformations, and source-revision status. Exact historical revisions were
not recorded for the legacy UniMorph imports; that limitation is disclosed with
`not-recorded-in-legacy-import` rather than reconstructed. Future imports must record the exact
upstream revision and source-archive checksum. This reproducibility limitation does not replace or
weaken the packaged license and attribution requirements.
Each UniMorph-derived model artifact carries its own notice with the canonical CC BY-SA 3.0 URI,
upstream attribution, transformations, ShareAlike statement, and Leo Galambos contribution notice.
The full CC legal text is not duplicated or presented as a root-project license. PoliMorf retains
its separately packaged BSD-2-Clause license.
For a future full PoliMorf measurement, also record the startup heap separately from benchmark parameters. Complete runtime construction is currently verified with a dedicated 6 GiB maximum heap; this limit is neither a retained-trie measurement nor a setting applied to ordinary JMH runs.
The Pages workflow publishes that staged documentation together with Javadoc, JUnit, PMD, JaCoCo, PIT, representative JMH, SBOM, optional dependency-check output, badge metadata, and retained build history. Its filesystem merge explicitly preserves the `builds/` tree in the separate `gh-pages` publication branch, so documentation regeneration cannot erase durable report URLs.
## Performance benchmark reproduction ## Performance benchmark reproduction
The JMH comparison command family is: The JMH comparison command family is:
@@ -46,7 +67,7 @@ The exact JMH configuration, hardware, operating system, and JDK captured for th
## Recorded and unavailable provenance ## Recorded and unavailable provenance
The performance documentation records its 2026-07-06 environment, JDK 25.0.3, operating system, and hardware. The quality CSV records the evaluated identifiers and counts but does not embed the Radixor Git revision, generation date, JDK, operating system, dictionary content hash, or immutable upstream revisions for every downloaded source. These fields are explicitly unavailable for this snapshot and are not reconstructed from filesystem timestamps. The performance documentation records its 2026-07-06 environment, JDK 25.0.3, operating system, and hardware. The quality CSV records the evaluated identifiers and counts but does not embed the Radixor Git revision, generation date, JDK, operating system, model ID, dictionary content hash, or immutable upstream revisions for every downloaded source. These fields are explicitly unavailable for this historical snapshot and are not reconstructed from filesystem timestamps. In particular, the snapshot predates the optional PoliMorf integration and must not be relabeled as `pl-pl-polimorf`.
Dependency versions that are reproducible from repository configuration include Apache Lucene 10.5.0, Morfologik 2.1.9, the Ukrainian dictionary artifact 4.9.1, and JMH 1.37. Other upstream branches or downloaded dictionary revisions should be pinned and embedded in a future result schema. Dependency versions that are reproducible from repository configuration include Apache Lucene 10.5.0, Morfologik 2.1.9, the Ukrainian dictionary artifact 4.9.1, and JMH 1.37. Other upstream branches or downloaded dictionary revisions should be pinned and embedded in a future result schema.
@@ -59,3 +80,4 @@ Audit reports preserve original multilingual forms and identify high-contributin
## JMH badge compatibility ## JMH badge compatibility
The quality documentation generator does not invoke JMH, change JMH result formats, or modify badge tooling. Existing JMH result paths and historical badge-compatible inputs remain independent. The repository currently publishes coverage and mutation badge metadata and retains JMH TXT/CSV artifacts as documented in [Environment and reports](environment.md). The quality documentation generator does not invoke JMH, change JMH result formats, or modify badge tooling. Existing JMH result paths and historical badge-compatible inputs remain independent. The repository currently publishes coverage and mutation badge metadata and retains JMH TXT/CSV artifacts as documented in [Environment and reports](environment.md).
See [Model Selection and Loading](../../model-selection-and-loading.md), [Stemmer Models](../../stemmer-models.md), and the generated [model catalog](../../stemmer-model-catalog.md) for current model identities.

View File

@@ -4,7 +4,7 @@ The JMH adapter registry is authoritative for evaluated implementations and lang
| Family or implementation | Upstream / attribution | Tested version or revision | Evaluated scope | Output capability and adapter behaviour | Interpretation notes | | Family or implementation | Upstream / attribution | Tested version or revision | Evaluated scope | Output capability and adapter behaviour | Interpretation notes |
| --- | --- | --- | --- | --- | --- | | --- | --- | --- | --- | --- | --- |
| Radixor | Egothor / Radixor project | Current repository revision; exact revision was not embedded in the quality CSV | All 20 reconciled Radixor dictionary languages; 19 have benchmark pages | Deterministic preferred patch via `get`; ranked distinct alternatives via `getAll`; primary is always included | Dictionary-derived compiled patch trie. Quality depends on dictionary coverage and annotation. | | Radixor | Egothor / Radixor project | Current repository revision; exact revision was not embedded in the quality CSV | All 20 reconciled default model languages; 19 have benchmark pages | Deterministic preferred patch via `get`; ranked distinct alternatives via `getAll`; primary is always included | Model-dictionary-derived compiled patch trie. Default rows use each language's stable default model ID. |
| Apache Lucene language stem filters | Apache Lucene project | 10.5.0 | Adapter-declared language-specific subsets | TokenFilter lifecycle and language normalization match JMH; normally single-output | Light, minimal, possessive, and language stem filters deliberately implement different scopes. Narrow scope is not a defect. | | Apache Lucene language stem filters | Apache Lucene project | 10.5.0 | Adapter-declared language-specific subsets | TokenFilter lifecycle and language normalization match JMH; normally single-output | Light, minimal, possessive, and language stem filters deliberately implement different scopes. Narrow scope is not a defect. |
| Apache Lucene SnowballFilter | Apache Lucene project using Snowball algorithms | Lucene 10.5.0 | Snowball-supported subset of Radixor languages | Single primary token emitted through the Lucene TokenFilter path | Includes TokenStream overhead and required normalization. | | Apache Lucene SnowballFilter | Apache Lucene project using Snowball algorithms | Lucene 10.5.0 | Snowball-supported subset of Radixor languages | Single primary token emitted through the Lucene TokenFilter path | Includes TokenStream overhead and required normalization. |
| Official Snowball Java | Snowball project | Repository preparation downloads the configured upstream Java distribution; an immutable revision was not recorded in the quality CSV | Same-language adapter subset | Direct generated Java API; single output | Rule-based suffix algorithms provide broad baselines rather than dictionary-root guarantees. | | Official Snowball Java | Snowball project | Repository preparation downloads the configured upstream Java distribution; an immutable revision was not recorded in the quality CSV | Same-language adapter subset | Direct generated Java API; single output | Rule-based suffix algorithms provide broad baselines rather than dictionary-root guarantees. |
@@ -24,6 +24,7 @@ Candidate sets are non-null, non-empty, contain the deterministic primary output
## Coverage fairness ## Coverage fairness
Radixor coverage is derived independently from its resources and language enumeration. Third-party coverage is the intersection of that universe with actual adapter support. Absence therefore means “not supported or not configured for this language,” not “zero quality.” Consult each language page for the exact evaluated rows. Radixor coverage is derived from registered default descriptors reconciled with language enumeration. Third-party coverage is the intersection of that universe with actual adapter support. Absence therefore means “not supported or not configured for this language,” not “zero quality.” Optional `pl-pl-polimorf` is a separate model row and does not replace default `pl-pl-unimorph`. Consult each language page for the exact evaluated rows.
Project authors and organizations are named only where repository configuration or source notices establish attribution. No broader authorship or license claim is inferred when metadata was not captured. Project authors and organizations are named only where repository configuration or source notices establish attribution. No broader authorship or license claim is inferred when metadata was not captured.
The JMH runtime configuration directly includes optional models needed for controlled comparisons; ordinary users do not receive these benchmark-only dependencies transitively. Historical rows retain their original model inputs. See [Model Selection and Loading](../../model-selection-and-loading.md).

View File

@@ -1,267 +1,104 @@
# Built-in Languages # Built-in Languages and Default Models
Radixor ships with a curated set of bundled stemmer dictionaries that can be loaded directly from the library distribution. These resources are intended to provide an immediately usable baseline for evaluation, prototyping, integration, and general-purpose stemming workloads, while still fitting naturally into workflows where the bundled baseline is later refined, extended, or replaced with custom lexical data. “Supported language” means that Radixor defines a language enum value and publishes a corresponding default model artifact. It does not mean that a dictionary is embedded in the core JAR. Applications add model artifacts explicitly or use the optional standard pack.
## Overview The language enum carries language identity, writing direction, a legacy resource-directory name, and the stable default model ID. A model descriptor carries the independently versioned model identity and resource. See [Model Selection and Loading](model-selection-and-loading.md) for the API and the generated [model catalog](stemmer-model-catalog.md) for versions, provenance, checksums, and sizes.
Bundled dictionaries are exposed through: ## Defaults and variants
```java | Language | Enum | Default model ID | Default artifact | Optional variants |
org.egothor.stemmer.StemmerPatchTrieLoader.Language |---|---|---|---|---|
``` | Czech | `CS_CZ` | `cs-cz-default` | `org.egothor:radixor-model-cs-cz-default` | — |
| Danish | `DA_DK` | `da-dk-default` | `org.egothor:radixor-model-da-dk-default` | — |
| German | `DE_DE` | `de-de-default` | `org.egothor:radixor-model-de-de-default` | — |
| Spanish | `ES_ES` | `es-es-default` | `org.egothor:radixor-model-es-es-default` | — |
| Persian | `FA_IR` | `fa-ir-default` | `org.egothor:radixor-model-fa-ir-default` | — |
| Finnish | `FI_FI` | `fi-fi-default` | `org.egothor:radixor-model-fi-fi-default` | — |
| French | `FR_FR` | `fr-fr-default` | `org.egothor:radixor-model-fr-fr-default` | — |
| Hebrew | `HE_IL` | `he-il-default` | `org.egothor:radixor-model-he-il-default` | — |
| Hungarian | `HU_HU` | `hu-hu-default` | `org.egothor:radixor-model-hu-hu-default` | — |
| Italian | `IT_IT` | `it-it-default` | `org.egothor:radixor-model-it-it-default` | — |
| Norwegian Bokmål | `NB_NO` | `nb-no-default` | `org.egothor:radixor-model-nb-no-default` | — |
| Dutch | `NL_NL` | `nl-nl-default` | `org.egothor:radixor-model-nl-nl-default` | — |
| Norwegian Nynorsk | `NN_NO` | `nn-no-default` | `org.egothor:radixor-model-nn-no-default` | — |
| Polish | `PL_PL` | `pl-pl-unimorph` | `org.egothor:radixor-model-pl-pl-unimorph` | `pl-pl-polimorf` / `org.egothor:radixor-model-pl-pl-polimorf` |
| Portuguese | `PT_PT` | `pt-pt-default` | `org.egothor:radixor-model-pt-pt-default` | — |
| Russian | `RU_RU` | `ru-ru-default` | `org.egothor:radixor-model-ru-ru-default` | — |
| Swedish | `SV_SE` | `sv-se-default` | `org.egothor:radixor-model-sv-se-default` | — |
| Ukrainian | `UK_UA` | `uk-ua-default` | `org.egothor:radixor-model-uk-ua-default` | — |
| English | `US_UK` | `us-uk-default` | `org.egothor:radixor-model-us-uk-default` | — |
| Yiddish | `YI` | `yi-default` | `org.egothor:radixor-model-yi-default` | — |
Each bundled dictionary is packaged with the library as a compressed UTF-8 text resource. When loaded through the runtime API, the resource is parsed by `StemmerDictionaryParser`, transformed into patch-command mappings, and compiled into a read-only `FrequencyTrie<CompiledPatchCommand>` by `StemmerPatchTrieLoader`. The maintained table deliberately avoids duplicating mutable provenance and checksum fields. Those values come from module metadata and are generated into the model catalog.
The bundled language definition also carries a language-level right-to-left flag. That flag is used by the loader to derive the `WordTraversalDirection` used for both trie-key construction and patch-command generation. In practice, left-to-right bundled languages use historical backward Egothor traversal, while right-to-left bundled languages use forward traversal over the stored form. ## The Polish dual-model case
## Supported bundled languages `PL_PL` represents Polish. It is not an alias for either source dictionary.
The following bundled language identifiers are currently available: - `loadCompiled(Language.PL_PL, ...)` resolves `pl-pl-unimorph`.
- `registry.require("pl-pl-polimorf")` resolves the optional PoliMorf model.
- `StemmerPatchTrieLoader.loadCompiled("pl-pl-polimorf", true, reductionMode)` constructs its compiled trie explicitly; complete construction is verified with a dedicated 6 GiB test heap.
- Both artifacts may be present and loaded independently.
- Adding PoliMorf does not change the language default.
- Radixor does not merge their dictionaries or outputs automatically.
| Language | Enum constant | Writing direction | Notes | Benchmark page | UniMorph and PoliMorf have different lexical sources and provenance. Applications should compare outputs with application-specific regression tests before changing an explicit model choice.
|---|---|---:|---|---|
| Czech | `CS_CZ` | LTR | Bundled general-purpose dictionary | [Czech](benchmarks/languages/czech.md) |
| Danish | `DA_DK` | LTR | Bundled general-purpose dictionary | [Danish](benchmarks/languages/danish.md) |
| German | `DE_DE` | LTR | Bundled general-purpose dictionary | [German](benchmarks/languages/german.md) |
| Spanish | `ES_ES` | LTR | Bundled general-purpose dictionary | [Spanish](benchmarks/languages/spanish.md) |
| Persian | `FA_IR` | RTL | Bundled dictionary uses forward traversal over the stored form | [Persian](benchmarks/languages/persian.md) |
| Finnish | `FI_FI` | LTR | Bundled general-purpose dictionary | [Finnish](benchmarks/languages/finnish.md) |
| French | `FR_FR` | LTR | Bundled general-purpose dictionary | [French](benchmarks/languages/french.md) |
| Hebrew | `HE_IL` | RTL | Bundled dictionary uses forward traversal over the stored form | No same-language external benchmark in this run |
| Hungarian | `HU_HU` | LTR | Bundled general-purpose dictionary | [Hungarian](benchmarks/languages/hungarian.md) |
| Italian | `IT_IT` | LTR | Bundled general-purpose dictionary | [Italian](benchmarks/languages/italian.md) |
| Norwegian Bokmål | `NB_NO` | LTR | Bundled general-purpose dictionary | [Norwegian Bokmal](benchmarks/languages/norwegian-bokmal.md) |
| Dutch | `NL_NL` | LTR | Bundled general-purpose dictionary | [Dutch](benchmarks/languages/dutch.md) |
| Norwegian Nynorsk | `NN_NO` | LTR | Bundled general-purpose dictionary | [Norwegian Nynorsk](benchmarks/languages/norwegian-nynorsk.md) |
| Polish | `PL_PL` | LTR | Bundled general-purpose dictionary | [Polish](benchmarks/languages/polish.md) |
| Portuguese | `PT_PT` | LTR | Bundled general-purpose dictionary | [Portuguese](benchmarks/languages/portuguese.md) |
| Russian | `RU_RU` | LTR | Bundled general-purpose dictionary | [Russian](benchmarks/languages/russian.md) |
| Swedish | `SV_SE` | LTR | Bundled general-purpose dictionary | [Swedish](benchmarks/languages/swedish.md) |
| Ukrainian | `UK_UA` | LTR | Bundled general-purpose dictionary | [Ukrainian](benchmarks/languages/ukrainian.md) |
| English | `US_UK` | LTR | Bundled general-purpose dictionary | [English](benchmarks/languages/english.md) |
| Yiddish | `YI` | RTL | Bundled dictionary uses forward traversal over the stored form | [Yiddish](benchmarks/languages/yiddish.md) |
## Basic usage ## Dependency patterns
Load a bundled dictionary like this: Minimal English:
```java ```groovy
import java.io.IOException; dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
import org.egothor.stemmer.CompiledPatchCommand; runtimeOnly 'org.egothor:radixor-model-us-uk-default:1.0.0'
import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.StemmerPatchTrieLoader;
public final class BuiltInExample {
private BuiltInExample() {
throw new AssertionError("No instances.");
}
public static void main(final String[] arguments) throws IOException {
final FrequencyTrie<CompiledPatchCommand> trie = StemmerPatchTrieLoader.loadCompiled(
StemmerPatchTrieLoader.Language.US_UK,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
System.out.println(trie.traversalDirection());
}
} }
``` ```
This call loads the bundled dictionary resource for the selected language, parses its lexical entries, derives patch-command mappings, and compiles the result into a read-only trie. All documented defaults:
## Example: stemming with a bundled dictionary ```groovy
dependencies {
```java implementation 'org.egothor:radixor:<radixor-version>'
import java.io.IOException; runtimeOnly 'org.egothor:radixor-models-standard:<catalog-version>'
import org.egothor.stemmer.CompiledPatchCommand;
import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.StemmerPatchTrieLoader;
public final class EnglishExample {
private EnglishExample() {
throw new AssertionError("No instances.");
}
public static void main(final String[] arguments) throws IOException {
final FrequencyTrie<CompiledPatchCommand> trie = StemmerPatchTrieLoader.loadCompiled(
StemmerPatchTrieLoader.Language.US_UK,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
final String word = "running";
final CompiledPatchCommand patch = trie.get(word);
final String stem = patch == null ? word : patch.apply(word);
System.out.println(word + " -> " + stem);
}
} }
``` ```
`CompiledPatchCommand` values are compiled with the traversal direction used when the trie and its patch commands were produced. The standard pack is metadata-only and excludes optional PoliMorf.
## Traversal behavior and right-to-left languages Every individual model artifact carries its own provenance and licensing material. UniMorph
models carry different model-specific CC BY-SA 3.0 notices because their official language
repositories identify different lexical sources and contributors. Each notice preserves upstream
attribution and records the Radixor transformations and Leo Galambos contribution statement.
Legacy imports disclose when an exact historical revision was not recorded; this is a
reproducibility limitation, not a claim that the source or license is unknown.
Bundled dictionaries are not all processed identically. ## Loading a language default
For traditional left-to-right suffix-oriented resources, Radixor preserves historical Egothor behavior and traverses logical word characters backward. That means trie paths are constructed from the logical end of the stored word toward its beginning, and patch commands are interpreted with the same backward traversal model.
For bundled right-to-left languages such as Persian, Hebrew, and Yiddish, Radixor uses forward traversal over the stored form. In those cases:
- trie keys are traversed from the logical beginning of the stored form,
- patch commands are generated in that same forward direction,
- compiled patch-command application uses `WordTraversalDirection.FORWARD`, which is naturally captured when `loadCompiled(...)` creates `CompiledPatchCommand` values.
This design keeps the traversal policy explicit and consistent across dictionary loading, trie lookup, binary persistence, builder reconstruction, and patch application.
## Reduction behavior
Bundled dictionaries can be compiled using any supported `ReductionMode`. The reduction configuration controls how semantically equivalent subtrees are merged during trie compilation, while preserving the contract of the selected mode.
Typical entry points are:
- `StemmerPatchTrieLoader.loadCompiled(language, storeOriginal, reductionMode)`
- `StemmerPatchTrieLoader.loadCompiled(language, storeOriginal, reductionSettings)`
For most users, `ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS` is the most conservative general-purpose choice because it preserves ranked `getAll(...)` behavior.
Compiled bundled dictionaries also use internal uniform-subtree contraction. If a whole subtree
would return the same preferred patch command, Radixor stores that subtree as an accepting leaf and
removes the deeper branches. This is the contracted trie representation used by the published
benchmark tables and is independent of the public reduction mode selected by the caller.
## Intended role of bundled dictionaries
Bundled dictionaries should be understood as practical default resources.
They are a good fit when:
- a supported language is already available,
- immediate usability matters,
- a reasonable baseline is sufficient,
- the goal is evaluation, prototyping, or straightforward integration.
They are also well suited to staged refinement workflows in which a bundled base is loaded first, then extended with domain-specific vocabulary, and finally persisted as a custom binary artifact.
## Character representation
Bundled dictionaries are ordinary UTF-8 lexical resources. The parser reads them as text, the trie stores standard Java strings, and the patch-command model operates on general character sequences.
This is important for two reasons:
1. the built-in resources are not limited to ASCII-only processing,
2. the traversal model is orthogonal to character encoding and script choice.
In other words, right-to-left handling in the loader is about logical traversal strategy, not about introducing a separate character model.
## When to prefer custom dictionaries
A custom dictionary is usually the better choice when:
- domain-specific vocabulary materially affects stemming quality,
- lexical coverage must be controlled more precisely,
- a stronger lexical resource is available than the bundled baseline,
- operational requirements demand an explicitly curated, versioned artifact.
Typical examples include:
- technical terminology,
- biomedical language,
- legal or financial vocabulary,
- organization-specific product and process names,
- dictionaries maintained with project-specific validation rules.
## Production recommendation
For production systems, the most robust workflow is usually:
1. start from a bundled dictionary when it is suitable,
2. extend it with domain-specific forms if needed,
3. rebuild it into a binary artifact,
4. deploy that compiled binary artifact,
5. load it at runtime through `loadBinaryCompiled(...)`.
This avoids repeated startup parsing and makes the deployed stemming behavior explicit, reproducible, and versionable.
## Example refinement workflow
```java ```java
import java.io.IOException; final FrequencyTrie<CompiledPatchCommand> trie =
import java.nio.file.Path; StemmerPatchTrieLoader.loadCompiled(
import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.FrequencyTrieBuilders;
import org.egothor.stemmer.PatchCommandEncoder;
import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.ReductionSettings;
import org.egothor.stemmer.StemmerPatchTrieBinaryIO;
import org.egothor.stemmer.StemmerPatchTrieLoader;
public final class BundledRefinementExample {
private BundledRefinementExample() {
throw new AssertionError("No instances.");
}
public static void main(final String[] arguments) throws IOException {
final FrequencyTrie<String> base = StemmerPatchTrieLoader.load(
StemmerPatchTrieLoader.Language.US_UK, StemmerPatchTrieLoader.Language.US_UK,
true, true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS); ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
final FrequencyTrie.Builder<String> builder = FrequencyTrieBuilders.copyOf(
base,
String[]::new,
ReductionSettings.withDefaults(
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS));
final PatchCommandEncoder encoder = PatchCommandEncoder.builder()
.traversalDirection(base.traversalDirection())
.build();
builder.put("microservices", encoder.encode("microservices", "microservice"));
final FrequencyTrie<String> compiled = builder.build();
StemmerPatchTrieBinaryIO.write(compiled, Path.of("english-custom.radixor.gz"));
}
}
``` ```
The reconstructed builder preserves the traversal direction of the source trie, so refinements remain semantically aligned with the original bundled dictionary. The call discovers the default descriptor from the runtime classpath, verifies its compressed resource, parses the GZip UTF-8 dictionary, and constructs a read-only trie. A missing default throws `StemmerModelNotFoundException`; there is no arbitrary fallback.
## Extending language support ## Writing direction
The built-in set is intentionally a practical baseline rather than a closed catalog. Additional languages, stronger lexical coverage, and improved dictionaries for currently supported languages are all natural extension paths. Persian, Hebrew, and Yiddish declare right-to-left language metadata and use forward traversal over stored forms. Other defaults use historical backward Egothor traversal. This setting must remain aligned across dictionary parsing, trie lookup, patch generation, persistence, and application. Model identity remains separate from writing direction.
What matters most is not only the number of entries, but the quality, consistency, maintainability, and operational usefulness of the lexical resource being added. ## Custom and persisted alternatives
## Related API surface Registered model artifacts are a convenient reproducible baseline. Applications may instead load caller-owned textual dictionaries or persist compiled `.radixor.gz` tries. Those paths are distinct from model artifact discovery:
The following types are typically involved when working with bundled dictionaries: - a model `stemmer.gz` is a compressed textual dictionary plus descriptor/index metadata;
- a `.radixor.gz` created by the binary writer is a persisted compiled trie;
- a source dictionary is upstream input, not automatically a valid model artifact.
- `StemmerPatchTrieLoader` See [Dictionary Format](dictionary-format.md), [CLI Compilation](cli-compilation.md), and [Stemmer Models](stemmer-models.md).
- `StemmerPatchTrieLoader.Language`
- `FrequencyTrie`
- `PatchCommandEncoder`
- `WordTraversalDirection`
- `ReductionMode`
- `ReductionSettings`
- `StemmerPatchTrieBinaryIO`
- `FrequencyTrieBuilders`
## Next steps ## Benchmark interpretation
- [Quick start](quick-start.md) Benchmark rows must identify the Radixor model ID used. Default rows use the default IDs above. Optional Polish PoliMorf comparisons must be labeled `pl-pl-polimorf`; they are not interchangeable with the historical default Polish row. Continue with [Benchmarking](benchmarking.md) and [Reproducibility](benchmarks/reference/reproducibility.md).
- [Dictionary format](dictionary-format.md)
- [CLI compilation](cli-compilation.md)
- [Programmatic usage](programmatic-usage.md)
## Summary
Radixors built-in language support provides immediate usability, a professionally defined baseline API, and a practical starting point for custom refinement. The bundled set now includes both left-to-right and right-to-left languages, and the library models that distinction explicitly through `WordTraversalDirection` so that trie construction, lookup, and patch application remain consistent.

View File

@@ -2,6 +2,8 @@
Radixor provides a command-line compiler for turning line-oriented dictionary files into compact binary stemmer artifacts. Radixor provides a command-line compiler for turning line-oriented dictionary files into compact binary stemmer artifacts.
The CLI output is not a model JAR. A model artifact contains a compressed textual dictionary, descriptor, index, checksum, and license so the runtime registry can discover and compile it. The CLI instead emits an already compiled binary trie for direct `loadBinaryCompiled(...)` use. Choose the model-module workflow when independently published classpath discovery is required; choose the CLI when the application owns a compiled binary asset.
This is the preferred preparation workflow when stemming should run against an already compiled artifact rather than against raw dictionary input. The CLI reads the dictionary, derives patch commands, builds a mutable trie, applies the selected subtree reduction strategy, and writes the final compiled trie in the project binary format under GZip compression. The result is a deployment-ready `.radixor.gz` file that can be loaded directly by application code. This is the preferred preparation workflow when stemming should run against an already compiled artifact rather than against raw dictionary input. The CLI reads the dictionary, derives patch commands, builds a mutable trie, applies the selected subtree reduction strategy, and writes the final compiled trie in the project binary format under GZip compression. The result is a deployment-ready `.radixor.gz` file that can be loaded directly by application code.
## What the CLI does ## What the CLI does
@@ -17,6 +19,10 @@ The `Compile` tool performs the following steps:
This workflow is intentionally aligned with the same dictionary semantics used elsewhere in the library. Remarks introduced by `#` or `//` are supported through the shared dictionary parser. This workflow is intentionally aligned with the same dictionary semantics used elsewhere in the library. Remarks introduced by `#` or `//` are supported through the shared dictionary parser.
## Create a registered custom model instead
To publish or deploy a custom dictionary through `StemmerModelRegistry`, do not merely rename CLI output to `stemmer.gz`. Create `models/<model-id>`, preserve the textual dictionary as a GZip module input, provide source metadata and a license, apply `org.egothor.radixor.model`, and run the model validation tasks. The resulting JAR has an index, descriptor, namespaced textual dictionary, checksum, and license. Detailed packaging is documented in [Stemmer Models](stemmer-models.md); selection is documented in [Model Selection and Loading](model-selection-and-loading.md).
## Basic usage ## Basic usage
```bash ```bash
@@ -220,6 +226,8 @@ The ranked `getAll()` mode is the safest default. The unordered and dominant mod
Compilation is usually a one-time step and is generally fast. The more important operational consideration is memory usage during preparation, because the dictionary-derived mutable structure exists before reduction compacts it into the final read-only trie. This is especially relevant for very large source dictionaries. Compilation is usually a one-time step and is generally fast. The more important operational consideration is memory usage during preparation, because the dictionary-derived mutable structure exists before reduction compacts it into the final read-only trie. This is especially relevant for very large source dictionaries.
The complete PoliMorf model is the current exceptional case: registered-model verification uses `runtimeModelIntegrationTest` with a 6 GiB maximum heap, configurable through `-PradixorLargeModelMaxHeap=<size>`. This setting applies only to that isolated test process, not the Gradle daemon or ordinary tests.
## Example workflow ## Example workflow
### 1. Prepare a dictionary ### 1. Prepare a dictionary
@@ -282,3 +290,5 @@ The CLI and the programmatic API implement the same conceptual preparation step.
- [Quick start](quick-start.md) - [Quick start](quick-start.md)
- [Programmatic usage](programmatic-usage.md) - [Programmatic usage](programmatic-usage.md)
- [Architecture and reduction](architecture-and-reduction.md) - [Architecture and reduction](architecture-and-reduction.md)
!!! note "Radixor 4 model artifacts"
Language dictionaries are independently versioned runtime model artifacts, not resources embedded in `radixor`. Language-based APIs resolve deterministic defaults through `StemmerModelRegistry`; see [Stemmer Models](stemmer-models.md).

View File

@@ -37,7 +37,7 @@ This API is expected to remain supportable across future versions. The preferred
Examples of likely additive evolution include: Examples of likely additive evolution include:
- additional bundled language resources, - additional independently versioned language models,
- fuller support for diacritics or native-script language resources, - fuller support for diacritics or native-script language resources,
- expanded documentation and operational tooling, - expanded documentation and operational tooling,
- new convenience methods that do not break existing code. - new convenience methods that do not break existing code.
@@ -83,6 +83,8 @@ Compiled `FrequencyTrie` instances are immutable and thread-safe for concurrent
Serialized patch-command strings remain the stable stored representation used by textual dictionaries and binary artifacts. Runtime stemming should use `CompiledPatchCommand` values produced by `StemmerPatchTrieLoader.loadCompiled(...)`, `StemmerPatchTrieLoader.loadBinaryCompiled(...)`, or `PatchCommandEncoder.compile(...)`. Serialized patch-command strings remain the stable stored representation used by textual dictionaries and binary artifacts. Runtime stemming should use `CompiledPatchCommand` values produced by `StemmerPatchTrieLoader.loadCompiled(...)`, `StemmerPatchTrieLoader.loadBinaryCompiled(...)`, or `PatchCommandEncoder.compile(...)`.
Language-default, descriptor, and stable model-ID `loadCompiled` entry points share the same compiled-value conversion. Explicit model IDs never fall back to a language default. Model loading is not cached, and construction-memory requirements are model-dependent; the unusually large PoliMorf input is verified separately with a 6 GiB maximum heap.
The historical `PatchCommandEncoder.apply(...)` and String-based `applyTo(...)` overloads remain compatibility APIs during the 2.x transition, but they are deprecated because they reparse the patch-command string on each application. See [Migration and Backward Compatibility](migration-and-backward-compatibility.md) for old and new code examples. The historical `PatchCommandEncoder.apply(...)` and String-based `applyTo(...)` overloads remain compatibility APIs during the 2.x transition, but they are deprecated because they reparse the patch-command string on each application. See [Migration and Backward Compatibility](migration-and-backward-compatibility.md) for old and new code examples.
Compiled buffer-oriented `CompiledPatchCommand.applyTo(...)` overloads use caller-owned output storage. They do not retain output arrays and report insufficient capacity with `CompiledPatchCommand.APPLY_INSUFFICIENT_CAPACITY`. Compiled buffer-oriented `CompiledPatchCommand.applyTo(...)` overloads use caller-owned output storage. They do not retain output arrays and report insufficient capacity with `CompiledPatchCommand.APPLY_INSUFFICIENT_CAPACITY`.
@@ -110,7 +112,7 @@ The following kinds of change are generally compatible with the projects dire
- improved internal data structures, - improved internal data structures,
- changes inside `org.egothor.stemmer.trie`, - changes inside `org.egothor.stemmer.trie`,
- expanded bundled dictionaries, - expanded model dictionaries,
- additional supported languages, - additional supported languages,
- improved native-script handling, - improved native-script handling,
- better benchmarks, tests, and reports, - better benchmarks, tests, and reports,
@@ -122,11 +124,11 @@ The project should be able to improve substantially while keeping the main user-
Some areas should be treated as stable in intent but still approached carefully when changed. Some areas should be treated as stable in intent but still approached carefully when changed.
### Bundled dictionary contents ### Independently versioned model contents
Bundled resources are versioned project data, not immutable language standards. Their contents may improve over time. Model resources are independently versioned project data, not immutable language standards. Their contents may improve over time.
That means stemming outcomes can legitimately change when bundled dictionaries are refined or expanded. Such changes are compatible with the projects direction, but they should still be understood as behavior changes at the lexical-resource level. That means stemming outcomes can legitimately change when a model artifact is updated. Such changes are separate from core compatibility and should be reviewed as lexical-resource behavior changes.
### Binary format evolution ### Binary format evolution
@@ -159,7 +161,7 @@ Users should avoid depending on:
- internal trie package details, - internal trie package details,
- undocumented internal classes or intermediate representations, - undocumented internal classes or intermediate representations,
- incidental internal ordering outside documented lookup semantics, - incidental internal ordering outside documented lookup semantics,
- assumptions that bundled dictionary contents will never evolve, - assumptions that a model's dictionary contents will never evolve across model versions,
- assumptions that internal binary-format details are frozen forever. - assumptions that internal binary-format details are frozen forever.
If a behavior is important to your integration, it should ideally be documented at the public API or project-documentation level rather than inferred from internal implementation details. If a behavior is important to your integration, it should ideally be documented at the public API or project-documentation level rather than inferred from internal implementation details.

View File

@@ -2,7 +2,7 @@
High-quality dictionaries are one of the most valuable ways to improve **Radixor**. High-quality dictionaries are one of the most valuable ways to improve **Radixor**.
The project already includes practical bundled dictionaries for common use, but the long-term quality and language reach of the stemmer depend heavily on the quality of its lexical resources. Contributions are therefore welcome not only in the form of code changes, but also in the form of well-prepared dictionary data for existing or additional languages. The project already publishes practical model dictionaries for common use, but long-term quality and language reach depend heavily on lexical-resource quality. Contributions may provide well-prepared model inputs for existing or additional languages.
This document explains what makes a dictionary contribution useful, how to structure it, and how to prepare it so that it integrates cleanly with the project. This document explains what makes a dictionary contribution useful, how to structure it, and how to prepare it so that it integrates cleanly with the project.
@@ -52,7 +52,7 @@ For full format details, see [Dictionary format](dictionary-format.md).
The most useful dictionary contributions generally fall into one of four categories. The most useful dictionary contributions generally fall into one of four categories.
### 1. Stronger dictionaries for already bundled languages ### 1. Stronger models for already supported languages
Improving lexical quality for already supported languages is often more valuable than merely expanding the language list. Better coverage, cleaner canonicalization, and improved consistency directly improve practical stemming outcomes. Improving lexical quality for already supported languages is often more valuable than merely expanding the language list. Better coverage, cleaner canonicalization, and improved consistency directly improve practical stemming outcomes.
@@ -68,7 +68,7 @@ That convention belongs to the supplied dictionaries, not to the underlying algo
### 4. Domain-quality refinements ### 4. Domain-quality refinements
Some contributions may be more appropriate as curated domain extensions than as replacements for a general-purpose bundled dictionary. These are still useful when they are clearly scoped and operationally coherent. Some contributions may be more appropriate as curated domain extensions than as replacements for a general-purpose default model. These are still useful when clearly scoped and operationally coherent.
## Normalization guidance ## Normalization guidance
@@ -139,6 +139,14 @@ A dictionary should read like a curated lexical resource, not like an unfiltered
## Practical preparation workflow ## Practical preparation workflow
Before conversion, record the official source project and repository, exact revision or release,
source-archive checksum, retrieval date, dataset license and URI, supplied attribution, and any
required upstream notice. Add a model-specific notice describing every material transformation and
the license applied to the derived data, including its canonical URI. Record any protectable
Radixor-specific contribution without claiming ownership over the upstream data. A legacy model
may disclose that its historical revision was not recorded; new imports must record an exact
revision and source-archive checksum rather than using that sentinel.
A disciplined dictionary contribution should typically follow this path: A disciplined dictionary contribution should typically follow this path:
1. prepare or normalize the lexical source, 1. prepare or normalize the lexical source,
@@ -183,7 +191,7 @@ This note does not need to be long. It simply needs to make the resource intelli
## Bundled-resource expectations ## Bundled-resource expectations
Not every useful dictionary must automatically become a bundled language resource. Not every useful dictionary must automatically become a published default model.
To be suitable for bundling, a dictionary should generally be: To be suitable for bundling, a dictionary should generally be:

View File

@@ -2,6 +2,27 @@
Radixor uses a simple line-oriented dictionary format designed for practical stemming workflows. The textual source format is tab-separated values, meaning that columns are separated by the tab character. Radixor uses a simple line-oriented dictionary format designed for practical stemming workflows. The textual source format is tab-separated values, meaning that columns are separated by the tab character.
## Source text, model resource, and compiled trie
Three artifacts must not be confused:
| Artifact | Representation | Consumer |
|---|---|---|
| Source textual dictionary | Plain UTF-8 tab-separated rows | Authors, parser, CLI, or model preparation |
| Registered model resource | The same Radixor dictionary bytes under GZip, accompanied by index, descriptor, checksum, and license | `StemmerModelRegistry` and `StemmerPatchTrieLoader` |
| Persisted compiled trie | GZip-compressed Radixor binary format, commonly `.radixor.gz` | `loadBinaryCompiled(...)` |
The model file named `stemmer.gz` is not Java serialization and is not a pre-instantiated or persisted trie. It is compressed textual dictionary input parsed when the model is loaded.
Consequently, compressed size is not a construction-memory estimate. The PoliMorf resource is 12,624,997 bytes compressed and 68,093,680 bytes decompressed, while full parsing, trie construction, reduction, and patch compilation require a dedicated verification JVM with a 6 GiB maximum heap.
Comment headers in maintained model inputs summarize provenance but do not replace packaged legal
material. Each UniMorph-derived artifact includes a language-specific notice describing its
official repository, lexical source, upstream attribution, CC BY-SA 3.0 canonical URI, ShareAlike
status, Radixor transformations, and Leo Galambos's protectable model-data contributions. The
notice does not claim ownership over the underlying data. GZip packaging and descriptor/checksum
generation are disclosed transformations; the in-memory trie is a Radixor runtime structure.
Each logical line describes one canonical stem and zero or more known word variants that should reduce to that stem. The format is intentionally lightweight, easy to maintain in source control, and directly consumable both by the programmatic loader and by the CLI compiler. Each logical line describes one canonical stem and zero or more known word variants that should reduce to that stem. The format is intentionally lightweight, easy to maintain in source control, and directly consumable both by the programmatic loader and by the CLI compiler.
## Core structure ## Core structure
@@ -129,7 +150,11 @@ run running runs ran
## Character set, compression, and normalization ## Character set, compression, and normalization
Dictionary files are read as UTF-8 text. Files loaded through `StemmerPatchTrieLoader.load(Path, ...)` may be either plain UTF-8 text or GZip-compressed UTF-8 text; the loader detects GZip input from the stream header instead of relying on the file extension. Bundled dictionaries are stored as GZip resources and are decoded as UTF-8 after decompression. Dictionary files are read as UTF-8 text. Files loaded through `StemmerPatchTrieLoader.load(Path, ...)` may be either plain UTF-8 text or GZip-compressed UTF-8 text; the loader detects GZip input from the stream header instead of relying on the file extension. Registered model dictionaries are stored as GZip resources and are decoded as UTF-8 after decompression.
## Turn a dictionary into a model artifact
An arbitrary classpath copy is not a discoverable model. A model module places immutable input and its license under `models/<model-id>/src/modelInput/`, declares metadata and an independent version, and applies the model convention plugin. The build validates the input, copies identical bytes into a generated namespaced resource, generates `META-INF/radixor/models.index` and a descriptor, records SHA-256, and packages licensing material. See [Stemmer Models](stemmer-models.md#create-or-update-a-model-module) for the complete procedure and [Model Selection and Loading](model-selection-and-loading.md) for runtime use.
The parser and trie are not restricted to ASCII. Dictionary items are ordinary Java `String` values, and trie traversal works over Java `char` sequences. This supports Latin-script data with diacritics, Cyrillic data, Hebrew, Persian, Yiddish, and other scripts represented in UTF-8, subject to the normal Java `String` model and the projects traversal configuration. The parser and trie are not restricted to ASCII. Dictionary items are ordinary Java `String` values, and trie traversal works over Java `char` sequences. This supports Latin-script data with diacritics, Cyrillic data, Hebrew, Persian, Yiddish, and other scripts represented in UTF-8, subject to the normal Java `String` model and the projects traversal configuration.
@@ -235,3 +260,5 @@ To understand how those dictionary lines are transformed into compiled runtime a
- [CLI compilation](cli-compilation.md) - [CLI compilation](cli-compilation.md)
- [Programmatic usage](programmatic-usage.md) - [Programmatic usage](programmatic-usage.md)
- [Architecture and reduction](architecture-and-reduction.md) - [Architecture and reduction](architecture-and-reduction.md)
!!! note "Radixor 4 model artifacts"
Language dictionaries are independently versioned runtime model artifacts, not resources embedded in `radixor`. Language-based APIs resolve deterministic defaults through `StemmerModelRegistry`; see [Stemmer Models](stemmer-models.md).

View File

@@ -1,14 +1,14 @@
# Fast Track # Fast Track
This page is the shortest path from an empty Java project to a working Radixor stemmer. This page is the shortest path from an empty Java project to a working Radixor stemmer.
It deliberately uses a bundled dictionary and the preferred compiled-command runtime API, so the It deliberately uses an external model artifact and the preferred compiled-command runtime API, so the
first result does not require writing a dictionary, running the CLI compiler, or understanding first result does not require writing a dictionary, running the CLI compiler, or understanding
reduction internals. reduction internals.
Use this page when the goal is: Use this page when the goal is:
- add the dependency, - add the dependency,
- load a bundled language resource, - load a registered language model,
- stem a token, - stem a token,
- know where to go next. - know where to go next.
@@ -23,14 +23,14 @@ groupId: org.egothor
artifactId: radixor artifactId: radixor
``` ```
Use the current published version from Maven Central. The snippets below use `3.0.0`; replace it Radixor 4 is not yet represented by a published release in this working tree. Replace the version placeholder with the reviewed release you deploy.
with the version you deploy if a newer release is available.
For a Gradle project: For a Gradle project:
```kotlin ```kotlin
dependencies { dependencies {
implementation("org.egothor:radixor:3.0.0") implementation("org.egothor:radixor:<radixor-version>")
runtimeOnly("org.egothor:radixor-model-us-uk-default:1.0.0")
} }
``` ```
@@ -40,17 +40,23 @@ For a Maven project:
<dependency> <dependency>
<groupId>org.egothor</groupId> <groupId>org.egothor</groupId>
<artifactId>radixor</artifactId> <artifactId>radixor</artifactId>
<version>3.0.0</version> <version>${radixor.version}</version>
</dependency>
<dependency>
<groupId>org.egothor</groupId>
<artifactId>radixor-model-us-uk-default</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency> </dependency>
``` ```
Radixor targets modern Java and has a dependency-light runtime core. The project documentation and Radixor targets modern Java and has a dependency-light runtime core. The project documentation and
benchmarks assume a current JDK; Java 21 or newer is the practical baseline for current releases. benchmarks assume a current JDK; Java 21 or newer is the practical baseline for current releases.
## 2. Load A Bundled Dictionary ## 2. Load An External Model Dictionary
The fastest path is to use a bundled dictionary through `StemmerPatchTrieLoader.Language`. The fastest path is to use a registered model through `StemmerPatchTrieLoader.Language`.
This example uses the bundled English resource, `US_UK`. This example uses `US_UK`, whose default ID is `us-uk-default`; the runtime model dependency above must be present.
```java ```java
import java.io.IOException; import java.io.IOException;
@@ -81,12 +87,11 @@ public final class RadixorFirstStem {
} }
``` ```
The loaded `FrequencyTrie<CompiledPatchCommand>` is immutable and can be shared across request The loaded `FrequencyTrie<CompiledPatchCommand>` has no mutating API. Load it once during application startup, publish it safely through application-owned lifecycle code, and reuse it for indexing and query processing.
threads. Load it once during application startup and reuse it for indexing and query processing.
## 3. Choose A Language Resource ## 3. Choose a Language Default or Explicit Model
Bundled dictionaries are exposed as enum constants. Common examples: Language defaults are exposed as enum constants. Common examples:
| Language | Enum constant | | Language | Enum constant |
| --- | --- | | --- | --- |
@@ -102,6 +107,8 @@ Bundled dictionaries are exposed as enum constants. Common examples:
The full list, writing-direction notes, and benchmark links are in The full list, writing-direction notes, and benchmark links are in
[Built-in Languages](built-in-languages.md). [Built-in Languages](built-in-languages.md).
Polish has two models. `Language.PL_PL` selects `pl-pl-unimorph`; load the alternative explicitly with `StemmerPatchTrieLoader.loadCompiled("pl-pl-polimorf", true, reductionMode)`, or retain a registry and pass `registry.require("pl-pl-polimorf")` to the descriptor overload. See [Model Selection and Loading](model-selection-and-loading.md). Full PoliMorf construction requires substantially more startup heap than ordinary models; the repository verifies it in a dedicated 6 GiB test JVM.
## 4. Use The Same Stemmer On Both Sides ## 4. Use The Same Stemmer On Both Sides
For search, use the same Radixor configuration during indexing and query processing. A typical For search, use the same Radixor configuration during indexing and query processing. A typical
@@ -118,7 +125,7 @@ limited to lookup and patch application.
## 5. Next Step For Production ## 5. Next Step For Production
The fast path compiles a bundled dictionary during startup. That is convenient for evaluation and The fast path parses and compiles a registered model dictionary during startup. That is convenient for evaluation and
small services. For larger deployments, compile once, persist a `.radixor.gz` artifact, and load small services. For larger deployments, compile once, persist a `.radixor.gz` artifact, and load
that binary artifact at runtime. that binary artifact at runtime.
@@ -126,5 +133,6 @@ Continue with:
- [Integration Deep Dive](integration-deep-dive.md) for production lifecycle guidance. - [Integration Deep Dive](integration-deep-dive.md) for production lifecycle guidance.
- [Loading and Building Stemmers](programmatic-loading-and-building.md) for all loading APIs. - [Loading and Building Stemmers](programmatic-loading-and-building.md) for all loading APIs.
- [Built-in Languages](built-in-languages.md) for bundled resources and dictionary locations. - [Model Selection and Loading](model-selection-and-loading.md) for model dependencies, variants, and failures.
- [Built-in Languages](built-in-languages.md) for defaults and optional variants.
- [Benchmarking](benchmarking.md) for speed and quality interpretation. - [Benchmarking](benchmarking.md) for speed and quality interpretation.

View File

@@ -28,12 +28,26 @@ Radixor delivers:
Radixor is intended for teams that require consistent stemming quality at scale, while retaining the ability to evolve lexical resources after compilation and to handle ambiguous reductions with greater precision than traditional single-stem pipelines allow. Radixor is intended for teams that require consistent stemming quality at scale, while retaining the ability to evolve lexical resources after compilation and to handle ambiguous reductions with greater precision than traditional single-stem pipelines allow.
## Add the core and model data
The core `org.egothor:radixor` JAR contains no language dictionary. A minimal application adds one model; broad deployments may use the optional standard pack:
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-model-pl-pl-unimorph:1.0.0'
}
```
`StemmerPatchTrieLoader.loadCompiled(Language.PL_PL, ...)` resolves the default `pl-pl-unimorph`. `pl-pl-polimorf` is a separate optional model selected by stable model ID. Follow [Model Selection and Loading](model-selection-and-loading.md) for runnable examples or choose artifacts from the generated [model catalog](stemmer-model-catalog.md).
## Start here ## Start here
- Read [Fast Track](fast-track.md) when you want the shortest path to a working bundled stemmer. - Read [Fast Track](fast-track.md) when you want the shortest path to a working bundled stemmer.
- Use [Model Selection and Loading](model-selection-and-loading.md) for default, explicit, dual-model, and ClassLoader examples.
- Use [Integration Deep Dive](integration-deep-dive.md) when you are wiring Radixor into a real application or search pipeline. - Use [Integration Deep Dive](integration-deep-dive.md) when you are wiring Radixor into a real application or search pipeline.
- Read [Quick Start](quick-start.md) for the broader developer walkthrough after the first result works. - Read [Quick Start](quick-start.md) for the broader developer walkthrough after the first result works.
- Use [Built-in Languages](built-in-languages.md) to find the bundled dictionaries exposed by Radixor. - Use [Built-in Languages](built-in-languages.md) to interpret language defaults and optional model variants.
- Review [Benchmarking](benchmarking.md) and [Benchmark Results](benchmarks/index.md) for reproducible performance and quality methodology. - Review [Benchmarking](benchmarking.md) and [Benchmark Results](benchmarks/index.md) for reproducible performance and quality methodology.
- Open [CI Reports](reports.md) to inspect published build artifacts and quality metrics. - Open [CI Reports](reports.md) to inspect published build artifacts and quality metrics.
- See the historical paper: [*Lemmatizer for Document Information Retrieval Systems in JAVA*](https://www.researchgate.net/publication/221512865_Lemmatizer_for_Document_Information_Retrieval_Systems_in_JAVA). - See the historical paper: [*Lemmatizer for Document Information Retrieval Systems in JAVA*](https://www.researchgate.net/publication/221512865_Lemmatizer_for_Document_Information_Retrieval_Systems_in_JAVA).

View File

@@ -1,7 +1,7 @@
# Integration Deep Dive # Integration Deep Dive
This page explains how to integrate Radixor into a real Java application after the first This page explains how to integrate Radixor into a real Java application after the first
fast-track experiment works. It covers dependencies, bundled dictionaries, runtime lifecycle, fast-track experiment works. It covers dependencies, external model artifacts, runtime lifecycle,
deployment artifacts, and the decisions that matter in search or text-processing systems. deployment artifacts, and the decisions that matter in search or text-processing systems.
## Integration Model ## Integration Model
@@ -15,9 +15,10 @@ Radixor has two separate phases:
The practical rule is simple: compile rarely, stem often. The practical rule is simple: compile rarely, stem often.
For production systems, prefer a startup-owned or dependency-injected singleton For production systems, prefer a startup-owned or dependency-injected
`FrequencyTrie<CompiledPatchCommand>` per language/configuration. The trie is immutable after `FrequencyTrie<CompiledPatchCommand>` per language/configuration. The compiled structure has no
construction and is suitable for concurrent reads. mutating API. The project does not currently publish a formal cross-thread safety guarantee, so
applications should use normal safe-publication practices when sharing a loaded trie.
## Dependency Coordinates ## Dependency Coordinates
@@ -31,7 +32,8 @@ Gradle:
```kotlin ```kotlin
dependencies { dependencies {
implementation("org.egothor:radixor:3.0.0") implementation("org.egothor:radixor:<radixor-version>")
runtimeOnly("org.egothor:radixor-models-standard:<catalog-version>")
} }
``` ```
@@ -41,11 +43,17 @@ Maven:
<dependency> <dependency>
<groupId>org.egothor</groupId> <groupId>org.egothor</groupId>
<artifactId>radixor</artifactId> <artifactId>radixor</artifactId>
<version>3.0.0</version> <version>${radixor.version}</version>
</dependency>
<dependency>
<groupId>org.egothor</groupId>
<artifactId>radixor-models-standard</artifactId>
<version>${model.catalog.version}</version>
<scope>runtime</scope>
</dependency> </dependency>
``` ```
Replace `3.0.0` with the current release selected for your deployment. Replace the example versions with the independently selected core and catalog releases for your deployment.
The core Java module is: The core Java module is:
@@ -61,30 +69,15 @@ module example.search {
} }
``` ```
## Bundled Dictionaries ## Runtime Model Artifacts
Radixor ships bundled dictionaries inside the library artifact. The public API exposes them through: The core ships no language dictionary. Add one or more `radixor-model-<model-id>` artifacts, or the optional metadata-only standard pack. Each model JAR contains an indexed descriptor and a namespaced GZip dictionary. `StemmerPatchTrieLoader.Language` represents language properties and a stable default model ID; it does not own embedded data.
```java The standard option is specifically a POM-only runtime dependency aggregate, not an all-model binary JAR. It resolves one default model JAR per language and excludes optional PoliMorf. The separate POM-only `radixor-models-bom` manages recommended versions without adding runtime artifacts. Repository tests and JMH attach individual model projects directly to non-production configurations, so neither path changes the root publication's dependency graph.
StemmerPatchTrieLoader.Language
```
The physical resources are packaged as compressed UTF-8 dictionaries under resource directories For minimal deployments choose only required model artifacts. For multiple Polish variants add both `pl-pl-unimorph` and `pl-pl-polimorf`, retain UniMorph as the language default, and request PoliMorf explicitly. See [Model Selection and Loading](model-selection-and-loading.md) for complete dependencies and [Built-in Languages](built-in-languages.md) for mappings.
such as:
```text Use `loadCompiled("pl-pl-polimorf", true, reductionMode)` for direct exact selection, or discover once and call `loadCompiled(descriptor, true, reductionMode)`. Neither form caches the trie. Complete PoliMorf startup is memory-intensive and is verified with a dedicated 6 GiB heap; construct it once during application initialization and retain the immutable result.
us_uk/stemmer.gz
de_de/stemmer.gz
fr_fr/stemmer.gz
pl_pl/stemmer.gz
```
Treat those resource paths as implementation details. Application code should load bundled
dictionaries through `StemmerPatchTrieLoader.Language`, because the enum also carries the language
metadata needed for correct traversal.
See [Built-in Languages](built-in-languages.md) for the complete language list, writing-direction
notes, and links to per-language benchmark pages.
## Minimal Service Wrapper ## Minimal Service Wrapper
@@ -126,7 +119,7 @@ searchable.
For a controlled deployment, compile once and deploy the binary artifact: For a controlled deployment, compile once and deploy the binary artifact:
1. choose a bundled or custom dictionary, 1. choose a registered model resource or caller-owned custom dictionary,
2. optionally extend it with domain vocabulary, 2. optionally extend it with domain vocabulary,
3. compile a contracted trie, 3. compile a contracted trie,
4. persist it as `.radixor.gz`, 4. persist it as `.radixor.gz`,
@@ -173,9 +166,9 @@ Use Radixor consistently across indexing and querying:
For multilingual content, do not run every token through every language. Route text by field, For multilingual content, do not run every token through every language. Route text by field,
document metadata, or language detection before stemming. document metadata, or language detection before stemming.
## Choosing Bundled Versus Custom Dictionaries ## Choosing Registered Versus Custom Dictionaries
Start with bundled dictionaries when: Start with registered model artifacts when:
- the language is supported, - the language is supported,
- the application needs a strong baseline quickly, - the application needs a strong baseline quickly,
@@ -218,7 +211,7 @@ use [Benchmark Results](benchmarks/index.md) for the detailed reference tree.
Before production rollout: Before production rollout:
- dependency version is pinned, - dependency version is pinned,
- language resource and reduction mode are documented, - language, model ID, model artifact version, checksum, and reduction mode are documented,
- indexing and query pipelines use the same stemming configuration, - indexing and query pipelines use the same stemming configuration,
- custom artifacts are versioned and reproducible, - custom artifacts are versioned and reproducible,
- fallback behavior for unknown tokens is explicit, - fallback behavior for unknown tokens is explicit,
@@ -231,5 +224,6 @@ Before production rollout:
- [Quick Start](quick-start.md) - [Quick Start](quick-start.md)
- [Built-in Languages](built-in-languages.md) - [Built-in Languages](built-in-languages.md)
- [Programmatic Usage](programmatic-usage.md) - [Programmatic Usage](programmatic-usage.md)
- [Model Selection and Loading](model-selection-and-loading.md)
- [CLI Compilation](cli-compilation.md) - [CLI Compilation](cli-compilation.md)
- [Benchmarking](benchmarking.md) - [Benchmarking](benchmarking.md)

View File

@@ -1,6 +1,149 @@
# Migration and Backward Compatibility # Migration and Backward Compatibility
This page describes the migration from repeated serialized patch-command application to compiled patch commands. ## Radixor 3.x to 4.x architecture migration
Radixor 3.x published algorithm classes and language dictionaries together as `org.egothor:radixor`. Radixor 4 keeps that established coordinate for the algorithmic core but removes every dictionary from the core JAR. Applications must now choose independently versioned model artifacts. This is deliberately source-compatible where practical and deliberately different at runtime.
### Before and after: dependencies
| Deployment | 3.x | 4.x |
|---|---|---|
| Core | `org.egothor:radixor:<3.x-version>` included dictionaries | `org.egothor:radixor:<radixor-version>` contains code only |
| Minimal Polish | No separate data dependency | Add `radixor-model-pl-pl-unimorph:1.0.0` |
| All defaults | Implicitly embedded | Add optional `radixor-models-standard:<catalog-version>` |
| Optional Polish variant | Not independently selectable | Add and explicitly select `radixor-model-pl-pl-polimorf:1.0.0` |
Gradle, preserving the previous Polish default:
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-model-pl-pl-unimorph:1.0.0'
}
```
Gradle, broad default coverage:
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-models-standard:<catalog-version>'
}
```
Maven, preserving the Polish default:
```xml
<dependency>
<groupId>org.egothor</groupId>
<artifactId>radixor</artifactId>
<version>${radixor.version}</version>
</dependency>
<dependency>
<groupId>org.egothor</groupId>
<artifactId>radixor-model-pl-pl-unimorph</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency>
```
### Before and after: API behavior
Language-oriented calls remain source-compatible:
```java
final FrequencyTrie<CompiledPatchCommand> polish =
StemmerPatchTrieLoader.loadCompiled(
StemmerPatchTrieLoader.Language.PL_PL,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
```
In 4.x this call creates a registry and resolves `Language.PL_PL.defaultModelId()`, which is `pl-pl-unimorph`. Source compatibility does not imply runtime classpath compatibility: the call fails with `StemmerModelNotFoundException` unless that model is visible.
Explicit selection enables multiple variants:
```java
final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
final StemmerModelDescriptor polimorf = registry.require("pl-pl-polimorf");
final FrequencyTrie<CompiledPatchCommand> trie =
StemmerPatchTrieLoader.loadCompiled(
polimorf,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
```
The existing `load(String, ...)` overload means a filesystem path. The compiled `loadCompiled(String, boolean, ReductionMode)` overload now means a stable model ID; use the `Path` overload for a filesystem dictionary. Descriptor-based compiled loading avoids rediscovery when an application retains a registry. See [Model Selection and Loading](model-selection-and-loading.md) for complete examples.
### Polish migration scenarios
1. **Preserve previous default behavior:** add `radixor-model-pl-pl-unimorph` and keep using `Language.PL_PL`.
2. **Use PoliMorf:** add `radixor-model-pl-pl-polimorf` and call `registry.require("pl-pl-polimorf")`.
3. **Deploy both:** add both runtime artifacts and load each descriptor by ID. They are not merged.
4. **Verify selection:** compare `registry.requireDefault(Language.PL_PL).id()` with `pl-pl-unimorph` through normal application control flow or a JUnit assertion, and inspect `registry.findByLanguage(Language.PL_PL)`.
5. **Diagnose absence:** read the exact `StemmerModelNotFoundException` message, then inspect the production `runtimeClasspath` rather than changing dependency order.
UniMorph and PoliMorf are not interchangeable quality datasets. They can differ in vocabulary, provenance, licensing, and stemming outputs.
Model migration does not erase source obligations. Each migrated UniMorph artifact packages its
language-specific notice with upstream attribution, Radixor modifications and contribution
statement, ShareAlike terms, and the canonical CC BY-SA 3.0 URI. The original imports did not
record exact UniMorph commits, so descriptors use
`source.revision=not-recorded-in-legacy-import` and disclose that fact. Future model imports must
record an exact upstream revision and source-archive checksum.
### Compatibility table
| Dimension | 4.x migration status |
|---|---|
| Source compatibility | Language-oriented loader signatures remain; external model dependencies are new |
| Binary compatibility | Removing resources is a major-version boundary; review all deployed artifacts |
| Runtime classpath | At least one selected model JAR is required |
| Model format | Descriptor format `radixor-dictionary-tsv-gzip` version `1` is validated by the registry |
| Model IDs | Stable runtime identities, independent of artifact discovery order |
| Core Maven coordinate | Remains `org.egothor:radixor` |
| Release versions | Core, each model, upstream source, format, and catalog versions evolve separately |
### Upgrade checklist
- Update the core dependency.
- Choose individual model artifacts or the standard pack.
- Put resource-only model dependencies on the production runtime classpath.
- Verify `Language.defaultModelId()` mappings used by the application.
- Inspect shaded, minimized, plugin, or modular packaging for indexes and resources.
- Run application-level vocabulary and output regression tests.
- Track model artifact versions and checksums separately from the core version.
### Roll back model choice
To return from optional PoliMorf to the default UniMorph behavior, add or retain `radixor-model-pl-pl-unimorph`, stop requesting `pl-pl-polimorf`, and load `Language.PL_PL` or explicitly request `pl-pl-unimorph`. Do not change the language constant. Remove the unused PoliMorf runtime dependency after verifying no explicit lookup still needs it.
Rolling the whole application back to 3.x instead requires restoring the reviewed 3.x core dependency and removing 4.x model assumptions. Do not combine 3.x embedded resources with the 4.x registry architecture.
Core, model, and catalog releases are independent:
```bash
git tag -a "release@4.0.0" -m "Release Radixor 4.0.0"
git tag -a "model/pl-pl-polimorf@1.0.0" -m "Release Polish PoliMorf model 1.0.0"
git tag -a "models-catalog@2026.1" -m "Release Radixor model catalog 2026.1"
```
A core tag publishes only the root `org.egothor:radixor` software artifacts, never model JARs. A model tag validates and publishes exactly its matching module, never core, standard, BOM, JMH, or the multilingual quality suite. A catalog tag publishes only BOM and standard aggregate metadata. Local model dry-run:
The catalog artifacts are POM-only: `radixor-models-standard` carries runtime dependencies on the 20 defaults, while `radixor-models-bom` carries dependency-management constraints for all 21 individual models. Neither publishes an empty binary, sources, or Javadoc JAR. This Maven BOM is distinct from the root CycloneDX SBOM report under `build/reports/sbom/`.
```bash
./tools/parse-model-release-tag.sh "model/pl-pl-polimorf@1.0.0" .
./gradlew --no-daemon :models:pl-pl-polimorf:check
./gradlew --no-daemon :models:pl-pl-polimorf:validateModelRelease -PmodelReleaseVersion=1.0.0
./gradlew --no-daemon :models:pl-pl-polimorf:packageModelReleaseCandidate -PmodelReleaseVersion=1.0.0
```
Model format compatibility is descriptor-level and does not alter migrated bytes. Version 1 is `radixor-dictionary-tsv-gzip`. Model versions come from each module's `model-version.txt` or the matching explicit release property; catalog version comes from `models/catalog-version.txt`; only core uses Git-derived `release@` versioning.
The model catalog used by the published documentation is generated under `build/mkdocs-source/`. Neither generated Markdown nor rendered MkDocs output belongs in Git.
The remainder of this page describes the earlier migration from repeated serialized patch-command application to compiled patch commands.
## Summary ## Summary

View File

@@ -0,0 +1,277 @@
# Model Selection and Loading
Radixor separates executable stemming code from language data. The core artifact supplies dictionary parsing, trie construction, patch commands, lookup, and the model registry. A model artifact supplies one indexed descriptor, one GZip-compressed Radixor dictionary, and its licensing material. The core JAR contains no language dictionary.
```text
Application
-> org.egothor:radixor (algorithmic core)
-> StemmerModelRegistry
-> indexed model descriptor
-> namespaced stemmer.gz resource
-> checksum verification and dictionary parsing
-> FrequencyTrie construction
-> patch lookup and stemming
```
## Language and model ID
These identifiers answer different questions:
| Concept | Example | Meaning |
|---|---|---|
| Language | `Language.PL_PL` | Polish as a linguistic identity |
| Model ID | `pl-pl-unimorph` | One concrete Polish model configuration |
| Model ID | `pl-pl-polimorf` | A different concrete Polish model configuration |
| Default model | `PL_PL -> pl-pl-unimorph` | The model selected by the language convenience API |
One language can have several models. `Language.PL_PL` is neither UniMorph nor PoliMorf. `loadCompiled(Language.PL_PL, ...)` resolves the stable default ID declared by `Language.defaultModelId()`. An explicit lookup requests exactly one ID. Registry ordering never changes either decision.
Licensing follows the selected artifact. Radixor Java software is BSD-3-Clause; UniMorph-derived
model data carries a model-specific CC BY-SA 3.0 notice, while PoliMorf carries its separate
BSD-2-Clause license. The UniMorph notice preserves upstream attribution and identifies the
Radixor transformations and limited protectable contributions without claiming the underlying data.
## Choose runtime dependencies
Radixor 4 is an architectural migration that is not yet represented by a published release in this working tree, so core and catalog versions below use placeholders. Every source-controlled model currently has model version `1.0.0`.
### Core plus the default Polish model
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-model-pl-pl-unimorph:1.0.0'
}
```
### Core plus optional PoliMorf
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-model-pl-pl-polimorf:1.0.0'
}
```
This dependency makes `pl-pl-polimorf` discoverable; it does not change the default for `PL_PL`.
### Both Polish models
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-model-pl-pl-unimorph:1.0.0'
runtimeOnly 'org.egothor:radixor-model-pl-pl-polimorf:1.0.0'
}
```
### Standard defaults
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-models-standard:<catalog-version>'
}
```
The standard aggregate is POM-only. Its POM supplies exactly one default model per supported language as transitive runtime dependencies and excludes optional PoliMorf. It publishes no empty binary JAR.
### BOM-managed versions
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
implementation platform('org.egothor:radixor-models-bom:<catalog-version>')
runtimeOnly 'org.egothor:radixor-model-pl-pl-unimorph'
runtimeOnly 'org.egothor:radixor-model-pl-pl-polimorf'
}
```
Equivalent Maven dependencies use ordinary runtime scope:
```xml
<dependency>
<groupId>org.egothor</groupId>
<artifactId>radixor</artifactId>
<version>${radixor.version}</version>
</dependency>
<dependency>
<groupId>org.egothor</groupId>
<artifactId>radixor-model-pl-pl-unimorph</artifactId>
<version>1.0.0</version>
<scope>runtime</scope>
</dependency>
```
Use `implementation` for the core because application code imports its API. Models normally use `runtimeOnly` because they provide resources rather than Java types. Tests with a deliberately isolated model set use `testRuntimeOnly`. The repository attaches every default model and optional PoliMorf directly to `jmhRuntimeOnly`; test and quality configurations likewise use direct non-production model dependencies. No benchmark aggregate artifact exists, and no model dependency enters the root published POM.
## Load the documented default
Dependency prerequisite: core plus `radixor-model-pl-pl-unimorph` (or the standard pack).
```java
import org.egothor.stemmer.CompiledPatchCommand;
import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.ReductionSettings;
import org.egothor.stemmer.StemmerPatchTrieLoader;
final FrequencyTrie<CompiledPatchCommand> polish =
StemmerPatchTrieLoader.loadCompiled(
StemmerPatchTrieLoader.Language.PL_PL,
true,
ReductionSettings.withDefaults(
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS));
final String word = "koty";
final CompiledPatchCommand patch = polish.get(word);
final String stem = patch == null ? word : patch.apply(word);
```
The loader creates a registry from the thread context class loader, resolves `PL_PL` to `pl-pl-unimorph`, verifies the compressed resource checksum, decompresses and parses the UTF-8 dictionary, constructs the trie, and compiles its patch commands. It does not load a serialized Java object. If the default artifact is absent, `StemmerModelNotFoundException` names the missing ID and suggested Maven artifact.
## Load PoliMorf explicitly
Dependency prerequisite: core plus `radixor-model-pl-pl-polimorf`.
```java
import org.egothor.stemmer.CompiledPatchCommand;
import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.StemmerModelDescriptor;
import org.egothor.stemmer.StemmerModelRegistry;
import org.egothor.stemmer.StemmerPatchTrieLoader;
final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
final StemmerModelDescriptor descriptor = registry.require("pl-pl-polimorf");
final FrequencyTrie<CompiledPatchCommand> polish =
StemmerPatchTrieLoader.loadCompiled(
descriptor,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
final String word = "koty";
final CompiledPatchCommand patch = polish.get(word);
final String stem = patch == null ? word : patch.apply(word);
```
The equivalent direct model-ID form is:
```java
final FrequencyTrie<CompiledPatchCommand> polimorf =
StemmerPatchTrieLoader.loadCompiled(
"pl-pl-polimorf",
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
```
`require("pl-pl-polimorf")` and the direct overload are deterministic because registry keys are stable model IDs. Discovery order is sorted, duplicate IDs are rejected, and no “first Polish model on the classpath” fallback exists. Both overloads return compiled patch-command values and perform complete integrity checking, parsing, reduction, and trie construction.
!!! warning "PoliMorf startup memory"
Full construction of the PoliMorf model is memory-intensive. Radixor verifies it in one isolated JVM with a task-specific maximum heap of 6 GiB. Two measured verification runs completed full construction in 23.7 seconds and 23.5 seconds, producing 358,993 canonical trie nodes; the complete Gradle processes peaked at approximately 6.23 GiB resident memory. The compressed model is only 12,624,997 bytes (68,093,680 bytes decompressed), so JAR size is not a proxy for construction-time heap. Applications loading the complete model must provision sufficient startup heap. Radixor does not currently expose a measured retained-heap value, so do not infer one from the process peak.
## Use both Polish models
Dependency prerequisite: both Polish model artifacts.
```java
final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
final StemmerModelDescriptor unimorph = registry.require("pl-pl-unimorph");
final StemmerModelDescriptor polimorf = registry.require("pl-pl-polimorf");
final StemmerModelDescriptor defaultPolish =
registry.requireDefault(StemmerPatchTrieLoader.Language.PL_PL);
if (!"pl-pl-unimorph".equals(defaultPolish.id())) {
throw new IllegalStateException(
"Unexpected default Polish model: " + defaultPolish.id());
}
final FrequencyTrie<CompiledPatchCommand> unimorphTrie =
StemmerPatchTrieLoader.loadCompiled(unimorph, true, reductionMode);
final FrequencyTrie<CompiledPatchCommand> polimorfTrie =
StemmerPatchTrieLoader.loadCompiled(polimorf, true, reductionMode);
```
The descriptors and tries coexist independently. The models are not merged, and adding PoliMorf does not alter the language default. An application that compares, votes across, or merges model outputs must implement that higher-level policy explicitly.
## Discover available models
```java
final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
for (final StemmerModelDescriptor model : registry.models()) {
System.out.printf("%s %s %s %s/%d descriptor=%s%n",
model.id(), model.language(), model.version(),
model.format(), model.formatVersion(), model.source());
}
final java.util.List<StemmerModelDescriptor> polishModels =
registry.findByLanguage(StemmerPatchTrieLoader.Language.PL_PL);
```
Both lists use stable model-ID order. The public descriptor API exposes ID, model artifact version, language, display name, runtime resource, default flag, format, format version, checksum, and descriptor source URL. Packaged provenance properties such as `source.name` and `source.version` are not currently exposed as typed descriptor accessors; consult the generated [model catalog](stemmer-model-catalog.md) for them.
## Use an explicit ClassLoader
```java
final ClassLoader pluginLoader = plugin.getClass().getClassLoader();
final StemmerModelRegistry pluginModels =
StemmerModelRegistry.fromClassLoader(pluginLoader);
final StemmerModelDescriptor model = pluginModels.require("pl-pl-polimorf");
```
`fromContextClassLoader()` uses the current thread context loader, falling back to Radixor's defining loader when the context loader is `null`. `fromClassLoader(loader)` searches only what that loader can expose through `getResources(...)` and ordinary resource lookup. Plugin containers, application servers, and isolated tests can therefore observe different model sets. Pass a non-null loader and retain the registry associated with that deployment scope.
## Error handling
```java
try {
final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
final StemmerModelDescriptor model = registry.require("pl-pl-polimorf");
// Load and cache the trie during application startup.
} catch (final StemmerModelNotFoundException exception) {
// Missing runtime dependency or model hidden from this ClassLoader.
throw exception;
} catch (final DuplicateStemmerModelException exception) {
// Conflicting artifacts or a fat JAR duplicated one stable ID.
throw exception;
} catch (final UnsupportedStemmerModelFormatException exception) {
// The model format or format version is not supported by this core.
throw exception;
} catch (final StemmerModelIntegrityException exception) {
// Malformed descriptor/index, missing resource, wrong language, or checksum failure.
throw exception;
} catch (final java.io.IOException exception) {
// Classpath enumeration or resource I/O failed.
throw new java.io.UncheckedIOException(exception);
}
```
Malformed metadata does not have a separate public exception: it is reported as `StemmerModelIntegrityException`. Missing explicit and default models both use `StemmerModelNotFoundException`; the default diagnostic additionally names the language and expected default ID. Never swallow these failures or choose an arbitrary model.
## Lifecycle and concurrency
`StemmerModelRegistry` copies discovered descriptors into an unmodifiable map, returns immutable list copies, and has no mutating API. `StemmerModelDescriptor` is final with final fields. These objects are safe to retain after discovery. Registry discovery is not globally cached: every call enumerates indexes and parses descriptors again. Model loading is also not cached: every call reads, hashes, decompresses, parses, and builds a new trie.
Compiled tries are immutable and thread-safe for concurrent reads. Load a registry and the required tries once during application startup, publish them safely, and reuse them. The loader does not cache model tries; do not repeatedly discover and compile models per token. When comparing both Polish models, account for the memory of two independent tries and avoid constructing them concurrently unless the deployment is sized for that peak.
## Troubleshooting
| Symptom | Meaning | Action |
|---|---|---|
| `No default model '...' is available` | The default artifact is absent from the selected loader | Add the named model as a runtime dependency and inspect `runtimeClasspath` |
| `No model 'pl-pl-polimorf' is available` | Explicit optional model is absent or invisible | Add `radixor-model-pl-pl-polimorf` to runtime, not only tests |
| Duplicate model ID | Two resources declare one stable ID | Remove the duplicate artifact or fix fat-JAR resource duplication; do not reorder the classpath |
| Checksum mismatch | Descriptor and compressed bytes differ | Replace the corrupted or incorrectly repackaged artifact |
| Unsupported format | Core supports neither the format name nor version | Use a compatible core/model pair; do not bypass validation |
| Works in tests, fails in production | The model is probably `testRuntimeOnly` | Inspect `./gradlew dependencies --configuration runtimeClasspath` |
| Visible with one loader only | Class loaders expose different resources | Call `fromClassLoader(...)` with the loader that owns the model JAR |
| PoliMorf is installed but language loading uses UniMorph | Expected default behavior | Select `pl-pl-polimorf` explicitly |
| Dependency minimization removed the model | Resource-only dependency was treated as unused | Preserve the model JAR, index, descriptor, license, and dictionary |
| Shaded JAR fails or reports duplicates | Indexes/resources were dropped or duplicated | Inspect with `jar tf app.jar | grep -E 'models.index|stemmer.gz'`; configure deterministic resource merging without duplicating IDs |
Useful Gradle diagnostics include `./gradlew dependencyInsight --dependency radixor-model --configuration runtimeClasspath` and `./gradlew dependencies --configuration testRuntimeClasspath`. Classpath order is not a remediation mechanism.
Continue with [Programmatic Usage](programmatic-usage.md), [Stemmer Models](stemmer-models.md), [Built-in Languages](built-in-languages.md), the generated [model catalog](stemmer-model-catalog.md), and [Architecture](architecture.md).

View File

@@ -2,9 +2,9 @@
This document explains how to acquire a compiled Radixor stemmer in Java. This document explains how to acquire a compiled Radixor stemmer in Java.
## Load a bundled language dictionary ## Load a registered default model
Bundled language resources are simple to use and compile directly into a `FrequencyTrie<CompiledPatchCommand>` during loading. Language-oriented entry points resolve a registered default model and compile its GZip textual dictionary into a `FrequencyTrie<CompiledPatchCommand>`. The corresponding model JAR must be on the runtime classpath; the core contains no dictionary.
```java ```java
import java.io.IOException; import java.io.IOException;
@@ -14,9 +14,9 @@ import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.ReductionMode; import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.StemmerPatchTrieLoader; import org.egothor.stemmer.StemmerPatchTrieLoader;
public final class BundledLanguageExample { public final class RegisteredLanguageModelExample {
private BundledLanguageExample() { private RegisteredLanguageModelExample() {
throw new AssertionError("No instances."); throw new AssertionError("No instances.");
} }
@@ -31,14 +31,16 @@ public final class BundledLanguageExample {
The `storeOriginal` flag controls whether the canonical stem is inserted as a no-op patch entry for the stem itself. The `storeOriginal` flag controls whether the canonical stem is inserted as a no-op patch entry for the stem itself.
Bundled `loadCompiled(...)` entry points build the runtime trie with the same contracted Language-oriented `loadCompiled(...)` entry points build the runtime trie with the same contracted
representation used by the published benchmarks. During compilation, uniform preferred-command representation used by the published benchmarks. During compilation, uniform preferred-command
subtrees are collapsed into accepting leaves, so lookup can stop before consuming the entire input subtrees are collapsed into accepting leaves, so lookup can stop before consuming the entire input
when the remaining characters cannot change the selected patch command. when the remaining characters cannot change the selected patch command.
## Load a textual dictionary ## Load a textual dictionary
Loading from a dictionary file follows the same preparation model as bundled resources, but the source comes from your own file or path. The input may be plain UTF-8 text or GZip-compressed UTF-8 text; the loader detects GZip data from the stream header. The textual format is tab-separated values, meaning that columns are separated by the tab character. Each non-empty logical line starts with the stem column and may contain zero or more variant columns. Input case normalization is controlled by `CaseProcessingMode` (default: `LOWERCASE_WITH_LOCALE_ROOT`), trailing remarks introduced by `#` or `//` are ignored, and dictionary items containing embedded whitespace are currently ignored with warning-level diagnostics. Loading from a dictionary file follows the same trie preparation model as registered model resources, but the source comes from your own file or path and bypasses registry metadata. The input may be plain UTF-8 text or GZip-compressed UTF-8 text; the loader detects GZip data from the stream header. The textual format is tab-separated values, meaning that columns are separated by the tab character. Each non-empty logical line starts with the stem column and may contain zero or more variant columns. Input case normalization is controlled by `CaseProcessingMode` (default: `LOWERCASE_WITH_LOCALE_ROOT`), trailing remarks introduced by `#` or `//` are ignored, and dictionary items containing embedded whitespace are currently ignored with warning-level diagnostics.
For explicit model IDs, multiple variants, and ClassLoader control, see [Model Selection and Loading](model-selection-and-loading.md).
```java ```java
import java.io.IOException; import java.io.IOException;

View File

@@ -1,80 +1,133 @@
# Programmatic Usage # Programmatic Usage
This document provides the programmatic entry point to **Radixor**. Radixor code and model data are separate runtime components. Every example on this page requires `org.egothor:radixor:<radixor-version>` as an `implementation` dependency and at least one model JAR as a runtime dependency. The core JAR contains no `stemmer.gz`.
Radixor follows a clear lifecycle: For complete dependency patterns, lifecycle guidance, and troubleshooting, use [Model Selection and Loading](model-selection-and-loading.md). The generated [model catalog](stemmer-model-catalog.md) records the current artifacts, versions, checksums, and provenance.
1. acquire a compiled stemmer, ## 1. Minimal use: the Polish default
2. query it for patch commands,
3. apply those commands to produce stems,
4. reopen and extend the compiled structure when needed.
## Conceptual model Dependency prerequisite:
Radixor is dictionary-driven, but runtime stemming does not operate by scanning raw dictionary files. A source dictionary is parsed as a sequence of canonical stems and their known variants. Each variant is converted into a compact patch command that transforms the variant into the stem, while the stem itself may optionally be stored as a canonical no-op patch. The mutable trie is then reduced into a compiled read-only structure that stores ordered values and their counts at addressed nodes. ```groovy
implementation 'org.egothor:radixor:<radixor-version>'
Two consequences matter for developers: runtimeOnly 'org.egothor:radixor-model-pl-pl-unimorph:1.0.0'
- the quality and coverage of stemming behavior depend on dictionary richness,
- runtime usage is based on compiled patch-command lookup rather than on direct dictionary traversal.
This is why Radixor can generalize beyond explicitly listed forms and why compiled artifacts are well suited for deployment.
## Documentation map
The programmatic API is easier to understand when split by developer task:
- [Fast Track](fast-track.md) gives the shortest dependency-to-first-stem path for a new Java project.
- [Integration Deep Dive](integration-deep-dive.md) explains production integration, deployment artifacts, search-pipeline usage, and operational decisions.
- [Loading and Building Stemmers](programmatic-loading-and-building.md) explains how to acquire a compiled stemmer from bundled resources, textual dictionaries, binary artifacts, or direct builder usage.
- [Lookup Edge Optimization](lookup-edge-optimization.md) explains dense child lookup tuning and the speed/memory trade-off when materializing compiled tries.
- [Querying and Ambiguity Handling](programmatic-querying-and-ambiguity.md) explains `get(...)`, `getAll(...)`, `getEntries(...)`, patch application, and the practical meaning of reduction modes.
- [Extending and Persisting Compiled Tries](programmatic-extending-and-persistence.md) explains how to reopen compiled tries, add new lexical data, rebuild them, and store them as binary artifacts.
## Core types
The main types involved in programmatic usage are:
- `FrequencyTrie.Builder<V>` for mutable construction and extension,
- `FrequencyTrie<V>` for the compiled read-only trie,
- `PatchCommandEncoder` for creating serialized patch commands,
- `CompiledPatchCommand` for repeated runtime patch application,
- `StemmerPatchTrieLoader` for loading bundled or textual dictionaries,
- `StemmerPatchTrieBinaryIO` for reading and writing compressed binary artifacts,
- `FrequencyTrieBuilders` for reconstructing a mutable builder from a compiled trie,
- `ReductionMode` and `ReductionSettings` for controlling compilation semantics.
## Java module system (JPMS)
The core artifact is published as an explicit JPMS module:
```java
module org.egothor.radixor;
``` ```
A named consuming module uses: ```java
import org.egothor.stemmer.CompiledPatchCommand;
import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.StemmerPatchTrieLoader;
final FrequencyTrie<CompiledPatchCommand> trie =
StemmerPatchTrieLoader.loadCompiled(
StemmerPatchTrieLoader.Language.PL_PL,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
final String word = "koty";
final CompiledPatchCommand patch = trie.get(word);
final String stem = patch == null ? word : patch.apply(word);
```
`Language.PL_PL` resolves to `pl-pl-unimorph`. The loader creates the registry internally through the thread context class loader.
## 2. Explicit model selection
Dependency prerequisite: replace or supplement the default dependency with `runtimeOnly 'org.egothor:radixor-model-pl-pl-polimorf:1.0.0'`.
```java ```java
module example.consumer { final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
requires org.egothor.radixor; final StemmerModelDescriptor polimorf = registry.require("pl-pl-polimorf");
final FrequencyTrie<CompiledPatchCommand> trie =
StemmerPatchTrieLoader.loadCompiled(
polimorf,
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
```
The stable model-ID overload performs the same exact selection without a separately retained registry:
```java
final FrequencyTrie<CompiledPatchCommand> trie =
StemmerPatchTrieLoader.loadCompiled(
"pl-pl-polimorf",
true,
ReductionMode.MERGE_SUBTREES_WITH_EQUIVALENT_RANKED_GET_ALL_RESULTS);
```
## 3. Multiple variants for one language
Dependency prerequisite: both `radixor-model-pl-pl-unimorph:1.0.0` and `radixor-model-pl-pl-polimorf:1.0.0` at runtime.
```java
final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
final StemmerModelDescriptor unimorph = registry.require("pl-pl-unimorph");
final StemmerModelDescriptor polimorf = registry.require("pl-pl-polimorf");
final FrequencyTrie<CompiledPatchCommand> unimorphTrie =
StemmerPatchTrieLoader.loadCompiled(unimorph, true, reductionMode);
final FrequencyTrie<CompiledPatchCommand> polimorfTrie =
StemmerPatchTrieLoader.loadCompiled(polimorf, true, reductionMode);
final StemmerModelDescriptor defaultPolish =
registry.requireDefault(StemmerPatchTrieLoader.Language.PL_PL);
if (!"pl-pl-unimorph".equals(defaultPolish.id())) {
throw new IllegalStateException(
"Unexpected default Polish model: " + defaultPolish.id());
} }
``` ```
The core module is standalone and can be consumed directly as a normal Java module. The tries remain independent. Radixor does not merge models or infer an alternative default from classpath order.
## Recommended reading order ## 4. Discovery
For most developers, the best order is: Dependency prerequisite: whichever model artifacts the application intends to discover.
1. [Fast Track](fast-track.md) ```java
2. [Integration Deep Dive](integration-deep-dive.md) final StemmerModelRegistry registry = StemmerModelRegistry.fromContextClassLoader();
3. [Loading and Building Stemmers](programmatic-loading-and-building.md)
4. [Querying and Ambiguity Handling](programmatic-querying-and-ambiguity.md)
5. [Extending and Persisting Compiled Tries](programmatic-extending-and-persistence.md)
## Next steps for (final StemmerModelDescriptor descriptor : registry.models()) {
System.out.printf("%s %s %s %s/%d%n",
descriptor.id(), descriptor.language(), descriptor.version(),
descriptor.format(), descriptor.formatVersion());
}
- [Quick Start](quick-start.md) final java.util.List<StemmerModelDescriptor> polish =
- [CLI compilation](cli-compilation.md) registry.findByLanguage(StemmerPatchTrieLoader.Language.PL_PL);
- [Dictionary format](dictionary-format.md) ```
- [Architecture and reduction](architecture-and-reduction.md)
Results use deterministic model-ID order. See [Built-in Languages](built-in-languages.md) for default interpretation and the generated [catalog](stemmer-model-catalog.md) for provenance.
## 5. Advanced ClassLoader selection
Dependency prerequisite: the model JAR must be visible to the selected loader.
```java
final ClassLoader applicationLoader = application.getClass().getClassLoader();
final StemmerModelRegistry isolatedRegistry =
StemmerModelRegistry.fromClassLoader(applicationLoader);
```
This form is useful for plugin containers, isolated application servers, and tests. It can discover a different set from the thread context loader. See [ClassLoader troubleshooting](model-selection-and-loading.md#troubleshooting).
## 6. Error handling
Dependency prerequisite: none beyond core; this example demonstrates an absent optional model.
```java
try {
StemmerModelRegistry.fromContextClassLoader().require("pl-pl-polimorf");
} catch (final StemmerModelNotFoundException exception) {
System.err.println(exception.getMessage());
}
```
Missing models never produce an empty trie or arbitrary fallback. Duplicate IDs, unsupported formats, malformed descriptors, missing resources, and checksum mismatches are also fatal. The full exception mapping and remediation table are in [Model Selection and Loading](model-selection-and-loading.md#error-handling).
## Continue into the trie API
- [Loading and Building Stemmers](programmatic-loading-and-building.md)
- [Querying and Ambiguity Handling](programmatic-querying-and-ambiguity.md)
- [Extending and Persisting Compiled Tries](programmatic-extending-and-persistence.md)
- [Architecture](architecture.md)

View File

@@ -4,10 +4,23 @@ This guide introduces the fastest practical path to using **Radixor**.
If you are new to Radixor and want the shortest possible path to a first working stem, start with If you are new to Radixor and want the shortest possible path to a first working stem, start with
[Fast Track](fast-track.md). This Quick Start is a broader developer walkthrough: it introduces the [Fast Track](fast-track.md). This Quick Start is a broader developer walkthrough: it introduces the
main loading options, query methods, artifact workflow, and metadata model. main loading options, query methods, artifact workflow, and metadata model. For model-ID selection and failures, use [Model Selection and Loading](model-selection-and-loading.md).
Radixor separates preparation from runtime usage. Source dictionaries are used to derive patch commands and reduce them into a compact read-only trie. Runtime stemming then operates on that compiled structure rather than on the original dictionary text. A richer dictionary usually improves the quality and coverage of inferred transformations, including transformations that are applicable to words not explicitly present in the source material. The reduction step also removes a large amount of redundant lexical information, which is why very large dictionaries can still produce compact runtime artifacts. These artifacts can be persisted and loaded directly when needed. Radixor separates preparation from runtime usage. Source dictionaries are used to derive patch commands and reduce them into a compact read-only trie. Runtime stemming then operates on that compiled structure rather than on the original dictionary text. A richer dictionary usually improves the quality and coverage of inferred transformations, including transformations that are applicable to words not explicitly present in the source material. The reduction step also removes a large amount of redundant lexical information, which is why very large dictionaries can still produce compact runtime artifacts. These artifacts can be persisted and loaded directly when needed.
From version 4 onward, the core and models are explicit dependencies:
```groovy
dependencies {
implementation 'org.egothor:radixor:<radixor-version>'
runtimeOnly 'org.egothor:radixor-models-standard:<catalog-version>'
}
```
The core JAR contains no dictionary. Replace the standard pack with `runtimeOnly 'org.egothor:radixor-model-us-uk-default:1.0.0'` for the minimal English example below. For Polish, `Language.PL_PL` resolves `pl-pl-unimorph`; installing optional `pl-pl-polimorf` does not select it automatically.
Explicit PoliMorf loading uses `StemmerPatchTrieLoader.loadCompiled("pl-pl-polimorf", true, reductionMode)`. Its complete dictionary is supported, but construction is exceptional enough that repository verification runs it separately with a 6 GiB maximum heap. See [Model Selection and Loading](model-selection-and-loading.md#load-polimorf-explicitly) for the complete dependency and Java example.
A practical workflow usually consists of two independent phases: A practical workflow usually consists of two independent phases:
1. obtain a compiled stemmer, 1. obtain a compiled stemmer,
@@ -17,9 +30,9 @@ A practical workflow usually consists of two independent phases:
A compiled stemmer can be obtained in three common ways. A compiled stemmer can be obtained in three common ways.
### Use a bundled language dictionary ### Use an external language model
Radixor ships with bundled dictionaries for a set of supported languages. These resources are line-oriented dictionaries stored with the library and compiled into a `FrequencyTrie<CompiledPatchCommand>` when loaded through the runtime API. The loader can also store the canonical stem itself as a no-op patch command. Compiled trie artifacts now persist self-describing metadata, including the traversal direction and compilation reduction settings used to build the artifact. Language dictionaries are independently versioned model JARs discovered by `StemmerModelRegistry`. The root `org.egothor:radixor` JAR contains no dictionary bytes. The loader compiles a selected model into a `FrequencyTrie<CompiledPatchCommand>`; compiled trie artifacts retain self-describing traversal and reduction metadata.
```java ```java
import java.io.IOException; import java.io.IOException;
@@ -29,9 +42,9 @@ import org.egothor.stemmer.FrequencyTrie;
import org.egothor.stemmer.ReductionMode; import org.egothor.stemmer.ReductionMode;
import org.egothor.stemmer.StemmerPatchTrieLoader; import org.egothor.stemmer.StemmerPatchTrieLoader;
public final class BundledStemmerExample { public final class RegisteredModelExample {
private BundledStemmerExample() { private RegisteredModelExample() {
throw new AssertionError("No instances."); throw new AssertionError("No instances.");
} }
@@ -251,3 +264,5 @@ Dictionary compilation is usually a one-time preparation step and is generally f
Every compiled trie artifact stores a `TrieMetadata` descriptor together with the immutable trie payload. That metadata currently records the binary format version, the `WordTraversalDirection`, the `ReductionSettings` used during compilation, the declared `DiacriticProcessingMode`, and the selected `CaseProcessingMode`. Traversal, case processing, and diacritic processing are applied during runtime lookup (`get`, `getAll`), and case/diacritic processing are also applied during dictionary insertion when a trie is built. Every compiled trie artifact stores a `TrieMetadata` descriptor together with the immutable trie payload. That metadata currently records the binary format version, the `WordTraversalDirection`, the `ReductionSettings` used during compilation, the declared `DiacriticProcessingMode`, and the selected `CaseProcessingMode`. Traversal, case processing, and diacritic processing are applied during runtime lookup (`get`, `getAll`), and case/diacritic processing are also applied during dictionary insertion when a trie is built.
`DiacriticProcessingMode.AS_IS` keeps dictionary keys and lookup keys unchanged. `DiacriticProcessingMode.REMOVE` strips diacritics from dictionary keys and lookup keys (for Czech diacritics and broad European Latin-script variants). `DiacriticProcessingMode.AS_IS_AND_STRIPPED_FALLBACK` is currently not supported and raises an `UnsupportedOperationException`. `DiacriticProcessingMode.AS_IS` keeps dictionary keys and lookup keys unchanged. `DiacriticProcessingMode.REMOVE` strips diacritics from dictionary keys and lookup keys (for Czech diacritics and broad European Latin-script variants). `DiacriticProcessingMode.AS_IS_AND_STRIPPED_FALLBACK` is currently not supported and raises an `UnsupportedOperationException`.
!!! note "Radixor 4 model artifacts"
Language dictionaries are independently versioned runtime model artifacts, not resources embedded in `radixor`. Language-based APIs resolve deterministic defaults through `StemmerModelRegistry`; see [Stemmer Models](stemmer-models.md).

View File

@@ -2,6 +2,8 @@
Radixor publishes durable build outputs to GitHub Pages from qualifying runs of `.github/workflows/pages.yml`. Radixor publishes durable build outputs to GitHub Pages from qualifying runs of `.github/workflows/pages.yml`.
The workflow builds maintained MkDocs documentation and the generated model catalog from the staged source tree under `build/mkdocs-source/`. It then merges the rendered site into the separate `gh-pages` publication worktree while preserving `builds/`. The main branch stores neither generated Markdown nor rendered site output. The publication retains the ten newest numbered report sets and maintains `builds/latest/` as a stable alias.
This page is the central entry point for published project artifacts, including build summaries, API documentation, test and quality reports, benchmark outputs, and software composition materials. It is intended both for routine project inspection and for linking stable report surfaces from external references such as the README, release notes, or development workflows. This page is the central entry point for published project artifacts, including build summaries, API documentation, test and quality reports, benchmark outputs, and software composition materials. It is intended both for routine project inspection and for linking stable report surfaces from external references such as the README, release notes, or development workflows.
## Stable entry points ## Stable entry points

192
docs/stemmer-models.md Normal file
View File

@@ -0,0 +1,192 @@
# Stemmer Models
This page defines the model artifact and its maintenance lifecycle. Application developers should begin with [Model Selection and Loading](model-selection-and-loading.md); the generated [model catalog](stemmer-model-catalog.md) is the detailed inventory.
## Terminology
| Term | Definition |
|---|---|
| Radixor core | Java parsing, patch-command, trie, registry, descriptor, and loader code in `org.egothor:radixor` |
| Language | Locale-level identity such as `PL_PL`; not a dictionary or model |
| Model ID | Stable identity of one concrete model, such as `pl-pl-unimorph` |
| Model artifact | Independently versioned JAR containing one descriptor, one runtime dictionary, and licensing material |
| Source dictionary | Upstream lexical or morphological source recorded in provenance |
| Runtime dictionary | GZip-compressed UTF-8 Radixor tab-separated data consumed during trie construction |
| Compiled trie | In-memory lookup structure built by the loader; not the `stemmer.gz` resource |
| Default model | Stable ID selected by a language-oriented loader call |
| Optional model | Discoverable only when installed and selected explicitly; PoliMorf is optional for Polish |
Core version, model artifact version, catalog version, source dictionary version, and model format version are separate compatibility axes. Updating Java code need not republish unchanged model bytes; updating one model need not release core or every other model.
## Model artifact identity and layout
A module named `models/<model-id>` publishes:
```text
org.egothor:radixor-model-<model-id>:<model-version>
```
The built PoliMorf JAR has this effective tree:
```text
META-INF/
LICENSES/PoliMorf-BSD-2-Clause.txt
MANIFEST.MF
radixor/
models.index
models/pl-pl-polimorf.properties
org/egothor/stemmer/models/pl-pl-polimorf/stemmer.gz
```
Each UniMorph-derived model instead contains one model-specific
`META-INF/NOTICE/<model-id>-data.txt`. That notice records the upstream attribution, the Radixor
transformations and contribution statement, the ShareAlike distribution terms, and the canonical
CC BY-SA 3.0 URI. The repository has no root CC license directory because CC BY-SA applies to
these model-data artifacts, not to the BSD-3-Clause Radixor Java software. PoliMorf retains only
its BSD-2-Clause data license.
`models.index` contains the descriptor path. The descriptor contains the exact resource path. No Java provider class is required, and model modules do not compile against a core API.
## Discovery and integrity
`StemmerModelRegistry` asks the selected `ClassLoader` for every `META-INF/radixor/models.index`. It sorts index URLs, validates each non-comment entry, loads the named descriptors, sorts descriptors by model ID, and rejects duplicate IDs. It does not scan arbitrary JAR entries.
Descriptor parsing verifies:
- the model-ID syntax;
- required nonblank runtime properties;
- a known `Language` enum name;
- format `radixor-dictionary-tsv-gzip` and format version `1`;
- the exact namespaced resource path;
- presence of the runtime resource;
- a lowercase 64-character SHA-256 value.
Loading then reads the compressed resource bytes through the descriptor's discovering class loader, compares their SHA-256 digest, opens GZip, parses UTF-8 Radixor dictionary rows, and constructs a trie. Duplicate-ID and checksum checks make selection independent of classpath order.
## Descriptor fields
The convention plugin generates these fields:
| Property | Role | Meaning |
|---|---|---|
| `model.id` | Authoritative runtime identity | Stable model ID |
| `model.version` | Authoritative artifact identity | Independently managed model version |
| `model.language` | Authoritative selection metadata | Existing `Language` enum value |
| `model.displayName` | Display metadata | Human-readable name |
| `model.resource` | Authoritative loading metadata | Namespaced GZip resource |
| `model.default` | Catalog/build declaration | Whether the module declares itself a default; runtime language selection uses `Language.defaultModelId()` |
| `model.format` | Authoritative compatibility metadata | `radixor-dictionary-tsv-gzip` |
| `model.formatVersion` | Authoritative compatibility metadata | Currently `1` |
| `model.sha256` | Authoritative integrity metadata | Digest of the compressed source bytes |
| `model.rightToLeft` | Processing metadata | Language direction recorded by the build |
| `model.caseProcessing` | Processing metadata | `LOWERCASE_WITH_LOCALE_ROOT` |
| `model.diacriticProcessing` | Processing metadata | `AS_IS` |
| `model.storeOriginal` | Processing metadata | Currently `true` |
| `source.name` | Provenance | Source dictionary name |
| `source.version` | Provenance | Upstream version or the legacy-import sentinel |
| `source.project` | Provenance | Upstream project |
| `source.repository` | Provenance | Official language repository |
| `source.dataset` | Provenance | Upstream dataset and lexical-source identity |
| `source.revision` | Provenance | Exact revision or `not-recorded-in-legacy-import` |
| `source.revisionStatus` | Provenance | `recorded` or `not-recorded-in-legacy-import` |
| `source.license` | Provenance | SPDX or project license reference |
| `source.licenseUri` | Provenance | Canonical license URI |
| `source.attribution` | Provenance | Attribution supplied by the official source |
| `source.verificationDate` | Provenance | Date the maintained upstream information was checked |
| `transformations.summary` | Provenance | Material Radixor conversion operations |
| `compiler.radixorVersion` | Provenance | Compiler lineage recorded by the plugin |
| `compiler.radixorCommit` | Provenance | Commit when available; currently `unavailable` |
| `statistics.groups` | Provenance/statistics | Currently `unavailable` |
| `statistics.forms` | Provenance/statistics | Currently `unavailable` |
The current registry consumes the authoritative `model.*` identity, format, resource, and checksum fields. Processing and provenance fields remain packaged for audit and catalog generation but are not all exposed as typed `StemmerModelDescriptor` accessors. The generated catalog is the supported documentation view of source name, version, license, checksum, and size.
## Immutable input to runtime model
The packaging sequence is:
```text
models/<id>/src/modelInput/stemmer.gz
-> validate GZip, strict UTF-8, rows, metadata, version, and license
-> copy identical bytes into build/generated/modelResources
-> generate descriptor, index, and packaged license
-> package radixor-model-<id>-<version>.jar
-> discover from the application's runtime classpath
-> verify checksum, parse dictionary, and build a trie
```
Application runtime never reads `src/modelInput` from a source checkout.
For PoliMorf, the immutable input is exactly:
`models/pl-pl-polimorf/src/modelInput/stemmer.gz`
Its required upstream license is:
`models/pl-pl-polimorf/src/modelInput/LICENSE-BSD-2-Clause.txt`
The final runtime resource is exactly:
`org/egothor/stemmer/models/pl-pl-polimorf/stemmer.gz`
## Aggregate projects
| Project | Published coordinate | Contents and purpose |
|---|---|---|
| `models/standard` | `org.egothor:radixor-models-standard:<catalog-version>` | POM-only aggregate with one transitive runtime default per language; excludes PoliMorf |
| `models/bom` | `org.egothor:radixor-models-bom:<catalog-version>` | POM-only Maven dependency-management constraints for all individual published model versions |
Neither catalog artifact publishes a binary, sources, or Javadoc JAR. The standard aggregate resolves model JARs because its POM contains runtime dependencies. Importing the BOM only manages versions and resolves no model by itself. JMH, tests, and quality evaluation depend directly on individual model projects through non-production Gradle configurations.
The Maven dependency BOM is not a software bill of materials. The root `cyclonedxDirectBom` task generates the project-wide CycloneDX SBOM under `build/reports/sbom/`; it does not write into `models/bom/build/`.
`models/build/` is an ignored Gradle output directory for the implicit lifecycle parent `:models`, not a source module. CycloneDX direct tasks exposed on subprojects by the root plugin are disabled, so the supported build does not write an SBOM there. Aggregate model reports are owned by the root project under `build/reports/models/`; individual model reports and publication files stay under `models/<model-id>/build/`.
## Create or update a model module
1. Choose a stable lowercase model ID matching the module directory.
2. Add `models/<id>/model-version.txt`; do not derive it from core.
3. Apply `org.egothor.radixor.model` in the module build script.
4. Declare `modelId`, `language`, `displayName`, `defaultModel`, repository, dataset, revision and status, license URI, attribution, verification date, and transformations.
5. Put immutable `stemmer.gz` and a model-specific `NOTICE-model-data.txt` under `src/modelInput/`. The notice must identify the applicable data license and canonical URI, upstream attribution, transformations, and derived-data contributions without implying that the core software uses that license.
6. Add the module ID and its `default` or `optional` build-topology role to `models/model-projects.properties`. `settings.gradle`, verification, standard membership, BOM constraints, tests, and JMH all consume that list; descriptor metadata remains authoritative for model identity and language properties.
7. Run:
```bash
./gradlew --no-daemon :models:<model-id>:validateModelInput
./gradlew --no-daemon :models:<model-id>:prepareModelResources
./gradlew --no-daemon :models:<model-id>:verifyModelDescriptor
./gradlew --no-daemon :models:<model-id>:verifyModelJar
./gradlew --no-daemon :models:<model-id>:check
./gradlew --no-daemon runtimeModelIntegrationTest -PmodelId=<model-id>
```
Validation fails for missing inputs, notices, attribution, repository, revision status, Radixor contribution and transformation disclosures, ShareAlike and no-endorsement statements, notice byte identity, unsafe or mismatched ID, invalid semantic version, invalid GZip/UTF-8, invalid dictionary rows, checksum mismatch, wrong packaged path, duplicate dictionaries, or dictionaries in sources/Javadoc artifacts. The explicit legacy revision sentinel is valid; an absent revision or status is not. The PoliMorf module separately validates its complete BSD-2-Clause license and attribution.
Copying an arbitrary `stemmer.gz` into an application is insufficient: registry discovery requires an index, a valid descriptor, namespaced resource, checksum, version, language, format declaration, and licensing material.
## Release boundaries
| Tag | Publishes | Does not publish |
|---|---|---|
| `release@<core-version>` | Root `org.egothor:radixor` software artifacts | Model JARs, standard pack, or BOM |
| `model/<model-id>@<model-version>` | Exactly the matching independently versioned model | Core, other models, standard pack, BOM, JMH, or full quality suite |
| `models-catalog@<catalog-version>` | Standard aggregate and models BOM | Individual model JARs or core |
Local validation for PoliMorf 1.0.0 is:
```bash
./tools/parse-model-release-tag.sh "model/pl-pl-polimorf@1.0.0" .
./gradlew --no-daemon :models:pl-pl-polimorf:check
./gradlew --no-daemon runtimeModelIntegrationTest -PmodelId=pl-pl-polimorf
./gradlew --no-daemon :models:pl-pl-polimorf:validateModelRelease \
-PmodelReleaseVersion=1.0.0
./gradlew --no-daemon :models:pl-pl-polimorf:packageModelReleaseCandidate \
-PmodelReleaseVersion=1.0.0
```
`runtimeModelIntegrationTest` uses an isolated JVM, defaults to a 6 GiB maximum heap, and can be overridden with `-PradixorLargeModelMaxHeap=10g`. For PoliMorf, `validateModelRelease` depends on this complete runtime construction and real stemming smoke verification in addition to descriptor, checksum, license, and package validation. The generic release workflow still selects and publishes only the requested model. The commands above are local validation only; repository owners control tags and publication.
## Documentation and troubleshooting
`prepareMkDocsSource` generates the catalog only at `build/mkdocs-source/stemmer-model-catalog.md`; generated Markdown and rendered site content are not tracked. For runtime failures, dependency inspection, ClassLoader isolation, and fat-JAR guidance, see [Model Selection and Loading](model-selection-and-loading.md#troubleshooting).

View File

@@ -1,12 +1,16 @@
# Stemming quality evaluation # Stemming quality evaluation
The explicit `stemmingQuality` analysis measures agreement between stemmer outputs and gold-standard equivalence classes represented by bundled multilingual dictionary rows. Dictionary text remains unchanged; reports and diagnostics use English. The explicit `stemmingQuality` analysis measures agreement between stemmer outputs and gold-standard equivalence classes represented by registered multilingual model dictionary rows. Dictionary text remains unchanged; reports and diagnostics use English.
JMH adapters, registries, third-party versions, language mappings, and preparation remain in `src/jmh`. The evaluator, reports, audits, and tests reside in the standard `src/test` source set. The former `src/stemmingQualityTest` source set was removed, and neither analytical nor JMH classes enter the production JAR. JMH adapters, registries, third-party versions, language mappings, and preparation remain in `src/jmh`. The evaluator, reports, audits, and tests reside in the standard `src/test` source set. The former `src/stemmingQualityTest` source set was removed, and neither analytical nor JMH classes enter the production JAR.
## Language and adapter coverage ## Language and adapter coverage
The authoritative Radixor universe is the validated one-to-one reconciliation of `src/main/resources/*/stemmer.gz` and every `StemmerPatchTrieLoader.Language` value. All 20 current values have exactly one resource; no sentinel or alias is excluded. Radixor is evaluated for all 20 languages, independently of third-party support. Third-party combinations come only from explicit JMH adapter metadata. Unsupported combinations are documented and never fabricated as zero-valued rows. The authoritative Radixor universe is the validated one-to-one reconciliation of every `StemmerPatchTrieLoader.Language` value with its registered default model descriptor. All 20 current values have exactly one documented default. Optional comparison models, including `pl-pl-polimorf`, are identified separately and never replace default benchmark rows. Third-party combinations come only from explicit JMH adapter metadata.
Default Polish evaluation is therefore `Radixor` with model `pl-pl-unimorph`. A future PoliMorf evaluation is a distinct `Radixor` / `pl-pl-polimorf` row. Evaluation classpaths receive individual models through direct non-production Gradle dependencies; ordinary applications inherit none of them from the core.
Complete PoliMorf trie construction and deterministic stemming smoke fixtures are runtime-verified separately. That functional verification is not a linguistic-quality measurement and does not justify rewriting the historical quality snapshot.
The expected matrix is constructed before evaluation from stemmer, language, dictionary mode, and supported output policy. Generation fails on missing, duplicate, unexpected, or stale keys. The expected matrix is constructed before evaluation from stemmer, language, dictionary mode, and supported output policy. Generation fails on missing, duplicate, unexpected, or stale keys.
@@ -80,3 +84,4 @@ Generated files under `build/reports/stemming-quality/` include `stemming-qualit
## Limitations ## Limitations
These measurements evaluate agreement with the available dictionary grouping. They do not capture every semantic, morphological, downstream, or dataset-specific property. `ANY_CANDIDATE` is optimistic and may not be globally realizable. `ALL_CANDIDATES` measures an overlap graph rather than a partition. Language coverage must remain visible in cross-stemmer comparisons. No single published metric establishes universal superiority; multiple metrics and their correlations are provided for transparent scientific assessment. These measurements evaluate agreement with the available dictionary grouping. They do not capture every semantic, morphological, downstream, or dataset-specific property. `ANY_CANDIDATE` is optimistic and may not be globally realizable. `ALL_CANDIDATES` measures an overlap graph rather than a partition. Language coverage must remain visible in cross-stemmer comparisons. No single published metric establishes universal superiority; multiple metrics and their correlations are provided for transparent scientific assessment.
Historical checked-in quality results retain their original inputs and claims. The optional PoliMorf model is not attributed to snapshots that predate it. See [Model Selection and Loading](model-selection-and-loading.md) and the generated [model catalog](stemmer-model-catalog.md).

View File

@@ -0,0 +1,30 @@
/*******************************************************************************
* Copyright (C) 2026, Leo Galambos
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors
* 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 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/

View File

@@ -51,11 +51,6 @@ publishing {
url = pomLicenseUrl url = pomLicenseUrl
distribution = pomLicenseDistribution distribution = pomLicenseDistribution
} }
license {
name = pomStemmerDataLicenseName
url = pomStemmerDataLicenseUrl
distribution = pomLicenseDistribution
}
} }
developers { developers {
@@ -104,8 +99,6 @@ tasks.register('validateReleaseMetadata') {
if (pomScmDeveloperConnection == null || pomScmDeveloperConnection.isBlank()) missing.add('pomScmDeveloperConnection') if (pomScmDeveloperConnection == null || pomScmDeveloperConnection.isBlank()) missing.add('pomScmDeveloperConnection')
if (pomLicenseName == null || pomLicenseName.isBlank()) missing.add('pomLicenseName') if (pomLicenseName == null || pomLicenseName.isBlank()) missing.add('pomLicenseName')
if (pomLicenseUrl == null || pomLicenseUrl.isBlank()) missing.add('pomLicenseUrl') if (pomLicenseUrl == null || pomLicenseUrl.isBlank()) missing.add('pomLicenseUrl')
if (pomStemmerDataLicenseName == null || pomStemmerDataLicenseName.isBlank()) missing.add('pomStemmerDataLicenseName')
if (pomStemmerDataLicenseUrl == null || pomStemmerDataLicenseUrl.isBlank()) missing.add('pomStemmerDataLicenseUrl')
if (signingKey == null || signingKey.isBlank()) missing.add('pomSigningKey / SIGNING_KEY') if (signingKey == null || signingKey.isBlank()) missing.add('pomSigningKey / SIGNING_KEY')
if (signingPassword == null || signingPassword.isBlank()) missing.add('pomSigningPassword / SIGNING_PASSWORD') if (signingPassword == null || signingPassword.isBlank()) missing.add('pomSigningPassword / SIGNING_PASSWORD')

View File

@@ -120,6 +120,11 @@ def transformPaiceHuskSource = { final File sourceFile, final File rulesFile, fi
transformedText = 'package org.egothor.stemmer.benchmark;' + '\n\n' + transformedText transformedText = 'package org.egothor.stemmer.benchmark;' + '\n\n' + transformedText
transformedText = transformedText.replaceFirst(/(?m)^\s*class\s+PaiceHusk\s*\{/, 'public final class PaiceHuskLancasterStemmer {') transformedText = transformedText.replaceFirst(/(?m)^\s*class\s+PaiceHusk\s*\{/, 'public final class PaiceHuskLancasterStemmer {')
transformedText = transformedText.replace('new Character(rule.letter)', 'Character.valueOf(rule.letter)')
transformedText = transformedText.replace('new Character(stem.charAt(stem.length() - 1))',
'Character.valueOf(stem.charAt(stem.length() - 1))')
transformedText = transformedText.replaceFirst(/(?m)^(\s*)static HashMap loadRules\(/,
'$1@SuppressWarnings("unchecked")\n$1static HashMap loadRules(')
final int packageEnd = transformedText.indexOf('\n', transformedText.indexOf('package org.egothor.stemmer.benchmark;')) final int packageEnd = transformedText.indexOf('\n', transformedText.indexOf('package org.egothor.stemmer.benchmark;'))
if (packageEnd >= 0) { if (packageEnd >= 0) {

View File

@@ -248,11 +248,24 @@
<sha256 value="a151df1e2e0b48618d8b06a180748a29b3abb39b1b2396f6a1c879a727488c6e" origin="Generated by Gradle"/> <sha256 value="a151df1e2e0b48618d8b06a180748a29b3abb39b1b2396f6a1c879a727488c6e" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="com.google.errorprone" name="error_prone_annotations" version="2.47.0">
<artifact name="error_prone_annotations-2.47.0.jar">
<sha256 value="5364bc6f22e72e98195e406a58d3ba1c09ffa11dea0729592cb870dc2de4056d" origin="Generated by Gradle"/>
</artifact>
<artifact name="error_prone_annotations-2.47.0.pom">
<sha256 value="d80c889a4a6f711f6945fbee79e05ec247b178a567e9d5abf58eb26ebf0a0752" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.errorprone" name="error_prone_parent" version="2.41.0"> <component group="com.google.errorprone" name="error_prone_parent" version="2.41.0">
<artifact name="error_prone_parent-2.41.0.pom"> <artifact name="error_prone_parent-2.41.0.pom">
<sha256 value="c538388d760a5c1c98dcf06f6ed3cfe5f11a651827db5cbd2ed8288c795cad42" origin="Generated by Gradle"/> <sha256 value="c538388d760a5c1c98dcf06f6ed3cfe5f11a651827db5cbd2ed8288c795cad42" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="com.google.errorprone" name="error_prone_parent" version="2.47.0">
<artifact name="error_prone_parent-2.47.0.pom">
<sha256 value="2368a990c7a63095e1d0d44459d5a4092f0eb31f8562bd12cdf0e1c877b6a685" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="failureaccess" version="1.0.3"> <component group="com.google.guava" name="failureaccess" version="1.0.3">
<artifact name="failureaccess-1.0.3.jar"> <artifact name="failureaccess-1.0.3.jar">
<sha256 value="cbfc3906b19b8f55dd7cfd6dfe0aa4532e834250d7f080bd8d211a3e246b59cb" origin="Generated by Gradle"/> <sha256 value="cbfc3906b19b8f55dd7cfd6dfe0aa4532e834250d7f080bd8d211a3e246b59cb" origin="Generated by Gradle"/>
@@ -274,6 +287,14 @@
<sha256 value="77ed42c8c8b2cebbb93ac9e07543ff6418aa24bdb8517580cf5324e9a6510956" origin="Generated by Gradle"/> <sha256 value="77ed42c8c8b2cebbb93ac9e07543ff6418aa24bdb8517580cf5324e9a6510956" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="com.google.guava" name="guava" version="33.6.0-jre">
<artifact name="guava-33.6.0-jre.jar">
<sha256 value="dc573e1fca4fd5454f4a5fd3d7da2df03002876a4175bafc14a95980dd7713b3" origin="Generated by Gradle"/>
</artifact>
<artifact name="guava-33.6.0-jre.module">
<sha256 value="2baf73ce839ae48e4b9e0083e256b0e58fc3bf8fc78fc3fbe797bbc89011216e" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="guava-parent" version="26.0-android"> <component group="com.google.guava" name="guava-parent" version="26.0-android">
<artifact name="guava-parent-26.0-android.pom"> <artifact name="guava-parent-26.0-android.pom">
<sha256 value="f8698ab46ca996ce889c1afc8ca4f25eb8ac6b034dc898d4583742360016cc04" origin="Generated by Gradle"/> <sha256 value="f8698ab46ca996ce889c1afc8ca4f25eb8ac6b034dc898d4583742360016cc04" origin="Generated by Gradle"/>
@@ -294,6 +315,11 @@
<sha256 value="68719e687c6e4c9ff3e0fecbef7bd20896f0f4f7b314743ed33c72f962568215" origin="Generated by Gradle"/> <sha256 value="68719e687c6e4c9ff3e0fecbef7bd20896f0f4f7b314743ed33c72f962568215" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="com.google.guava" name="guava-parent" version="33.6.0-jre">
<artifact name="guava-parent-33.6.0-jre.pom">
<sha256 value="374bd31f61b1cf612bee9ab2e4d70bbdf77dd85a49b431f809d4fbdc901f2dd4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="com.google.guava" name="listenablefuture" version="9999.0-empty-to-avoid-conflict-with-guava"> <component group="com.google.guava" name="listenablefuture" version="9999.0-empty-to-avoid-conflict-with-guava">
<artifact name="listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar"> <artifact name="listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar">
<sha256 value="b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99" origin="Generated by Gradle"/> <sha256 value="b372a037d4230aa57fbeffdef30fd6123f9c0c2db85d0aced00c91b974f33f99" origin="Generated by Gradle"/>
@@ -524,11 +550,24 @@
<sha256 value="6d849ae7454ab391718e5fc70e2716418ef3ed264472345bd80c6de64e00b6c4" origin="Generated by Gradle"/> <sha256 value="6d849ae7454ab391718e5fc70e2716418ef3ed264472345bd80c6de64e00b6c4" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="me.champeau.jmh" name="jmh-gradle-plugin" version="0.7.3">
<artifact name="jmh-gradle-plugin-0.7.3.jar">
<sha256 value="d7097e619541d90e0a970b2a68573e22ad01d2999ee5365d56d59830765bf98f" origin="Generated by Gradle"/>
</artifact>
<artifact name="jmh-gradle-plugin-0.7.3.module">
<sha256 value="3487d1aba24fe0af527c6d5f78b5f0e8fd64fe9878708b460e6600e39a47bc43" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="me.champeau.jmh" name="me.champeau.jmh.gradle.plugin" version="0.7.2"> <component group="me.champeau.jmh" name="me.champeau.jmh.gradle.plugin" version="0.7.2">
<artifact name="me.champeau.jmh.gradle.plugin-0.7.2.pom"> <artifact name="me.champeau.jmh.gradle.plugin-0.7.2.pom">
<sha256 value="57e0c23ac60945aefb5a0c4a9339bea68a295364ca47c7a9079a032f79013abb" origin="Generated by Gradle"/> <sha256 value="57e0c23ac60945aefb5a0c4a9339bea68a295364ca47c7a9079a032f79013abb" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="me.champeau.jmh" name="me.champeau.jmh.gradle.plugin" version="0.7.3">
<artifact name="me.champeau.jmh.gradle.plugin-0.7.3.pom">
<sha256 value="d516226b3b114e4b32d42544d1d2796c732c5465d5dae7cc846be6b23bed8d1d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.bytebuddy" name="byte-buddy" version="1.17.7"> <component group="net.bytebuddy" name="byte-buddy" version="1.17.7">
<artifact name="byte-buddy-1.17.7.jar"> <artifact name="byte-buddy-1.17.7.jar">
<sha256 value="3575dcb8a98faf943d3c1595c47a16047c4fce8a83ebbb26262f1a2f67546357" origin="Generated by Gradle"/> <sha256 value="3575dcb8a98faf943d3c1595c47a16047c4fce8a83ebbb26262f1a2f67546357" origin="Generated by Gradle"/>
@@ -725,6 +764,11 @@
<sha256 value="524ec4787aff73af6b3a9fafa154c7f1881b648299b663fdbfcadda1286f2353" origin="Generated by Gradle"/> <sha256 value="524ec4787aff73af6b3a9fafa154c7f1881b648299b663fdbfcadda1286f2353" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache" name="apache" version="38">
<artifact name="apache-38.pom">
<sha256 value="9b0a5f28ddfb4b7500a37022bee8245efdd044fb9a3d79fb827550923eccc4b5" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.commons" name="commons-collections4" version="4.5.0"> <component group="org.apache.commons" name="commons-collections4" version="4.5.0">
<artifact name="commons-collections4-4.5.0.jar"> <artifact name="commons-collections4-4.5.0.jar">
<sha256 value="00f93263c267be201b8ae521b44a7137271b16688435340bf629db1bac0a5845" origin="Generated by Gradle"/> <sha256 value="00f93263c267be201b8ae521b44a7137271b16688435340bf629db1bac0a5845" origin="Generated by Gradle"/>
@@ -995,6 +1039,11 @@
<sha256 value="6f4bb954198678a528dfc8b2887a84cc3f54ae4a0b8b75c191fa28b04963e607" origin="Generated by Gradle"/> <sha256 value="6f4bb954198678a528dfc8b2887a84cc3f54ae4a0b8b75c191fa28b04963e607" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven" version="3.9.16">
<artifact name="maven-3.9.16.pom">
<sha256 value="5a761e32d3f3b5d65a70345cab4a327730c1d2000bb935bae7276dcc8fa81738" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-artifact" version="3.9.14"> <component group="org.apache.maven" name="maven-artifact" version="3.9.14">
<artifact name="maven-artifact-3.9.14.jar"> <artifact name="maven-artifact-3.9.14.jar">
<sha256 value="1effa70eacbf0aa4d94ad9c7b225be031ce4317fa07da59e23b02b3e4e1231a3" origin="Generated by Gradle"/> <sha256 value="1effa70eacbf0aa4d94ad9c7b225be031ce4317fa07da59e23b02b3e4e1231a3" origin="Generated by Gradle"/>
@@ -1003,6 +1052,14 @@
<sha256 value="e668c936d22fd2c11edff52eac72c6e7fc13ba57c949096048be8debf0f9ffd2" origin="Generated by Gradle"/> <sha256 value="e668c936d22fd2c11edff52eac72c6e7fc13ba57c949096048be8debf0f9ffd2" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-artifact" version="3.9.16">
<artifact name="maven-artifact-3.9.16.jar">
<sha256 value="54cc1c1ef932e3d4a903352111b42b4d3c3ed8e7a1d0de73b625309d9c3ad3e8" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-artifact-3.9.16.pom">
<sha256 value="85d313bbbdbce67e199aadb4336e100c40a147881142ea4368cdebeafc02baec" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-builder-support" version="3.9.14"> <component group="org.apache.maven" name="maven-builder-support" version="3.9.14">
<artifact name="maven-builder-support-3.9.14.jar"> <artifact name="maven-builder-support-3.9.14.jar">
<sha256 value="2109ff808046e4f8b356b1064060a3f224b0b0aad07ecceaf7696c3bdc0b2296" origin="Generated by Gradle"/> <sha256 value="2109ff808046e4f8b356b1064060a3f224b0b0aad07ecceaf7696c3bdc0b2296" origin="Generated by Gradle"/>
@@ -1011,6 +1068,14 @@
<sha256 value="6ed1ab2a239c5954b074dd8b75e70dbba55866840e73c53ae8b1f99a35afb7b5" origin="Generated by Gradle"/> <sha256 value="6ed1ab2a239c5954b074dd8b75e70dbba55866840e73c53ae8b1f99a35afb7b5" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-builder-support" version="3.9.16">
<artifact name="maven-builder-support-3.9.16.jar">
<sha256 value="02972384eae3495801565fd27abb84cfd75a8e6d2cbb1ae0c556752ebc2b1cde" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-builder-support-3.9.16.pom">
<sha256 value="c8366af883eeec0e2fd13e14cd8245969284b6e66df131f7b7c03d270f72f613" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-core" version="3.9.14"> <component group="org.apache.maven" name="maven-core" version="3.9.14">
<artifact name="maven-core-3.9.14.jar"> <artifact name="maven-core-3.9.14.jar">
<sha256 value="db009d57b90a714efe86c81c7a518febb276d01ba3daf2f301e382f6560e8a58" origin="Generated by Gradle"/> <sha256 value="db009d57b90a714efe86c81c7a518febb276d01ba3daf2f301e382f6560e8a58" origin="Generated by Gradle"/>
@@ -1019,6 +1084,14 @@
<sha256 value="a7967fb392197e5fa73c7b7c3fb728f77fc50f4ad7f03679c0bbabee5c0132b3" origin="Generated by Gradle"/> <sha256 value="a7967fb392197e5fa73c7b7c3fb728f77fc50f4ad7f03679c0bbabee5c0132b3" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-core" version="3.9.16">
<artifact name="maven-core-3.9.16.jar">
<sha256 value="5d45c72e3dbfab8b68d15ad4f12777b7d9b5fe4d4adc99c3bd51fb9641fab009" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-core-3.9.16.pom">
<sha256 value="186f17628c5235d03e34c593122d05fdc1be9694440a54d8213b3f957d6379a4" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-model" version="3.9.14"> <component group="org.apache.maven" name="maven-model" version="3.9.14">
<artifact name="maven-model-3.9.14.jar"> <artifact name="maven-model-3.9.14.jar">
<sha256 value="684f573b1b37933c5d62c1c21d5da4335b049fb8b3d9754281597a38dbbc4044" origin="Generated by Gradle"/> <sha256 value="684f573b1b37933c5d62c1c21d5da4335b049fb8b3d9754281597a38dbbc4044" origin="Generated by Gradle"/>
@@ -1027,6 +1100,14 @@
<sha256 value="e999c4ae0f12bff7585bffcaf5b0e6cb69226f27d21d5421fa4ae4e76779152a" origin="Generated by Gradle"/> <sha256 value="e999c4ae0f12bff7585bffcaf5b0e6cb69226f27d21d5421fa4ae4e76779152a" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-model" version="3.9.16">
<artifact name="maven-model-3.9.16.jar">
<sha256 value="f59d86a507c241bf17bbf050050d1b8b9c0d34d5010a7e2386c3cab7c83b93de" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-model-3.9.16.pom">
<sha256 value="64883ffcfd91ddaadb4181740236a823bfe0880e0c20f5beee74bc32a93914a7" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-model-builder" version="3.9.14"> <component group="org.apache.maven" name="maven-model-builder" version="3.9.14">
<artifact name="maven-model-builder-3.9.14.jar"> <artifact name="maven-model-builder-3.9.14.jar">
<sha256 value="9a6f4deb11bd6fe3f8b11036ed46f34cded3b00fc638f242327537bfb53c9d3f" origin="Generated by Gradle"/> <sha256 value="9a6f4deb11bd6fe3f8b11036ed46f34cded3b00fc638f242327537bfb53c9d3f" origin="Generated by Gradle"/>
@@ -1035,6 +1116,14 @@
<sha256 value="7548856c413b3ef5f3d35c2e812beae847dd21809f8e5d3621d5da2d7bdcfe6f" origin="Generated by Gradle"/> <sha256 value="7548856c413b3ef5f3d35c2e812beae847dd21809f8e5d3621d5da2d7bdcfe6f" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-model-builder" version="3.9.16">
<artifact name="maven-model-builder-3.9.16.jar">
<sha256 value="002be86d1f53b36f559a0786034a17598d71087f1935f205a1f9e51d4dd124b3" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-model-builder-3.9.16.pom">
<sha256 value="6e2a59eadd77b244fe60fc60b7ed3a9b2dee704d44a4f5baca4f9d3be6e53e10" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-parent" version="39"> <component group="org.apache.maven" name="maven-parent" version="39">
<artifact name="maven-parent-39.pom"> <artifact name="maven-parent-39.pom">
<sha256 value="cfe4820aa1d96ae51d1dc5b0e2a9dc582c42478c24c95ca8238f547e60bef721" origin="Generated by Gradle"/> <sha256 value="cfe4820aa1d96ae51d1dc5b0e2a9dc582c42478c24c95ca8238f547e60bef721" origin="Generated by Gradle"/>
@@ -1045,6 +1134,11 @@
<sha256 value="82d0112ba1907ff5fd13a2485829c97df66c6a81e075359a561a422f7d1582d3" origin="Generated by Gradle"/> <sha256 value="82d0112ba1907ff5fd13a2485829c97df66c6a81e075359a561a422f7d1582d3" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-parent" version="48">
<artifact name="maven-parent-48.pom">
<sha256 value="cc9eed84b90a96cbc33aefecc93facb9a49f960ad678909162c579356cfe12c9" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-plugin-api" version="3.9.14"> <component group="org.apache.maven" name="maven-plugin-api" version="3.9.14">
<artifact name="maven-plugin-api-3.9.14.jar"> <artifact name="maven-plugin-api-3.9.14.jar">
<sha256 value="062445ef3ae988e245cca68ccec915de64703ec615badf2d9d61da9ee6f1a245" origin="Generated by Gradle"/> <sha256 value="062445ef3ae988e245cca68ccec915de64703ec615badf2d9d61da9ee6f1a245" origin="Generated by Gradle"/>
@@ -1053,6 +1147,14 @@
<sha256 value="754d855dfe4c605400620b0c7ef8708c9a413ef629b07f214767ebb15ab7f99a" origin="Generated by Gradle"/> <sha256 value="754d855dfe4c605400620b0c7ef8708c9a413ef629b07f214767ebb15ab7f99a" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-plugin-api" version="3.9.16">
<artifact name="maven-plugin-api-3.9.16.jar">
<sha256 value="37cb5e483e23327cf4ba18f920b45e000d20eec0428a086a5c1bd6bbdecf088c" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-plugin-api-3.9.16.pom">
<sha256 value="6fe60dbb3157b9466a6b18f70a4c6eca7f68978eaf015ce164bb2471e1acbc12" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-repository-metadata" version="3.9.14"> <component group="org.apache.maven" name="maven-repository-metadata" version="3.9.14">
<artifact name="maven-repository-metadata-3.9.14.jar"> <artifact name="maven-repository-metadata-3.9.14.jar">
<sha256 value="307e4920b17a8fdd764b556a7569de9bdd384d6b5f3f6a63dfb2ef186f02da2a" origin="Generated by Gradle"/> <sha256 value="307e4920b17a8fdd764b556a7569de9bdd384d6b5f3f6a63dfb2ef186f02da2a" origin="Generated by Gradle"/>
@@ -1061,6 +1163,14 @@
<sha256 value="9c399dc0a741c5023a28a2a38d4a49a80059078431be99b3d4571831c3915fdc" origin="Generated by Gradle"/> <sha256 value="9c399dc0a741c5023a28a2a38d4a49a80059078431be99b3d4571831c3915fdc" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-repository-metadata" version="3.9.16">
<artifact name="maven-repository-metadata-3.9.16.jar">
<sha256 value="bc3dd413b89a16b695f35a5d0496b58ea2787c30b7b6062c130d24d6d764720f" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-repository-metadata-3.9.16.pom">
<sha256 value="1c018bbd6cd513b43df5dd64c82579b14c414d35f99e06a0c3878b05ae070912" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-resolver-provider" version="3.9.14"> <component group="org.apache.maven" name="maven-resolver-provider" version="3.9.14">
<artifact name="maven-resolver-provider-3.9.14.jar"> <artifact name="maven-resolver-provider-3.9.14.jar">
<sha256 value="a5bc340ffe35325c55a01762feee374abb2a9e2b14191ea39c1ef646c2754f65" origin="Generated by Gradle"/> <sha256 value="a5bc340ffe35325c55a01762feee374abb2a9e2b14191ea39c1ef646c2754f65" origin="Generated by Gradle"/>
@@ -1069,6 +1179,14 @@
<sha256 value="355db0ea3f355a1c575523a13e31f8b9fdace732474c74afae6ad90fce722e33" origin="Generated by Gradle"/> <sha256 value="355db0ea3f355a1c575523a13e31f8b9fdace732474c74afae6ad90fce722e33" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-resolver-provider" version="3.9.16">
<artifact name="maven-resolver-provider-3.9.16.jar">
<sha256 value="72a2d6aad3708e2c708b659b292ae9587a4d170ec88f48466290318730221118" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-resolver-provider-3.9.16.pom">
<sha256 value="33723bba45ff2a1581bc2840836b7d9c9aa262af676f4f61222e179b56ea8818" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-settings" version="3.9.14"> <component group="org.apache.maven" name="maven-settings" version="3.9.14">
<artifact name="maven-settings-3.9.14.jar"> <artifact name="maven-settings-3.9.14.jar">
<sha256 value="0e5492e07136565b1ef72a981e99797999183e54f589e00aa608cbadc4cb9bda" origin="Generated by Gradle"/> <sha256 value="0e5492e07136565b1ef72a981e99797999183e54f589e00aa608cbadc4cb9bda" origin="Generated by Gradle"/>
@@ -1077,6 +1195,14 @@
<sha256 value="a49d6f6434b40c1ef8b63dccf8615aa9505d236d0e9fe6045e5f9513a42aadbe" origin="Generated by Gradle"/> <sha256 value="a49d6f6434b40c1ef8b63dccf8615aa9505d236d0e9fe6045e5f9513a42aadbe" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-settings" version="3.9.16">
<artifact name="maven-settings-3.9.16.jar">
<sha256 value="322ae5b23f4b7b6ce7896bd33a793143dbbbbcc16c4475e2d7eebbd8f755da92" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-settings-3.9.16.pom">
<sha256 value="d3df811fe57832933adef90c119cbf3abb941884cf840cc9777aa639cf1a145d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven" name="maven-settings-builder" version="3.9.14"> <component group="org.apache.maven" name="maven-settings-builder" version="3.9.14">
<artifact name="maven-settings-builder-3.9.14.jar"> <artifact name="maven-settings-builder-3.9.14.jar">
<sha256 value="1d3cf59f9dc6af77f7a1052aea598535b4f59926a9fe92cecce3ecfb5b91ff1f" origin="Generated by Gradle"/> <sha256 value="1d3cf59f9dc6af77f7a1052aea598535b4f59926a9fe92cecce3ecfb5b91ff1f" origin="Generated by Gradle"/>
@@ -1085,6 +1211,14 @@
<sha256 value="8ca00532860ab13c7b5398df095fc3820c223955c32974c5d5b6bc6e45357c61" origin="Generated by Gradle"/> <sha256 value="8ca00532860ab13c7b5398df095fc3820c223955c32974c5d5b6bc6e45357c61" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.apache.maven" name="maven-settings-builder" version="3.9.16">
<artifact name="maven-settings-builder-3.9.16.jar">
<sha256 value="226f1cbb0b4d414eff773fb151a8977837c98073e14d5963794e6cf464e6adbb" origin="Generated by Gradle"/>
</artifact>
<artifact name="maven-settings-builder-3.9.16.pom">
<sha256 value="bce946240bf297982f524666674acff5c14878a24849f1f3c3489cd1d829ed48" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.apache.maven.resolver" name="maven-resolver" version="1.9.27"> <component group="org.apache.maven.resolver" name="maven-resolver" version="1.9.27">
<artifact name="maven-resolver-1.9.27.pom"> <artifact name="maven-resolver-1.9.27.pom">
<sha256 value="8924b41711cce058f83c46d79ad83d6e04edcf13ed5631ec11135656e0b87f56" origin="Generated by Gradle"/> <sha256 value="8924b41711cce058f83c46d79ad83d6e04edcf13ed5631ec11135656e0b87f56" origin="Generated by Gradle"/>
@@ -1244,6 +1378,11 @@
<sha256 value="89a1bc79e46c35ab108b7e215bb2c5c215ff8f3af1ae3cfef82d9a2b33b06c51" origin="Generated by Gradle"/> <sha256 value="89a1bc79e46c35ab108b7e215bb2c5c215ff8f3af1ae3cfef82d9a2b33b06c51" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.codehaus.plexus" name="plexus" version="25">
<artifact name="plexus-25.pom">
<sha256 value="faa7947c2020967ad0c92b259ee9fa361d05e90cd036d17c37098bb1edaea3a3" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.codehaus.plexus" name="plexus" version="8"> <component group="org.codehaus.plexus" name="plexus" version="8">
<artifact name="plexus-8.pom"> <artifact name="plexus-8.pom">
<sha256 value="ffa349db04e7abf65885bdc5a2062f4197c0ff9d3f1f4e2aa5720b77233f742c" origin="Generated by Gradle"/> <sha256 value="ffa349db04e7abf65885bdc5a2062f4197c0ff9d3f1f4e2aa5720b77233f742c" origin="Generated by Gradle"/>
@@ -1257,6 +1396,14 @@
<sha256 value="04842f331b0225b85a5e20439710d228ea7a6302abe6d53c9c9846fbc5bf99ff" origin="Generated by Gradle"/> <sha256 value="04842f331b0225b85a5e20439710d228ea7a6302abe6d53c9c9846fbc5bf99ff" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.codehaus.plexus" name="plexus-classworlds" version="2.11.0">
<artifact name="plexus-classworlds-2.11.0.jar">
<sha256 value="8971f135490070bc5fde7413fcc8db7c997fda4bebfb5c31185900d66edcbbb2" origin="Generated by Gradle"/>
</artifact>
<artifact name="plexus-classworlds-2.11.0.pom">
<sha256 value="281d317bf8a5fe818708cdd00e377dd234ec949f498d30f4b363f6b9771e1fa2" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.codehaus.plexus" name="plexus-classworlds" version="2.9.0"> <component group="org.codehaus.plexus" name="plexus-classworlds" version="2.9.0">
<artifact name="plexus-classworlds-2.9.0.jar"> <artifact name="plexus-classworlds-2.9.0.jar">
<sha256 value="1ad3292cd563381e3fd632f3fded1988f9e9b2be7a9f3db63ff4c4cedba13fa5" origin="Generated by Gradle"/> <sha256 value="1ad3292cd563381e3fd632f3fded1988f9e9b2be7a9f3db63ff4c4cedba13fa5" origin="Generated by Gradle"/>
@@ -1302,6 +1449,14 @@
<sha256 value="6138300481471c7fe6aeb115f912961f886e1a46ee9c2bd2841b65184824da28" origin="Generated by Gradle"/> <sha256 value="6138300481471c7fe6aeb115f912961f886e1a46ee9c2bd2841b65184824da28" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.codehaus.plexus" name="plexus-utils" version="3.6.1">
<artifact name="plexus-utils-3.6.1.jar">
<sha256 value="05a63effd67e2d6b9d610cc82e2bd7473289d34802e57a529b28110f28af5679" origin="Generated by Gradle"/>
</artifact>
<artifact name="plexus-utils-3.6.1.pom">
<sha256 value="c8397373781af640a76c5da88f1674293b4fc9a2391d0768ee3fc791883b040d" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.codehaus.woodstox" name="stax2-api" version="4.2.2"> <component group="org.codehaus.woodstox" name="stax2-api" version="4.2.2">
<artifact name="stax2-api-4.2.2.jar"> <artifact name="stax2-api-4.2.2.jar">
<sha256 value="a61c48d553efad78bc01fffc4ac528bebbae64cbaec170b2a5e39cf61eb51abe" origin="Generated by Gradle"/> <sha256 value="a61c48d553efad78bc01fffc4ac528bebbae64cbaec170b2a5e39cf61eb51abe" origin="Generated by Gradle"/>
@@ -1326,11 +1481,24 @@
<sha256 value="efe3734bc5b5e390b7ddd5cc7e86a5aca1a0377534e3420962f0931327c88d10" origin="Generated by Gradle"/> <sha256 value="efe3734bc5b5e390b7ddd5cc7e86a5aca1a0377534e3420962f0931327c88d10" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.cyclonedx" name="cyclonedx-gradle-plugin" version="3.3.0">
<artifact name="cyclonedx-gradle-plugin-3.3.0.jar">
<sha256 value="9bf283e7e451cedf536b263733cf4ddca2329b3cffe19a05ccb8cc1f90a098e8" origin="Generated by Gradle"/>
</artifact>
<artifact name="cyclonedx-gradle-plugin-3.3.0.module">
<sha256 value="92c20482c05782eec05b9c0db1b2ed615160147e52c179c3e080538103e26239" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.cyclonedx.bom" name="org.cyclonedx.bom.gradle.plugin" version="3.2.4"> <component group="org.cyclonedx.bom" name="org.cyclonedx.bom.gradle.plugin" version="3.2.4">
<artifact name="org.cyclonedx.bom.gradle.plugin-3.2.4.pom"> <artifact name="org.cyclonedx.bom.gradle.plugin-3.2.4.pom">
<sha256 value="9a8e381d2369288b6c3198b3062e8099229abddafd0a49beb631fd999ea07b9a" origin="Generated by Gradle"/> <sha256 value="9a8e381d2369288b6c3198b3062e8099229abddafd0a49beb631fd999ea07b9a" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.cyclonedx.bom" name="org.cyclonedx.bom.gradle.plugin" version="3.3.0">
<artifact name="org.cyclonedx.bom.gradle.plugin-3.3.0.pom">
<sha256 value="f59df2c670269e7f5e3d9b2b539b9f435db5e88a2d545ab4811f2217d2cc5c68" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.eclipse.ee4j" name="project" version="1.0.5"> <component group="org.eclipse.ee4j" name="project" version="1.0.5">
<artifact name="project-1.0.5.pom"> <artifact name="project-1.0.5.pom">
<sha256 value="916b4794d8d8220a59a3fdf6a64dbe794aeb23395e888b81ae36a9b5a2c591a6" origin="Generated by Gradle"/> <sha256 value="916b4794d8d8220a59a3fdf6a64dbe794aeb23395e888b81ae36a9b5a2c591a6" origin="Generated by Gradle"/>
@@ -1558,6 +1726,14 @@
<sha256 value="08a02856e487c9357f9b29e38745f8ae805848111e72d15aad0352338f1632e1" origin="Generated by Gradle"/> <sha256 value="08a02856e487c9357f9b29e38745f8ae805848111e72d15aad0352338f1632e1" origin="Generated by Gradle"/>
</artifact> </artifact>
</component> </component>
<component group="org.junit" name="junit-bom" version="5.14.4">
<artifact name="junit-bom-5.14.4.module">
<sha256 value="8a5e98d131de7d7aadb1ee88bfd86d66e62a7c2e2a4074a3b2498b03d236eb64" origin="Generated by Gradle"/>
</artifact>
<artifact name="junit-bom-5.14.4.pom">
<sha256 value="5706e8f29a0a07f56efbbea4a0670793414194bb8d24d8143ba1e787a2f32856" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.junit" name="junit-bom" version="5.9.3"> <component group="org.junit" name="junit-bom" version="5.9.3">
<artifact name="junit-bom-5.9.3.module"> <artifact name="junit-bom-5.9.3.module">
<sha256 value="b401fd25901e582a524aa5343c4b39e28bc56e24961c1069bf2b4bbfcee46b93" origin="Generated by Gradle"/> <sha256 value="b401fd25901e582a524aa5343c4b39e28bc56e24961c1069bf2b4bbfcee46b93" origin="Generated by Gradle"/>

View File

@@ -45,6 +45,7 @@ nav:
- Integration: - Integration:
- Overview: programmatic-usage.md - Overview: programmatic-usage.md
- Model Selection and Loading: model-selection-and-loading.md
- Loading and Building Stemmers: programmatic-loading-and-building.md - Loading and Building Stemmers: programmatic-loading-and-building.md
- Querying and Ambiguity Handling: programmatic-querying-and-ambiguity.md - Querying and Ambiguity Handling: programmatic-querying-and-ambiguity.md
- Extending and Persisting Compiled Tries: programmatic-extending-and-persistence.md - Extending and Persisting Compiled Tries: programmatic-extending-and-persistence.md
@@ -52,6 +53,8 @@ nav:
- CLI Compilation: cli-compilation.md - CLI Compilation: cli-compilation.md
- Dictionaries and Languages: - Dictionaries and Languages:
- Stemmer Models: stemmer-models.md
- Published Model Catalog: stemmer-model-catalog.md
- Built-in Languages: built-in-languages.md - Built-in Languages: built-in-languages.md
- Dictionary Format: dictionary-format.md - Dictionary Format: dictionary-format.md
- Contributing Dictionaries: contributing-dictionaries.md - Contributing Dictionaries: contributing-dictionaries.md
@@ -101,4 +104,5 @@ nav:
- Quality and Operations: quality-and-operations.md - Quality and Operations: quality-and-operations.md
- Stemming Quality: stemming-quality.md - Stemming Quality: stemming-quality.md
- Reports: reports.md - Reports: reports.md
- Historical Builds: builds.md
- Test taxonomy and execution filtering: test-taxonomy-and-filtering.md - Test taxonomy and execution filtering: test-taxonomy-and-filtering.md

101
models/bom/build.gradle Normal file
View File

@@ -0,0 +1,101 @@
import groovy.xml.XmlParser
plugins {
id 'java-platform'
id 'maven-publish'
id 'signing'
}
group = 'org.egothor'
version = providers.fileContents(rootProject.layout.projectDirectory.file('models/catalog-version.txt'))
.asText.map(String::trim).get()
Properties modelTopology = new Properties()
rootProject.file('models/model-projects.properties').withInputStream { InputStream input ->
modelTopology.load(input)
}
List<String> modelIds = modelTopology.stringPropertyNames().toList().sort()
dependencies {
constraints {
modelIds.each { String modelId ->
api project(":models:${modelId}")
}
}
}
publishing {
publications {
bom(MavenPublication) {
from components.javaPlatform
artifactId = 'radixor-models-bom'
pom {
name = 'Radixor Stemmer Models BOM'
description = 'Maven dependency-management BOM containing recommended versions for published Radixor models.'
packaging = 'pom'
url = 'https://github.com/leogalambos/Radixor'
licenses {
license {
name = 'BSD-3-Clause'
url = 'https://spdx.org/licenses/BSD-3-Clause.html'
distribution = 'repo'
}
}
developers {
developer {
id = 'egothor'
name = 'Leo Galambos'
email = 'egothor@gmail.com'
}
}
scm {
url = 'https://github.com/leogalambos/Radixor'
connection = 'scm:git:https://github.com/leogalambos/Radixor.git'
developerConnection = 'scm:git:ssh://git@github.com/leogalambos/Radixor.git'
}
}
}
}
repositories {
maven {
name = 'catalogStaging'
url = rootProject.layout.buildDirectory.dir('model-catalog-staging-repository').get().asFile.toURI()
}
}
}
String signingKey = providers.environmentVariable('SIGNING_KEY').orNull
String signingPassword = providers.environmentVariable('SIGNING_PASSWORD').orNull
signing {
required = { providers.environmentVariable('GITHUB_REF_TYPE').orNull == 'tag' }
if (signingKey != null && !signingKey.isBlank()) {
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.bom
}
}
tasks.register('verifyPomOnlyPlatform') {
group = 'verification'
description = 'Verifies the POM-only model dependency-management platform.'
dependsOn(tasks.named('generatePomFileForBomPublication'))
doLast {
File pomFile = layout.buildDirectory.file('publications/bom/pom-default.xml').get().asFile
Node pom = new XmlParser().parse(pomFile)
List<Node> constraints = pom.dependencyManagement.dependencies.dependency as List<Node>
List<String> artifactIds = constraints.collect { Node dependency -> dependency.artifactId.text() }
List<String> expected = modelIds.collect { String modelId -> "radixor-model-${modelId}" }
if (pom.packaging.text() != 'pom' || artifactIds != expected) {
throw new GradleException('radixor-models-bom must publish exactly the ordered model constraints as Maven packaging pom.')
}
if (!pom.dependencies.isEmpty()) {
throw new GradleException('radixor-models-bom must not introduce runtime model dependencies.')
}
if (!tasks.withType(Jar).isEmpty()) {
throw new GradleException('radixor-models-bom must not create binary, sources, or Javadoc JARs.')
}
}
}
tasks.named('check') {
dependsOn(tasks.named('verifyPomOnlyPlatform'))
}

View File

@@ -0,0 +1 @@
2026.1

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'cs-cz-default'
language = 'CS_CZ'
displayName = 'Czech default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/ces'
sourceDataset = 'UniMorph Czech morphological dataset (`ces`); repository also documents non-distributed MorfFlex-CZ data'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph; Witold Kieraś is credited for the separate MorfFlex-CZ conversion'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: cs-cz-default
Radixor language: CS_CZ
Source project: UniMorph
Official repository: https://github.com/unimorph/ces
Upstream dataset: UniMorph Czech morphological dataset (`ces`); repository also documents non-distributed MorfFlex-CZ data
Upstream lexical source: Wiktionary; the CC BY-NC-SA MorfFlex-CZ dataset is excluded
Attribution: UniMorph; Witold Kieraś is credited for the separate MorfFlex-CZ conversion
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'da-dk-default'
language = 'DA_DK'
displayName = 'Danish default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/dan'
sourceDataset = 'UniMorph Danish morphological dataset (`dan`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: da-dk-default
Radixor language: DA_DK
Source project: UniMorph
Official repository: https://github.com/unimorph/dan
Upstream dataset: UniMorph Danish morphological dataset (`dan`)
Upstream lexical source: Wikipedia
Attribution: UniMorph and Wikipedia contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'de-de-default'
language = 'DE_DE'
displayName = 'German default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/deu'
sourceDataset = 'UniMorph German morphological dataset (`deu`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and English Wiktionary contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: de-de-default
Radixor language: DE_DE
Source project: UniMorph
Official repository: https://github.com/unimorph/deu
Upstream dataset: UniMorph German morphological dataset (`deu`)
Upstream lexical source: English Wiktionary
Attribution: UniMorph and English Wiktionary contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'es-es-default'
language = 'ES_ES'
displayName = 'Spanish default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/spa'
sourceDataset = 'UniMorph Spanish morphological dataset (`spa`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and English Wiktionary contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: es-es-default
Radixor language: ES_ES
Source project: UniMorph
Official repository: https://github.com/unimorph/spa
Upstream dataset: UniMorph Spanish morphological dataset (`spa`)
Upstream lexical source: English Wiktionary
Attribution: UniMorph and English Wiktionary contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'fa-ir-default'
language = 'FA_IR'
displayName = 'Persian default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/fas'
sourceDataset = 'UniMorph Persian morphological dataset (`fas`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: fa-ir-default
Radixor language: FA_IR
Source project: UniMorph
Official repository: https://github.com/unimorph/fas
Upstream dataset: UniMorph Persian morphological dataset (`fas`)
Upstream lexical source: Wikipedia
Attribution: UniMorph and Wikipedia contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'fi-fi-default'
language = 'FI_FI'
displayName = 'Finnish default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/fin'
sourceDataset = 'UniMorph Finnish morphological dataset (`fin`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: fi-fi-default
Radixor language: FI_FI
Source project: UniMorph
Official repository: https://github.com/unimorph/fin
Upstream dataset: UniMorph Finnish morphological dataset (`fin`)
Upstream lexical source: Wikipedia
Attribution: UniMorph and Wikipedia contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'fr-fr-default'
language = 'FR_FR'
displayName = 'French default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/fra'
sourceDataset = 'UniMorph French morphological dataset (`fra`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: fr-fr-default
Radixor language: FR_FR
Source project: UniMorph
Official repository: https://github.com/unimorph/fra
Upstream dataset: UniMorph French morphological dataset (`fra`)
Upstream lexical source: Wikipedia
Attribution: UniMorph and Wikipedia contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'he-il-default'
language = 'HE_IL'
displayName = 'Hebrew default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/heb'
sourceDataset = 'UniMorph Hebrew morphological dataset (`heb`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph; Omer Goldman (annotator); Wiktionary contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: he-il-default
Radixor language: HE_IL
Source project: UniMorph
Official repository: https://github.com/unimorph/heb
Upstream dataset: UniMorph Hebrew morphological dataset (`heb`)
Upstream lexical source: Wiktionary
Attribution: UniMorph; Omer Goldman (annotator); Wiktionary contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'hu-hu-default'
language = 'HU_HU'
displayName = 'Hungarian default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/hun'
sourceDataset = 'UniMorph Hungarian morphological dataset (`hun`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph; Christo Kirov, Ryan Cotterell, and Khuyagbaatar Batsuren (conversion); Judit Ács and Gábor Bella (validation); English Wiktionary contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: hu-hu-default
Radixor language: HU_HU
Source project: UniMorph
Official repository: https://github.com/unimorph/hun
Upstream dataset: UniMorph Hungarian morphological dataset (`hun`)
Upstream lexical source: English Wiktionary
Attribution: UniMorph; Christo Kirov, Ryan Cotterell, and Khuyagbaatar Batsuren (conversion); Judit Ács and Gábor Bella (validation); English Wiktionary contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'it-it-default'
language = 'IT_IT'
displayName = 'Italian default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/ita'
sourceDataset = 'UniMorph Italian morphological dataset (`ita`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: it-it-default
Radixor language: IT_IT
Source project: UniMorph
Official repository: https://github.com/unimorph/ita
Upstream dataset: UniMorph Italian morphological dataset (`ita`)
Upstream lexical source: Wikipedia
Attribution: UniMorph and Wikipedia contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,22 @@
# Build-topology membership only. Per-model metadata remains authoritative.
cs-cz-default=default
da-dk-default=default
de-de-default=default
es-es-default=default
fa-ir-default=default
fi-fi-default=default
fr-fr-default=default
he-il-default=default
hu-hu-default=default
it-it-default=default
nb-no-default=default
nl-nl-default=default
nn-no-default=default
pl-pl-polimorf=optional
pl-pl-unimorph=default
pt-pt-default=default
ru-ru-default=default
sv-se-default=default
uk-ua-default=default
us-uk-default=default
yi-default=default

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'nb-no-default'
language = 'NB_NO'
displayName = 'Norwegian Bokmål default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/nob'
sourceDataset = 'UniMorph Norwegian Bokmål morphological dataset (`nob`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: nb-no-default
Radixor language: NB_NO
Source project: UniMorph
Official repository: https://github.com/unimorph/nob
Upstream dataset: UniMorph Norwegian Bokmål morphological dataset (`nob`)
Upstream lexical source: Wikipedia
Attribution: UniMorph and Wikipedia contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'nl-nl-default'
language = 'NL_NL'
displayName = 'Dutch default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/nld'
sourceDataset = 'UniMorph Dutch morphological dataset (`nld`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

View File

@@ -0,0 +1,38 @@
Radixor model-data notice
Radixor-derived model data
Copyright (C) 2026, Leo Galambos.
Copyright and, where applicable, database rights are claimed in the
Radixor-specific selection, verification, cleaning, normalization,
grouping, deduplication, filtering, reformatting, metadata preparation,
and packaging of this model, to the extent protected by applicable law.
The underlying morphological data remains attributed to UniMorph and
the upstream contributors identified in this notice.
This derived model data, including Radixor's protectable contributions,
is distributed under Creative Commons Attribution-ShareAlike 3.0
Unported.
Model ID: nl-nl-default
Radixor language: NL_NL
Source project: UniMorph
Official repository: https://github.com/unimorph/nld
Upstream dataset: UniMorph Dutch morphological dataset (`nld`)
Upstream lexical source: Wikipedia
Attribution: UniMorph and Wikipedia contributors
License:
Creative Commons Attribution-ShareAlike 3.0 Unported
Canonical license URI: https://creativecommons.org/licenses/by-sa/3.0/
Source revision: not-recorded-in-legacy-import
Revision status: not-recorded-in-legacy-import
The exact UniMorph commit used for the original Radixor import was not recorded. The model remains attributed to the official UniMorph language repository and is distributed under the repository's stated data license.
Radixor modifications: Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata.
The derived model data is distributed under CC BY-SA 3.0. UniMorph supplies morphological data; Radixor constructs its own patch-command trie at runtime. Neither UniMorph nor any upstream contributor endorses Radixor.
Upstream information verified: 2026-07-22

View File

@@ -0,0 +1,23 @@
plugins {
id 'org.egothor.radixor.model'
}
radixorModel {
modelId = 'nn-no-default'
language = 'NN_NO'
displayName = 'Norwegian Nynorsk default model'
defaultModel = true
sourceName = 'UniMorph'
sourceVersion = 'not-recorded-in-legacy-import'
sourceRevision = 'not-recorded-in-legacy-import'
sourceProject = 'UniMorph'
sourceRepository = 'https://github.com/unimorph/nno'
sourceDataset = 'UniMorph Norwegian Nynorsk morphological dataset (`nno`)'
sourceRevisionStatus = 'not-recorded-in-legacy-import'
sourceLicense = 'CC-BY-SA-3.0'
sourceLicenseUri = 'https://creativecommons.org/licenses/by-sa/3.0/'
sourceAttribution = 'UniMorph and Wikipedia contributors'
sourceVerificationDate = '2026-07-22'
transformationsSummary = 'Cleaning, normalization, grouping inflected forms by lemma, deduplication, filtering invalid rows, reformatting into Radixor dictionary groups, GZip packaging, and generation of runtime descriptor and checksum metadata'
noticeFileName = 'NOTICE-model-data.txt'
}

View File

@@ -0,0 +1 @@
1.0.0

Some files were not shown because too many files have changed in this diff Show More