Ensuring calls default to the values found by the Settings object in indicoio.config

This commit is contained in:
Madison May
2015-02-27 16:33:22 -05:00
parent 110abaf7a6
commit e9fc025e95
11 changed files with 67 additions and 20 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
from indicoio.utils import api_handler
import indicoio.config as config
def language(text, cloud=config.cloud, batch=False, auth=None, **kwargs):
def language(text, cloud=config.CLOUD, batch=False, auth=None, **kwargs):
"""
Given input text, returns a probability distribution over 33 possible
languages of what language the text was written in.
+2 -2
View File
@@ -2,7 +2,7 @@ from indicoio import JSON_HEADERS
from indicoio.utils import api_handler
import indicoio.config as config
def political(text, cloud=config.cloud, batch=False, auth=None, **kwargs):
def political(text, cloud=config.CLOUD, batch=False, auth=None, **kwargs):
"""
Given input text, returns a probability distribution over the political alignment of the speaker.
@@ -30,7 +30,7 @@ def political(text, cloud=config.cloud, batch=False, auth=None, **kwargs):
return api_handler(text, cloud=cloud, api="political", batch=batch, auth=auth, **kwargs)
def posneg(text, cloud=config.cloud, batch=False, auth=None, **kwargs):
def posneg(text, cloud=config.CLOUD, batch=False, auth=None, **kwargs):
"""
Given input text, returns a scalar estimate of the sentiment of that text.
Values are roughly in the range 0 to 1 with 0.5 indicating neutral sentiment.
+1 -1
View File
@@ -1,7 +1,7 @@
from indicoio.utils import api_handler
import indicoio.config as config
def text_tags(text, cloud=config.cloud, batch=False, auth=None, **kwargs):
def text_tags(text, cloud=config.CLOUD, batch=False, auth=None, **kwargs):
"""
Given input text, returns a probability distribution over 100 document categories