Download the PHP package iserter/php-ai-text-sanitizer without Composer

On this page you can find all versions of the php package iserter/php-ai-text-sanitizer. 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 php-ai-text-sanitizer

php-ai-text-sanitizer

A small, dependency-free PHP library that detects and removes invisible watermarks — and other tell-tale characters — that AI providers leave in generated text.

Large language models routinely emit characters that render as nothing but survive copy/paste: zero-width spaces and joiners, Unicode tag characters (U+E0000–E007F) and variation selectors used for steganographic watermarking, bidirectional controls, and unusual spaces such as the narrow no-break space (U+202F). This library strips them, and can optionally normalize the visible typography (smart quotes, dashes, ellipses) that also signals machine authorship.

Install

Usage

One-liner

Configured instance

Clean with a report of what changed

Detect only (don't modify)

Options

Option Default Effect
remove_zero_width true Remove ZWSP, ZWNJ, ZWJ, word joiner, BOM (U+200B–200D, U+2060, U+FEFF).
remove_bidi true Remove bidirectional marks/controls (U+200E/200F, U+202A–202E, U+2066–2069, U+061C).
remove_invisible_math true Remove invisible math operators (U+2061–2064).
remove_variation_selectors true Remove variation selectors (U+FE00–FE0F, U+E0100–E01EF).
remove_tag_chars true Remove the Unicode Tags block (U+E0000–E007F).
remove_format_chars true Remove soft hyphen, CGJ, Hangul fillers, interlinear annotations, etc.
remove_braille_blank true Remove U+2800 BRAILLE PATTERN BLANK.
strip_control true Remove stray C0/C1 control characters (keeps TAB, LF, CR).
keep_emoji true Preserve ZWJ and variation selectors when they are part of a valid emoji sequence.
remove_citations false Remove AI-generated citations like (oaicite:5){index=5} or 【13†source】.
normalize_homoglyphs false Apply NFKC normalization to neutralize visually identical homoglyphs (requires ext-intl).
normalize_spaces true Fold unusual spaces (NBSP, thin space, ideographic space, …) to U+0020.
normalize_line_separators true U+2028 → \n, U+2029 → \n\n.
normalize_smart_quotes false Curly/angle quotes → straight ' and ".
normalize_dashes false Dashes and minus (U+2010–2015, U+2212) → -.
normalize_ellipsis false U+2026 → ....
collapse_whitespace false Collapse runs of horizontal whitespace, trim line-end spaces, cap blank lines.
trim false Trim leading/trailing whitespace of the whole string.

Docker

Demo


All versions of php-ai-text-sanitizer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-mbstring Version *
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 iserter/php-ai-text-sanitizer contains the following files

Loading the files please wait ...