Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including text-backdrop with all npm packages installed. Try it out:

var backdrop = require('text-backdrop'); await backdrop('Donald Trump is running for president in 2016')

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

text-backdrop v1.0.8

Module to analyze meaning from text and send back relevant information about the text


Text-backdrop is a text-contextualization tool that takes a string and returns some relevant news, images, and wikipedia summaries. This module exports a single function which will take a string and return a promise that (when fulfilled) will return an object with contextual information (described below).

How to use

var backdrop = require('text-backdrop');
backdrop('Donald Trump is running for president in 2016').then(console.log)


    original_text: 'Donald Trump is running for president in 2016'
    named_entities: {'Donald Trump': {confidence: ...}}
    textTags: {'right_politics': .1244, 'energy': .0954, 'left_politics': .1674}
    keywords: {'2016': .2015, donald: .2385, trump: .2337}
    news: [{title: 'Presidential Horse Race 2016....', url: ...}, {title: 'Election 2016: Donald Trump...', url: ...}, ...]
    'Donald Trump': {
        images: ...
        summary: 'Donald John Trump (born on June 14, 1946) is an American...'

Explanation of Results

The results are a JSON object containing all extracted relevant information. We notice that the tool returns named entities (i.e. people, places, and organizations), categorical tags of the text, keywords from the text, relevant news (given the keywords), and images and a wikipedia summary for each named entity.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free