Text Summarization API Document


The Professional Text Summarization API can be easily used in Java/JVM/Android, Node.js, PHP, Python, Objective-C/i-OS, Ruby and .Net programming evironment based on the Unirest project which provided by Mashape. Mashape is the Cloude API Marketplace, all you need to do is just three steps:

  1. Register a Mashape account;
  2. Go to the Text Summarization API page on Mashape and subscrible to it;
  3. Start using the Professional Text Summarization API;

You can test our professional text summarization api by the free plan first, which limited 100 requests/day. We use the POST request in the Text Summarization API and proivde in the request body as a JSON blob. The json request body like this:


{
    "url": "http://en.wikipedia.org/wiki/Automatic_summarization",
    "text": "",
    "sentnum": 8
}

There are three parameters in the request, "url", "text" and "sentnum", you can insert a page url you want to summarize directly or copy and paste some text from some ariticles to be summarized, and the "sentnum" is the sentence number of the summarized text you want. Notice that the "url" parameter processed first, if you want summarize some text, use th json request like the following:


{
    "url": "",
    "text": "Automatic summarization is the process of reducing a text document with a computer program in order to create a summary that retains the most important points of the original document. As the problem of information overload has grown, and as the quantity of data has increased, so has interest in automatic summarization. Technologies that can make a coherent summary take into account variables such as length, writing style and syntax. An example of the use of summarization technology is search engines such as Google. Document summarization is another.",
    "sentnum": 8
}

The simplest way to use the API is by Curl, following is the example given by Mashape platform, using the first json request body:


curl --include --request POST
'https://textanalysis-text-summarization.p.mashape.com/text-summarizer' \
    --header "X-Mashape-Authorization: Mashape API Key" \
    --header "Content-Type: application/json" \
    --data "{\"url\":\"http:\/\/en.wikipedia.org\/wiki\/Automatic_summarization\",\"text\":\"\",\"sentnum\":8}"

Here the Mashape API Key you can find in your Mashape account dashboard, copyt it and replace it, and than excute it on the command line, finally, you can get the response like this:


{
    "sentences": [
        "Document summarization is another.",
        "Generally, there are two approaches to automatic summarization: extraction and abstraction.",
        "Furthermore, evaluation of extracted summaries can be automated, since it is essentially a classification task.",
        "Even though automating abstractive summarization is the goal of summarization research, most practical systems are based on some form of extractive summarization.",
        "Extractive methods work by selecting a subset of existing words, phrases, or sentences in the original text to form the summary.",
        "The state-of-the-art abstractive methods are still quite weak, so most research has focused on extractive methods.",
       "These systems are known as multi-document summarization systems.",
       "People are subjective, and different authors would choose different sentences."
   ]
}

If you want use our professional text summarization api on other programming languages like java, python, ruby and etc, you should use the open source Unirest library provided by Mashape. Following is the details of using Text Summarization API for the supported programming language: