mirror of
https://github.com/wassname/IndicoIo-python.git
synced 2026-07-26 13:07:34 +08:00
Ensuring calls default to the values found by the Settings object in indicoio.config
This commit is contained in:
@@ -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,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,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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user