Septzzz's picture
Upload folder using huggingface_hub (part 22)
8ba3cef verified
Raw
History Blame Contribute Delete
3.48 kB
import requests
import json
from datetime import date, datetime, timedelta
import os
from typing import Optional, Dict, Union, List
def sentiment_analysis(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Identify the topics of conversation and evaluate, extract and quantify the emotional state or attitude of your customers towards those topics with a polarity score value."
"""
url = f"https://bitext.p.rapidapi.comsignup"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "bitext.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def entity_extraction(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Extract the relevant named entities (personal names, places, companies, addresses, dates, phone numbers, etc.)."
"""
url = f"https://bitext.p.rapidapi.comsignup"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "bitext.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def language_identification(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Identify what language a text is written in, including multilingual text. Available in over 50 languages."
"""
url = f"https://bitext.p.rapidapi.comsignup"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "bitext.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def lemmatization(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"Identify all potential roots (lemmas) of each word, using morphological analysis and carefully-curated lexicons. Available in 15 languages."
"""
url = f"https://bitext.p.rapidapi.comsignup"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "bitext.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation
def bot_assitant_services(toolbench_rapidapi_key: str='088440d910mshef857391f2fc461p17ae9ejsnaebc918926ff'):
"""
"NLP solutions that will improve the performance your Customer Support chatbot and help you create the best automated Customer Support experience."
"""
url = f"https://bitext.p.rapidapi.comsignup"
querystring = {}
headers = {
"X-RapidAPI-Key": toolbench_rapidapi_key,
"X-RapidAPI-Host": "bitext.p.rapidapi.com"
}
response = requests.get(url, headers=headers, params=querystring)
try:
observation = response.json()
except:
observation = response.text
return observation