yousuf/chatman
Composer 安装命令:
composer require yousuf/chatman
包简介
Chatbot is a php library that uses machine learning to generate responses based on collection of known conversations.
README 文档
README
Chatman is a machine-learning based chatbot library build in PHP. It can generate responses by learning the conversations. Chatman is very easy to use. It can be used for generating auto responses for social media, customer support, ecommerce website, personal fun etc.
Read Documentation
Installation
First make sure your system has composer installed.
composer require yousuf/chatman
If you get any error like this :
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires yousuf/chatman ^1.0 -> satisfiable by yousuf/chatman[v1.0.0].
- yousuf/chatman v1.0.0 requires writecrow/lemmatizer dev-master -> found writecrow/lemmatizer[dev-master] but it does not match your minimum-stability.
Then run these commands :
composer require writecrow/lemmatizer:dev-master
composer require yousuf/chatman
Training Dataset :
{
"intents": [
{"tag": "intro",
"patterns": ["Hello", "Hi", "Hi there", "hey", "Whats up"],
"responses": ["Hi, how can I help you ?", "Hey, do you need any help ?", "How are you doing?", "Greetings !"]
},
{"tag": "age",
"patterns": ["how old are you?", "can i know your age", "what is your age"],
"responses": ["I am 19 years old", "My age is 19", "My birthday is Jan 5th and I was born in 2002, so I am 19 years old !"]
}]
}
Example Code :
require_once __DIR__ . '/vendor/autoload.php'; use Chatman\BotWithPatterns; $bot = new BotWithPatterns("chatbot.json"); $bot->defaultMsg = "I did not understand !"; $bot->train(); $resp = $bot->getResponse("hello"); echo $resp['resp'];
yousuf/chatman 适用场景与选型建议
yousuf/chatman 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 41 次下载、GitHub Stars 达 2, 最近一次更新时间为 2021 年 12 月 28 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「machine learning chatbot」 「php chatbot」 「ai chatbot」 「chatman」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 yousuf/chatman 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 yousuf/chatman 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 yousuf/chatman 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Doctrine implementation of the MetaborStd (Statemachine) for PHP 8.2+
Automatically translate and review your content via Lokalise.
Simple and elegant tools for build web application.
Phwoolcon Finite State Machine
2020 PHP: A showcase and classroom for the cutting edge features of PHP 8
An introduction to machine learning in Rubix ML using the famous Iris dataset and the K Nearest Neighbors classifier.
统计信息
- 总下载量: 41
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-12-28