mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-06-27 16:10:34 +08:00
UPDATE: version number, README, CHANGES.txt
This commit is contained in:
@@ -1,6 +0,0 @@
|
||||
This directory contains eggs that were downloaded by setuptools to build, test, and run plug-ins.
|
||||
|
||||
This directory caches those eggs to prevent repeated downloads.
|
||||
|
||||
However, it is safe to delete this directory.
|
||||
|
||||
+2
-1
@@ -31,4 +31,5 @@ v0.7.4 Mon Jun 22 -- Fix for setup.py issues
|
||||
v0.7.5 Wed Jul 1 -- Public access to sentimentHQ api
|
||||
v0.7.6 Tue Jul 7 -- Add Keywords API
|
||||
v0.8.0 Fri Jul 10 -- Add Content Filtering API, Named Entities API, Facial Emotion with Localization
|
||||
v0.8.1 Wed Fri 22 -- Add Sentiment HQ to predict_text API
|
||||
v0.8.1 Wed Jul 22 -- Add Sentiment HQ to predict_text API
|
||||
v0.9.0 Tue Jul 28 -- Deprecate batch function calls in favor of type inference
|
||||
|
||||
@@ -83,11 +83,11 @@ Examples
|
||||
|
||||
Batch API
|
||||
---------
|
||||
Each `indicoio` function has a corresponding batch function for analyzing many examples with a single request. Simply pass in a list of inputs and receive a list of results in return.
|
||||
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.
|
||||
```python
|
||||
>>> from indicoio import batch_sentiment
|
||||
>>> from indicoio import sentiment
|
||||
|
||||
>>> batch_sentiment(['Best day ever', 'Worst day ever'])
|
||||
>>> sentiment(['Best day ever', 'Worst day ever'])
|
||||
[0.9899001220871786, 0.005709885173415242]
|
||||
```
|
||||
|
||||
@@ -101,12 +101,12 @@ Accepted text API names: `text_tags, political, sentiment, language`
|
||||
Accepted image API names: `fer, facial_features, image_features`
|
||||
|
||||
```python
|
||||
>>> from indicoio import predict_text, predict_image, batch_predict_text, batch_predict_image
|
||||
>>> from indicoio import predict_text, predict_image, predict_text, predict_image
|
||||
|
||||
>>> predict_text('Best day ever', apis=["sentiment", "language"])
|
||||
{'sentiment': 0.9899001220871786, 'language': {u'Swedish': 0.0022464881013042294, u'Vietnamese': 9.887170914498351e-05, ...}}
|
||||
|
||||
>>> batch_predict_text(['Best day ever', 'Worst day ever'], apis=["sentiment", "language"])
|
||||
>>> predict_text(['Best day ever', 'Worst day ever'], apis=["sentiment", "language"])
|
||||
{'sentiment': [0.9899001220871786, 0.005709885173415242], 'language': [{u'Swedish': 0.0022464881013042294, u'Vietnamese': 9.887170914498351e-05, u'Romanian': 0.00010661175919993216, ...}, {u'Swedish': 0.4924352805804646, u'Vietnamese': 0.028574824174911372, u'Romanian': 0.004185623723173551, u'Dutch': 0.000717033819689362, u'Korean': 0.0030093489153785826, ...}]}
|
||||
|
||||
>>> import numpy as np
|
||||
@@ -116,6 +116,6 @@ Accepted image API names: `fer, facial_features, image_features`
|
||||
>>> predict_image(test_face, apis=["fer", "facial_features"])
|
||||
{'facial_features': [0.0, -0.026176479280200796, 0.20707644777495776, ...], 'fer': {u'Angry': 0.08877494466353497, u'Sad': 0.3933999409104264, u'Neutral': 0.1910612654566151, u'Surprise': 0.0346146405941845, u'Fear': 0.17682159820518667, u'Happy': 0.11532761017005204}}
|
||||
|
||||
>>> batch_predict_image([test_face, test_face], apis=["fer", "facial_features"])
|
||||
>>> predict_image([test_face, test_face], apis=["fer", "facial_features"])
|
||||
{'facial_features': [[0.0, -0.026176479280200796, 0.20707644777495776, ...], [0.0, -0.026176479280200796, 0.20707644777495776, ...]], 'fer': [{u'Angry': 0.08877494466353497, u'Sad': 0.3933999409104264, u'Neutral': 0.1910612654566151, u'Surprise': 0.0346146405941845, u'Fear': 0.17682159820518667, u'Happy': 0.11532761017005204}, { u'Angry': 0.08877494466353497, u'Sad': 0.3933999409104264, u'Neutral': 0.1910612654566151, u'Surprise': 0.0346146405941845, u'Fear': 0.17682159820518667, u'Happy': 0.11532761017005204}]}
|
||||
```
|
||||
|
||||
+8
-8
@@ -91,15 +91,15 @@ Examples
|
||||
Batch API
|
||||
---------
|
||||
|
||||
Each ``indicoio`` function has a corresponding batch function for
|
||||
analyzing many examples with a single request. Simply pass in a list of
|
||||
inputs and receive a list of results in return.
|
||||
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.
|
||||
|
||||
.. code:: python
|
||||
|
||||
>>> from indicoio import batch_sentiment
|
||||
>>> from indicoio import sentiment
|
||||
|
||||
>>> batch_sentiment(['Best day ever', 'Worst day ever'])
|
||||
>>> sentiment(['Best day ever', 'Worst day ever'])
|
||||
[0.9899001220871786, 0.005709885173415242]
|
||||
|
||||
Calling multiple APIs with a single function
|
||||
@@ -119,12 +119,12 @@ Accepted image API names: ``fer, facial_features, image_features``
|
||||
|
||||
.. code:: python
|
||||
|
||||
>>> from indicoio import predict_text, predict_image, batch_predict_text, batch_predict_image
|
||||
>>> from indicoio import predict_text, predict_image, predict_text, predict_image
|
||||
|
||||
>>> predict_text('Best day ever', apis=["sentiment", "language"])
|
||||
{'sentiment': 0.9899001220871786, 'language': {u'Swedish': 0.0022464881013042294, u'Vietnamese': 9.887170914498351e-05, ...}}
|
||||
|
||||
>>> batch_predict_text(['Best day ever', 'Worst day ever'], apis=["sentiment", "language"])
|
||||
>>> predict_text(['Best day ever', 'Worst day ever'], apis=["sentiment", "language"])
|
||||
{'sentiment': [0.9899001220871786, 0.005709885173415242], 'language': [{u'Swedish': 0.0022464881013042294, u'Vietnamese': 9.887170914498351e-05, u'Romanian': 0.00010661175919993216, ...}, {u'Swedish': 0.4924352805804646, u'Vietnamese': 0.028574824174911372, u'Romanian': 0.004185623723173551, u'Dutch': 0.000717033819689362, u'Korean': 0.0030093489153785826, ...}]}
|
||||
|
||||
>>> import numpy as np
|
||||
@@ -134,6 +134,6 @@ Accepted image API names: ``fer, facial_features, image_features``
|
||||
>>> predict_image(test_face, apis=["fer", "facial_features"])
|
||||
{'facial_features': [0.0, -0.026176479280200796, 0.20707644777495776, ...], 'fer': {u'Angry': 0.08877494466353497, u'Sad': 0.3933999409104264, u'Neutral': 0.1910612654566151, u'Surprise': 0.0346146405941845, u'Fear': 0.17682159820518667, u'Happy': 0.11532761017005204}}
|
||||
|
||||
>>> batch_predict_image([test_face, test_face], apis=["fer", "facial_features"])
|
||||
>>> predict_image([test_face, test_face], apis=["fer", "facial_features"])
|
||||
{'facial_features': [[0.0, -0.026176479280200796, 0.20707644777495776, ...], [0.0, -0.026176479280200796, 0.20707644777495776, ...]], 'fer': [{u'Angry': 0.08877494466353497, u'Sad': 0.3933999409104264, u'Neutral': 0.1910612654566151, u'Surprise': 0.0346146405941845, u'Fear': 0.17682159820518667, u'Happy': 0.11532761017005204}, { u'Angry': 0.08877494466353497, u'Sad': 0.3933999409104264, u'Neutral': 0.1910612654566151, u'Surprise': 0.0346146405941845, u'Fear': 0.17682159820518667, u'Happy': 0.11532761017005204}]}
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from functools import wraps, partial
|
||||
import warnings
|
||||
|
||||
Version, version, __version__, VERSION = ('0.8.1',) * 4
|
||||
Version, version, __version__, VERSION = ('0.9.0',) * 4
|
||||
|
||||
JSON_HEADERS = {
|
||||
'Content-type': 'application/json',
|
||||
|
||||
Reference in New Issue
Block a user