All Projects → monkeylearn → monkeylearn-php

monkeylearn / monkeylearn-php

Licence: MIT license
Official PHP client for the MonkeyLearn API. Build and consume machine learning models for language processing from your PHP apps.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to monkeylearn-php

NLP Quickbook
NLP in Python with Deep Learning
Stars: ✭ 516 (+997.87%)
Mutual labels:  text-classification, language-processing
monkeylearn-java
Official Java client for the MonkeyLearn API. Build and consume machine learning models for language processing from your Java apps.
Stars: ✭ 23 (-51.06%)
Mutual labels:  text-classification, language-processing
ML4K-AI-Extension
Use machine learning in AppInventor, with easy training using text, images, or numbers through the Machine Learning for Kids website.
Stars: ✭ 18 (-61.7%)
Mutual labels:  text-classification
automatic-personality-prediction
[AAAI 2020] Modeling Personality with Attentive Networks and Contextual Embeddings
Stars: ✭ 43 (-8.51%)
Mutual labels:  text-classification
feedIO
A Feed Aggregator that Knows What You Want to Read.
Stars: ✭ 26 (-44.68%)
Mutual labels:  text-classification
nlpbuddy
A text analysis application for performing common NLP tasks through a web dashboard interface and an API
Stars: ✭ 115 (+144.68%)
Mutual labels:  text-classification
NLP Toolkit
Library of state-of-the-art models (PyTorch) for NLP tasks
Stars: ✭ 92 (+95.74%)
Mutual labels:  text-classification
COVID-19-Tweet-Classification-using-Roberta-and-Bert-Simple-Transformers
Rank 1 / 216
Stars: ✭ 24 (-48.94%)
Mutual labels:  text-classification
ner-d
Python module for Named Entity Recognition (NER) using natural language processing.
Stars: ✭ 14 (-70.21%)
Mutual labels:  language-processing
Pytorch-NLU
Pytorch-NLU,一个中文文本分类、序列标注工具包,支持中文长文本、短文本的多类、多标签分类任务,支持中文命名实体识别、词性标注、分词等序列标注任务。 Ptorch NLU, a Chinese text classification and sequence annotation toolkit, supports multi class and multi label classification tasks of Chinese long text and short text, and supports sequence annotation tasks such as Chinese named entity recognition, part of speech ta…
Stars: ✭ 151 (+221.28%)
Mutual labels:  text-classification
nsmc-zeppelin-notebook
Movie review dataset Word2Vec & sentiment classification Zeppelin notebook
Stars: ✭ 26 (-44.68%)
Mutual labels:  text-classification
nlp-lt
Natural Language Processing for Lithuanian language
Stars: ✭ 17 (-63.83%)
Mutual labels:  text-classification
3HAN
An original implementation of "3HAN: A Deep Neural Network for Fake News Detection" (ICONIP 2017)
Stars: ✭ 29 (-38.3%)
Mutual labels:  text-classification
yunyi
2018“云移杯- 景区口碑评价分值预测
Stars: ✭ 29 (-38.3%)
Mutual labels:  text-classification
lingua-go
👄 The most accurate natural language detection library for Go, suitable for long and short text alike
Stars: ✭ 684 (+1355.32%)
Mutual labels:  language-processing
schreib-gut
German extension for write-good
Stars: ✭ 34 (-27.66%)
Mutual labels:  language-processing
ml-with-text
[Tutorial] Demystifying Natural Language Processing with Python
Stars: ✭ 18 (-61.7%)
Mutual labels:  text-classification
FNet-pytorch
Unofficial implementation of Google's FNet: Mixing Tokens with Fourier Transforms
Stars: ✭ 204 (+334.04%)
Mutual labels:  text-classification
ganbert-pytorch
Enhancing the BERT training with Semi-supervised Generative Adversarial Networks in Pytorch/HuggingFace
Stars: ✭ 60 (+27.66%)
Mutual labels:  text-classification
10kGNAD
Ten Thousand German News Articles Dataset for Topic Classification
Stars: ✭ 63 (+34.04%)
Mutual labels:  text-classification

monkeylearn-php

Official PHP client for the MonkeyLearn API. Build and consume machine learning models for language processing from your PHP apps.

Autoload

The first step to use monkeylearn-php is to download composer:

$ curl -s http://getcomposer.org/installer | php

Then we have to install our dependencies using:

$ php composer.phar install

Now we can use autoloader from Composer by:

{
    "require": {
        "monkeylearn/monkeylearn-php": "~0.1"
    }
}

Or, if you don't want to use composer, clone the code and include this line of code:

require 'autoload.php';

Usage examples

Here are some examples of how to use the library in order to create and use classifiers:

require 'autoload.php';

// Use the API key from your account
$ml = new MonkeyLearn\Client('<YOUR API KEY HERE>');

// Create a new classifier
$res = $ml->classifiers->create('Test Classifier');

// Get the id of the new module
$model_id = $res->result['id'];

// Get the classifier detail
$res = $ml->classifiers->detail($model_id);

// Create two new tags on the classifier
$res = $ml->classifiers->tags->create($model_id, 'Negative');
$negative_id = $res->result['id'];
$res = $ml->classifiers->tags->create($model_id, 'Positive');
$positive_id = $res->result['id'];

// Now let's upload some data
$data = array(
    array('text' => 'The movie was terrible, I hated it.', 'tags' => [$negative_id]),
    array('text' => 'I love this movie, I want to watch it again!', 'tags' => [$positive_id])
);
$res = $ml->classifiers->upload_data($model_id, $data);

// Classify some texts
$res = $ml->classifiers->classify($model_id, ['I love the movie', 'I hate the movie']);
var_dump($res->result);

You can also use the sdk with extractors:

require 'autoload.php';

$ml = new MonkeyLearn\Client('<YOUR API KEY HERE>');
$res = $ml->extractors->extract('<Extractor ID>', ['Some text to extract.']);
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].