Good Contents Are Everywhere, But Here, We Deliver The Best of The Best.Please Hold on!
Your address will show here +12 34 56 78

Remember when we moved into our bright, big shiny new office back in August? Well, We’ve already started to run out of space!

We’ve recently added two super-smart guys to our team. Given our focus on always improving our product and service, we’ve added two technical brains to the AYLIEN mothership. One an NLP researcher and the other a Machine Translation/NLP guru.

Peiman Barnaghi (Linkedin)

Peiman started work at AYLIEN back in March as a Natural Language Processing researcher. His research work is focused on Scalable Topic-Level Sentiment Analysis on Streaming Feeds.



Peiman is working under the supervision of Dr. John Breslin, from The Insight Center at NUI Galway, who also happens to be a mentor and advisor to AYLIEN.

His research work is something we’re extremely excited about at AYLIEN. The problem he’s addressing refers to the shortcomings of current techniques in dealing with large volumes of streaming data. The time-dependent nature of this task requires development methods and techniques for continuous monitoring and analysis of streaming feeds (such as Twitter data) to provide live and updatable models for sentiment that evolve over time.

In Peiman’s words: “Social data processing is a fascinating topic that I am very eager to learn more about. I believe my skills and background knowledge combined with the research environment, mentoring and supervision support will enable me to thrive in this extremely interesting area.”

When he’s not buried in research papers, Peiman enjoys swimming (not in the Irish Sea yet), music and reading.

Jordi Carrera (Linkedin)

Jordi Carrera is a Computational Linguist and Natural Language engineer with 6+ years of experience developing Artificial Intelligence applications.



He started his career in academia at Universitat Oberta de Catalunya working as a researcher on knowledge representation and ontologies, where he soon became interested in extracting structured knowledge from unstructured text. This led him to the field of syntactic analysis and relation mining while still in academia at Universitat Politecnica de Catalunya .

Since his academic days, Jordi has amassed a wealth of experience in distributional language models, semantic vector spaces, clustering and document classification as well as topic modeling. His experience ranges from working as a language consultant for a San Francisco based Machine Translation company, a European Sentiment Analysis start-up, Asomo to co-building his own Text Summarization product, Sumplify.

In more recent years, Jordi has continued his previous work on Machine Translation with Web Interpret, and has explored several other areas such as automatic spell checking with Grammarly .

Outside of work, Jordi is a huge fan of long bike rides, public speaking, and the scientific method.

Text Analysis API - Sign up


One of our users, Michael Hopkins, recently built a Laravel 5 friendly wrapper, around our AYLIEN PHP SDK, which makes it really easy for the Laravel community to use our API.

Michael wanted to incorporate our API and provide the facade, “Aylien::” to a Laravel 5 app he was building. Thankfully for us and for Laravel users, he decided to the make this wrapper publicly available on GitHub. He’s even gone so far as designing a nice graphic to accompany his work. Nice job Michael!



If you haven’t heard of Laravel, you can read more about the PHP Framework here.

Michael put together a clear and concise guide to getting up and running with his wrapper, along with a neat little example app, that showcases the wrapper in action, which we’ll walk through in this blog.

What you’ll need to get going




You can add this package to your composer.json and update the composer by running/adding either of the below commands.

"hopkins/laravel-aylien-wrapper": "dev-master"


composer require hopkins/laravel-aylien-wrapper=dev-master

Once you’ve updated the composer, add the AYLIEN ServiceProvider to the providers array in app/config/app.php


You’ll also need to add the facade into your array of facades as shown below:

'Aylien'    => 'HopkinsLaravelAylienWrapperFacadesAylien',

Next, run the artisan tool to bring the config into your project with the following command:

php artisan vendor:publish

Don’t forget to add your AYLIEN API keys, if you haven’t got yours yet, you can sign up here. Michael went for the option of adding his AYLIEN credentials to the .env file.

To use this style of config you can copy the below into your config/aylien.php

return [
    'app_id' => env('API_AYLIEN_APP_ID'),
    'app_key' => env('API_AYLIEN_APP_KEY')

Example App

Michael Provides an example app he built that logs all messages from a chat/email client/ contact form in a DB using a public static function boot() method and then analyzes the text using the AYLIEN API. In the example below Michael analyzes the sentiment of the text.

class Message extends BaseModel
    protected $guarded = ['id'];
    public static function boot()
        Message::created(function(Message $message)
            $aylienResponse = Aylien::Sentiment(['text'=>$message->message]);
                'polarity' => $aylienResponse->polarity,
                'polarity_confidence' => $aylienResponse->polarity_confidence,
                'subjectivity' => $aylienResponse->subjectivity,
                'subjectivity_confidence' => $aylienResponse->subjectivity_confidence

The rest of the AYLIEN endpoints can be invoked using the following commands.


If you’ve built something cool with APIs and would loke to share it with the AYLIEN community, drop us a line at we’d love to hear from you.




As you may already know, we like to feature interesting and useful examples of what the AYLIEN community are building with our API. Previously, we’ve showcased a PowerShell wrapper and a Laravel wrapper. For this edition of our blog, we’re going feature a data scientist who spent some time building an R binding for our Text Analysis API.

Arnab is a solutions architect and data analytics expert based in India. He recently developed an R binding for our Text Analysis API that we think is going to be very popular amongst our R users. This R Binding makes it really quick and easy for the R community, to get up and running with our API and we’re glad he spent the time to putting it together.


If you’re new to AYLIEN and Text Analysis, the first thing you’ll need to do is sign up for free access to the API. Take a look at our getting started page, which will take you through the signup process. We have a free plan available which allows you to make up to 1,000 calls to the API per day, for free.

The second thing you need to do is, install the following packages from your R console using the following commands:



Point to file:


Note: You must have XQuartz installed to view the results which you can download here.


To show how easy it is to use the API with R, we’re going to run a simple analysis using the binding, by analyzing the following article: (, extracting the main body of text from the page and classifying the article based on IPTC news-codes.

Code Snippet:

aylienAPI<-function(APPLICATION_ID, APPLICATION_KEY, endpoint, parameters, type)
  url = paste0('',endpoint)
  httpHeader = c(Accept="text/xml", 'X-AYLIEN-TextAPI-Application-ID' = APPLICATION_ID,
                 'X-AYLIEN-TextAPI-Application-Key'= APPLICATION_KEY,
                 'Content-Type'="application/x-www-form-urlencoded; charset=UTF-8")



  resp<-getURL(url, httpheader = httpHeader,
               postfields=paramEncode, verbose = FALSE)


Don’t forget to add your AYLIEN credentials:


Arnab has made it really easy to call each end point, all you need to do is specify the endpoint in the code. To call the classification endpoint for example, we simply use “classify”.

endpoint = "classify"
parameters = ""
type = "url"


It’s up to you, how you want to display your results, but using the following command, displays them nice and clearly in a table format converting the output to a data frame, as shown in the image below.

resultsdf<-ldply(xmlToList(results), data.frame)

As you can see from the Results, the API returned an accurate two-tier classification of “Sport – Soccer”.

You can also choose to retrieve data using Xpath from the XML result with the following request.

View(xpathSApply(PARSED, "//category",xmlValue))

If you have an app or a wrapper you’ve built with our API’s, we’d love to hear about it and feature it on our blog. Get in touch at and tell us what you’re building.

Text Analysis API - Sign up


If you’re relatively new to the NLP and Text Analysis world, you’ll more than likely have come across some pretty technical terms and acronyms, that are challenging to get your head around, especially, if you’re relying on scientific definitions for a plain and simple explanation.

We decided to put together a list of 10 common terms in Natural Language Processing which we’ve broken down in layman terms, making them easier to understand. So if you don’t know your “Bag of Words” from your LDA we’ve got you covered.

The terms we chose were based on terms we often find ourselves explaining to users and customers on a day to day basis.

Natural Language Processing (NLP) – A Computer Science field connected to Artificial Intelligence and Computational Linguistics which focuses on interactions between computers and human language and a machine’s ability to understand, or mimic the understanding of human language. Examples of NLP applications include Siri and Google Now.

Information Extraction – The process of automatically extracting structured information from unstructured and/or semi-structured sources, such as text documents or web pages for example.



Named Entity Recognition (NER) – The process of locating and classifying elements in text into predefined categories such as the names of people, organizations, places, monetary values, percentages, etc.

Corpus or Corpora – A usually large collection of documents that can be used to infer and validate linguistic rules, as well as to do statistical analysis and hypothesis testing.

Sentiment Analysis – The use of Natural Language Processing techniques to extract subjective information from a piece of text. i.e. whether an author is being subjective or objective or even positive or negative. (can also be referred to as Opinion Mining)


Sentiment Analysis:

Word Sense Disambiguation – The ability to identify the meaning of words in context in a computational manner. A third party corpus or knowledge base, such as WordNet or Wikipedia, is often used to cross-reference entities as part of this process. A simple example being, for an algorithm to determine whether a reference to “apple” in a piece of text refers to the company or the fruit.

Bag of Words – A commonly used model in methods of Text Classification. As part of the BOW model, a piece of text (sentence or a document) is represented as a bag or multiset of words, disregarding grammar and even word order and the frequency or occurrence of each word is used as a feature for training a classifier.

Explicit Semantic Analysis (ESA) – Used in Information Retrieval, Document Classification and Semantic Relatedness calculation (i.e. how similar in meaning two words or pieces of text are to each other), ESA is the process of understanding the meaning of a piece text, as a combination of the concepts found in that text.

Latent Semantic Analysis (LSA) – The process of analyzing relationships between a set of documents and the terms they contain. Accomplished by producing a set of concepts related to the documents and terms. LSA assumes that words that are close in meaning will occur in similar pieces of text.

Latent Dirichlet Allocation (LDA) – A common topic modeling technique, LDA is based on the premise that each document or piece of text is a mixture of a small number of topics and that each word in a document is attributable to one of the topics.

If you would like to dive into more detail on any of the terms or NLP techniques discussed schedule a call with one of our experts, here. You can also read more about some of the terms above in our Text Analysis 101 blog series.


Text Analysis API - Sign up