Giter Club home page Giter Club logo

textrazor-api-cli's Introduction

TextRazor API CLI

A nodejs-powered command-line interface for TextRazor.

Getting Started

Make textrazor.js executable

computer-1:repositories user$ cd textrazor-api-cli
computer-1:textrazor-api-cli user$ chmod +x textrazor.js

Add TextRazor API Key

Get a key here.

Add a file called .env in the project root containing your TextRazor API key.

// contents of news-api-cli/.env
TEXTRAZOR_API_KEY=YOUR-KEY-HERE

Commands

Usage

analyze [options]

Options

-t, --text [text]              Content to analyze
-u, --urls [urls]              A list of comma-separated urls to extract and analyze
-e, --extractors <extractors>  A list of comma-separated extractors
-w, --write [path]             Save the result to [path]/[encodeURIComponent(url or text)]
-h, --help                     output usage information

Examples

Extract entities and topics from the phrase "Donald Trump is a moron" and save it to donald/Donald%20Trump%20is%20a%20moron.json:

./textrazor.js analyze -t "Donald Trump is a moron" -e entities,topics  -w donald

Extract entities and topics from a New York Times article and save it to nyt/https%3A%2F%2Fwww.nytimes.com%2F2018%2F08%2F25%2Fus%2Fpolitics%2Frobert-mueller-russia-investigation.htm.json:

./textrazor.js analyze -u https://www.nytimes.com/2018/08/25/us/politics/robert-mueller-russia-investigation.html -e entities,topics  -w nyt

textrazor-api-cli's People

Contributors

jasonbelmonti avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.