jeffreyvanrossum / contextr-for-laravel
contextr for laravel
Fund package maintenance!
ContextrForLaravel
Requires
- php: ^8.4
- illuminate/contracts: ^10.0||^11.0||^12.0
- jeffreyvanrossum/contextr: ^0.1.0
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.1.1||^7.10.0
- orchestra/testbench: ^10.0.0||^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- spatie/laravel-ray: ^1.35
This package is auto-updated.
Last update: 2025-03-16 22:10:59 UTC
README
contextr
AI-driven text analysis for spam, sentiment, moderation, and more.
Installation
You can install the package via composer:
composer require jeffreyvanrossum/contextr-for-laravel
You can publish the config file with:
php artisan vendor:publish --tag="contextr-config"
Usage
Contextr::spam() ->text('Buy cheap viagra now!!! Click here: shady.link') ->context([ 'topic' => 'Health Forum Discussion', 'user_history' => 'First time poster' ]) ->withReasoning() ->analyze(); $check->data(); // full result array $check->spam(); // true (boolean) $check->confidence(); // 0.95 (float) $check->reasoning(); // "Contains promotional content and suspicious link"
For more examples, see:
https://github.com/jeffreyvr/contextr?tab=readme-ov-file#examples
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.