Download the PHP package kirschbaum-development/redactor-onnx without Composer

On this page you can find all versions of the php package kirschbaum-development/redactor-onnx. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package redactor-onnx

Kirschbaum Redactor ONNX

Laravel Supported Versions Latest Version on Packagist Application Testing Static Analysis Code Style

Redactor ONNX gives Kirschbaum Redactor an in-process named entity recogniser. It runs a token classification model through TransformersPHP inside the PHP worker, so the redactor can find names, places and organisations in prose with no sidecar to deploy and no network call to wait for.

The recogniser registers as the onnx driver. Everything else stays the redactor's: the gates that keep JSON and stack traces away from the model, the offset check, the circuit breaker, batching, operators and profiles.

Quick Start

Install the package, then download and load the model once so no job pays for it:

Select the driver in any profile's recognition block in config/redactor.php:

Then redact as usual:

How It Works

The model labels tokens, and the runtime reports no character offsets, so the recogniser finds each decoded token in the original text and folds the model's BIO labels into spans with exact offsets. Long texts are cut at whitespace into windows the model can hold in full, and every prose value the redactor gathers from a payload goes through the model in one batched call. Model labels such as PER are mapped to the names the redactor's profiles already use, such as PERSON.

The model loads on the first call and stays in memory, so the driver belongs in queue workers, Octane, exports and redactor:scan, where a process lives long enough to amortise the load.

Documentation

The full documentation lives in docs/:

Page What it covers
Getting Started Requirements, installation, selecting the driver, warming the model, and where to run it.
Configuration Every key in config/redactor-onnx.php with its type, default and environment variable.
How It Works Alignment of tokens to characters, windows, batching, labels and failures.
Models Choosing a model, tokenizer marks, memory and speed.
Testing Faking the classifier in your suite, the opt-in real-model test, the package's own conventions.

Requirements

Testing

See Testing for the opt-in test that downloads and runs the real model.

Changelog

See CHANGELOG.md.

License

MIT License. See LICENSE.md for details.


All versions of redactor-onnx with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3|^8.4|^8.5
ext-ffi Version *
illuminate/support Version ^12.0|^13.0
kirschbaum-development/redactor Version ^1.0
codewithkyrian/transformers Version ^0.6
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kirschbaum-development/redactor-onnx contains the following files

Loading the files please wait ...