Machine Learning for Text Analysis

Get actionable data from text. Integrate with your app within minutes.

OR

Customers

Companies using MonkeyLearn

Next section

Benefits

  • Easy to use

    No NLP or Machine Learning knowledge is required. Just play with our UI.

  • Customized for your needs

    Pick a pre-created module or create your own by training a machine learning model.

  • Instant Integration

    Integrate within your project in minutes using our API and any programming language.

Next section

Simple and Modern User Interface

Taste the power of Machine Learning in your hands!

Interface image
Next section

How it works

Use MonkeyLearn in 3 simple steps!

  • Select or Create a Module

    1. Select or Create a Module

    You can select ready to use modules or create your own with a simple UI!

  • Test

    2. Test

    Use our web interface to test your module and improve the results.

  • Integrate

    3. Integrate

    Integrate with any programming language through an API that will be instantly published.

Next section

Testimonials

What people think about MonkeyLearn

  • "MonkeyLearn is one of the most innovative and compelling platforms I've used. I've also loved working with MonkeyLearn's team - their amiable, supportive, and relentless willingness to help me build great products to help our community have put them among my favorite new companies."

    Jack Dorsey

    Rand Fishkin

    Cofounder at Moz.
    Seattle, WA
    @randfish

  • “MonkeyLearn is my go-to machine learning API when I want to do sentiment analysis and topic detection over web scraped data. Easy to use, fast to set up and accurate results.”

    Jack Dorsey

    Ignacio Elola Villar

    Data Scientist at Import.io
    London
    @ignacio_elola

  • "MonkeyLearn has the easiest machine learning platform available...I love their approach to the problem. I think about them as a "data scientist in a box!" And their team is phenomenal as well."

    Jack Dorsey

    Mike Ruggieri

    Executive Director & VP of Product at Meltwater
    San Francisco
    in/mruggieri/

Next section

Super Easy Integration

Libraries & Documentation are provided to easily integrate MonkeyLearn with your favorite programming language.

  • Python

    import requests
    import json
    
    data = {
        'text_list': ["This is a text to try language detection.",
            "This is some more text"]
    }
    
    response = requests.post(
        "https://api.monkeylearn.com/v2/classifiers/cl_oJNMkt2V/classify/",
        data=json.dumps(data),
        headers={'Authorization': 'Token <YOUR TOKEN GOES HERE>',
                'Content-Type': 'application/json'})
    
    print json.loads(response.text)
  • Ruby

    require "net/http"
    require "uri"
    require 'json'
    
    uri = URI.parse("https://api.monkeylearn.com/v2/classifiers/cl_oJNMkt2V/classify/")
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    request = Net::HTTP::Post.new(uri.request_uri)
    
    # Set POST data
    request.body = {text_list: ["This is a text to try language detection.", "some more text"]}.to_json
    # Set headers
    request.add_field("Content-Type", "application/json")
    request.add_field("Authorization", "token <YOUR TOKEN GOES HERE>")
    
    puts(http.request(request).body)
  • PHP

    <?php
    
    $url = 'https://api.monkeylearn.com/v2/classifiers/cl_oJNMkt2V/classify/?';
    $data = array('text_list' => array('some text to test', 'some more text'));
    
    $options = array(
        'http' => array(
            'header'  => "Content-type: application/json\r\n".
                "Authorization:token <YOUR TOKEN GOES HERE>\r\n",
            'method'  => 'POST',
            'content' => json_encode($data),
        ),
    );
    $context  = stream_context_create($options);
    $result = file_get_contents($url, false, $context);
    
    var_dump($result);
    
    ?>
  • JavaScript

    <!DOCTYPE html>
    <html>
    <head>
    
    <meta charset="UTF-8">
    
    <title>MonkeyLearn Javascript Integration</title>
    
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"
    ></script>
    <script type="text/javascript">
    
    $.ajax({
        url : "https://api.monkeylearn.com/v2/classifiers/cl_oJNMkt2V/classify/",
        type : "POST",
        headers: {
            "Authorization": "token <YOUR TOKEN GOES HERE>",
        },
        dataType: "json",
        contentType: "application/json; charset=utf-8",
        data : JSON.stringify({
          text_list: ["This is a text to try language detection.", "some more text"]
        }),
        success : function(result) {
          alert(result);
        },
        error : function(e) {
          alert('Error: ' + e);
        }
    });
    
    </script>
    
    </head>
    </html>
  • Java

    import java.net.HttpURLConnection;
    import java.net.URL;
    import java.net.URLEncoder;
    import java.io.DataOutputStream;
    import java.io.BufferedReader;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.InputStream;
    import java.lang.StringBuffer;
    
    public class App
    {
        public static void main( String[] args )
        {
            URL url;
            HttpURLConnection connection = null;
            try {
                //Create connection
                url = new URL("https://api.monkeylearn.com/v2/classifiers/cl_oJNMkt2V/classify/?");
                connection = (HttpURLConnection)url.openConnection();
                connection.setRequestMethod("POST");
                connection.setRequestProperty("Authorization",
                    "token <YOUR TOKEN GOES HERE>");
                connection.setRequestProperty("Content-Type",
                    "application/json");
    
                connection.setUseCaches (false);
                connection.setDoInput(true);
                connection.setDoOutput(true);
    
                //Send request
                OutputStreamWriter wr = new OutputStreamWriter(connection.getOutputStream());
    
                wr.write ("{\"text_list\": [\"This is a text to try language detection.\", \"some more text\"]}");
                wr.flush ();
                wr.close ();
    
                //Get Response
                InputStream is = connection.getInputStream();
                BufferedReader rd = new BufferedReader(new InputStreamReader(is));
                String line;
                StringBuffer response = new StringBuffer();
                while((line = rd.readLine()) != null) {
                  response.append(line);
                  response.append('\r');
                }
                rd.close();
                System.out.println(response.toString());
    
            } catch (Exception e) {
                e.printStackTrace();
            } finally {
                if(connection != null) {
                    connection.disconnect();
                }
            }
        }
    }
  • .NET

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;
    using System.Net.Http;
    using System.Net.Http.Headers;
    
    
    namespace dotnet_integration
    {
        class Program
        {
            static void Main(string[] args)
            {
                using (var client = new HttpClient())
                {
                    client.BaseAddress = new Uri("https://api.monkeylearn.com");
                    client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("token", "<YOUR TOKEN GOES HERE>");
    
                    var content = new FormUrlEncodedContent(new[]
                    {
                        new KeyValuePair("text_list", "This is a text to test the API.")
                    });
                    var response = client.PostAsync("/v2/classifiers/cl_oJNMkt2V/classify/", content).Result;
                    if (response.IsSuccessStatusCode)
                    {
                        var responseBody = response.Content.ReadAsStringAsync().Result;
                        Console.WriteLine(responseBody);
                        Console.ReadLine();
                    }
                }
            }
        }
    }
Next section

Featured in the Press

News about MonkeyLearn

OR
Back to top