Each indicoio function can be called with a batch of data for analyzing many examples with a single network request. This can improve the speed of using the indico APIs significantly. Simply pass in a list of inputs and receive a list of results in return. The optimal balance between the size of the batch requests and the amount of network requests varies case by case, but performance is usually optimal between 20-100 examples.
Not using the latest package?
If you’re using an older version of our client libraries the syntax for batch calls is different. Namely, you’ll need to call a separate batch function as shown below.
import indicoio indicoio.config.api_key = 'cc9302ad9499c2280755c0b30e6b9f9e' # Version >= 0.9.0 indicoio.sentiment(['indico is so easy to use!', 'Still really easy, yiss']) # Version < 0.9.0 indicoio.batch_sentiment(['indico is so easy to use!', 'Still really easy, yiss']) # [0.9782025594088044, 0.9895808115135271]