Skip to content

bredikhin/indico

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indico

Indico.io API wrapper in Elixir.

Installation

Just add indico to your list of dependencies in mix.exs:

def deps do
  [
    {:indico, "~> 0.1.1"}
  ]
end

and put your Indico.io API key in your configuration file like this:

config :indico, indico_io_api_key: System.get_env("INDICO_IO_API_KEY")

(assuming that environment variable is set).

Implemented functionality

  • sentiment: quickly and efficiently determine if text is positive or negative,
  • sentimenthq: Highly accurate sentiment analysis but less performant than the standard Sentiment API,
  • texttags: Determine the topics in the phrase or document,
  • language: Automatically determine the language of a phrase or document,
  • political: Gauge the political leanings of a phrase or document,
  • people: Identify references to specific persons found in a document,
  • places: Identify references to specific places found in a document,
  • organizations: Identify references to specific organizations found in a document,
  • personality: Predicts the personality traits of a text's author,
  • textfeatures: Convert text into meaningful feature vectors,
  • emotion: Predicts the emotion expressed by an author in a sample of text,
  • summarization: Summarizes long documents by extracting important sentences

Usage example

iex(1)> IndicoIo.sentiment "I feel good!"
{:ok, %{"results" => 0.9360338577753942}}
iex(2)> IndicoIo.sentiment "yikes!"
{:ok, %{"results" => 8.545276187403398e-4}}
iex(3)> IndicoIo.sentiment(["yes-yes-yes!", "no way!"])
{:ok, %{"results" => [0.9344446305911374, 0.005659668743777363]}}

Dependencies

Documentation

The docs are available at https://hexdocs.pm/indico.

License

The MIT License

Copyright (c) 2018 Ruslan Bredikhin

Releases

No releases published

Packages

No packages published

Languages