andronewille / sluis-onnx
A local ONNX model as a Sluis recogniser: the names, streets and towns that no pattern and no list can find.
Requires
- php: ^8.3
- ext-ffi: *
- andronewille/sluis: ^0.1@dev
- codewithkyrian/transformers: ^0.6
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-23 07:06:24 UTC
README
A local ONNX model as one more Sluis recogniser: the names, towns and organisations in prose that no pattern and no list can find. Still offline — the weights are read from disk, and a run that finds none stops rather than fetching them.
It needs PHP's FFI extension and 178 MB of weights, which is why it is not part of the core.
composer require andronewille/sluis-onnx
vendor/bin/transformers download Xenova/bert-base-multilingual-cased-ner-hrl \
token-classification --cache-dir=/models
Composer asks whether codewithkyrian/platform-package-installer may run: it picks the ONNX Runtime
build for this machine, and the model does not load without it.
use Sluis\Onnx\{Onnx, Profile, Transformers}; use Sluis\Sluis; $profile = Profile::ner(); $sluis = Sluis::nederlands()->plus(new Onnx(new Transformers($profile, '/models'), $profile));
This repository is a read-only mirror, split out of Andronewille/sluis. The issues and the tests are there, and so is what the model was measured to find and to miss.
Licensed under the EUPL-1.2.