indicoio-python
A wrapper for the indico API.
The indico API is free to use, and no training data is required.
Installation
From PyPI:
pip install indicoio
From source:
git clone https://github.com/IndicoDataSolutions/IndicoIo-python.git
python setup.py install
API Keys + Setup
For API key registration and setup, checkout our quickstart guide.
Full Documentation
Detailed documentation and further code examples are available at indico.io/docs.
Supported APIs:
Positive/Negative Sentiment Analysis
Political Sentiment Analysis
Image Feature Extraction
Facial Emotion Recognition
Facial Feature Extraction
Language Detection
Text Topic Tagging
Examples
>>> from indicoio import political, sentiment, language, text_tags, keywords, fer, facial_features, image_features
>>> indicoio.config.api_key = "YOUR_API_KEY"
>>> political("Guns don't kill people. People kill people.")
{u'Libertarian': 0.47740164630834825, u'Green': 0.08454409540443657, u'Liberal': 0.16617097211030055, u'Conservative': 0.2718832861769146}
>>> sentiment('Worst movie ever.')
0.07062467665597527
>>> sentiment('Really enjoyed the movie.')
0.8105182526856075
>>> text_tags("Facebook blog posts about Android tech make better journalism than most news outlets.")
>>> text_tags(test_text, threshold=0.1) # return only keys with value > 0.1
{u'startups_and_entrepreneurship': 0.21888586688354486}
>>> text_tags(test_text, top_n=1) # return only keys with top_n values
{u'startups_and_entrepreneurship': 0.21888586688354486}
>>> import numpy as np
>>> test_face = np.linspace(0,50,48*48).reshape(48,48)
>>> fer(test_face)
{u'Angry': 0.08843749137458341, u'Sad': 0.39091163159204684, u'Neutral': 0.1947947999669361, u'Surprise': 0.03443785859010413, u'Fear': 0.17574534848440568, u'Happy': 0.11567286999192382}
>>> facial_features(test_face)
[0.0, -0.02568680526917187, 0.21645604230056517, ..., 3.0342637531932777]
>>> language('Quis custodiet ipsos custodes')
{u'Swedish': 0.00033330636691921914, u'Lithuanian': 0.007328693814717631, u'Vietnamese': 0.0002686116137658802, u'Romanian': 8.133913804076592e-06, ...}
>>> keywords("Facebook blog posts about Android tech make better journalism than most news outlets.", top_n=3)
{u'android': 0.10602030910588661,
u'journalism': 0.13466866170166855,
u'outlets': 0.13930405357808642}
Batch API
Each indicoio function can process many examples with a single request. Simply pass in a list of inputs and receive a list of results in return.
>>> from indicoio import sentiment
>>> sentiment(['Best day ever', 'Worst day ever'])
[0.9899001220871786, 0.005709885173415242]
Metadata
Release files for IndicoIo 1.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| IndicoIo-1.4.1.tar.gz | 22.3 kB | Without provenance | Details for IndicoIo-1.4.1.tar.gz |
Release files / IndicoIo-1.4.1.tar.gz
| Download URL | IndicoIo-1.4.1.tar.gz |
|---|---|
| Size | 22.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f856d90d35be527619c46f33404f6190b461692f85062ccdf47130680a7b8585
|
|
BLAKE2b-256 checksum How to use checksums |
252fca5898efa371333130e648159cacc721562dca030ff444e01a3a71d557e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.42.0 CPython/3.7.5
|
Security for IndicoIo 1.4.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.