sqlite-tokenizer-ar 0.1.15__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- sqlite_tokenizer_ar/__init__.py +19 -0
- sqlite_tokenizer_ar/sqlite_tokenizer_ar.dll +0 -0
- sqlite_tokenizer_ar-0.1.15.dist-info/METADATA +254 -0
- sqlite_tokenizer_ar-0.1.15.dist-info/RECORD +7 -0
- sqlite_tokenizer_ar-0.1.15.dist-info/WHEEL +4 -0
- sqlite_tokenizer_ar-0.1.15.dist-info/licenses/LICENSE +79 -0
- sqlite_tokenizer_ar-0.1.15.dist-info/licenses/THIRD_PARTY_NOTICES.md +29 -0
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"""Load the bundled Arabic FTS5 tokenizer into a SQLite connection."""
|
|
2
|
+
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
import sys
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def loadable_path():
|
|
8
|
+
"""Return the bundled library's full path for SQLite or other clients."""
|
|
9
|
+
suffix = '.dll' if sys.platform == 'win32' else '.so'
|
|
10
|
+
return str(Path(__file__).with_name(f'sqlite_tokenizer_ar{suffix}'))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def load(connection):
|
|
14
|
+
"""Load into this connection, then disable extension loading, even on failure."""
|
|
15
|
+
connection.enable_load_extension(True)
|
|
16
|
+
try:
|
|
17
|
+
connection.load_extension(loadable_path())
|
|
18
|
+
finally:
|
|
19
|
+
connection.enable_load_extension(False)
|
|
Binary file
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: sqlite-tokenizer-ar
|
|
3
|
+
Version: 0.1.15
|
|
4
|
+
Summary: Arabic FTS5 tokenizer and search helpers for SQLite
|
|
5
|
+
Project-URL: Homepage, https://github.com/yshalsager/sqlite-tokenizer-ar
|
|
6
|
+
Project-URL: Issues, https://github.com/yshalsager/sqlite-tokenizer-ar/issues
|
|
7
|
+
License-Expression: Apache-2.0
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
License-File: THIRD_PARTY_NOTICES.md
|
|
10
|
+
Requires-Python: >=3.10
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# sqlite-tokenizer-ar
|
|
14
|
+
|
|
15
|
+
Arabic search for SQLite FTS5, shipped as a native tokenizer extension, official SQLite WASM bundle, and optional Lucene-style query helpers.
|
|
16
|
+
|
|
17
|
+
The core extension exposes an FTS5 tokenizer named `sqlite_tokenizer_ar`. It is designed to match the [Apache Lucene](https://lucene.apache.org/) Arabic analysis pipeline for tokenization, Arabic normalization, stopwords, digit folding, and light stemming, while running inside SQLite.
|
|
18
|
+
|
|
19
|
+
Reference assets are pinned to Lucene `9.9.0` for reproducibility. The ArabicAnalyzer pipeline was source-diffed against Lucene `10.4.0` on 2026-06-07 with no behavior changes found.
|
|
20
|
+
|
|
21
|
+
> [!CAUTION]
|
|
22
|
+
> **Disclaimer:** This project was developed with heavy use of AI assistance. Treat it as an experiment rather than a stable product.
|
|
23
|
+
|
|
24
|
+
## Repository Layout
|
|
25
|
+
|
|
26
|
+
- `tokenizer/`: loadable SQLite extension written in C.
|
|
27
|
+
- `query_compat/`: optional Python CLI/reference layer for Lucene-style query behavior; runtime analysis, parsing, planning, ranking, and highlighting primitives live in C UDFs.
|
|
28
|
+
- `playground/`: browser demo source using official SQLite WASM built with the tokenizer extension.
|
|
29
|
+
- `tests/fixtures/`: small public fixtures for smoke tests. Large/private corpus fixtures are intentionally excluded.
|
|
30
|
+
- `ingester/sql/001_canonical_schema.sql`: minimal schema fixture used by query compatibility tests.
|
|
31
|
+
|
|
32
|
+
## Install
|
|
33
|
+
|
|
34
|
+
Release archives provide the loadable extension for Linux x64/arm64, macOS arm64, and Windows x64:
|
|
35
|
+
|
|
36
|
+
| Platform | Release archive | Installed library |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| Linux x64 | `sqlite-tokenizer-ar-linux-x64.tar.gz` | `sqlite_tokenizer_ar.so` |
|
|
39
|
+
| Linux arm64 | `sqlite-tokenizer-ar-linux-arm64.tar.gz` | `sqlite_tokenizer_ar.so` |
|
|
40
|
+
| macOS arm64 | `sqlite-tokenizer-ar-macos-arm64.tar.gz` | `sqlite_tokenizer_ar.so` |
|
|
41
|
+
| Windows x64 | `sqlite-tokenizer-ar-windows-x64.tar.gz` | `sqlite_tokenizer_ar.dll` |
|
|
42
|
+
|
|
43
|
+
Install the correct archive automatically with [Mise](https://mise.jdx.dev/):
|
|
44
|
+
|
|
45
|
+
```toml
|
|
46
|
+
[tools."github:yshalsager/sqlite-tokenizer-ar"]
|
|
47
|
+
version = "0.1.15"
|
|
48
|
+
asset_pattern = 'sqlite-tokenizer-ar-{{ os() }}-{{ arch() }}.tar.gz'
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
mise install
|
|
53
|
+
export SQLITE_TOKENIZER_AR_EXTENSION="$(mise where github:yshalsager/sqlite-tokenizer-ar)/sqlite_tokenizer_ar.so"
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
On Windows PowerShell:
|
|
57
|
+
|
|
58
|
+
```powershell
|
|
59
|
+
mise install
|
|
60
|
+
$env:SQLITE_TOKENIZER_AR_EXTENSION = "$(mise where github:yshalsager/sqlite-tokenizer-ar)\sqlite_tokenizer_ar.dll"
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
SQLite must have FTS5 and loadable-extension support enabled.
|
|
64
|
+
|
|
65
|
+
### Python
|
|
66
|
+
|
|
67
|
+
Install from PyPI with Python 3.10+:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
pip install sqlite-tokenizer-ar
|
|
71
|
+
# Or with uv:
|
|
72
|
+
uv add sqlite-tokenizer-ar
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Prebuilt wheels support Linux x64/arm64 (glibc 2.28+), macOS arm64 (11+) and Intel (10.13+), and Windows x64.
|
|
76
|
+
|
|
77
|
+
```python
|
|
78
|
+
import sqlite3
|
|
79
|
+
import sqlite_tokenizer_ar
|
|
80
|
+
|
|
81
|
+
db = sqlite3.connect(':memory:')
|
|
82
|
+
sqlite_tokenizer_ar.load(db)
|
|
83
|
+
db.execute("CREATE VIRTUAL TABLE docs USING fts5(body, tokenize='sqlite_tokenizer_ar')")
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`load(db)` enables extension loading temporarily and disables it afterward, including on failure. Call it for each connection. `loadable_path()` returns the bundled library's full path for other SQLite clients. Python's SQLite must support FTS5 and extension loading; the wheel does not replace SQLite.
|
|
87
|
+
|
|
88
|
+
#### Building and Publishing Wheels
|
|
89
|
+
|
|
90
|
+
To build a wheel locally after compiling the native extension:
|
|
91
|
+
|
|
92
|
+
```bash
|
|
93
|
+
# macOS arm64; on Linux use a matching manylinux build container instead.
|
|
94
|
+
MACOSX_DEPLOYMENT_TARGET=11.0 mise run tokenizer:build
|
|
95
|
+
SQLITE_TOKENIZER_AR_BINARY=tokenizer/build/sqlite_tokenizer_ar.so \
|
|
96
|
+
WHEEL_PLATFORM=macosx_11_0_arm64 mise x uv -- uv build --wheel
|
|
97
|
+
mise x uv -- uv run --isolated --no-project --with dist/*.whl \
|
|
98
|
+
python -I tests/test_python_wheel.py
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
The platform tag must match the compiled binary: Linux wheels are built inside `manylinux_2_28` containers, and macOS builds set `MACOSX_DEPLOYMENT_TARGET` to `11.0` for arm64 or `10.13` for Intel. Packaging rejects macOS binaries that require a newer OS than their wheel tag claims. Only wheel distribution is supported; no source distribution is published.
|
|
102
|
+
|
|
103
|
+
Desktop and wheel builds use [pinned SQLite headers](vendor/sqlite/README.md); no SQLite runtime is bundled.
|
|
104
|
+
|
|
105
|
+
Packaging follows [sqlite-dateutil](https://github.com/simonw/sqlite-dateutil): a native SQLite library plus a small connection loader, tagged `py3-none-<platform>` rather than tied to a CPython ABI. Hatchling handles wheel metadata and file hashes; uv builds, tests, and publishes.
|
|
106
|
+
|
|
107
|
+
Tag pushes automatically build, test, and publish all five wheels to PyPI; pull requests and manual runs only build and test. Before pushing a release tag, configure a PyPI trusted publisher for repository `yshalsager/sqlite-tokenizer-ar`, workflow `python-wheels.yml`, environment `pypi`. The `v<version>` tag, `pyproject.toml`, and `package.json` versions must match. Publishing checks PyPI for matching existing files so reruns can skip them.
|
|
108
|
+
|
|
109
|
+
## Build From Source
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
mise run build
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This produces:
|
|
116
|
+
|
|
117
|
+
```text
|
|
118
|
+
tokenizer/build/sqlite_tokenizer_ar.so
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
Load it in SQLite:
|
|
122
|
+
|
|
123
|
+
```sql
|
|
124
|
+
.load ./tokenizer/build/sqlite_tokenizer_ar
|
|
125
|
+
CREATE VIRTUAL TABLE docs USING fts5(body, tokenize='sqlite_tokenizer_ar');
|
|
126
|
+
INSERT INTO docs(body) VALUES('قُرْآن كريم'),('هذه كتابها مفيد');
|
|
127
|
+
SELECT rowid, body FROM docs WHERE docs MATCH 'قران';
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Tokenizer Features
|
|
131
|
+
|
|
132
|
+
- Standard-style UTF-8 token segmentation for Arabic, Latin, and digits.
|
|
133
|
+
- ASCII lowercase for mixed Arabic/Latin text.
|
|
134
|
+
- Arabic and Persian digit folding to ASCII digits.
|
|
135
|
+
- Lucene Arabic stopword filtering.
|
|
136
|
+
- Arabic normalization: diacritics and tatweel stripping, alef/hamza normalization, dotless yeh to yeh, and teh marbuta to heh.
|
|
137
|
+
- Lucene-style Arabic light stemming.
|
|
138
|
+
- Tokenizer options for custom stopwords, stopword disabling, and stem exclusions.
|
|
139
|
+
- Optional Unicode Arabic honorific expansion, including `ﷺ`, `ﷻ`, `﵀`, and related ligatures.
|
|
140
|
+
- Analyzer-aware source spans and highlighting, including full stemmed words and one-glyph honorific sources.
|
|
141
|
+
- Helper UDFs for analysis, normalization, strict-form checks, wildcard/fuzzy matching, query planning, ranking, and snippets.
|
|
142
|
+
|
|
143
|
+
See the [tokenizer reference](tokenizer/README.md) for tokenizer arguments, UDF signatures, static registration, and integration examples.
|
|
144
|
+
|
|
145
|
+
## Query Compatibility Layer
|
|
146
|
+
|
|
147
|
+
SQLite FTS5 provides indexing, `MATCH`, native prefix queries, BM25, `highlight()`, and `snippet()`. The compatibility layer adds behavior FTS5 does not provide by itself:
|
|
148
|
+
|
|
149
|
+
- Boolean query parsing.
|
|
150
|
+
- Prefix, suffix, wildcard, and fuzzy expansion.
|
|
151
|
+
- Strict versus relaxed Arabic-form matching.
|
|
152
|
+
- Field routing for page/title style schemas.
|
|
153
|
+
- Lucene-style scoring helpers and deterministic result ordering.
|
|
154
|
+
- Snippet/highlight helper paths.
|
|
155
|
+
|
|
156
|
+
The schema-independent `sqlite_tokenizer_ar_plan_query_json()` C UDF returns `MATCH` templates plus unresolved corpus-dependent expansion descriptors. `sqlite_tokenizer_ar_execute_query_json()` is only for the repository's canonical query-compat schema. Keep application filtering, pagination, and custom result SQL outside it.
|
|
157
|
+
|
|
158
|
+
Use the compatibility layer when you need Lucene-style query syntax. Use the tokenizer directly when Arabic analysis plus native SQLite FTS behavior is enough. See the [query compatibility reference](query_compat/README.md).
|
|
159
|
+
|
|
160
|
+
## Test
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
mise run test
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
The public test lane uses small synthetic fixtures. Full corpus parity runs are kept outside this repository because they depend on large third-party/private datasets.
|
|
167
|
+
|
|
168
|
+
## WASM Playground
|
|
169
|
+
|
|
170
|
+
[Public demo](https://yshalsager.github.io/sqlite-tokenizer-ar/playground/)
|
|
171
|
+
|
|
172
|
+
The playground uses official SQLite WASM built with this extension as an extra init module:
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
SQLITE_SRC_DIR=/path/to/sqlite-source-tree mise run playground:build-wasm
|
|
176
|
+
mise x -- python -m http.server 8080
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
Open `http://localhost:8080/playground/`.
|
|
180
|
+
|
|
181
|
+
GitHub Pages publishes the playground from `main` using the latest release WASM assets plus the public fixture JSONL files.
|
|
182
|
+
|
|
183
|
+
## WASM npm Package
|
|
184
|
+
|
|
185
|
+
Release builds also pack the generated WASM bundle as:
|
|
186
|
+
|
|
187
|
+
```text
|
|
188
|
+
@yshalsager/sqlite-tokenizer-ar-wasm
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
The SQLite release is pinned in `mise.toml` as `SQLITE_TOKENIZER_AR_SQLITE_REF`. On Renovate's SQLite PRs, `sqlite-headers.yml` refreshes both vendored headers and their hashes, commits the result to the same branch, and explicitly dispatches public tests, five wheel builds, runtime compatibility, and WASM checks for that commit. Version checks block merging stale headers. Renovate automerges minor/patch updates after CI passes; no extra App or secret is needed.
|
|
192
|
+
|
|
193
|
+
The compatibility matrix tests historical SQLite runtimes plus the current ref using the same extension binary. For manual SQLite bumps, run `mise run sqlite:update`, then `mise run test`, and commit the generated `vendor/sqlite/` changes.
|
|
194
|
+
|
|
195
|
+
It exports stable asset URLs:
|
|
196
|
+
|
|
197
|
+
```js
|
|
198
|
+
import {sqliteWasmUrls} from '@yshalsager/sqlite-tokenizer-ar-wasm'
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
For Node/Vitest:
|
|
202
|
+
|
|
203
|
+
```js
|
|
204
|
+
import sqlite3InitModule from '@yshalsager/sqlite-tokenizer-ar-wasm/node'
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Install the public package tarball directly from the release without npm authentication:
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
npm install https://github.com/yshalsager/sqlite-tokenizer-ar/releases/download/v0.1.15/yshalsager-sqlite-tokenizer-ar-wasm-0.1.15.tgz
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
For apps that need fixed public paths, copy package `dist/*` to `public/sqlite-wasm/`.
|
|
214
|
+
|
|
215
|
+
## Android Native Artifacts
|
|
216
|
+
|
|
217
|
+
Release builds also attach `sqlite-tokenizer-ar-android.zip`, built with Android NDK `29.0.14206865` for:
|
|
218
|
+
|
|
219
|
+
- `arm64-v8a/libsqlite_tokenizer_ar.so`
|
|
220
|
+
- `armeabi-v7a/libsqlite_tokenizer_ar.so`
|
|
221
|
+
- `x86_64/libsqlite_tokenizer_ar.so`
|
|
222
|
+
|
|
223
|
+
The Android API level and ABI list are pinned in `mise.toml` as `SQLITE_TOKENIZER_AR_ANDROID_API` and `SQLITE_TOKENIZER_AR_ANDROID_ABIS`.
|
|
224
|
+
|
|
225
|
+
These are loadable SQLite extensions. The Android app still needs a SQLite runtime with FTS5 and extension loading enabled, or a custom SQLite build that registers the tokenizer directly.
|
|
226
|
+
|
|
227
|
+
## iOS Native Artifact
|
|
228
|
+
|
|
229
|
+
Release builds attach a static XCFramework:
|
|
230
|
+
|
|
231
|
+
```text
|
|
232
|
+
sqlite-tokenizer-ar-ios.xcframework.zip
|
|
233
|
+
└── SQLiteTokenizerAr.xcframework
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
It includes `ios-arm64` and `ios-arm64_x86_64-simulator` slices. Link it with Apple system `libsqlite3`, then register the tokenizer once per SQLite connection before creating/querying FTS tables:
|
|
237
|
+
|
|
238
|
+
```c
|
|
239
|
+
sqlite_tokenizer_ar_register(db);
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
Minimal local podspec shape:
|
|
243
|
+
|
|
244
|
+
```ruby
|
|
245
|
+
s.vendored_frameworks = 'SQLiteTokenizerAr.xcframework'
|
|
246
|
+
s.libraries = 'sqlite3'
|
|
247
|
+
s.ios.deployment_target = '15.0'
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
## Current Scope
|
|
251
|
+
|
|
252
|
+
The tokenizer is the stable core product. The query compatibility layer is useful but broader: it includes planner, scorer, parser, and snippet helpers that are intentionally outside tokenizer responsibilities.
|
|
253
|
+
|
|
254
|
+
See [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for attribution and licensing notes.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
sqlite_tokenizer_ar/__init__.py,sha256=DQJeA8Bq8ND1wJFZ-OcGKxbr_LJFUBAmDC5ebikGrDI,633
|
|
2
|
+
sqlite_tokenizer_ar/sqlite_tokenizer_ar.dll,sha256=5B1PFi4rSdWRenMpSa4zs73MMFtjzKbtdkHsrFYvEf0,293458
|
|
3
|
+
sqlite_tokenizer_ar-0.1.15.dist-info/METADATA,sha256=1zDUwJpKWOsjBkR0Hgo_5oNKocxSR3wEnuzZL1fHYpA,11286
|
|
4
|
+
sqlite_tokenizer_ar-0.1.15.dist-info/WHEEL,sha256=lpoBGaIUIidvvdZ4qRAP61bBKYJdt4FI3WXFL50Gzyo,94
|
|
5
|
+
sqlite_tokenizer_ar-0.1.15.dist-info/licenses/LICENSE,sha256=_4VOJqzWXFOY8G7T560CvrpO0WthxMjZGH-ZmTxF6po,9039
|
|
6
|
+
sqlite_tokenizer_ar-0.1.15.dist-info/licenses/THIRD_PARTY_NOTICES.md,sha256=582GjIzqDI7YgO8psonpyKYbJ4BmqWA6pXKUs9fORiM,1738
|
|
7
|
+
sqlite_tokenizer_ar-0.1.15.dist-info/RECORD,,
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
|
|
10
|
+
|
|
11
|
+
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
|
|
12
|
+
|
|
13
|
+
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
|
|
14
|
+
|
|
15
|
+
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
|
|
16
|
+
|
|
17
|
+
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
|
|
18
|
+
|
|
19
|
+
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
|
|
20
|
+
|
|
21
|
+
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work.
|
|
22
|
+
|
|
23
|
+
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on or derived from the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link or bind by name to the interfaces of, the Work and Derivative Works thereof.
|
|
24
|
+
|
|
25
|
+
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
|
|
26
|
+
|
|
27
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
|
|
28
|
+
|
|
29
|
+
2. Grant of Copyright License.
|
|
30
|
+
|
|
31
|
+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
|
|
32
|
+
|
|
33
|
+
3. Grant of Patent License.
|
|
34
|
+
|
|
35
|
+
Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution alone or by combination of their Contribution with the Work to which such Contribution was submitted.
|
|
36
|
+
|
|
37
|
+
If You institute patent litigation against any entity alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
|
|
38
|
+
|
|
39
|
+
4. Redistribution.
|
|
40
|
+
|
|
41
|
+
You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
|
|
42
|
+
|
|
43
|
+
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
|
|
44
|
+
|
|
45
|
+
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
|
|
46
|
+
|
|
47
|
+
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
|
|
48
|
+
|
|
49
|
+
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or within a display generated by the Derivative Works, if and wherever such third-party notices normally appear.
|
|
50
|
+
|
|
51
|
+
The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
|
|
52
|
+
|
|
53
|
+
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
|
|
54
|
+
|
|
55
|
+
5. Submission of Contributions.
|
|
56
|
+
|
|
57
|
+
Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions.
|
|
58
|
+
|
|
59
|
+
Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
|
|
60
|
+
|
|
61
|
+
6. Trademarks.
|
|
62
|
+
|
|
63
|
+
This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
|
|
64
|
+
|
|
65
|
+
7. Disclaimer of Warranty.
|
|
66
|
+
|
|
67
|
+
Unless required by applicable law or agreed to in writing, Licensor provides the Work and each Contributor provides its Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
|
|
68
|
+
|
|
69
|
+
You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
|
|
70
|
+
|
|
71
|
+
8. Limitation of Liability.
|
|
72
|
+
|
|
73
|
+
In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law, such as deliberate and grossly negligent acts, or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work, including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses, even if such Contributor has been advised of the possibility of such damages.
|
|
74
|
+
|
|
75
|
+
9. Accepting Warranty or Additional Liability.
|
|
76
|
+
|
|
77
|
+
While redistributing the Work or Derivative Works thereof, You may choose to offer and charge a fee for acceptance of support, warranty, indemnity, or other liability obligations. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
|
|
78
|
+
|
|
79
|
+
END OF TERMS AND CONDITIONS
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Third-Party Notices
|
|
2
|
+
|
|
3
|
+
This project ports behavior from Lucene's Arabic analysis pipeline and includes small reference assets used for verification.
|
|
4
|
+
|
|
5
|
+
## Apache Lucene
|
|
6
|
+
|
|
7
|
+
- Project: Apache Lucene
|
|
8
|
+
- Reference asset version: 9.9.0
|
|
9
|
+
- Latest checked compatible version: 10.4.0
|
|
10
|
+
- License: Apache License 2.0
|
|
11
|
+
- Source: https://lucene.apache.org/
|
|
12
|
+
|
|
13
|
+
Files under `tokenizer/assets/lucene_9_9_0/` are reference copies used to verify the ported behavior and preserve source provenance. The C tokenizer code is a port that targets behavioral compatibility with Lucene Arabic analysis.
|
|
14
|
+
|
|
15
|
+
On 2026-06-07, Lucene `9.9.0` and `10.4.0` were source-diffed for the ArabicAnalyzer pipeline. No behavior changes were found in `ArabicAnalyzer`, Arabic normalization/stem filters, stopwords, `StandardTokenizer`, lowercase, decimal digit folding, or stop filtering. `ArabicNormalizer` and `ArabicStemmer` only changed Java visibility modifiers.
|
|
16
|
+
|
|
17
|
+
## Arabic Stopwords
|
|
18
|
+
|
|
19
|
+
The Arabic stopword list distributed by Lucene is credited in the source file as created by Jacques Savoy and distributed under a BSD license. The generated C header `tokenizer/src/arabic_stopwords_99.h` is derived from that list.
|
|
20
|
+
|
|
21
|
+
## SQLite
|
|
22
|
+
|
|
23
|
+
The unmodified SQLite headers in `vendor/sqlite/` are used for desktop extension and Python wheel builds. Their source archive and hashes are recorded in [`vendor/sqlite/README.md`](vendor/sqlite/README.md). The Python wheels include the extension, not a SQLite runtime.
|
|
24
|
+
|
|
25
|
+
The playground build scripts target the official SQLite WASM source tree. Generated SQLite WASM artifacts are not committed by default.
|
|
26
|
+
|
|
27
|
+
- Project: SQLite
|
|
28
|
+
- Source: https://sqlite.org/
|
|
29
|
+
- License: public domain / blessing, as documented by SQLite upstream.
|