PHPackages                             yousuf/chatman - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yousuf/chatman

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yousuf/chatman
==============

Chatbot is a php library that uses machine learning to generate responses based on collection of known conversations.

v1.0.1(2y ago)2415MITPHPPHP &gt;=7.2

Since Dec 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/yousufnoor5/php-chatman)[ Packagist](https://packagist.org/packages/yousuf/chatman)[ RSS](/packages/yousuf-chatman/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (2)Versions (3)Used By (0)

PHP Chatman
===========

[](#php-chatman)

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](https://php-chatman.netlify.app)

Installation
------------

[](#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 :
------------------

[](#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 :
--------------

[](#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'];
```

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~831 days

Total

2

Last Release

817d ago

PHP version history (2 changes)v1.0.0PHP ^7.2

v1.0.1PHP &gt;=7.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/73256222?v=4)[Muhammad Yousuf Noor](/maintainers/yousufnoor5)[@yousufnoor5](https://github.com/yousufnoor5)

---

Top Contributors

[![yousufnoor5](https://avatars.githubusercontent.com/u/73256222?v=4)](https://github.com/yousufnoor5 "yousufnoor5 (8 commits)")

---

Tags

chatbotphp-chatphp-mlai chatbotmachine learning chatbotphp chatbotchatman

### Embed Badge

![Health badge](/badges/yousuf-chatman/health.svg)

```
[![Health](https://phpackages.com/badges/yousuf-chatman/health.svg)](https://phpackages.com/packages/yousuf-chatman)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
