承接 garryrodriguez/php-ai-classifier 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

garryrodriguez/php-ai-classifier

最新稳定版本:v0.1.0

Composer 安装命令:

composer require garryrodriguez/php-ai-classifier

包简介

Native PHP text classification library

README 文档

README

A lightweight, native PHP text classification library. Categorize support tickets, blog posts, or user feedback instantly without needing expensive external APIs like OpenAI or Python microservices.

Features

  • 100% Native PHP: No dependencies, no Python, no C++ extensions.
  • Fast & Private: All data stays on your server. Zero latency.
  • Easy Integration: Built for Composer and modern PSR-4 standards.
  • Naive Bayes Logic: Uses probability-based classification for reliable sorting.

Usage Example

use garryRodriguez\PhpAiClassifier\Classifier;

$ai = new Classifier();

// 1. Train the AI
$ai->train('billing', 'I need my invoice for last month');
$ai->train('billing', 'Where is my receipt?');
$ai->train('support', 'The app is crashing on my iPhone');
$ai->train('support', 'I cannot log in to my account');

// 2. Predict categories
$category = $ai->predict('Can you send me my bill?');

echo $category; // Outputs: billing


******

$ai = new Classifier();

// Only train if we don't have a saved model yet
if (!file_exists('my_model.json')) {
    $ai->train('billing', 'I need my invoice');
    $ai->saveModel('my_model.json');
} else {
    $ai->loadModel('my_model.json');
}

echo $ai->predict('Where is my bill?');

Installation

Install the package via Composer:

composer require garryrodriguez/php-ai-classifier

```zsh
composer require garryrodriguez/php-ai-classifier

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-31

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固