Skip to content
Enhance your WordPress content with Artificial Intelligence and Machine Learning services.
PHP Shell Other
Branch: develop
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github Add more info messages to the release Action Jul 25, 2019
assets/img update plugin icons Jun 11, 2019
bin Adds Version 1.0.0 Jul 24, 2018
includes/Classifai Merge pull request #106 from 10up/fix/unexpected-end-of-json-input Jul 24, 2019
languages POT bump Jul 24, 2019
src/js
tests
vendor/yahnis-elsts/plugin-update-checker More proper gitignore patterns Apr 25, 2019
.babelrc Setup webpack build process Feb 6, 2019
.editorconfig
.eslintrc.json
.gitignore More proper gitignore patterns Apr 25, 2019
.travis.yml add mysql service in .travis.yml Jul 24, 2019
CHANGELOG.md Use proper URL for as-yet-unreleased changes Jul 24, 2019
CODE_OF_CONDUCT.md capitalizes AI and updates email address Apr 26, 2019
CONTRIBUTING.md Bump version in `config.php` Jul 24, 2019
LICENSE.md Create LICENSE.md Mar 21, 2019
README.md Add data gathering info Jun 24, 2019
autoload.php phpcs fixes for autoload Mar 19, 2019
classifai.php Merge pull request #104 from 10up/release/1.3.2 Jul 24, 2019
composer.json Merge branch 'develop' into feature/composer-type Jun 7, 2019
composer.lock POT, lock, and (change)log it for 1.2.1 Apr 25, 2019
config.php Merge pull request #104 from 10up/release/1.3.2 Jul 24, 2019
package-lock.json Bump js-yaml from 3.12.1 to 3.13.1 Jun 6, 2019
package.json Adds makepot command and .pot file Feb 27, 2019
phpcs.xml.dist
phpunit.xml.dist
portkey.json Rename all instances of Klasifai or Classifai Feb 13, 2019
webpack.config.js Setup webpack build process Feb 6, 2019

README.md

ClassifAI

Enhance your WordPress content with Artificial Intelligence and Machine Learning services.

Support Level Build Status Release Version WordPress tested up to version MIT License

Table of Contents

Features

Requirements

  • PHP 7.0+
  • WordPress 5.0+
  • To utilize the Lanaguage Processing functionality, you will need an active IBM Watson account.
  • To utilize the Image Processing functionality, you will need an active Microsoft Azure account.

Installation

1. Download or Clone this repo, install dependencies and build.

  • git clone https://github.com/10up/classifai.git && cd classifai
  • composer install && npm install && npm run build

2. Activate Plugin

Set Up Content Tagging (via IBM Watson)

1. Sign up for Watson services

  • Register for an IBM Cloud account or sign into your existing one.
  • Check for an email from IBM Cloud and click the Confirm Account link.
  • Log into your account (accepting the privacy policy) and create a new Natural Language Understanding Resource if you do not already have one. It may take a minute for your account to fully populate with the default resource group to use.
  • Click Manage in the left hand menu, then Show credentials on the Manage page to view the credentials for this resource.

2. Configure IBM Watson API Keys under ClassifAI > Language Processing

The credentials screen will show either an API key or a username/password combination.

If your credentials contain an API Key, then:
  • In the API URL field enter the URL
  • In the API User field, enter apikey.
  • Enter your API Key in the API Key field.
If your credentials contain a username and password, then:
  • In the API URL field enter the URL
  • Enter the username value into the API User field.
  • Enter the password into the API key field.

3. Configure Post Types to classify and IBM Watson Features to enable under ClassifAI > Language Processing

  • Choose which public post types to classify when saved.
  • Chose whether to assign category, keyword, entity, and concept as well as the taxonomies used for each.

4. Save Post or run WP CLI command to batch classify posts

Set Up Image Processing (via Microsoft Azure)

Note that Computer Vision can analyze images that meet the following requirements:

  • The image must be presented in JPEG, PNG, GIF, or BMP format
  • The file size of the image must be less than 4 megabytes (MB)
  • The dimensions of the image must be greater than 50 x 50 pixels

Note that Computer Vision has a free pricing tier that offers 20 transactions per minute and 5,000 transactions per month.

1. Sign up for Azure services

  • Register for a Microsoft Azure account or sign into your existing one.
  • Log into your account and create a new Computer Vision Service if you do not already have one. It may take a minute for your account to fully populate with the default resource group to use.
  • Click Quick start in the left hand Resource Management menu to view the API endpoint credential for this resource in section 2b.
  • Click Keys in the left hand Resource Management menu to view the Key 1 credential for this resource.

2. Configure Microsoft Azure API and Key under ClassifAI > Image Processing

  • In the Endpoint URL field, enter your API endpoint.
  • In the API Key field, enter your Key 1.

3. Save Image to classify image

WP CLI Usage Instructions

1. Batch Classify Posts

$ wp classifai post {post_ids} [--post_type=post_type] [--limit=limit] [--link=link]

Options

--post_type=post_type

Batch classify posts belonging to this post type. If false or absent relies on post_ids in args

default: false
options:

  • any post type name
  • false, if args contains post_ids

--limit=limit

Limit classification to N posts.

default: false
options:

  • false, no limit
  • N, max number of posts to classify

--link=link

Whether to link classification results to Taxonomy terms

default: true

2. Classify Text

$ wp classifai text {text} [--category=bool] [--keyword=bool] [--concept=bool] [--entity=bool] [--input=input] [--only-normalize=bool]

Directly classify text using Watson NLU.

Options

--category=bool

Enables NLU category feature

default: true

--keyword=bool

Enables NLU keyword feature

default: true

--concept=bool

Enables NLU concept feature

default: true

--entity=bool

Enables NLU entity feature

default: true

--input=input

Path to input file or URL

default: false
options:

  • path to local file
  • path to remote URL
  • false, uses args[0] instead

--only-normalize=<bool>

Prints the normalized text that will be sent to the NLU API

default: false

Data Gathering

ClassifAI connects your WordPress site directly to your account with specific service provider(s) (e.g. Microsoft Azure AI, IBM Watson), so no data is gathered by 10up. The data gathered in our registration form is used simply to stay in touch with users so we can provide product updates and news. More information is available in the Privacy Policy on ClassifAIplugin.com.

Support Level

Active: 10up is actively working on this, and we expect to continue work for the foreseeable future including keeping tested up to the most recent version of WordPress. Bug reports, feature requests, questions, and pull requests are welcome.

Changelog

A complete listing of all notable changes to Distributor are documented in CHANGELOG.md.

Contributing

Please read CODE_OF_CONDUCT.md for details on our code of conduct and CONTRIBUTING.md for details on the process for submitting pull requests to us.

Like what you see?

Work with us at 10up

You can’t perform that action at this time.