PHPackages                             kweaver00/watson\_php - 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. [API Development](/categories/api)
4. /
5. kweaver00/watson\_php

ActiveLibrary[API Development](/categories/api)

kweaver00/watson\_php
=====================

A PHP SDK for using IBM Watson

v1.0(9y ago)71114[1 issues](https://github.com/kweaver00/unofficial-ibm-watson-php-sdk/issues)Apache 2.0PHPPHP &gt;=5.5.0

Since Feb 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/kweaver00/unofficial-ibm-watson-php-sdk)[ Packagist](https://packagist.org/packages/kweaver00/watson_php)[ Docs](https://github.com/kweaver00/unofficial-ibm-watson-php-sdk)[ RSS](/packages/kweaver00-watson-php/feed)WikiDiscussions master Synced 1mo ago

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

ibm-watson-php-sdk
==================

[](#ibm-watson-php-sdk)

Installing Using Composer
-------------------------

[](#installing-using-composer)

```
composer require kweaver00/watson_php

```

or

```
composer require kweaver00/watson_php dev-master

```

Supported Services
------------------

[](#supported-services)

[Natural Language Classifier](https://github.com/kweaver00/unofficial-ibm-watson-php-sdk#natural-language-classifier)

[Retrieve and Rank](https://github.com/kweaver00/unofficial-ibm-watson-php-sdk#retrieve-and-rank)

[Document Conversion](https://github.com/kweaver00/unofficial-ibm-watson-php-sdk#document-conversion)

Natural Language Classifier
---------------------------

[](#natural-language-classifier)

### Creating A New Object

[](#creating-a-new-object)

```
$naturalLangObj = new \Kweaver\Watson\NaturalLanguageClassifier();

```

### API Methods

[](#api-methods)

**[Create classifier](https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/#create_classifier)** - Sends data to create and train a classifier and returns information about the new classifier.

**[List classifiers](https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/#get_classifiers)** - Retrieves the list of classifiers for the service instance. Returns an empty array if no classifiers are available.

**[Get information about a classifier](https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/#get_status)** - Returns status and other information about a classifier

**[Delete classifier](https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/#delete_classifier)** - Deletes a classifier.

**[Classify](https://www.ibm.com/watson/developercloud/natural-language-classifier/api/v1/#classify)** - Returns label information for the input. The status must be "Available" before you can classify calls. Use the Get information about a classifier method to retrieve the status.

### Example

[](#example)

```
require_once "/vendor/autoload.php";

$naturalLangObj = new \Kweaver\Watson\NaturalLanguageClassifier();
$naturalLangObj->setServiceCredentials("YOUR_WATSON_SERVICE_CREDENTIALS_USER_NAME","YOUR_WATSON_SERVICE_CREDENTIALS_PASSWORD");

$localFilePathForTrainingMetaDataJSON = realpath("./new_training_data_meta_data.json");
$localFilePathForTrainingData = realpath("./weather_data_train.csv");

//Creating a new classifier
$response = $naturalLangObj->create($localFilePathForTrainingData,$localFilePathForTrainingMetaDataJSON);

```

Retrieve and Rank
-----------------

[](#retrieve-and-rank)

Document Conversion
-------------------

[](#document-conversion)

### Creating A New Object

[](#creating-a-new-object-1)

```
$documentConversionObj = new \Kweaver\Watson\DocumentConversion();

```

### API Methods

[](#api-methods-1)

**[Convert a document](https://www.ibm.com/watson/developercloud/document-conversion/api/v1/#convert-document)** - Converts a document to answer units, HTML or text. This method accepts a multipart/form-data request. Upload the document as the "file" form part and the configuration as the "config" form part.

### Example

[](#example-1)

```
require_once "/vendor/autoload.php";

$documentConversionObj = new \Kweaver\Watson\DocumentConversion();
$documentConversionObj->setServiceCredentials("YOUR_USERNAME_FOR_THE_DOC_CONVERSION_SERVICE","YOUR_PASSWORD");

$configFilePath = realpath('./config.json');
$uploadedFilePath = realpath('./sample.pdf');

$version = date('Y-m-d');

$result = $documentConversionObj->convert($configFilePath, $uploadedFilePath, $version);

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity59

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

Unknown

Total

1

Last Release

3363d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f685a6345f5edd9da794bddf12afd11782d333d8c243edabebf261cd576918ef?d=identicon)[keithweaver](/maintainers/keithweaver)

---

Top Contributors

[![keithweaver](https://avatars.githubusercontent.com/u/6508608?v=4)](https://github.com/keithweaver "keithweaver (21 commits)")

---

Tags

classifierdocument-conversionibmibm-bluemixibm-watsonibm-watson-apiibm-watson-servicesmachine-learningnatural-languagenatural-language-processingretrieve-and-rankphpibmibm watson

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/kweaver00-watson-php/health.svg)

```
[![Health](https://phpackages.com/badges/kweaver00-watson-php/health.svg)](https://phpackages.com/packages/kweaver00-watson-php)
```

###  Alternatives

[saleh7/proxmox-ve_php_api

ProxmoxVE PHP API

11718.7k](/packages/saleh7-proxmox-ve-php-api)[liamcottle/instagram-sdk-php

This is an unofficial SDK for the Instagram Private API in PHP

1308.4k](/packages/liamcottle-instagram-sdk-php)[manamine/php-eos-rpc-sdk

PHP SDK for the EOS RPC API

207.5k](/packages/manamine-php-eos-rpc-sdk)

PHPackages © 2026

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