diff --git a/edenai_apis/apis/__init__.py b/edenai_apis/apis/__init__.py index c32fbfba..32cdd7ab 100644 --- a/edenai_apis/apis/__init__.py +++ b/edenai_apis/apis/__init__.py @@ -9,7 +9,6 @@ from .base64 import Base64Api from .clarifai import ClarifaiApi from .cohere import CohereApi -from .connexun import ConnexunApi from .corticalio import CorticalioApi from .dataleon import DataleonApi from .deepai import DeepAIApi @@ -24,9 +23,7 @@ from .gladia import GladiaApi from .google import GoogleApi from .hireability import HireabilityApi -from .ibm import IbmApi from .klippa import KlippaApi -from .lettria import LettriaApi from .lovoai import LovoaiApi from .meaningcloud import MeaningcloudApi from .meta import MetaApi @@ -34,27 +31,21 @@ from .mindee import MindeeApi from .mistral import MistralApi from .modernmt import ModernmtApi -from .neuralspace import NeuralSpaceApi -from .nlpcloud import NlpCloudApi from .nyckel import NyckelApi from .oneai import OneaiApi from .openai import OpenaiApi from .originalityai import OriginalityaiApi from .perplexityai import PerplexityApi -from .phedone import PhedoneApi from .photoroom import PhotoroomApi -from .picpurify import PicpurifyApi from .privateai import PrivateaiApi from .prowritingaid import ProWritingAidApi from .readyredact import ReadyRedactApi from .replicate import ReplicateApi -from .revai import RevAIApi from .rossum import RossumApi from .sapling import SaplingApi from .senseloaf import SenseloafApi from .sentisight import SentiSightApi from .sightengine import SightEngineApi -from .skybiometry import SkybiometryApi from .smartclick import SmartClickApi from .speechmatics import SpeechmaticsApi from .stabilityai import StabilityAIApi diff --git a/edenai_apis/apis/clarifai/clarifai_api.py b/edenai_apis/apis/clarifai/clarifai_api.py index 82cbd5d0..b85adb1b 100644 --- a/edenai_apis/apis/clarifai/clarifai_api.py +++ b/edenai_apis/apis/clarifai/clarifai_api.py @@ -56,7 +56,7 @@ from .clarifai_helpers import explicit_content_likelihood, get_formatted_language -class ClarifaiApi(ProviderInterface, OcrInterface, ImageInterface, TextInterface): +class ClarifaiApi(ProviderInterface, OcrInterface, ImageInterface): provider_name = "clarifai" def __init__(self, api_keys: Dict = {}) -> None: @@ -71,81 +71,6 @@ def __init__(self, api_keys: Dict = {}) -> None: self.text_moderation_code = "moderation-multilingual-text-classification" self.text_generation_code = "mistral-7B-Instruct" - def text__generation( - self, text: str, temperature: float, max_tokens: int, model: str - ) -> ResponseType[GenerationDataClass]: - raise ProviderException( - message="This provider is deprecated. You won't be charged for your call.", - code=500, - ) - - def text__moderation( - self, text: str, language: str - ) -> ResponseType[ModerationDataClass]: - channel = ClarifaiChannel.get_grpc_channel() - stub = service_pb2_grpc.V2Stub(channel) - - metadata = (("authorization", self.key),) - user_data_object = resources_pb2.UserAppIDSet(user_id="clarifai", app_id="main") - - post_model_outputs_response = stub.PostModelOutputs( - service_pb2.PostModelOutputsRequest( - # The userDataObject is created in the overview and is required when using a PAT - user_app_id=user_data_object, - model_id=self.text_moderation_code, - inputs=[ - resources_pb2.Input( - data=resources_pb2.Data(text=resources_pb2.Text(raw=text)) - ) - ], - ), - metadata=metadata, - ) - - if post_model_outputs_response.status.code != status_code_pb2.SUCCESS: - raise ProviderException( - post_model_outputs_response.status.description, - code=post_model_outputs_response.status.code, - ) - - response = MessageToDict( - post_model_outputs_response, preserving_proto_field_name=True - ) - output = response.get("outputs", []) - if len(output) == 0: - raise ProviderException( - "Clarifai returned an empty response!", - code=post_model_outputs_response.status.code, - ) - - original_response = output[0].get("data", {}) or {} - - classification: Sequence[TextModerationItem] = [] - for concept in original_response.get("concepts", []) or []: - classificator = CategoryType.choose_category_subcategory(concept["name"]) - classification.append( - TextModerationItem( - label=concept["name"], - category=classificator["category"], - subcategory=classificator["subcategory"], - likelihood_score=concept["value"], - likelihood=standardized_confidence_score(concept["value"]), - ) - ) - standardized_response: ModerationDataClass = ModerationDataClass( - nsfw_likelihood=ModerationDataClass.calculate_nsfw_likelihood( - classification - ), - nsfw_likelihood_score=ModerationDataClass.calculate_nsfw_likelihood_score( - classification - ), - items=classification, - ) - return ResponseType[ModerationDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - def ocr__ocr( self, file: str, diff --git a/edenai_apis/apis/connexun/__init__.py b/edenai_apis/apis/connexun/__init__.py deleted file mode 100644 index 2dec6d97..00000000 --- a/edenai_apis/apis/connexun/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .connexun_api import ConnexunApi diff --git a/edenai_apis/apis/connexun/connexun_api.py b/edenai_apis/apis/connexun/connexun_api.py deleted file mode 100644 index 49ef1b9e..00000000 --- a/edenai_apis/apis/connexun/connexun_api.py +++ /dev/null @@ -1,106 +0,0 @@ -import json -from typing import Dict, Optional - -import requests - -from edenai_apis.features import ProviderInterface, TextInterface -from edenai_apis.features.text import ( - SentimentAnalysisDataClass, - SummarizeDataClass, -) -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from edenai_apis.utils.exception import ProviderException -from edenai_apis.utils.types import ResponseType - - -class ConnexunApi(ProviderInterface, TextInterface): - provider_name = "connexun" - - def __init__(self, api_keys: Dict = {}) -> None: - self.api_settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys - ) - self.api_key = self.api_settings["api"] - self.base_url = "https://api.connexun.com/" - - def text__sentiment_analysis( - self, language: str, text: str - ) -> ResponseType[SentimentAnalysisDataClass]: - files = {"text": text} - headers = { - "x-api-key": self.api_key, - "Content-Type": "application/json", - "Accept": "application/json", - } - url = f"{self.base_url}text-analysis/sentiment" - - response = requests.post(url, headers=headers, json=files) - original_response = response.json() - - if isinstance(original_response, dict) and original_response.get("message"): - raise ProviderException( - original_response["message"], - code = response.status_code - ) - - general_sentiment = original_response.get("Sentiment") - general_sentiment_rate = original_response.get("Value") - - if not general_sentiment and not general_sentiment_rate: - raise ProviderException( - "Provider has not found a sentiment of the text.", - code = 200 - ) - - standardized_response = SentimentAnalysisDataClass( - general_sentiment=original_response.get("Sentiment"), - general_sentiment_rate=original_response.get("Value"), - ) - - return ResponseType[SentimentAnalysisDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - - def text__summarize( - self, - text: str, - output_sentences: int, - language: str, - model: Optional[str] = None, - ) -> ResponseType[SummarizeDataClass]: - # Prepare request - files = {"text": text, "output_sentences": output_sentences} - headers = { - "x-api-key": self.api_key, - "Content-Type": "application/json", - "Accept": "application/json", - } - url = f"{self.base_url}text-analysis/summarize" - - # Send request to API - response = requests.post(url, headers=headers, json=files) - status_code = response.status_code - try: - original_response = response.json() - except json.JSONDecodeError: - raise ProviderException("Internal server error", code = status_code) - if status_code != 200: - raise ProviderException(response.json()["detail"], code = status_code) - if original_response.get("Error"): - raise ProviderException(original_response["Error"], code = status_code) - - # Check errors from API - if isinstance(original_response, dict) and original_response.get("message"): - raise ProviderException(original_response["message"], code = status_code) - - # Return standardized response - standardized_response = SummarizeDataClass( - result=original_response.get("summary", {}) - ) - result = ResponseType[SummarizeDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - return result diff --git a/edenai_apis/apis/connexun/errors.py b/edenai_apis/apis/connexun/errors.py deleted file mode 100644 index fc9e02d7..00000000 --- a/edenai_apis/apis/connexun/errors.py +++ /dev/null @@ -1,22 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInvalidInputError, - ProviderInvalidInputTextLengthError, - ProviderAuthorizationError, - ProviderParsingError, -) - -# NOTE: error messages should be regex patterns -ERRORS: ProviderErrorLists = { - ProviderInvalidInputError: [ - r"Requested sentences exceed total sentences detected in text", - r"Invalid language format for: \w+.", - ], - ProviderInvalidInputTextLengthError: [ - r"Input text not formatted correctly. Error Too \w+ text, should be \w+ than \d+ characters", - ], - ProviderAuthorizationError: [ - r"Forbidden", - ], - ProviderParsingError: [r"Provider has not found a sentiment of the text."], -} diff --git a/edenai_apis/apis/connexun/info.json b/edenai_apis/apis/connexun/info.json deleted file mode 100644 index ee51d202..00000000 --- a/edenai_apis/apis/connexun/info.json +++ /dev/null @@ -1,70 +0,0 @@ -{ - "text": { - "sentiment_analysis": { - "constraints": { - "languages": [ - "en", - "ar", - "bn", - "da", - "de", - "es", - "fi", - "fr", - "hi", - "id", - "it", - "ja", - "ko", - "nl", - "no", - "pa", - "pl", - "pt", - "ro", - "ru", - "sv", - "ta", - "tr", - "uk", - "zh" - ], - "allow_null_language": true - }, - "version": "v1.0" - }, - "summarize": { - "constraints": { - "languages": [ - "en", - "ar", - "bn", - "da", - "de", - "es", - "fi", - "fr", - "hi", - "id", - "it", - "ja", - "ko", - "nl", - "no", - "pa", - "pl", - "pt", - "ro", - "ru", - "sv", - "ta", - "tr", - "uk", - "zh" - ], - "allow_null_language": true - }, - "version": "v1.0" - } - } -} diff --git a/edenai_apis/apis/connexun/outputs/text/sentiment_analysis_output.json b/edenai_apis/apis/connexun/outputs/text/sentiment_analysis_output.json deleted file mode 100644 index 88d2fa07..00000000 --- a/edenai_apis/apis/connexun/outputs/text/sentiment_analysis_output.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "original_response": { - "Sentiment": "negative", - "Value": 0.382 - }, - "standardized_response": { - "general_sentiment": "Negative", - "general_sentiment_rate": 0.38, - "items": [] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/connexun/outputs/text/summarize_output.json b/edenai_apis/apis/connexun/outputs/text/summarize_output.json deleted file mode 100644 index c2aee117..00000000 --- a/edenai_apis/apis/connexun/outputs/text/summarize_output.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "original_response": { - "summary": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American president of the United States.", - "language": "en", - "sentenceLength": 2, - "sentenceRanked": [ - [ - "1", - "A member of the Democratic Party, Obama was the first African-American president of the United States." - ], - [ - "0", - "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017." - ] - ] - }, - "standardized_response": { - "result": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American president of the United States." - } -} \ No newline at end of file diff --git a/edenai_apis/apis/connexun/outputs/text/syntax_analysis_output.json b/edenai_apis/apis/connexun/outputs/text/syntax_analysis_output.json deleted file mode 100644 index e69de29b..00000000 diff --git a/edenai_apis/apis/ibm/__init__.py b/edenai_apis/apis/ibm/__init__.py deleted file mode 100644 index e5065f3b..00000000 --- a/edenai_apis/apis/ibm/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .ibm_api import IbmApi diff --git a/edenai_apis/apis/ibm/config.py b/edenai_apis/apis/ibm/config.py deleted file mode 100644 index d463fe40..00000000 --- a/edenai_apis/apis/ibm/config.py +++ /dev/null @@ -1,86 +0,0 @@ -from typing import Dict - -from watson_developer_cloud import NaturalLanguageUnderstandingV1, LanguageTranslatorV3 -from watson_developer_cloud.speech_to_text_v1 import SpeechToTextV1 -from watson_developer_cloud.text_to_speech_v1 import TextToSpeechV1 - - -def ibm_clients(api_settings: Dict) -> Dict: - return { - "text": NaturalLanguageUnderstandingV1( - version="2021-08-01", - iam_apikey=api_settings["natural_language_understanding"]["apikey"], - url=api_settings["natural_language_understanding"]["url"], - ), - "texttospeech": TextToSpeechV1( - iam_apikey=api_settings["text_to_speech"]["apikey"], - url=api_settings["text_to_speech"]["url"], - ), - "translation": LanguageTranslatorV3( - version="2018-05-01", - iam_apikey=api_settings["translator"]["apikey"], - url=api_settings["translator"]["url"], - ), - "speech": SpeechToTextV1( - iam_apikey=api_settings["speech_to_text"]["apikey"], - url=api_settings["speech_to_text"]["url"], - ), - } - - -models = { - "fr-FR": "fr-FR_NarrowbandModel", - "en-US": "en-US_NarrowbandModel", - "en-GB": "en-GB_NarrowbandModel", - "es-ES": "es-ES_NarrowbandModel", - "it-IT": "it-IT_NarrowbandModel", - "ja-JP": "ja-JP_NarrowbandModel", - "nl-NL": "nl-NL_NarrowbandModel", - "pt-PT": "pt-BR_NarrowbandModel", - "de-DE": "de-DE_NarrowbandModel", -} - -audio_voices_ids = { - "en-US": {"FEMALE": "en-US_AllisonExpressive", "MALE": "en-US_MichaelExpressive"}, - "fr-FR": {"FEMALE": "fr-FR_ReneeV3Voice", "MALE": "fr-FR_NicolasV3Voice"}, - "es-ES": {"FEMALE": "es-ES_LauraV3Voice", "MALE": "es-ES_EnriqueV3Voice"}, - "de-DE": {"FEMALE": "de-DE_BirgitV3Voice", "MALE": "de-DE_DieterV3Voice"}, - "en-GB": {"FEMALE": "en-GB_KateV3Voice", "MALE": "en-GB_JamesV3Voice"}, - "it-IT": {"FEMALE": "it-IT_FrancescaV3Voice", "MALE": ""}, - "ja-JP": {"FEMALE": "ja-JP_EmiV3Voice", "MALE": ""}, - "pt-BR": {"FEMALE": "pt-BR_IsabelaV3Voice", "MALE": ""}, - "fr-CA": {"FEMALE": "fr-CA_LouiseV3Voice", "MALE": ""}, - "es-LA": {"FEMALE": "es-LA_SofiaV3Voice", "MALE": ""}, - "es-US": {"FEMALE": "es-US_SofiaV3Voice", "MALE": ""}, - "en-AU": {"FEMALE": "en-AU_HeidiExpressive", "MALE": "en-AU_JackExpressive"}, - "nl-NL": {"FEMALE": "nl-NL_MerelV3Voice"}, - "ko-KR": {"FEMALE": "ko-KR_JinV3Voice"}, -} - -language_iso = { - "fr-FR": "fr", - "en-US": "en", - "es-ES": "es", - "fn-FN": "fi", - "sw-SW": "sv", -} - -tags = { - "ADJ": "Adjactive", - "ADP": "Adposition", - "ADV": "Adverb", - "AUX": "Auxiliary", - "CCONJ": "Coordinating_Conjunction", - "INTJ": "Injection", - "DET": "Determiner", - "NOUN": "Noun", - "NUM": "Cardinal number", - "PRON": "Pronoun", - "PROPN": "Proper noun", - "PART": "Particle", - "PUNCT": "Punctuation", - "SYM": "Symbol", - "SCONJ": "Sub Conjunction", - "VERB": "Verb", - "X": "Other", -} diff --git a/edenai_apis/apis/ibm/errors.py b/edenai_apis/apis/ibm/errors.py deleted file mode 100644 index b9965cb0..00000000 --- a/edenai_apis/apis/ibm/errors.py +++ /dev/null @@ -1,49 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInternalServerError, - ProviderInvalidInputError, - ProviderInvalidInputPayloadSize, - ProviderMissingInputError, - ProviderParsingError, - ProviderInvalidInputFileFormatError, - ProviderInvalidInputAudioEncodingError, - ProviderNotFoundError, -) - -# NOTE: error messages should be regex patterns -ERRORS: ProviderErrorLists = { - ProviderMissingInputError: [ - r"The parameter 'target' should not be empty", - ], - ProviderParsingError: [ - r"Unable to detect the source language", - r"Mismatched tag found by parser", - ], - ProviderInvalidInputPayloadSize: [ - r"Payload length \d+ exceeds the payload limit 5120 bytes.", - r"Exceeded max content length for translate request, max allowed is 50 KiB", - r"Error: Payload length \d+ exceeds the payload limit 5120 bytes., Code: 400 , Information: {'code_description': 'Bad Request'} , X-dp-watson-tran-id: [a-f0-9\-]+ , X-global-transaction-id: [a-f0-9\-]+", - ], - ProviderInvalidInputError: [ - r"not enough text for language id", - r"unsupported text language: \w+", - r"Input contains unmatched open SSML tags", - r"Sampling rate must lie in the range of 8 kHz to 192 kHz", - r"\w+ with attribute volume is not supported in the current voice", - r"Only \w+ voice is available for the \w+ language code", - ], - ProviderInternalServerError: [ - r"Internal Server Error", - ], - ProviderInvalidInputFileFormatError: [ - r"Audio format not supported. Use one of the following: \w+", - r"File extension not supported. Use one of the following extensions: \w+", - ], - ProviderInvalidInputAudioEncodingError: [ - r"unable to transcode data stream \w+ -> \w+", - ], - ProviderNotFoundError: [ - r"Error: Unable to find model for specified languages, Code: 404 , X-dp-watson-tran-id: [a-f0-9\-]+ , X-global-transaction-id: [a-f0-9\-]+", - r"Error: Model \w+ not found, Code: 404 , Information: {'code_description': 'Not Found'} , X-dp-watson-tran-id: [a-f0-9\-]+ , X-global-transaction-id: [a-f0-9\-]+", - ], -} diff --git a/edenai_apis/apis/ibm/ibm_api.py b/edenai_apis/apis/ibm/ibm_api.py deleted file mode 100644 index 8d8752e5..00000000 --- a/edenai_apis/apis/ibm/ibm_api.py +++ /dev/null @@ -1,19 +0,0 @@ -from typing import Dict - -from edenai_apis.apis.ibm.ibm_audio_api import IbmAudioApi -from edenai_apis.apis.ibm.ibm_text_api import IbmTextApi -from edenai_apis.apis.ibm.ibm_translation_api import IbmTranslationApi -from edenai_apis.features import ProviderInterface -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from .config import ibm_clients - - -class IbmApi(ProviderInterface, IbmTranslationApi, IbmAudioApi, IbmTextApi): - provider_name = "ibm" - - def __init__(self, api_keys: Dict = {}): - self.api_settings = load_provider( - ProviderDataEnum.KEY, "ibm", api_keys=api_keys - ) - self.clients = ibm_clients(self.api_settings) diff --git a/edenai_apis/apis/ibm/ibm_audio_api.py b/edenai_apis/apis/ibm/ibm_audio_api.py deleted file mode 100644 index 73fd72c7..00000000 --- a/edenai_apis/apis/ibm/ibm_audio_api.py +++ /dev/null @@ -1,168 +0,0 @@ -import base64 -from io import BytesIO -from typing import List, Optional - -from edenai_apis.apis.ibm.ibm_helpers import ( - generate_right_ssml_text, - get_right_audio_support_and_sampling_rate, - handle_ibm_call, -) -from edenai_apis.features.audio import ( - SpeechDiarization, - SpeechDiarizationEntry, - SpeechToTextAsyncDataClass, - TextToSpeechDataClass, -) -from edenai_apis.features.audio.audio_interface import AudioInterface -from edenai_apis.utils.exception import ( - ProviderException, -) -from edenai_apis.utils.types import ( - AsyncBaseResponseType, - AsyncLaunchJobResponseType, - AsyncPendingResponseType, - AsyncResponseType, - ResponseType, -) -from edenai_apis.utils.upload_s3 import USER_PROCESS, upload_file_bytes_to_s3 - - -class IbmAudioApi(AudioInterface): - def audio__text_to_speech( - self, - language: str, - text: str, - option: str, - voice_id: str, - audio_format: str, - speaking_rate: int, - speaking_pitch: int, - speaking_volume: int, - sampling_rate: int, - ) -> ResponseType[TextToSpeechDataClass]: - """ - :param language: String that contains language name 'fr-FR', 'en-US', 'es-EN' - :param text: String that contains text to transform - :param option: String that contains option of voice(MALE, FEMALE) - :return: - """ - text = generate_right_ssml_text(text, speaking_rate, speaking_pitch) - - ext, audio_format = get_right_audio_support_and_sampling_rate( - audio_format, sampling_rate - ) - - params = {"text": text, "accept": audio_format, "voice": voice_id} - - request = handle_ibm_call(self.clients["texttospeech"].synthesize, **params) - response = handle_ibm_call(request.get_result) - - audio_content = BytesIO(response.content) - audio = base64.b64encode(audio_content.read()).decode("utf-8") - voice_type = 1 - - audio_content.seek(0) - resource_url = upload_file_bytes_to_s3(audio_content, f".{ext}", USER_PROCESS) - - standardized_response = TextToSpeechDataClass( - audio=audio, voice_type=voice_type, audio_resource_url=resource_url - ) - - return ResponseType[TextToSpeechDataClass]( - original_response={}, standardized_response=standardized_response - ) - - def audio__speech_to_text_async__launch_job( - self, - file: str, - language: str, - speakers: int, - profanity_filter: bool, - vocabulary: Optional[List[str]], - audio_attributes: tuple, - model: Optional[str] = None, - file_url: str = "", - provider_params: Optional[dict] = None, - ) -> AsyncLaunchJobResponseType: - provider_params = provider_params or {} - export_format, channels, frame_rate = audio_attributes - - language_audio = language - - with open(file, "rb") as file_: - audio_config = { - "audio": file_, - "content_type": "audio/" + export_format, - "speaker_labels": True, - "profanity_filter": profanity_filter, - } - audio_config.update({"rate": int(frame_rate)}) - if language_audio: - audio_config.update({"model": f"{language_audio}_Telephony"}) - if language_audio == "ja-JP": - audio_config["model"] = f"{language_audio}_Multimedia" - audio_config.update(provider_params) - response = handle_ibm_call( - self.clients["speech"].create_job, **audio_config - ) - if response.status_code == 201: - return AsyncLaunchJobResponseType(provider_job_id=response.result["id"]) - else: - raise ProviderException( - "An error occured during ibm api call", code=response.status_code - ) - - def audio__speech_to_text_async__get_job_result( - self, provider_job_id: str - ) -> AsyncBaseResponseType[SpeechToTextAsyncDataClass]: - payload = {"id": provider_job_id} - response = handle_ibm_call(self.clients["speech"].check_job, **payload) - - status = response.result["status"] - if status == "completed": - original_response = response.result["results"] - data = response.result["results"][0]["results"] - - diarization_entries = [] - speakers = set() - - text = " ".join([entry["alternatives"][0]["transcript"] for entry in data]) - - time_stamps = [ - time_stamp - for entry in data - for time_stamp in entry["alternatives"][0]["timestamps"] - ] - for idx_word, word_info in enumerate( - original_response[0].get("speaker_labels", []) - ): - speakers.add(word_info["speaker"]) - diarization_entries.append( - SpeechDiarizationEntry( - segment=time_stamps[idx_word][0], - start_time=str(time_stamps[idx_word][1]), - end_time=str(time_stamps[idx_word][2]), - speaker=int(word_info["speaker"]) + 1, - confidence=word_info["confidence"], - ) - ) - diarization = SpeechDiarization( - total_speakers=len(speakers), entries=diarization_entries - ) - standardized_response = SpeechToTextAsyncDataClass( - text=text, diarization=diarization - ) - return AsyncResponseType[SpeechToTextAsyncDataClass]( - original_response=original_response, - standardized_response=standardized_response, - provider_job_id=provider_job_id, - ) - - if status == "failed": - # Apparently no error message present in response - # ref: https://cloud.ibm.com/apidocs/speech-to-text?code=python#checkjob - raise ProviderException - - return AsyncPendingResponseType[SpeechToTextAsyncDataClass]( - provider_job_id=provider_job_id - ) diff --git a/edenai_apis/apis/ibm/ibm_helpers.py b/edenai_apis/apis/ibm/ibm_helpers.py deleted file mode 100644 index 7ef1c845..00000000 --- a/edenai_apis/apis/ibm/ibm_helpers.py +++ /dev/null @@ -1,93 +0,0 @@ -from edenai_apis.utils.exception import AsyncJobException, AsyncJobExceptionReason, ProviderException -from edenai_apis.utils.ssml import ( - convert_audio_attr_in_prosody_tag, -) -from watson_developer_cloud.watson_service import WatsonApiException -from watson_developer_cloud.watson_service import WatsonApiException - -from edenai_apis.utils.exception import AsyncJobException, AsyncJobExceptionReason, ProviderException -from edenai_apis.utils.ssml import ( - convert_audio_attr_in_prosody_tag, -) - - -def handle_ibm_call(function_call, **kwargs): - provider_job_id_error = "job not found" - try: - response = function_call(**kwargs) - except WatsonApiException as exc: - message = exc.message - code = exc.code - if provider_job_id_error in str(exc): - raise AsyncJobException( - reason=AsyncJobExceptionReason.DEPRECATED_JOB_ID, - code = code - ) - raise ProviderException(message, code = code) - except Exception as exc: - if provider_job_id_error in str(exc): - raise AsyncJobException( - reason=AsyncJobExceptionReason.DEPRECATED_JOB_ID - ) - raise ProviderException(str(exc)) - return response - -def generate_right_ssml_text(text, speaking_rate, speaking_pitch): - attribs = {"rate": speaking_rate, "pitch": speaking_pitch} - cleaned_attribs_string = "" - for k, v in attribs.items(): - if not v: - continue - cleaned_attribs_string = f"{cleaned_attribs_string} {k}='{v}%'" - if not cleaned_attribs_string.strip(): - return text - return convert_audio_attr_in_prosody_tag(cleaned_attribs_string, text) - - -# list of audio format with there extension, Wether or not a sampling rate is required, and also if you can specify -# a sampling rate with any value or from a list of samplings -# Exmp: ("mp3", "mp3", False, []) => means the audio format mp3 with an extension mp3 with no required sampling value and -# can optionnaly have any sampling rate between 8000Hz and 192000Hz -audio_format_list_extensions = [ - ("alaw", "alaw", True, []), - ("basic", "basic", False, None), - ("flac", "flac", False, []), - ("l16", "pcm", True, []), - ("mp3", "mp3", False, []), - ("mulaw", "mulaw", True, []), - ("ogg", "ogg", False, []), - ("ogg-opus", "ogg", False, [48000, 24000, 16000, 12000, 8000]), - ("ogg-vorbis", "ogg", False, []), - ("wav", "wav", False, []), - ("webm", "webm", False, None), - ("webm-opus", "webm", False, None), - ("webm-vorbis", "webm", False, []), -] - - -def get_right_audio_support_and_sampling_rate(audio_format: str, sampling_rate: int): - if sampling_rate and (sampling_rate < 8000 or sampling_rate > 192000): - raise ProviderException( - "Sampling rate must lie in the range of 8 kHz to 192 kHz" - ) - if not audio_format: - audio_format = "mp3" - right_audio_format = next( - filter(lambda x: x[0] == audio_format, audio_format_list_extensions), None - ) - file_extension = right_audio_format[1] - audio_format = audio_format.replace("-", ";codecs=") - audio_format = f"audio/{audio_format}" - if not sampling_rate: # no sampling provided - if right_audio_format[2]: - raise ProviderException( - f"You must specify a sampling rate for the '{audio_format}' audio format" - ) - return file_extension, audio_format - if right_audio_format[3] is None: # you can not specify a sampling rate value - return file_extension, audio_format - if isinstance(right_audio_format[3], list) and len(right_audio_format[3]) > 0: - # get the nearest - nearest_rate = min(right_audio_format[3], key=lambda x: abs(x - sampling_rate)) - return file_extension, f"{audio_format};rate={nearest_rate}" - return file_extension, f"{audio_format};rate={sampling_rate}" diff --git a/edenai_apis/apis/ibm/ibm_text_api.py b/edenai_apis/apis/ibm/ibm_text_api.py deleted file mode 100644 index bb8976ff..00000000 --- a/edenai_apis/apis/ibm/ibm_text_api.py +++ /dev/null @@ -1,172 +0,0 @@ -from typing import Sequence - -from ibm_watson.natural_language_understanding_v1 import ( - CategoriesOptions, - EntitiesOptions, - Features, - KeywordsOptions, - SentimentOptions, - SyntaxOptions, - SyntaxOptionsTokens, -) - -from edenai_apis.apis.ibm.ibm_helpers import handle_ibm_call -from edenai_apis.features.text import ( - ExtractedTopic, - InfosKeywordExtractionDataClass, - InfosNamedEntityRecognitionDataClass, - InfosSyntaxAnalysisDataClass, - KeywordExtractionDataClass, - NamedEntityRecognitionDataClass, - SegmentSentimentAnalysisDataClass, - SentimentAnalysisDataClass, - SyntaxAnalysisDataClass, - TopicExtractionDataClass, -) -from edenai_apis.features.text.text_interface import TextInterface -from edenai_apis.utils.types import ResponseType -from .config import tags - - -class IbmTextApi(TextInterface): - def text__sentiment_analysis( - self, language: str, text: str - ) -> ResponseType[SentimentAnalysisDataClass]: - payload = { - "text": text, - "language": language, - "features": Features(sentiment=SentimentOptions()) - } - request = handle_ibm_call(self.clients["text"].analyze, **payload) - response = handle_ibm_call(request.get_result) - - # Create output object - items: Sequence[SegmentSentimentAnalysisDataClass] = [] - standarize = SentimentAnalysisDataClass( - general_sentiment=response["sentiment"]["document"]["label"], - general_sentiment_rate=float( - abs(response["sentiment"]["document"]["score"]) - ), - items=items, - ) - - return ResponseType[SentimentAnalysisDataClass]( - original_response=response, standardized_response=standarize - ) - - def text__keyword_extraction( - self, language: str, text: str - ) -> ResponseType[KeywordExtractionDataClass]: - payload = { - "text": text, - "language": language, - "features": Features(keywords=KeywordsOptions(emotion=True, sentiment=True)) - } - request = handle_ibm_call(self.clients["text"].analyze, **payload) - response = handle_ibm_call(request.get_result) - - # Analysing response - items: Sequence[InfosKeywordExtractionDataClass] = [] - for key_phrase in response["keywords"]: - items.append( - InfosKeywordExtractionDataClass( - keyword=key_phrase["text"], importance=key_phrase["relevance"] - ) - ) - - standardized_response = KeywordExtractionDataClass(items=items) - - return ResponseType[KeywordExtractionDataClass]( - original_response=response, standardized_response=standardized_response - ) - - def text__named_entity_recognition( - self, language: str, text: str - ) -> ResponseType[NamedEntityRecognitionDataClass]: - payload = { - "text": text, - "language": language, - "features": Features(entities=EntitiesOptions(sentiment=True, mentions=True, emotion=True)) - } - request = handle_ibm_call(self.clients["text"].analyze, **payload) - response = handle_ibm_call(request.get_result) - - items: Sequence[InfosNamedEntityRecognitionDataClass] = [] - - for ent in response["entities"]: - category = ent["type"].upper() - if category == "JOBTITLE": - category = "PERSONTYPE" - items.append( - InfosNamedEntityRecognitionDataClass( - entity=ent["text"], - importance=ent["relevance"], - category=category, - ) - ) - - standardized_response = NamedEntityRecognitionDataClass(items=items) - - return ResponseType[NamedEntityRecognitionDataClass]( - original_response=response, standardized_response=standardized_response - ) - - def text__syntax_analysis( - self, language: str, text: str - ) -> ResponseType[SyntaxAnalysisDataClass]: - payload = { - "text": text, - "language": language, - "features": Features(syntax=SyntaxOptions(sentences=True, - tokens=SyntaxOptionsTokens(lemma=True, part_of_speech=True))) - } - request = handle_ibm_call(self.clients["text"].analyze, **payload) - response = handle_ibm_call(request.get_result) - - items: Sequence[InfosSyntaxAnalysisDataClass] = [] - - # Getting syntax detected of word and its score of confidence - for keyword in response["syntax"]["tokens"]: - tag_ = tags[keyword["part_of_speech"]] - items.append( - InfosSyntaxAnalysisDataClass( - word=keyword["text"], - importance=None, - others=None, - tag=tag_, - lemma=keyword.get("lemma"), - ) - ) - - standardized_response = SyntaxAnalysisDataClass(items=items) - - return ResponseType[SyntaxAnalysisDataClass]( - original_response=response, standardized_response=standardized_response - ) - - def text__topic_extraction( - self, language: str, text: str - ) -> ResponseType[TopicExtractionDataClass]: - payload = { - "text": text, - "language": language, - "features": Features(categories=CategoriesOptions()) - } - request = handle_ibm_call(self.clients["text"].analyze, **payload) - original_response = handle_ibm_call(request.get_result) - - categories: Sequence[ExtractedTopic] = [] - for category in original_response.get("categories"): - categories.append( - ExtractedTopic( - category=category.get("label"), importance=category.get("score") - ) - ) - - standardized_response = TopicExtractionDataClass(items=categories) - result = ResponseType[TopicExtractionDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - - return result diff --git a/edenai_apis/apis/ibm/ibm_translation_api.py b/edenai_apis/apis/ibm/ibm_translation_api.py deleted file mode 100644 index 9d5f54bf..00000000 --- a/edenai_apis/apis/ibm/ibm_translation_api.py +++ /dev/null @@ -1,61 +0,0 @@ -from typing import Sequence - -from edenai_apis.apis.ibm.ibm_helpers import handle_ibm_call -from edenai_apis.features.translation import ( - AutomaticTranslationDataClass, - InfosLanguageDetectionDataClass, - LanguageDetectionDataClass, -) -from edenai_apis.features.translation.translation_interface import TranslationInterface -from edenai_apis.utils.languages import get_language_name_from_code -from edenai_apis.utils.types import ResponseType - - -class IbmTranslationApi(TranslationInterface): - def translation__automatic_translation( - self, source_language: str, target_language: str, text: str - ) -> ResponseType[AutomaticTranslationDataClass]: - payload = { - "text" : text, - "source": source_language, - "target": target_language - } - request = handle_ibm_call(self.clients["translation"].translate, **payload) - response = handle_ibm_call(request.get_result) - - # Create output TextAutomaticTranslation object - standardized: AutomaticTranslationDataClass - - # Getting the translated text - for translated_text in response["translations"]: - standardized = AutomaticTranslationDataClass( - text=translated_text["translation"] - ) - - return ResponseType[AutomaticTranslationDataClass]( - original_response=response["translations"], - standardized_response=standardized, - ) - - def translation__language_detection( - self, text: str - ) -> ResponseType[LanguageDetectionDataClass]: - response = self.clients["translation"].identify(text).get_result() - items: Sequence[InfosLanguageDetectionDataClass] = [] - - for lang in response["languages"]: - if lang["confidence"] > 0.2: - items.append( - InfosLanguageDetectionDataClass( - language=lang["language"], - display_name=get_language_name_from_code( - isocode=lang["language"] - ), - confidence=lang["confidence"], - ) - ) - - return ResponseType[LanguageDetectionDataClass]( - original_response=response, - standardized_response=LanguageDetectionDataClass(items=items), - ) diff --git a/edenai_apis/apis/ibm/info.json b/edenai_apis/apis/ibm/info.json deleted file mode 100644 index 99623773..00000000 --- a/edenai_apis/apis/ibm/info.json +++ /dev/null @@ -1,318 +0,0 @@ -{ - "audio": { - "speech_to_text_async": { - "constraints": { - "languages": [ - "cs-CZ", - "en-AU", - "fr-CA", - "es-ES", - "es-LA", - "pt-BR", - "it-IT", - "nl-BE", - "ar-MS", - "hi-IN", - "ar-MS", - "de-DE", - "nl-NL", - "en-US", - "en-GB", - "ja-JP", - "zh-CN", - "ko-KR", - "fr-FR", - "en-IN" - ], - "file_extensions" : [ - "flac", - "mp3", - "wav", - "flac", - "ogg", - "webm", - "alaw", - "amr", - "g729", - "l16", - "mpeg", - "mulaw" - ], - "allow_null_language": true - }, - "version": "v1" - }, - "text_to_speech": { - "constraints": { - "languages": [ - "fr-CA", - "es-LA", - "en-AU", - "en-US", - "es-US", - "de-DE", - "it-IT", - "es-ES", - "ja-JP", - "pt-BR", - "fr-FR", - "en-GB", - "nl-NL", - "ko-KR" - ], - "audio_format": [ - "alaw", - "basic", - "flac", - "l16", - "mp3", - "mulaw", - "ogg", - "ogg-opus", - "ogg-vorbis", - "wav", - "webm", - "webm-opus", - "webm-vorbis" - ], - "voice_ids" : { - "MALE": [ - "en-US_MichaelExpressive", - "en-US_HenryV3Voice", - "en-US_KevinV3Voice", - "en-US_MichaelV3Voice", - "fr-FR_NicolasV3Voice", - "es-ES_EnriqueV3Voice", - "de-DE_DieterV3Voice", - "en-GB_JamesV3Voice", - "en-AU_JackExpressive" - ], - "FEMALE": [ - "en-US_AllisonExpressive", - "en-US_AllisonV3Voice", - "en-US_EmmaExpressive", - "en-US_EmilyV3Voice", - "en-US_LisaExpressive", - "en-US_LisaV3Voice", - "en-US_OliviaV3Voice", - "fr-FR_ReneeV3Voice", - "es-ES_LauraV3Voice", - "de-DE_BirgitV3Voice", - "de-DE_ErikaV3Voice", - "en-GB_KateV3Voice", - "en-GB_CharlotteV3Voice", - "it-IT_FrancescaV3Voice", - "ja-JP_EmiV3Voice", - "pt-BR_IsabelaV3Voice", - "fr-CA_LouiseV3Voice", - "es-LA_SofiaV3Voice", - "es-US_SofiaV3Voice", - "en-AU_HeidiExpressive", - "nl-NL_MerelV3Voice", - "ko-KR_JinV3Voice" - ] - } - }, - "version": "v1" - } - }, - "text": { - "keyword_extraction": { - "constraints": { - "languages": [ - "ar", - "zh", - "cs", - "da", - "nl", - "en", - "fi", - "fr", - "de", - "he", - "hi", - "it", - "ja", - "ko", - "no", - "no", - "no", - "pl", - "pt", - "ro", - "ru", - "sk", - "es", - "sv", - "tr" - ], - "allow_null_language" : true - }, - "version": "v1 (2021-08-01)" - }, - "named_entity_recognition": { - "constraints": { - "languages": [ - "ar", - "zh", - "nl", - "en", - "fr", - "de", - "it", - "ja", - "ko", - "pt", - "ru", - "es", - "sv" - ], - "allow_null_language" : true - }, - "version": "v1 (2021-08-01)" - }, - "sentiment_analysis": { - "constraints": { - "languages": [ - "ar", - "zh", - "nl", - "en", - "fr", - "de", - "it", - "ja", - "ko", - "pt", - "ru", - "es" - ], - "allow_null_language" : true - }, - "version": "v1 (2021-08-01)" - }, - "syntax_analysis": { - "constraints": { - "languages": [ - "ar", - "zh", - "cs", - "da", - "nl", - "en", - "fi", - "fr", - "de", - "he", - "hi", - "it", - "ja", - "ko", - "no", - "no", - "no", - "pl", - "pt", - "ro", - "ru", - "sk", - "es", - "sv", - "tr" - ], - "allow_null_language" : true - }, - "version": "v1 (2021-08-01)" - }, - "topic_extraction": { - "constraints": { - "languages": [ - "ar", - "zh", - "nl", - "en", - "fr", - "de", - "it", - "ja", - "ko", - "pt", - "ru", - "es" - ], - "allow_null_language" : true - }, - "version": "v1 (2021-08-01)" - } - }, - "translation": { - "automatic_translation": { - "constraints": { - "languages": [ - "ar-AR", - "bg-BG", - "bn-BD", - "bs-BA", - "ca-ES", - "cnr-ME", - "cs-CZ", - "cy-GB", - "da-DK", - "de-DE", - "el-GR", - "en-US", - "es-ES", - "et-EE", - "eu-ES", - "fi-FI", - "fr-FR", - "fr-CA", - "ga-IE", - "gu-IN", - "he-IL", - "hi-IN", - "hr-HR", - "hu-HU", - "id-ID", - "it-IT", - "ja-JP", - "kn-IN", - "ko-KR", - "lt-LT", - "lv-LV", - "ml-IN", - "mr-IN", - "ms-MY", - "mt-MT", - "nb-NO", - "ne-NP", - "nl-NL", - "pa-IN", - "pl-PL", - "pt-BR", - "ro-RO", - "ru-RU", - "si-LK", - "sk-SK", - "sl-SI", - "sr-RS", - "sv-SE", - "ta-IN", - "te-IN", - "th-TH", - "tr-TR", - "uk-UA", - "ur-PK", - "vi-VN", - "zh-CN", - "zh-TW" - ], - "allow_null_language" : true - }, - "version": "v3 (2018-05-01)" - }, - "language_detection": { - "version": "v1 (2021-08-01)" - } - } -} diff --git a/edenai_apis/apis/ibm/outputs/audio/speech_to_text_async_output.json b/edenai_apis/apis/ibm/outputs/audio/speech_to_text_async_output.json deleted file mode 100644 index 1ff52c7c..00000000 --- a/edenai_apis/apis/ibm/outputs/audio/speech_to_text_async_output.json +++ /dev/null @@ -1,633 +0,0 @@ -{ - "status": "succeeded", - "provider_job_id": "558c3904-7d51-11ed-a53f-87a82fcd74e4", - "original_response": [ - { - "result_index": 0, - "speaker_labels": [ - { - "speaker": 1, - "confidence": 0.62, - "final": false, - "from": 0.08, - "to": 0.47 - }, - { - "speaker": 1, - "confidence": 0.62, - "final": false, - "from": 0.47, - "to": 1.02 - }, - { - "speaker": 1, - "confidence": 0.52, - "final": false, - "from": 1.43, - "to": 1.81 - }, - { - "speaker": 1, - "confidence": 0.52, - "final": false, - "from": 1.81, - "to": 2.7 - }, - { - "speaker": 1, - "confidence": 0.54, - "final": false, - "from": 3.32, - "to": 3.68 - }, - { - "speaker": 1, - "confidence": 0.54, - "final": false, - "from": 3.68, - "to": 4.8 - }, - { - "speaker": 0, - "confidence": 0.5, - "final": false, - "from": 6.82, - "to": 7.47 - }, - { - "speaker": 0, - "confidence": 0.47, - "final": false, - "from": 7.5, - "to": 7.86 - }, - { - "speaker": 0, - "confidence": 0.47, - "final": false, - "from": 7.86, - "to": 8.14 - }, - { - "speaker": 0, - "confidence": 0.41, - "final": false, - "from": 8.49, - "to": 8.89 - }, - { - "speaker": 0, - "confidence": 0.43, - "final": false, - "from": 9.27, - "to": 9.65 - }, - { - "speaker": 0, - "confidence": 0.43, - "final": false, - "from": 9.65, - "to": 10.01 - }, - { - "speaker": 0, - "confidence": 0.42, - "final": false, - "from": 10.58, - "to": 10.79 - }, - { - "speaker": 0, - "confidence": 0.42, - "final": false, - "from": 10.79, - "to": 10.95 - }, - { - "speaker": 0, - "confidence": 0.42, - "final": false, - "from": 10.95, - "to": 11.41 - }, - { - "speaker": 0, - "confidence": 0.5, - "final": false, - "from": 11.44, - "to": 11.63 - }, - { - "speaker": 0, - "confidence": 0.5, - "final": false, - "from": 11.63, - "to": 11.8 - }, - { - "speaker": 0, - "confidence": 0.5, - "final": false, - "from": 11.8, - "to": 12.34 - }, - { - "speaker": 0, - "confidence": 0.44, - "final": false, - "from": 12.68, - "to": 12.95 - }, - { - "speaker": 0, - "confidence": 0.44, - "final": false, - "from": 12.95, - "to": 13.06 - }, - { - "speaker": 0, - "confidence": 0.44, - "final": false, - "from": 13.06, - "to": 13.34 - }, - { - "speaker": 0, - "confidence": 0.44, - "final": false, - "from": 13.34, - "to": 13.78 - }, - { - "speaker": 0, - "confidence": 0.43, - "final": false, - "from": 13.9, - "to": 14.25 - }, - { - "speaker": 0, - "confidence": 0.43, - "final": false, - "from": 14.25, - "to": 14.89 - }, - { - "speaker": 0, - "confidence": 0.41, - "final": false, - "from": 14.92, - "to": 15.24 - }, - { - "speaker": 0, - "confidence": 0.45, - "final": false, - "from": 15.28, - "to": 15.43 - }, - { - "speaker": 0, - "confidence": 0.45, - "final": false, - "from": 15.43, - "to": 15.64 - }, - { - "speaker": 0, - "confidence": 0.45, - "final": false, - "from": 15.64, - "to": 16.01 - }, - { - "speaker": 0, - "confidence": 0.41, - "final": false, - "from": 16.19, - "to": 16.46 - }, - { - "speaker": 0, - "confidence": 0.41, - "final": false, - "from": 16.46, - "to": 16.7 - }, - { - "speaker": 0, - "confidence": 0.41, - "final": true, - "from": 16.7, - "to": 17.04 - } - ], - "results": [ - { - "final": true, - "alternatives": [ - { - "transcript": "unit one page fourteen real conversations ", - "timestamps": [ - [ - "unit", - 0.08, - 0.47 - ], - [ - "one", - 0.47, - 1.02 - ], - [ - "page", - 1.43, - 1.81 - ], - [ - "fourteen", - 1.81, - 2.7 - ], - [ - "real", - 3.32, - 3.68 - ], - [ - "conversations", - 3.68, - 4.8 - ] - ], - "confidence": 0.97 - } - ] - }, - { - "final": true, - "alternatives": [ - { - "transcript": "hello hi my name's Cody %HESITATION what's your name I'm she hero nice to meet you she he ro yeah that's right %HESITATION we've from ", - "timestamps": [ - [ - "hello", - 6.82, - 7.47 - ], - [ - "hi", - 7.5, - 7.86 - ], - [ - "my", - 7.86, - 8.14 - ], - [ - "name's", - 8.49, - 8.89 - ], - [ - "Cody", - 9.27, - 9.65 - ], - [ - "%HESITATION", - 9.65, - 10.01 - ], - [ - "what's", - 10.58, - 10.79 - ], - [ - "your", - 10.79, - 10.95 - ], - [ - "name", - 10.95, - 11.41 - ], - [ - "I'm", - 11.44, - 11.63 - ], - [ - "she", - 11.63, - 11.8 - ], - [ - "hero", - 11.8, - 12.34 - ], - [ - "nice", - 12.68, - 12.95 - ], - [ - "to", - 12.95, - 13.06 - ], - [ - "meet", - 13.06, - 13.34 - ], - [ - "you", - 13.34, - 13.78 - ], - [ - "she", - 13.9, - 14.25 - ], - [ - "he", - 14.25, - 14.89 - ], - [ - "ro", - 14.92, - 15.24 - ], - [ - "yeah", - 15.28, - 15.43 - ], - [ - "that's", - 15.43, - 15.64 - ], - [ - "right", - 15.64, - 16.01 - ], - [ - "%HESITATION", - 16.19, - 16.46 - ], - [ - "we've", - 16.46, - 16.7 - ], - [ - "from", - 16.7, - 17.04 - ] - ], - "confidence": 0.73 - } - ] - } - ] - } - ], - "standardized_response": { - "text": "unit one page fourteen real conversations hello hi my name's Cody %HESITATION what's your name I'm she hero nice to meet you she he ro yeah that's right %HESITATION we've from ", - "diarization": { - "total_speakers": 2, - "entries": [ - { - "segment": "unit", - "start_time": "0.08", - "end_time": "0.47", - "speaker": 2, - "confidence": 0.62 - }, - { - "segment": "one", - "start_time": "0.47", - "end_time": "1.02", - "speaker": 2, - "confidence": 0.62 - }, - { - "segment": "page", - "start_time": "1.43", - "end_time": "1.81", - "speaker": 2, - "confidence": 0.52 - }, - { - "segment": "fourteen", - "start_time": "1.81", - "end_time": "2.7", - "speaker": 2, - "confidence": 0.52 - }, - { - "segment": "real", - "start_time": "3.32", - "end_time": "3.68", - "speaker": 2, - "confidence": 0.54 - }, - { - "segment": "conversations", - "start_time": "3.68", - "end_time": "4.8", - "speaker": 2, - "confidence": 0.54 - }, - { - "segment": "hello", - "start_time": "6.82", - "end_time": "7.47", - "speaker": 1, - "confidence": 0.5 - }, - { - "segment": "hi", - "start_time": "7.5", - "end_time": "7.86", - "speaker": 1, - "confidence": 0.47 - }, - { - "segment": "my", - "start_time": "7.86", - "end_time": "8.14", - "speaker": 1, - "confidence": 0.47 - }, - { - "segment": "name's", - "start_time": "8.49", - "end_time": "8.89", - "speaker": 1, - "confidence": 0.41 - }, - { - "segment": "Cody", - "start_time": "9.27", - "end_time": "9.65", - "speaker": 1, - "confidence": 0.43 - }, - { - "segment": "%HESITATION", - "start_time": "9.65", - "end_time": "10.01", - "speaker": 1, - "confidence": 0.43 - }, - { - "segment": "what's", - "start_time": "10.58", - "end_time": "10.79", - "speaker": 1, - "confidence": 0.42 - }, - { - "segment": "your", - "start_time": "10.79", - "end_time": "10.95", - "speaker": 1, - "confidence": 0.42 - }, - { - "segment": "name", - "start_time": "10.95", - "end_time": "11.41", - "speaker": 1, - "confidence": 0.42 - }, - { - "segment": "I'm", - "start_time": "11.44", - "end_time": "11.63", - "speaker": 1, - "confidence": 0.5 - }, - { - "segment": "she", - "start_time": "11.63", - "end_time": "11.8", - "speaker": 1, - "confidence": 0.5 - }, - { - "segment": "hero", - "start_time": "11.8", - "end_time": "12.34", - "speaker": 1, - "confidence": 0.5 - }, - { - "segment": "nice", - "start_time": "12.68", - "end_time": "12.95", - "speaker": 1, - "confidence": 0.44 - }, - { - "segment": "to", - "start_time": "12.95", - "end_time": "13.06", - "speaker": 1, - "confidence": 0.44 - }, - { - "segment": "meet", - "start_time": "13.06", - "end_time": "13.34", - "speaker": 1, - "confidence": 0.44 - }, - { - "segment": "you", - "start_time": "13.34", - "end_time": "13.78", - "speaker": 1, - "confidence": 0.44 - }, - { - "segment": "she", - "start_time": "13.9", - "end_time": "14.25", - "speaker": 1, - "confidence": 0.43 - }, - { - "segment": "he", - "start_time": "14.25", - "end_time": "14.89", - "speaker": 1, - "confidence": 0.43 - }, - { - "segment": "ro", - "start_time": "14.92", - "end_time": "15.24", - "speaker": 1, - "confidence": 0.41 - }, - { - "segment": "yeah", - "start_time": "15.28", - "end_time": "15.43", - "speaker": 1, - "confidence": 0.45 - }, - { - "segment": "that's", - "start_time": "15.43", - "end_time": "15.64", - "speaker": 1, - "confidence": 0.45 - }, - { - "segment": "right", - "start_time": "15.64", - "end_time": "16.01", - "speaker": 1, - "confidence": 0.45 - }, - { - "segment": "%HESITATION", - "start_time": "16.19", - "end_time": "16.46", - "speaker": 1, - "confidence": 0.41 - }, - { - "segment": "we've", - "start_time": "16.46", - "end_time": "16.7", - "speaker": 1, - "confidence": 0.41 - }, - { - "segment": "from", - "start_time": "16.7", - "end_time": "17.04", - "speaker": 1, - "confidence": 0.41 - } - ], - "error_message": null - } - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/audio/text_to_speech_output.json b/edenai_apis/apis/ibm/outputs/audio/text_to_speech_output.json deleted file mode 100644 index b095c094..00000000 --- a/edenai_apis/apis/ibm/outputs/audio/text_to_speech_output.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "original_response": {}, - "standardized_response": { - "audio": "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", - "voice_type": 1, - "audio_resource_url": "https://d14uq1pz7dzsdq.cloudfront.net/8ce7d33b-90df-40e3-bcd5-e3ce0cf4b343_.mp3?Expires=1689855552&Signature=n7PVhkVD4lAOnuws-lGuD5bsao8KpW-ZvtxCnURA~3Q3HkhvgvKpT4M1jKT~GTzm-JUvh3UQLUCpTNeOP14OwdxShb6Taf0sAOR6t93lOvKsFotGBwVzWz8d6ubWi7tI8t5iPQjGyyVlRYUPBbL8sV6Mv0r54GG90AMWEKe96Y79VzLjGKGNu5671DcV7S2qdldTdD6UogcD0RqZ4fXW~uktmn-Ter-pxj8gg3V7i8yLEFB0MhocNlMOuBd94aFgf5XqKpJrwfaY0xtT-Pf1n52eMLJR3ZkhL5uJeIG~tElyGTnySZobJUDelx-IhvMRq~SrJaUdGWPHZ07Ls9DzNA__&Key-Pair-Id=K1F55BTI9AHGIK" - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/text/keyword_extraction_output.json b/edenai_apis/apis/ibm/outputs/text/keyword_extraction_output.json deleted file mode 100644 index 2bbf729b..00000000 --- a/edenai_apis/apis/ibm/outputs/text/keyword_extraction_output.json +++ /dev/null @@ -1,196 +0,0 @@ -{ - "original_response": { - "usage": { - "text_units": 1, - "text_characters": 345, - "features": 1 - }, - "language": "en", - "keywords": [ - { - "text": "member of the Democratic Party", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.938959, - "emotion": { - "sadness": 0.480068, - "joy": 0.136363, - "fear": 0.008853, - "disgust": 0.11689, - "anger": 0.032352 - }, - "count": 1 - }, - { - "text": "Barack Hussein Obama", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.935648, - "emotion": { - "sadness": 0.41816, - "joy": 0.077768, - "fear": 0.028846, - "disgust": 0.147803, - "anger": 0.036395 - }, - "count": 1 - }, - { - "text": "American politician", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.906662, - "emotion": { - "sadness": 0.41816, - "joy": 0.077768, - "fear": 0.028846, - "disgust": 0.147803, - "anger": 0.036395 - }, - "count": 1 - }, - { - "text": "Illinois", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.566999, - "emotion": { - "sadness": 0.315591, - "joy": 0.590319, - "fear": 0.050256, - "disgust": 0.011318, - "anger": 0.015997 - }, - "count": 1 - }, - { - "text": "Obama", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.561784, - "emotion": { - "sadness": 0.449114, - "joy": 0.107065, - "fear": 0.018849, - "disgust": 0.132346, - "anger": 0.034374 - }, - "count": 1 - }, - { - "text": "U.S. senator", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.466505, - "emotion": { - "sadness": 0.315591, - "joy": 0.590319, - "fear": 0.050256, - "disgust": 0.011318, - "anger": 0.015997 - }, - "count": 1 - }, - { - "text": "44th president of the United States", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.395212, - "emotion": { - "sadness": 0.41816, - "joy": 0.077768, - "fear": 0.028846, - "disgust": 0.147803, - "anger": 0.036395 - }, - "count": 1 - }, - { - "text": "Illinois state senator", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.338146, - "emotion": { - "sadness": 0.315591, - "joy": 0.590319, - "fear": 0.050256, - "disgust": 0.011318, - "anger": 0.015997 - }, - "count": 1 - }, - { - "text": "first African-American president of the United States", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.180544, - "emotion": { - "sadness": 0.480068, - "joy": 0.136363, - "fear": 0.008853, - "disgust": 0.11689, - "anger": 0.032352 - }, - "count": 1 - } - ] - }, - "standardized_response": { - "items": [ - { - "keyword": "member of the Democratic Party", - "importance": 0.94 - }, - { - "keyword": "Barack Hussein Obama", - "importance": 0.94 - }, - { - "keyword": "American politician", - "importance": 0.91 - }, - { - "keyword": "Illinois", - "importance": 0.57 - }, - { - "keyword": "Obama", - "importance": 0.56 - }, - { - "keyword": "U.S. senator", - "importance": 0.47 - }, - { - "keyword": "44th president of the United States", - "importance": 0.4 - }, - { - "keyword": "Illinois state senator", - "importance": 0.34 - }, - { - "keyword": "first African-American president of the United States", - "importance": 0.18 - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/text/named_entity_recognition_output.json b/edenai_apis/apis/ibm/outputs/text/named_entity_recognition_output.json deleted file mode 100644 index 4b291cce..00000000 --- a/edenai_apis/apis/ibm/outputs/text/named_entity_recognition_output.json +++ /dev/null @@ -1,345 +0,0 @@ -{ - "original_response": { - "usage": { - "text_units": 1, - "text_characters": 345, - "features": 1 - }, - "language": "en", - "entities": [ - { - "type": "JobTitle", - "text": "American politician", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.950395, - "mentions": [ - { - "text": "American politician", - "location": [ - 27, - 46 - ], - "confidence": 0.414777 - } - ], - "emotion": { - "sadness": 0.41816, - "joy": 0.077768, - "fear": 0.028846, - "disgust": 0.147803, - "anger": 0.036395 - }, - "count": 1, - "confidence": 0.414777 - }, - { - "type": "Person", - "text": "Barack Hussein Obama", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.617417, - "mentions": [ - { - "text": "Barack Hussein Obama", - "location": [ - 0, - 20 - ], - "confidence": 0.825827 - }, - { - "text": "Obama", - "location": [ - 154, - 159 - ], - "confidence": 0.930762 - } - ], - "emotion": { - "sadness": 0.41816, - "joy": 0.077768, - "fear": 0.028846, - "disgust": 0.147803, - "anger": 0.036395 - }, - "disambiguation": { - "subtype": [ - "Politician", - "President", - "Appointer", - "AwardWinner", - "Celebrity", - "PoliticalAppointer", - "U.S.Congressperson", - "USPresident", - "TVActor" - ], - "name": "Barack_Obama", - "dbpedia_resource": "http://dbpedia.org/resource/Barack_Obama" - }, - "count": 2, - "confidence": 0.987941 - }, - { - "type": "JobTitle", - "text": "president", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.426224, - "mentions": [ - { - "text": "president", - "location": [ - 70, - 79 - ], - "confidence": 0.931722 - }, - { - "text": "president", - "location": [ - 191, - 200 - ], - "confidence": 0.360921 - } - ], - "emotion": { - "sadness": 0.449114, - "joy": 0.107065, - "fear": 0.018849, - "disgust": 0.132346, - "anger": 0.034374 - }, - "count": 2, - "confidence": 0.956365 - }, - { - "type": "Location", - "text": "United States", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.408988, - "mentions": [ - { - "text": "United States", - "location": [ - 87, - 100 - ], - "confidence": 0.588641 - }, - { - "text": "United States", - "location": [ - 208, - 221 - ], - "confidence": 0.555031 - } - ], - "emotion": { - "sadness": 0.449114, - "joy": 0.107065, - "fear": 0.018849, - "disgust": 0.132346, - "anger": 0.034374 - }, - "disambiguation": { - "subtype": [ - "Region", - "AdministrativeDivision", - "Country", - "GovernmentalJurisdiction", - "FilmEditor" - ], - "name": "United_States", - "dbpedia_resource": "http://dbpedia.org/resource/United_States" - }, - "count": 2, - "confidence": 0.816958 - }, - { - "type": "Organization", - "text": "Democratic Party", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.348958, - "mentions": [ - { - "text": "Democratic Party", - "location": [ - 136, - 152 - ], - "confidence": 0.793233 - } - ], - "emotion": { - "sadness": 0.480068, - "joy": 0.136363, - "fear": 0.008853, - "disgust": 0.11689, - "anger": 0.032352 - }, - "disambiguation": { - "subtype": [ - "PoliticalParty" - ], - "name": "Democratic_Party_%28United_States%29", - "dbpedia_resource": "http://dbpedia.org/resource/Democratic_Party_%28United_States%29" - }, - "count": 1, - "confidence": 0.793233 - }, - { - "type": "JobTitle", - "text": "U.S. senator", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.348567, - "mentions": [ - { - "text": "U.S. senator", - "location": [ - 249, - 261 - ], - "confidence": 0.462975 - } - ], - "emotion": { - "sadness": 0.315591, - "joy": 0.590319, - "fear": 0.050256, - "disgust": 0.011318, - "anger": 0.015997 - }, - "count": 1, - "confidence": 0.462975 - }, - { - "type": "Location", - "text": "Illinois", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.161957, - "mentions": [ - { - "text": "Illinois", - "location": [ - 267, - 275 - ], - "confidence": 0.63313 - }, - { - "text": "Illinois", - "location": [ - 304, - 312 - ], - "confidence": 0.428223 - } - ], - "emotion": { - "sadness": 0.315591, - "joy": 0.590319, - "fear": 0.050256, - "disgust": 0.011318, - "anger": 0.015997 - }, - "count": 2, - "confidence": 0.790232 - }, - { - "type": "JobTitle", - "text": "state senator", - "sentiment": { - "score": 0, - "label": "neutral" - }, - "relevance": 0.054396, - "mentions": [ - { - "text": "state senator", - "location": [ - 313, - 326 - ], - "confidence": 0.588411 - } - ], - "emotion": { - "sadness": 0.315591, - "joy": 0.590319, - "fear": 0.050256, - "disgust": 0.011318, - "anger": 0.015997 - }, - "count": 1, - "confidence": 0.588411 - } - ] - }, - "standardized_response": { - "items": [ - { - "entity": "American politician", - "category": "PERSONTYPE", - "importance": 0.950395 - }, - { - "entity": "Barack Hussein Obama", - "category": "PERSON", - "importance": 0.617417 - }, - { - "entity": "president", - "category": "PERSONTYPE", - "importance": 0.426224 - }, - { - "entity": "United States", - "category": "LOCATION", - "importance": 0.408988 - }, - { - "entity": "Democratic Party", - "category": "ORGANIZATION", - "importance": 0.348958 - }, - { - "entity": "U.S. senator", - "category": "PERSONTYPE", - "importance": 0.348567 - }, - { - "entity": "Illinois", - "category": "LOCATION", - "importance": 0.161957 - }, - { - "entity": "state senator", - "category": "PERSONTYPE", - "importance": 0.054396 - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/text/sentiment_analysis_output.json b/edenai_apis/apis/ibm/outputs/text/sentiment_analysis_output.json deleted file mode 100644 index 3a0ffc1f..00000000 --- a/edenai_apis/apis/ibm/outputs/text/sentiment_analysis_output.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "original_response": { - "usage": { - "text_units": 1, - "text_characters": 566, - "features": 1 - }, - "sentiment": { - "document": { - "score": -0.540575, - "mixed": "1", - "label": "negative" - } - }, - "language": "en" - }, - "standardized_response": { - "general_sentiment": "Negative", - "general_sentiment_rate": 0.54, - "items": [] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/text/syntax_analysis_output.json b/edenai_apis/apis/ibm/outputs/text/syntax_analysis_output.json deleted file mode 100644 index 3a95d0ac..00000000 --- a/edenai_apis/apis/ibm/outputs/text/syntax_analysis_output.json +++ /dev/null @@ -1,1075 +0,0 @@ -{ - "original_response": { - "usage": { - "text_units": 1, - "text_characters": 345, - "features": 1 - }, - "syntax": { - "tokens": [ - { - "text": "Barack", - "part_of_speech": "PROPN", - "location": [ - 0, - 6 - ] - }, - { - "text": "Hussein", - "part_of_speech": "PROPN", - "location": [ - 7, - 14 - ] - }, - { - "text": "Obama", - "part_of_speech": "PROPN", - "location": [ - 15, - 20 - ] - }, - { - "text": "is", - "part_of_speech": "AUX", - "location": [ - 21, - 23 - ], - "lemma": "be" - }, - { - "text": "an", - "part_of_speech": "DET", - "location": [ - 24, - 26 - ], - "lemma": "a" - }, - { - "text": "American", - "part_of_speech": "ADJ", - "location": [ - 27, - 35 - ], - "lemma": "American" - }, - { - "text": "politician", - "part_of_speech": "NOUN", - "location": [ - 36, - 46 - ], - "lemma": "politician" - }, - { - "text": "who", - "part_of_speech": "PRON", - "location": [ - 47, - 50 - ], - "lemma": "who" - }, - { - "text": "served", - "part_of_speech": "VERB", - "location": [ - 51, - 57 - ], - "lemma": "serve" - }, - { - "text": "as", - "part_of_speech": "ADP", - "location": [ - 58, - 60 - ], - "lemma": "as" - }, - { - "text": "the", - "part_of_speech": "DET", - "location": [ - 61, - 64 - ], - "lemma": "the" - }, - { - "text": "44th", - "part_of_speech": "ADJ", - "location": [ - 65, - 69 - ] - }, - { - "text": "president", - "part_of_speech": "NOUN", - "location": [ - 70, - 79 - ], - "lemma": "president" - }, - { - "text": "of", - "part_of_speech": "ADP", - "location": [ - 80, - 82 - ], - "lemma": "of" - }, - { - "text": "the", - "part_of_speech": "DET", - "location": [ - 83, - 86 - ], - "lemma": "the" - }, - { - "text": "United", - "part_of_speech": "PROPN", - "location": [ - 87, - 93 - ] - }, - { - "text": "States", - "part_of_speech": "PROPN", - "location": [ - 94, - 100 - ], - "lemma": "State" - }, - { - "text": "from", - "part_of_speech": "ADP", - "location": [ - 101, - 105 - ], - "lemma": "from" - }, - { - "text": "2009", - "part_of_speech": "NUM", - "location": [ - 106, - 110 - ] - }, - { - "text": "to", - "part_of_speech": "ADP", - "location": [ - 111, - 113 - ], - "lemma": "to" - }, - { - "text": "2017", - "part_of_speech": "NUM", - "location": [ - 114, - 118 - ] - }, - { - "text": ".", - "part_of_speech": "PUNCT", - "location": [ - 118, - 119 - ] - }, - { - "text": "A", - "part_of_speech": "DET", - "location": [ - 120, - 121 - ], - "lemma": "a" - }, - { - "text": "member", - "part_of_speech": "NOUN", - "location": [ - 122, - 128 - ], - "lemma": "member" - }, - { - "text": "of", - "part_of_speech": "ADP", - "location": [ - 129, - 131 - ], - "lemma": "of" - }, - { - "text": "the", - "part_of_speech": "DET", - "location": [ - 132, - 135 - ], - "lemma": "the" - }, - { - "text": "Democratic", - "part_of_speech": "PROPN", - "location": [ - 136, - 146 - ] - }, - { - "text": "Party", - "part_of_speech": "PROPN", - "location": [ - 147, - 152 - ], - "lemma": "Party" - }, - { - "text": ",", - "part_of_speech": "PUNCT", - "location": [ - 152, - 153 - ] - }, - { - "text": "Obama", - "part_of_speech": "PROPN", - "location": [ - 154, - 159 - ] - }, - { - "text": "was", - "part_of_speech": "AUX", - "location": [ - 160, - 163 - ], - "lemma": "be" - }, - { - "text": "the", - "part_of_speech": "DET", - "location": [ - 164, - 167 - ], - "lemma": "the" - }, - { - "text": "first", - "part_of_speech": "ADJ", - "location": [ - 168, - 173 - ], - "lemma": "first" - }, - { - "text": "African", - "part_of_speech": "ADJ", - "location": [ - 174, - 181 - ], - "lemma": "African" - }, - { - "text": "-", - "part_of_speech": "PUNCT", - "location": [ - 181, - 182 - ] - }, - { - "text": "American", - "part_of_speech": "ADJ", - "location": [ - 182, - 190 - ], - "lemma": "American" - }, - { - "text": "president", - "part_of_speech": "NOUN", - "location": [ - 191, - 200 - ], - "lemma": "president" - }, - { - "text": "of", - "part_of_speech": "ADP", - "location": [ - 201, - 203 - ], - "lemma": "of" - }, - { - "text": "the", - "part_of_speech": "DET", - "location": [ - 204, - 207 - ], - "lemma": "the" - }, - { - "text": "United", - "part_of_speech": "PROPN", - "location": [ - 208, - 214 - ] - }, - { - "text": "States", - "part_of_speech": "PROPN", - "location": [ - 215, - 221 - ], - "lemma": "State" - }, - { - "text": ".", - "part_of_speech": "PUNCT", - "location": [ - 221, - 222 - ] - }, - { - "text": "He", - "part_of_speech": "PRON", - "location": [ - 223, - 225 - ], - "lemma": "he" - }, - { - "text": "previously", - "part_of_speech": "ADV", - "location": [ - 226, - 236 - ], - "lemma": "previously" - }, - { - "text": "served", - "part_of_speech": "VERB", - "location": [ - 237, - 243 - ], - "lemma": "serve" - }, - { - "text": "as", - "part_of_speech": "ADP", - "location": [ - 244, - 246 - ], - "lemma": "as" - }, - { - "text": "a", - "part_of_speech": "DET", - "location": [ - 247, - 248 - ], - "lemma": "a" - }, - { - "text": "U.S.", - "part_of_speech": "PROPN", - "location": [ - 249, - 253 - ] - }, - { - "text": "senator", - "part_of_speech": "NOUN", - "location": [ - 254, - 261 - ], - "lemma": "senator" - }, - { - "text": "from", - "part_of_speech": "ADP", - "location": [ - 262, - 266 - ], - "lemma": "from" - }, - { - "text": "Illinois", - "part_of_speech": "PROPN", - "location": [ - 267, - 275 - ] - }, - { - "text": "from", - "part_of_speech": "ADP", - "location": [ - 276, - 280 - ], - "lemma": "from" - }, - { - "text": "2005", - "part_of_speech": "NUM", - "location": [ - 281, - 285 - ] - }, - { - "text": "to", - "part_of_speech": "ADP", - "location": [ - 286, - 288 - ], - "lemma": "to" - }, - { - "text": "2008", - "part_of_speech": "NUM", - "location": [ - 289, - 293 - ] - }, - { - "text": "and", - "part_of_speech": "CCONJ", - "location": [ - 294, - 297 - ], - "lemma": "and" - }, - { - "text": "as", - "part_of_speech": "ADP", - "location": [ - 298, - 300 - ], - "lemma": "as" - }, - { - "text": "an", - "part_of_speech": "DET", - "location": [ - 301, - 303 - ], - "lemma": "a" - }, - { - "text": "Illinois", - "part_of_speech": "PROPN", - "location": [ - 304, - 312 - ] - }, - { - "text": "state", - "part_of_speech": "NOUN", - "location": [ - 313, - 318 - ], - "lemma": "state" - }, - { - "text": "senator", - "part_of_speech": "NOUN", - "location": [ - 319, - 326 - ], - "lemma": "senator" - }, - { - "text": "from", - "part_of_speech": "ADP", - "location": [ - 327, - 331 - ], - "lemma": "from" - }, - { - "text": "1997", - "part_of_speech": "NUM", - "location": [ - 332, - 336 - ] - }, - { - "text": "to", - "part_of_speech": "ADP", - "location": [ - 337, - 339 - ], - "lemma": "to" - }, - { - "text": "2004", - "part_of_speech": "NUM", - "location": [ - 340, - 344 - ] - }, - { - "text": ".", - "part_of_speech": "PUNCT", - "location": [ - 344, - 345 - ] - } - ], - "sentences": [ - { - "text": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017.", - "location": [ - 0, - 119 - ] - }, - { - "text": "A member of the Democratic Party, Obama was the first African-American president of the United States.", - "location": [ - 120, - 222 - ] - }, - { - "text": "He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "location": [ - 223, - 345 - ] - } - ] - }, - "language": "en" - }, - "standardized_response": { - "items": [ - { - "word": "Barack", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "Hussein", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "Obama", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "is", - "importance": null, - "tag": "Auxiliary", - "lemma": "be", - "others": {} - }, - { - "word": "an", - "importance": null, - "tag": "Determiner", - "lemma": "a", - "others": {} - }, - { - "word": "American", - "importance": null, - "tag": "Adjactive", - "lemma": "American", - "others": {} - }, - { - "word": "politician", - "importance": null, - "tag": "Noun", - "lemma": "politician", - "others": {} - }, - { - "word": "who", - "importance": null, - "tag": "Pronoun", - "lemma": "who", - "others": {} - }, - { - "word": "served", - "importance": null, - "tag": "Verb", - "lemma": "serve", - "others": {} - }, - { - "word": "as", - "importance": null, - "tag": "Adposition", - "lemma": "as", - "others": {} - }, - { - "word": "the", - "importance": null, - "tag": "Determiner", - "lemma": "the", - "others": {} - }, - { - "word": "44th", - "importance": null, - "tag": "Adjactive", - "lemma": null, - "others": {} - }, - { - "word": "president", - "importance": null, - "tag": "Noun", - "lemma": "president", - "others": {} - }, - { - "word": "of", - "importance": null, - "tag": "Adposition", - "lemma": "of", - "others": {} - }, - { - "word": "the", - "importance": null, - "tag": "Determiner", - "lemma": "the", - "others": {} - }, - { - "word": "United", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "States", - "importance": null, - "tag": "Proper noun", - "lemma": "State", - "others": {} - }, - { - "word": "from", - "importance": null, - "tag": "Adposition", - "lemma": "from", - "others": {} - }, - { - "word": "2009", - "importance": null, - "tag": "Cardinal number", - "lemma": null, - "others": {} - }, - { - "word": "to", - "importance": null, - "tag": "Adposition", - "lemma": "to", - "others": {} - }, - { - "word": "2017", - "importance": null, - "tag": "Cardinal number", - "lemma": null, - "others": {} - }, - { - "word": ".", - "importance": null, - "tag": "Punctuation", - "lemma": null, - "others": {} - }, - { - "word": "A", - "importance": null, - "tag": "Determiner", - "lemma": "a", - "others": {} - }, - { - "word": "member", - "importance": null, - "tag": "Noun", - "lemma": "member", - "others": {} - }, - { - "word": "of", - "importance": null, - "tag": "Adposition", - "lemma": "of", - "others": {} - }, - { - "word": "the", - "importance": null, - "tag": "Determiner", - "lemma": "the", - "others": {} - }, - { - "word": "Democratic", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "Party", - "importance": null, - "tag": "Proper noun", - "lemma": "Party", - "others": {} - }, - { - "word": ",", - "importance": null, - "tag": "Punctuation", - "lemma": null, - "others": {} - }, - { - "word": "Obama", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "was", - "importance": null, - "tag": "Auxiliary", - "lemma": "be", - "others": {} - }, - { - "word": "the", - "importance": null, - "tag": "Determiner", - "lemma": "the", - "others": {} - }, - { - "word": "first", - "importance": null, - "tag": "Adjactive", - "lemma": "first", - "others": {} - }, - { - "word": "African", - "importance": null, - "tag": "Adjactive", - "lemma": "African", - "others": {} - }, - { - "word": "-", - "importance": null, - "tag": "Punctuation", - "lemma": null, - "others": {} - }, - { - "word": "American", - "importance": null, - "tag": "Adjactive", - "lemma": "American", - "others": {} - }, - { - "word": "president", - "importance": null, - "tag": "Noun", - "lemma": "president", - "others": {} - }, - { - "word": "of", - "importance": null, - "tag": "Adposition", - "lemma": "of", - "others": {} - }, - { - "word": "the", - "importance": null, - "tag": "Determiner", - "lemma": "the", - "others": {} - }, - { - "word": "United", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "States", - "importance": null, - "tag": "Proper noun", - "lemma": "State", - "others": {} - }, - { - "word": ".", - "importance": null, - "tag": "Punctuation", - "lemma": null, - "others": {} - }, - { - "word": "He", - "importance": null, - "tag": "Pronoun", - "lemma": "he", - "others": {} - }, - { - "word": "previously", - "importance": null, - "tag": "Adverb", - "lemma": "previously", - "others": {} - }, - { - "word": "served", - "importance": null, - "tag": "Verb", - "lemma": "serve", - "others": {} - }, - { - "word": "as", - "importance": null, - "tag": "Adposition", - "lemma": "as", - "others": {} - }, - { - "word": "a", - "importance": null, - "tag": "Determiner", - "lemma": "a", - "others": {} - }, - { - "word": "U.S.", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "senator", - "importance": null, - "tag": "Noun", - "lemma": "senator", - "others": {} - }, - { - "word": "from", - "importance": null, - "tag": "Adposition", - "lemma": "from", - "others": {} - }, - { - "word": "Illinois", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "from", - "importance": null, - "tag": "Adposition", - "lemma": "from", - "others": {} - }, - { - "word": "2005", - "importance": null, - "tag": "Cardinal number", - "lemma": null, - "others": {} - }, - { - "word": "to", - "importance": null, - "tag": "Adposition", - "lemma": "to", - "others": {} - }, - { - "word": "2008", - "importance": null, - "tag": "Cardinal number", - "lemma": null, - "others": {} - }, - { - "word": "and", - "importance": null, - "tag": "Coordinating_Conjunction", - "lemma": "and", - "others": {} - }, - { - "word": "as", - "importance": null, - "tag": "Adposition", - "lemma": "as", - "others": {} - }, - { - "word": "an", - "importance": null, - "tag": "Determiner", - "lemma": "a", - "others": {} - }, - { - "word": "Illinois", - "importance": null, - "tag": "Proper noun", - "lemma": null, - "others": {} - }, - { - "word": "state", - "importance": null, - "tag": "Noun", - "lemma": "state", - "others": {} - }, - { - "word": "senator", - "importance": null, - "tag": "Noun", - "lemma": "senator", - "others": {} - }, - { - "word": "from", - "importance": null, - "tag": "Adposition", - "lemma": "from", - "others": {} - }, - { - "word": "1997", - "importance": null, - "tag": "Cardinal number", - "lemma": null, - "others": {} - }, - { - "word": "to", - "importance": null, - "tag": "Adposition", - "lemma": "to", - "others": {} - }, - { - "word": "2004", - "importance": null, - "tag": "Cardinal number", - "lemma": null, - "others": {} - }, - { - "word": ".", - "importance": null, - "tag": "Punctuation", - "lemma": null, - "others": {} - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/text/topic_extraction_output.json b/edenai_apis/apis/ibm/outputs/text/topic_extraction_output.json deleted file mode 100644 index 506ebd77..00000000 --- a/edenai_apis/apis/ibm/outputs/text/topic_extraction_output.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "original_response": { - "usage": { - "text_units": 1, - "text_characters": 95, - "features": 1 - }, - "language": "en", - "categories": [ - { - "score": 1.0, - "label": "/art and entertainment/movies and tv" - }, - { - "score": 0.999944, - "label": "/art and entertainment/movies and tv/movies" - }, - { - "score": 0.999575, - "label": "/art and entertainment/movies and tv/television" - } - ] - }, - "standardized_response": { - "items": [ - { - "category": "/Art And Entertainment/Movies And Tv", - "importance": 1.0 - }, - { - "category": "/Art And Entertainment/Movies And Tv/Movies", - "importance": 1.0 - }, - { - "category": "/Art And Entertainment/Movies And Tv/Television", - "importance": 1.0 - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/translation/automatic_translation_output.json b/edenai_apis/apis/ibm/outputs/translation/automatic_translation_output.json deleted file mode 100644 index 8ae0a108..00000000 --- a/edenai_apis/apis/ibm/outputs/translation/automatic_translation_output.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "original_response": [ - { - "translation": "Artificial intelligence also refers to intellectual machinery, machine intelligence, which refers to the wisdom shown by the machines manufactured by people.Usually artificial intelligence refers to the technology that presents human intelligence through ordinary computer programs.The word also points to the question of whether a smart system like this can be realized, and how it can be achieved.At the same time, through advances in medicine, neuroscience, robotics, and statistics, the norm predicts that many occupations in humans are also gradually being replaced by them" - } - ], - "standardized_response": { - "text": "Artificial intelligence also refers to intellectual machinery, machine intelligence, which refers to the wisdom shown by the machines manufactured by people.Usually artificial intelligence refers to the technology that presents human intelligence through ordinary computer programs.The word also points to the question of whether a smart system like this can be realized, and how it can be achieved.At the same time, through advances in medicine, neuroscience, robotics, and statistics, the norm predicts that many occupations in humans are also gradually being replaced by them" - } -} \ No newline at end of file diff --git a/edenai_apis/apis/ibm/outputs/translation/language_detection_output.json b/edenai_apis/apis/ibm/outputs/translation/language_detection_output.json deleted file mode 100644 index 18c3c546..00000000 --- a/edenai_apis/apis/ibm/outputs/translation/language_detection_output.json +++ /dev/null @@ -1,319 +0,0 @@ -{ - "original_response": { - "languages": [ - { - "language": "it", - "confidence": 0.9999999998396725 - }, - { - "language": "sq", - "confidence": 1.0212451095683897e-10 - }, - { - "language": "ro", - "confidence": 4.708089465632825e-11 - }, - { - "language": "pt", - "confidence": 8.940754659602539e-12 - }, - { - "language": "eo", - "confidence": 8.312895478153914e-13 - }, - { - "language": "mt", - "confidence": 7.86418793934793e-13 - }, - { - "language": "ca", - "confidence": 2.2006051922707576e-13 - }, - { - "language": "hr", - "confidence": 1.4769108221389002e-13 - }, - { - "language": "pl", - "confidence": 5.392510559656236e-14 - }, - { - "language": "eu", - "confidence": 4.7192405756385175e-14 - }, - { - "language": "et", - "confidence": 2.7158129984096845e-14 - }, - { - "language": "sl", - "confidence": 1.5768929924964758e-14 - }, - { - "language": "ms", - "confidence": 1.1279222816609187e-14 - }, - { - "language": "tr", - "confidence": 1.0813803956337854e-14 - }, - { - "language": "ht", - "confidence": 8.19149234662626e-15 - }, - { - "language": "lt", - "confidence": 4.997426933106339e-15 - }, - { - "language": "hu", - "confidence": 3.6240659653348396e-15 - }, - { - "language": "sk", - "confidence": 3.592678339607043e-15 - }, - { - "language": "az", - "confidence": 1.8221343473416242e-15 - }, - { - "language": "sv", - "confidence": 1.6020255475338111e-15 - }, - { - "language": "nn", - "confidence": 1.3042881466885243e-15 - }, - { - "language": "da", - "confidence": 1.2213085069207258e-15 - }, - { - "language": "tl", - "confidence": 8.123931703518554e-16 - }, - { - "language": "ku", - "confidence": 7.100811231920388e-16 - }, - { - "language": "es", - "confidence": 5.253710310843753e-16 - }, - { - "language": "af", - "confidence": 4.979260604480163e-16 - }, - { - "language": "nl", - "confidence": 3.1286957282188786e-16 - }, - { - "language": "nb", - "confidence": 2.456700644766109e-16 - }, - { - "language": "lv", - "confidence": 1.1932378135241337e-16 - }, - { - "language": "fr", - "confidence": 1.0982541567234712e-16 - }, - { - "language": "de", - "confidence": 9.828455308145501e-17 - }, - { - "language": "ja", - "confidence": 2.9164472569045646e-17 - }, - { - "language": "ko", - "confidence": 2.3966584255940453e-17 - }, - { - "language": "vi", - "confidence": 2.167208886477989e-17 - }, - { - "language": "cs", - "confidence": 1.2307832412417178e-17 - }, - { - "language": "fi", - "confidence": 7.01176572363588e-18 - }, - { - "language": "el", - "confidence": 4.404547143452098e-18 - }, - { - "language": "zh", - "confidence": 3.079392971627941e-18 - }, - { - "language": "zh-TW", - "confidence": 2.902311101693446e-18 - }, - { - "language": "en", - "confidence": 2.507715355250999e-18 - }, - { - "language": "so", - "confidence": 2.14075755180271e-18 - }, - { - "language": "th", - "confidence": 1.7511165303069123e-18 - }, - { - "language": "is", - "confidence": 9.2293017894505e-19 - }, - { - "language": "cy", - "confidence": 3.8462491401130747e-19 - }, - { - "language": "hi", - "confidence": 2.669928598885797e-19 - }, - { - "language": "ar", - "confidence": 1.958827989872552e-19 - }, - { - "language": "sr", - "confidence": 1.5657820171410785e-19 - }, - { - "language": "ru", - "confidence": 1.509511487866972e-19 - }, - { - "language": "mn", - "confidence": 1.3097007228749597e-19 - }, - { - "language": "he", - "confidence": 1.1151060858424286e-19 - }, - { - "language": "ur", - "confidence": 8.29662777355283e-20 - }, - { - "language": "ga", - "confidence": 4.092721753929488e-20 - }, - { - "language": "my", - "confidence": 3.700229456248533e-20 - }, - { - "language": "uk", - "confidence": 3.659759774028137e-20 - }, - { - "language": "mr", - "confidence": 2.6836140835021747e-20 - }, - { - "language": "ka", - "confidence": 1.8000590121296155e-20 - }, - { - "language": "be", - "confidence": 1.5332158590136848e-20 - }, - { - "language": "lo", - "confidence": 1.197136076463734e-20 - }, - { - "language": "bg", - "confidence": 8.962753986935338e-21 - }, - { - "language": "km", - "confidence": 8.885002512114458e-21 - }, - { - "language": "kk", - "confidence": 6.817649141026369e-21 - }, - { - "language": "pa", - "confidence": 6.0320336632163514e-21 - }, - { - "language": "ta", - "confidence": 4.915391234890383e-21 - }, - { - "language": "ky", - "confidence": 4.717995020065613e-21 - }, - { - "language": "ml", - "confidence": 4.2155242895497864e-21 - }, - { - "language": "ps", - "confidence": 4.0900016522742374e-21 - }, - { - "language": "bn", - "confidence": 4.075204743653098e-21 - }, - { - "language": "hy", - "confidence": 2.8886035485326313e-21 - }, - { - "language": "ne", - "confidence": 2.6452183702936298e-21 - }, - { - "language": "te", - "confidence": 2.408058685636773e-21 - }, - { - "language": "fa", - "confidence": 1.964693430582205e-21 - }, - { - "language": "cv", - "confidence": 1.5836887227570463e-21 - }, - { - "language": "ba", - "confidence": 1.3846226541915962e-21 - }, - { - "language": "gu", - "confidence": 1.0752882629785642e-21 - }, - { - "language": "si", - "confidence": 7.255868823831215e-22 - }, - { - "language": "pa-PK", - "confidence": 6.26521392062563e-22 - } - ] - }, - "standardized_response": { - "items": [ - { - "language": "it", - "display_name": "Italian", - "confidence": 0.9999999998396725 - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/lettria/__init__.py b/edenai_apis/apis/lettria/__init__.py deleted file mode 100644 index 3af49857..00000000 --- a/edenai_apis/apis/lettria/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .lettria_api import LettriaApi diff --git a/edenai_apis/apis/lettria/info.json b/edenai_apis/apis/lettria/info.json deleted file mode 100644 index 80e2901c..00000000 --- a/edenai_apis/apis/lettria/info.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "text": { - "named_entity_recognition": { - "constraints": { - "languages": [ - "en-US", - "fr-FR" - ], - "allow_null_language": true - }, - "version": "v5.5.2" - }, - "sentiment_analysis": { - "constraints": { - "languages": [ - "en-US", - "fr-FR" - ], - "allow_null_language":true - }, - "version": "v5.5.2" - }, - "syntax_analysis": { - "constraints": { - "languages": [ - "en-US", - "fr-FR" - ], - "allow_null_language": true - }, - "version": "v5.5.2" - } - } -} diff --git a/edenai_apis/apis/lettria/lettria_api.py b/edenai_apis/apis/lettria/lettria_api.py deleted file mode 100644 index 207c41a0..00000000 --- a/edenai_apis/apis/lettria/lettria_api.py +++ /dev/null @@ -1,175 +0,0 @@ -import json -from typing import Dict, Sequence - -import requests - -from edenai_apis.features import ProviderInterface, TextInterface -from edenai_apis.features.text import ( - InfosNamedEntityRecognitionDataClass, - NamedEntityRecognitionDataClass, - InfosSyntaxAnalysisDataClass, - SyntaxAnalysisDataClass, - SentimentAnalysisDataClass, -) -from edenai_apis.features.text.sentiment_analysis.sentiment_analysis_dataclass import ( - SegmentSentimentAnalysisDataClass, - SentimentEnum, -) -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from edenai_apis.utils.exception import ProviderException -from edenai_apis.utils.types import ResponseType -from .lettria_tags import tags - - -class LettriaApi(ProviderInterface, TextInterface): - provider_name = "lettria" - - def __init__(self, api_keys: Dict = {}) -> None: - self.api_settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys - ) - self.api_key = self.api_settings["api_key"] - self.url = "https://api.lettria.com/" - self.headers = { - "Authorization": self.api_key, - } - - def text__named_entity_recognition( - self, language: str, text: str - ) -> ResponseType[NamedEntityRecognitionDataClass]: - original_response = requests.post( - url=self.url, headers=self.headers, json={"text": text} - ) - try: - original_response = original_response.json() - except json.decoder.JSONDecodeError: - raise ProviderException("Internal Server error", code=500) - - items: Sequence[InfosNamedEntityRecognitionDataClass] = [] - for value in original_response["sentences"]: - item = value.get("ml_ner", []) - for entity in item: - items.append( - InfosNamedEntityRecognitionDataClass( - entity=entity["source"], - importance=None, - category=entity.get("type"), - ) - ) - - standardized_response = NamedEntityRecognitionDataClass(items=items) - - result = ResponseType[NamedEntityRecognitionDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - return result - - def _normalize_sentiment(self, rate: float) -> SentimentEnum: - if rate > 0: - return SentimentEnum.POSITIVE - if rate < 0: - return SentimentEnum.NEGATIVE - return SentimentEnum.NEUTRAL - - def text__sentiment_analysis( - self, language: str, text: str - ) -> ResponseType[SentimentAnalysisDataClass]: - try: - original_response = requests.post( - url=self.url, headers=self.headers, json={"text": text} - ).json() - except json.JSONDecodeError: - raise ProviderException("Internal Server error", code=500) - - items = [] - for sentence in original_response["sentences"]: - score = sentence["sentiment"]["subsentences"][0]["values"]["total"] - sentiment = self._normalize_sentiment(score).value - items.append( - SegmentSentimentAnalysisDataClass( - segment=sentence["sentiment"]["subsentences"][0]["sentence"], - sentiment=sentiment, - sentiment_rate=abs( - sentence["sentiment"]["subsentences"][0]["values"]["total"] - ), - ) - ) - - sentiment: str = self._normalize_sentiment(original_response["sentiment"]).value - sentiment_rate: float = abs(original_response["sentiment"]) - - standarize = SentimentAnalysisDataClass( - general_sentiment=sentiment, - general_sentiment_rate=sentiment_rate, - items=items, - ) - - result = ResponseType[SentimentAnalysisDataClass]( - original_response=original_response, - standardized_response=standarize, - ) - return result - - def text__syntax_analysis( - self, language: str, text: str - ) -> ResponseType[SyntaxAnalysisDataClass]: - try: - original_response = requests.post( - url=self.url, headers=self.headers, json={"text": text} - ).json() - except: - raise ProviderException( - "Something went wrong when performing the call", 500 - ) - - items: Sequence[InfosSyntaxAnalysisDataClass] = [] - - for sentence in original_response["sentences"]: - for word in sentence["detail"]: - if word["tag"] in tags: - gender = None - plural = None - # lemmatizer can be a dict or a list. - # gender and plural are only available if the lemmatizer is a dict - if isinstance(word.get("lemmatizer"), dict): - if word.get("lemmatizer", {}).get("gender", {}).get("female"): - gender = "feminine" - elif ( - not word.get("lemmatizer", {}) - .get("gender", {}) - .get("female") - ): - gender = "masculine" - if word.get("lemmatizer", {}).get("gender", {}).get("plural"): - plural = "plural" - elif ( - not word.get("lemmatizer", {}) - .get("gender", {}) - .get("plural") - ): - plural = "singular" - other = { - "gender": gender, - "plural": plural, - "mode": None, - "infinitive": word.get("infinit"), - } - items.append( - InfosSyntaxAnalysisDataClass( - word=word["source"], - tag=tags[word["tag"]], - lemma=word["lemma"], - others=other, - importance=None, - ) - ) - - standardized_response = SyntaxAnalysisDataClass(items=items) - - result = ResponseType[SyntaxAnalysisDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - return result diff --git a/edenai_apis/apis/lettria/lettria_tags.py b/edenai_apis/apis/lettria/lettria_tags.py deleted file mode 100644 index b15b42dd..00000000 --- a/edenai_apis/apis/lettria/lettria_tags.py +++ /dev/null @@ -1,22 +0,0 @@ -tags = { - "C": "conjunction", - "CC": "co-ordinating conjunction", - "CD": "number", - "CLO": "pronoun object", - "CLS": "pronoun", - "D": "determiner", - "JJ": "adjective", - "N": "common noun", - "NP": "proper noun", - "PUNCT": "punctuation", - "P": "preposition", - "PD": "pronom define", - "PROREL": "pronom relative", - "RB": "adverb", - "RB_WH": "adverb question", - "SYM": "symbols", - "UH": "interjection", - "V": "verb", - "VINF": "infinitive verb", - "VP": "verb participe past", -} diff --git a/edenai_apis/apis/lettria/outputs/text/named_entity_recognition_output.json b/edenai_apis/apis/lettria/outputs/text/named_entity_recognition_output.json deleted file mode 100644 index efaa7106..00000000 --- a/edenai_apis/apis/lettria/outputs/text/named_entity_recognition_output.json +++ /dev/null @@ -1,3182 +0,0 @@ -{ - "original_response": { - "language": "en", - "escapeHtml": false, - "splitNewLine": false, - "modules": [ - "EMOTICONS", - "DETECT_LANGUAGE", - "NER", - "TOKENIZE", - "POSTAGGER", - "LEMMATIZER", - "SENTENCE_ACTS", - "DEPENDENCY_PARSER", - "NLU", - "SPLIT_PROPOSITION", - "COREFERENCE", - "SENTIMENT", - "ML_NER", - "EXTRACT_PATTERN" - ], - "source_pure": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American president of the United States. He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "projectId": "5fb39e7f739cc549f6890f9e", - "domain": null, - "type": null, - "sentences": [ - { - "source": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017.", - "sentence_indexes": [ - 0, - 119 - ], - "source_pure": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017.", - "detail": [ - { - "source": "Barack Hussein Obama", - "tag": "NP", - "source_pure": "Barack Hussein Obama", - "indexes": [ - 0, - 20 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "Barack Hussein Obama", - "index": 0, - "meaning": [ - { - "sub": "person", - "super": "concrete_thing|natural_thing", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "nsubj", - "ref": 1, - "transform": {}, - "coreference": [ - 0 - ] - }, - { - "source": "is", - "source_pure": "is", - "indexes": [ - 21, - 23 - ], - "tag": "V", - "len": 1, - "lemmatizer": { - "infinit": "be", - "conjugate": [ - { - "mode": "indicative", - "temps": "present", - "pronom": 3 - } - ], - "transitif": true - }, - "lemma": "be", - "index": 1, - "meaning": [ - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "exist", - "super": "root|act|existing", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "infinit": [ - "be" - ], - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "root", - "ref": -1, - "transform": {}, - "coreference": [] - }, - { - "source": "an", - "source_pure": "an", - "indexes": [ - 24, - 26 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "index": 2, - "meaning": [], - "value": null, - "dep": "det", - "ref": 4, - "transform": {}, - "coreference": [ - 1 - ] - }, - { - "source": "american", - "source_pure": "American", - "indexes": [ - 27, - 35 - ], - "tag": "JJ", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "american", - "index": 3, - "meaning": [ - { - "sub": "relational", - "super": null, - "intensity": 0, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "transform": { - "lemma": "america", - "tag": "N", - "meaning": [ - { - "sub": "continent", - "super": "concrete_thing|fabricated_thing|created_location|territory", - "intensity": 1, - "negation": false, - "origin": [ - "transform" - ] - } - ], - "extra": {} - }, - "dep": "amod", - "ref": 4, - "coreference": [ - 1 - ] - }, - { - "source": "politician", - "source_pure": "politician", - "indexes": [ - 36, - 46 - ], - "tag": "N", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "politician", - "index": 4, - "meaning": [ - { - "sub": "professional", - "super": "concrete_thing|natural_thing|person|[person_by_activity]", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "obj", - "ref": 1, - "transform": {}, - "coreference": [ - 1 - ] - }, - { - "source": "who", - "source_pure": "who", - "indexes": [ - 47, - 50 - ], - "tag": "PROREL", - "len": 1, - "lemmatizer": {}, - "lemma": "who", - "index": 5, - "meaning": [], - "value": null, - "dep": "nsubj", - "ref": 6, - "transform": {}, - "coreference": [ - 2 - ] - }, - { - "source": "served", - "source_pure": "served", - "indexes": [ - 51, - 57 - ], - "tag": "V", - "len": 1, - "lemmatizer": { - "infinit": "serve", - "conjugate": [ - { - "mode": "indicative", - "temps": "past", - "pronom": 5 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 4 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 3 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 6 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 2 - } - ], - "transitif": true - }, - "lemma": "serve", - "index": 6, - "meaning": [ - { - "sub": "favour", - "super": "root|interact|interactions|positive", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "give_(sthg)", - "super": "root|interact|make_possess|transmitting", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "provide_(sbody)", - "super": "root|interact|make_possess|providing", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "take_place_of", - "super": "root|act|being|be_related", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "infinit": [ - "serve" - ], - "verb_meaning": { - "serve": [ - "root|interact|interactions|positive|favour", - "root|interact|make_possess|transmitting|give_(sthg)", - "root|interact|make_possess|providing|provide_(sbody)", - "root|act|being|be_related|take_place_of" - ] - }, - "dep": "acl:relcl", - "ref": 4, - "transform": {}, - "coreference": [] - }, - { - "source": "as", - "source_pure": "as", - "indexes": [ - 58, - 60 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Way|Manner|AS", - "Way|Manner|ACCORDING", - "Duration|DURING", - "Comparison|LIKE" - ] - }, - "lemma": "as", - "index": 7, - "meaning": [ - { - "sub": "AS", - "super": "Way|Manner", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "ACCORDING", - "super": "Way|Manner", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "DURING", - "super": "Duration", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "LIKE", - "super": "Comparison", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 10, - "transform": {}, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 61, - 64 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "index": 8, - "meaning": [], - "value": null, - "dep": "det", - "ref": 10, - "transform": {}, - "coreference": [ - 3 - ] - }, - { - "source": "44th", - "tag": "ENTITY", - "source_pure": "44th", - "indexes": [ - 65, - 69 - ], - "len": 2, - "lemmatizer": { - "number": 44 - }, - "lemma": "44 th", - "index": 9, - "meaning": [ - { - "sub": "ordinal", - "super": "ENTITY", - "intensity": 1, - "negation": false, - "origin": [ - "link_entity" - ] - } - ], - "value": { - "entity": "ordinal", - "rank": "44", - "unit": "eme", - "confidence": 0.99 - }, - "dep": "amod", - "ref": 10, - "transform": {}, - "coreference": [ - 3 - ] - }, - { - "source": "president", - "source_pure": "president", - "indexes": [ - 70, - 79 - ], - "tag": "N", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "president", - "index": 10, - "meaning": [ - { - "sub": "card_game", - "super": "abstract_thing|entity|[activities_(n)]|activity_field|game_(abstr.)", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "obl", - "ref": 6, - "transform": {}, - "coreference": [ - 3 - ] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 80, - 82 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Subject|Relation|OF", - "Duration|OF" - ] - }, - "lemma": "of", - "index": 11, - "meaning": [ - { - "sub": "OF", - "super": "Subject|Relation", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "OF", - "super": "Duration", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 13, - "transform": {}, - "coreference": [ - 3 - ] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 83, - 86 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "index": 12, - "meaning": [], - "value": null, - "dep": "det", - "ref": 13, - "transform": {}, - "coreference": [ - 3 - ] - }, - { - "source": "United States", - "tag": "NP", - "source_pure": "United States", - "indexes": [ - 87, - 100 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "United States", - "index": 13, - "meaning": [ - { - "sub": "created_location", - "super": "concrete_thing|fabricated_thing|object", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "amod", - "ref": 15, - "transform": {}, - "coreference": [ - 3 - ] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 101, - 105 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Causality|Cause|BECAUSE", - "Localization|Temporal|FROM", - "Localization|Source|FROM" - ] - }, - "lemma": "from", - "index": 14, - "meaning": [ - { - "sub": "BECAUSE", - "super": "Causality|Cause", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Temporal", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Source", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 15, - "transform": {}, - "coreference": [ - 4 - ] - }, - { - "source": "2009to", - "tag": "ENTITY", - "source_pure": "2009 to", - "indexes": [ - 106, - 113 - ], - "len": 2, - "lemmatizer": { - "number": 2009 - }, - "lemma": "2009 to", - "index": 15, - "meaning": [ - { - "sub": "data_storage", - "super": "ENTITY", - "intensity": 1, - "negation": false, - "origin": [ - "link_entity" - ] - } - ], - "value": { - "entity": "data_storage", - "unit": "to", - "scalar": 2009, - "Mo": 2009000000, - "Gbit": 16072000, - "kbit": 16072000000000, - "Go": 2009000, - "To": 2009, - "confidence": 0.99 - }, - "dep": "obl", - "ref": 16, - "transform": {}, - "coreference": [ - 4, - 5, - 6 - ] - }, - { - "source": "2017", - "tag": "CD", - "source_pure": "2017", - "indexes": [ - 114, - 118 - ], - "len": 1, - "lemmatizer": { - "number": 2017 - }, - "lemma": "2017", - "index": 16, - "meaning": [ - { - "sub": "number", - "super": null, - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": { - "scalar": 2017 - }, - "dep": "obl", - "ref": 6, - "transform": {}, - "coreference": [ - 4, - 6, - 7 - ] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 118, - 119 - ], - "tag": "PUNCT", - "len": 1, - "lemmatizer": {}, - "lemma": ".", - "index": 17, - "meaning": [], - "value": null, - "transform": {}, - "dep": "punct", - "ref": 1, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 17, - "start_indexes": 0, - "end_indexes": 119 - } - ], - "ml_ner": [ - { - "entity": "person", - "source": "Barack Hussein Obama", - "value": null, - "index": 0 - }, - { - "entity": "created_location", - "source": "United States", - "value": null, - "index": 13 - } - ], - "ml_sentiment": { - "sentence": { - "value": 0.617 - }, - "subsentence": [ - 0.617 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "pride", - "value": 1 - }, - { - "type": "neutral", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "pride", - "value": 1 - }, - { - "type": "neutral", - "value": 1 - } - ] - ] - }, - "coreference": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6, - 7 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 17, - "start_indexes": 0, - "end_indexes": 119, - "elements": [ - { - "target": { - "lemma": "politician", - "source": "politician", - "index": 4 - }, - "subject": { - "lemma": "Barack Hussein Obama", - "source": "Barack Hussein Obama", - "index": 0 - }, - "source": { - "index": 1, - "lemma": "be", - "source": "is" - }, - "value": 0.617 - } - ], - "sentence": "Barack Hussein Obama is an american politician who served as the 44th president of the United States from 2009to 2017 .", - "values": { - "positive": 0.617, - "negative": 0, - "total": 0.617 - } - } - ], - "values": { - "positive": 0.617, - "negative": 0, - "total": 0.617 - }, - "elements": [ - { - "target": { - "lemma": "politician", - "source": "politician", - "index": 4 - }, - "subject": { - "lemma": "Barack Hussein Obama", - "source": "Barack Hussein Obama", - "index": 0 - }, - "source": { - "index": 1, - "lemma": "be", - "source": "is" - }, - "value": 0.617 - } - ] - }, - "emotion": { - "subsentences": [ - { - "start_id": 0, - "end_id": 17, - "start_indexes": 0, - "end_indexes": 119, - "elements": [ - { - "target": { - "lemma": "politician", - "source": "politician", - "index": 4 - }, - "subject": { - "lemma": "Barack Hussein Obama", - "source": "Barack Hussein Obama", - "index": 0 - }, - "source": { - "index": 1, - "lemma": "be", - "source": "is" - }, - "value": { - "pride": 1, - "neutral": 1 - } - } - ], - "sentence": "Barack Hussein Obama is an american politician who served as the 44th president of the United States from 2009to 2017 .", - "values": { - "pride": 1, - "neutral": 1 - } - } - ], - "values": [ - { - "type": "pride", - "value": 1 - }, - { - "type": "neutral", - "value": 1 - } - ], - "elements": [ - { - "target": { - "lemma": "politician", - "source": "politician", - "index": 4 - }, - "subject": { - "lemma": "Barack Hussein Obama", - "source": "Barack Hussein Obama", - "index": 0 - }, - "source": { - "index": 1, - "lemma": "be", - "source": "is" - }, - "value": { - "pride": 1, - "neutral": 1 - } - } - ] - }, - "sentence_type": "assert" - }, - { - "source": "A member of the Democratic Party, Obama was the first African-American president of the United States.", - "sentence_indexes": [ - 119, - 222 - ], - "source_pure": " A member of the Democratic Party, Obama was the first African-American president of the United States.", - "detail": [ - { - "source": "a", - "source_pure": "A", - "indexes": [ - 120, - 121 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "index": 0, - "meaning": [], - "value": null, - "dep": "det", - "ref": 1, - "transform": {}, - "coreference": [ - 8 - ] - }, - { - "source": "member", - "source_pure": "member", - "indexes": [ - 122, - 128 - ], - "tag": "N", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "member", - "index": 1, - "meaning": [ - { - "sub": "person_by_other_characteristic", - "super": "concrete_thing|natural_thing|person|[person_by_characteristics]", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "obl", - "ref": 7, - "transform": {}, - "coreference": [ - 8 - ] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 129, - 131 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Subject|Relation|OF", - "Duration|OF" - ] - }, - "lemma": "of", - "index": 2, - "meaning": [ - { - "sub": "OF", - "super": "Subject|Relation", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "OF", - "super": "Duration", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 4, - "transform": {}, - "coreference": [ - 8 - ] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 132, - 135 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "index": 3, - "meaning": [], - "value": null, - "dep": "det", - "ref": 4, - "transform": {}, - "coreference": [ - 8, - 9 - ] - }, - { - "source": "Democratic Party", - "tag": "NP", - "source_pure": "Democratic Party", - "indexes": [ - 136, - 152 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "Democratic Party", - "index": 4, - "meaning": [ - { - "sub": "company", - "super": "concrete_thing|natural_thing|person|human_group", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "amod", - "ref": 1, - "transform": {}, - "coreference": [ - 8, - 9 - ] - }, - { - "source": ",", - "source_pure": ",", - "indexes": [ - 152, - 153 - ], - "tag": "PUNCT", - "len": 1, - "lemmatizer": {}, - "lemma": ",", - "index": 5, - "meaning": [], - "value": null, - "dep": "punct", - "ref": 1, - "transform": {}, - "coreference": [] - }, - { - "source": "Obama", - "tag": "NP", - "source_pure": "Obama", - "indexes": [ - 154, - 159 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "Obama", - "index": 6, - "meaning": [ - { - "sub": "person", - "super": "concrete_thing|natural_thing", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "nsubj", - "ref": 7, - "transform": {}, - "coreference": [ - 10 - ] - }, - { - "source": "was", - "source_pure": "was", - "indexes": [ - 160, - 163 - ], - "tag": "V", - "len": 1, - "lemmatizer": { - "infinit": "be", - "conjugate": [ - { - "mode": "subjonctive", - "temps": "past", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 1 - } - ], - "transitif": true - }, - "lemma": "be", - "index": 7, - "meaning": [ - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "exist", - "super": "root|act|existing", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "infinit": [ - "be" - ], - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "root", - "ref": -1, - "transform": {}, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 164, - 167 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "index": 8, - "meaning": [], - "value": null, - "dep": "det", - "ref": 11, - "transform": {}, - "coreference": [ - 11 - ] - }, - { - "source": "first", - "source_pure": "first", - "indexes": [ - 168, - 173 - ], - "tag": "JJ", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "first", - "index": 9, - "meaning": [ - { - "sub": "ordinal", - "super": "quantity_jj", - "intensity": 0, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "amod", - "ref": 11, - "transform": {}, - "coreference": [ - 11 - ] - }, - { - "source": "african-american", - "source_pure": "African-American", - "indexes": [ - 174, - 190 - ], - "tag": "JJ", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "african-american", - "index": 10, - "meaning": [], - "value": null, - "dep": "amod", - "ref": 11, - "transform": {}, - "coreference": [ - 11 - ] - }, - { - "source": "president", - "source_pure": "president", - "indexes": [ - 191, - 200 - ], - "tag": "N", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "president", - "index": 11, - "meaning": [ - { - "sub": "card_game", - "super": "abstract_thing|entity|[activities_(n)]|activity_field|game_(abstr.)", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "obj", - "ref": 7, - "transform": {}, - "coreference": [ - 11 - ] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 201, - 203 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Subject|Relation|OF", - "Duration|OF" - ] - }, - "lemma": "of", - "index": 12, - "meaning": [ - { - "sub": "OF", - "super": "Subject|Relation", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "OF", - "super": "Duration", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 14, - "transform": {}, - "coreference": [ - 11 - ] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 204, - 207 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "index": 13, - "meaning": [], - "value": null, - "dep": "det", - "ref": 14, - "transform": {}, - "coreference": [ - 11, - 12 - ] - }, - { - "source": "United States", - "tag": "NP", - "source_pure": "United States", - "indexes": [ - 208, - 221 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "United States", - "index": 14, - "meaning": [ - { - "sub": "created_location", - "super": "concrete_thing|fabricated_thing|object", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "obl", - "ref": 7, - "transform": {}, - "coreference": [ - 11, - 12 - ] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 221, - 222 - ], - "tag": "PUNCT", - "len": 1, - "lemmatizer": {}, - "lemma": ".", - "index": 15, - "meaning": [], - "value": null, - "dep": "punct", - "ref": 7, - "transform": {}, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 15, - "start_indexes": 120, - "end_indexes": 222 - } - ], - "ml_ner": [ - { - "entity": "company", - "source": "Democratic Party", - "value": null, - "index": 4 - }, - { - "entity": "person", - "source": "Obama", - "value": null, - "index": 6 - }, - { - "entity": "created_location", - "source": "United States", - "value": null, - "index": 14 - } - ], - "ml_sentiment": { - "sentence": { - "value": 0.598 - }, - "subsentence": [ - 0.598 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "pride", - "value": 1 - }, - { - "type": "neutral", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "pride", - "value": 1 - }, - { - "type": "neutral", - "value": 1 - } - ] - ] - }, - "coreference": [ - 8, - 9, - 10, - 11, - 12 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 15, - "start_indexes": 120, - "end_indexes": 222, - "elements": [ - { - "target": { - "lemma": "president", - "source": "president", - "index": 11 - }, - "subject": { - "lemma": "Obama", - "source": "Obama", - "index": 6 - }, - "source": { - "index": 7, - "lemma": "be", - "source": "was" - }, - "value": 0.598 - } - ], - "sentence": "a member of the Democratic Party , Obama was the first african-american president of the United States .", - "values": { - "positive": 0.598, - "negative": 0, - "total": 0.598 - } - } - ], - "values": { - "positive": 0.598, - "negative": 0, - "total": 0.598 - }, - "elements": [ - { - "target": { - "lemma": "president", - "source": "president", - "index": 11 - }, - "subject": { - "lemma": "Obama", - "source": "Obama", - "index": 6 - }, - "source": { - "index": 7, - "lemma": "be", - "source": "was" - }, - "value": 0.598 - } - ] - }, - "emotion": { - "subsentences": [ - { - "start_id": 0, - "end_id": 15, - "start_indexes": 120, - "end_indexes": 222, - "elements": [ - { - "target": { - "lemma": "president", - "source": "president", - "index": 11 - }, - "subject": { - "lemma": "Obama", - "source": "Obama", - "index": 6 - }, - "source": { - "index": 7, - "lemma": "be", - "source": "was" - }, - "value": { - "pride": 1, - "neutral": 1 - } - } - ], - "sentence": "a member of the Democratic Party , Obama was the first african-american president of the United States .", - "values": { - "pride": 1, - "neutral": 1 - } - } - ], - "values": [ - { - "type": "pride", - "value": 1 - }, - { - "type": "neutral", - "value": 1 - } - ], - "elements": [ - { - "target": { - "lemma": "president", - "source": "president", - "index": 11 - }, - "subject": { - "lemma": "Obama", - "source": "Obama", - "index": 6 - }, - "source": { - "index": 7, - "lemma": "be", - "source": "was" - }, - "value": { - "pride": 1, - "neutral": 1 - } - } - ] - }, - "sentence_type": "assert" - }, - { - "source": "He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "sentence_indexes": [ - 222, - 345 - ], - "source_pure": " He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "detail": [ - { - "source": "he", - "source_pure": "He", - "indexes": [ - 223, - 225 - ], - "tag": "CLS", - "len": 1, - "lemmatizer": { - "pronom": 3 - }, - "lemma": "it", - "index": 0, - "meaning": [ - { - "sub": "coreference", - "super": null, - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": { - "scalar": 3 - }, - "dep": "nsubj", - "ref": 2, - "transform": {}, - "coreference": [ - 13 - ] - }, - { - "source": "previously", - "source_pure": "previously", - "indexes": [ - 226, - 236 - ], - "tag": "RB", - "len": 1, - "lemmatizer": { - "category": [ - "time and aspect" - ] - }, - "lemma": "previously", - "index": 1, - "meaning": [ - { - "sub": "time and aspect", - "super": null, - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "advmod", - "ref": 2, - "transform": {}, - "coreference": [] - }, - { - "source": "served", - "source_pure": "served", - "indexes": [ - 237, - 243 - ], - "tag": "V", - "len": 1, - "lemmatizer": { - "infinit": "serve", - "conjugate": [ - { - "mode": "indicative", - "temps": "past", - "pronom": 3 - } - ], - "transitif": true - }, - "lemma": "serve", - "index": 2, - "meaning": [ - { - "sub": "favour", - "super": "root|interact|interactions|positive", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "give_(sthg)", - "super": "root|interact|make_possess|transmitting", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "provide_(sbody)", - "super": "root|interact|make_possess|providing", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "take_place_of", - "super": "root|act|being|be_related", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "infinit": [ - "serve" - ], - "verb_meaning": { - "serve": [ - "root|interact|interactions|positive|favour", - "root|interact|make_possess|transmitting|give_(sthg)", - "root|interact|make_possess|providing|provide_(sbody)", - "root|act|being|be_related|take_place_of" - ] - }, - "dep": "root", - "ref": -1, - "transform": {}, - "coreference": [] - }, - { - "source": "as", - "source_pure": "as", - "indexes": [ - 244, - 246 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Way|Manner|AS", - "Way|Manner|ACCORDING", - "Duration|DURING", - "Comparison|LIKE" - ] - }, - "lemma": "as", - "index": 3, - "meaning": [ - { - "sub": "AS", - "super": "Way|Manner", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "ACCORDING", - "super": "Way|Manner", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "DURING", - "super": "Duration", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "LIKE", - "super": "Comparison", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 6, - "transform": {}, - "coreference": [] - }, - { - "source": "a", - "source_pure": "a", - "indexes": [ - 247, - 248 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "index": 4, - "meaning": [], - "value": null, - "dep": "det", - "ref": 6, - "transform": {}, - "coreference": [] - }, - { - "source": "U.S.", - "tag": "NP", - "source_pure": "U.S.", - "indexes": [ - 249, - 253 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "U.S.", - "index": 5, - "meaning": [ - { - "sub": "created_location", - "super": "concrete_thing|fabricated_thing|object", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "compound", - "ref": 6, - "transform": {}, - "coreference": [] - }, - { - "source": "senator", - "source_pure": "senator", - "indexes": [ - 254, - 261 - ], - "tag": "N", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "senator", - "index": 6, - "meaning": [ - { - "sub": "person_by_other_activity", - "super": "concrete_thing|natural_thing|person|[person_by_activity]", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "obl", - "ref": 2, - "transform": {}, - "coreference": [] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 262, - 266 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Causality|Cause|BECAUSE", - "Localization|Temporal|FROM", - "Localization|Source|FROM" - ] - }, - "lemma": "from", - "index": 7, - "meaning": [ - { - "sub": "BECAUSE", - "super": "Causality|Cause", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Temporal", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Source", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 8, - "transform": {}, - "coreference": [] - }, - { - "source": "Illinois", - "tag": "NP", - "source_pure": "Illinois", - "indexes": [ - 267, - 275 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "Illinois", - "index": 8, - "meaning": [ - { - "sub": "created_location", - "super": "concrete_thing|fabricated_thing|object", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "nmod", - "ref": 6, - "transform": {}, - "coreference": [ - 14 - ] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 276, - 280 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Causality|Cause|BECAUSE", - "Localization|Temporal|FROM", - "Localization|Source|FROM" - ] - }, - "lemma": "from", - "index": 9, - "meaning": [ - { - "sub": "BECAUSE", - "super": "Causality|Cause", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Temporal", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Source", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 10, - "transform": {}, - "coreference": [ - 15 - ] - }, - { - "source": "2005to", - "tag": "ENTITY", - "source_pure": "2005 to", - "indexes": [ - 281, - 288 - ], - "len": 2, - "lemmatizer": { - "number": 2005 - }, - "lemma": "2005 to", - "index": 10, - "meaning": [ - { - "sub": "data_storage", - "super": "ENTITY", - "intensity": 1, - "negation": false, - "origin": [ - "link_entity" - ] - } - ], - "value": { - "entity": "data_storage", - "unit": "to", - "scalar": 2005, - "Mo": 2005000000, - "Gbit": 16040000, - "kbit": 16040000000000, - "Go": 2005000, - "To": 2005, - "confidence": 0.99 - }, - "dep": "obl", - "ref": 2, - "transform": {}, - "coreference": [ - 15, - 16 - ] - }, - { - "source": "2008", - "tag": "CD", - "source_pure": "2008", - "indexes": [ - 289, - 293 - ], - "len": 1, - "lemmatizer": { - "number": 2008 - }, - "lemma": "2008", - "index": 11, - "meaning": [ - { - "sub": "number", - "super": null, - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": { - "scalar": 2008 - }, - "dep": "nmod", - "ref": 10, - "transform": {}, - "coreference": [ - 15, - 16 - ] - }, - { - "source": "and", - "source_pure": "and", - "indexes": [ - 294, - 297 - ], - "tag": "CC", - "len": 1, - "lemmatizer": {}, - "lemma": "and", - "index": 12, - "meaning": [ - { - "sub": "&", - "super": null, - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "WITH", - "super": null, - "Inclusion_Exclusion|Addition": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "cc", - "ref": 16, - "transform": {}, - "coreference": [] - }, - { - "source": "as", - "source_pure": "as", - "indexes": [ - 298, - 300 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Way|Manner|AS", - "Way|Manner|ACCORDING", - "Duration|DURING", - "Comparison|LIKE" - ] - }, - "lemma": "as", - "index": 13, - "meaning": [ - { - "sub": "AS", - "super": "Way|Manner", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "ACCORDING", - "super": "Way|Manner", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "DURING", - "super": "Duration", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "LIKE", - "super": "Comparison", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 16, - "transform": {}, - "coreference": [] - }, - { - "source": "an", - "source_pure": "an", - "indexes": [ - 301, - 303 - ], - "tag": "D", - "len": 1, - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "index": 14, - "meaning": [], - "value": null, - "dep": "det", - "ref": 16, - "transform": {}, - "coreference": [ - 17 - ] - }, - { - "source": "Illinois state", - "tag": "NP", - "source_pure": "Illinois state", - "indexes": [ - 304, - 318 - ], - "len": 1, - "lemmatizer": {}, - "lemma": "Illinois state", - "index": 15, - "meaning": [ - { - "sub": "created_location", - "super": "concrete_thing|fabricated_thing|object", - "intensity": 1, - "origin": [ - "ml_ner" - ] - } - ], - "value": null, - "dep": "compound", - "ref": 16, - "transform": {}, - "coreference": [ - 17 - ] - }, - { - "source": "senator", - "source_pure": "senator", - "indexes": [ - 319, - 326 - ], - "tag": "N", - "len": 1, - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "senator", - "index": 16, - "meaning": [ - { - "sub": "person_by_other_activity", - "super": "concrete_thing|natural_thing|person|[person_by_activity]", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "nmod", - "ref": 6, - "transform": {}, - "coreference": [ - 17 - ] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 327, - 331 - ], - "tag": "P", - "len": 1, - "lemmatizer": { - "sens": [ - "Causality|Cause|BECAUSE", - "Localization|Temporal|FROM", - "Localization|Source|FROM" - ] - }, - "lemma": "from", - "index": 17, - "meaning": [ - { - "sub": "BECAUSE", - "super": "Causality|Cause", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Temporal", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - }, - { - "sub": "FROM", - "super": "Localization|Source", - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": null, - "dep": "case", - "ref": 18, - "transform": {}, - "coreference": [ - 18 - ] - }, - { - "source": "1997to", - "tag": "ENTITY", - "source_pure": "1997 to", - "indexes": [ - 332, - 339 - ], - "len": 2, - "lemmatizer": { - "number": 1997 - }, - "lemma": "1997 to", - "index": 18, - "meaning": [ - { - "sub": "data_storage", - "super": "ENTITY", - "intensity": 1, - "negation": false, - "origin": [ - "link_entity" - ] - } - ], - "value": { - "entity": "data_storage", - "unit": "to", - "scalar": 1997, - "Mo": 1997000000, - "Gbit": 15976000, - "kbit": 15976000000000, - "Go": 1997000, - "To": 1997, - "confidence": 0.99 - }, - "dep": "nmod", - "ref": 16, - "transform": {}, - "coreference": [ - 18, - 19, - 20 - ] - }, - { - "source": "2004", - "tag": "CD", - "source_pure": "2004", - "indexes": [ - 340, - 344 - ], - "len": 1, - "lemmatizer": { - "number": 2004 - }, - "lemma": "2004", - "index": 19, - "meaning": [ - { - "sub": "number", - "super": null, - "intensity": 1, - "negation": false, - "origin": [ - "lettria" - ] - } - ], - "value": { - "scalar": 2004 - }, - "dep": "nmod", - "ref": 16, - "transform": {}, - "coreference": [ - 18, - 20, - 21 - ] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 344, - 345 - ], - "tag": "PUNCT", - "len": 1, - "lemmatizer": {}, - "lemma": ".", - "index": 20, - "meaning": [], - "value": null, - "dep": "punct", - "ref": 2, - "transform": {}, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 20, - "start_indexes": 223, - "end_indexes": 345 - } - ], - "ml_ner": [ - { - "entity": "created_location", - "source": "U.S.", - "value": null, - "index": 5 - }, - { - "entity": "created_location", - "source": "Illinois", - "value": null, - "index": 8 - }, - { - "entity": "created_location", - "source": "Illinois state", - "value": null, - "index": 15 - } - ], - "ml_sentiment": { - "sentence": { - "value": 0.612 - }, - "subsentence": [ - 0.612 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "neutral", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "neutral", - "value": 1 - } - ] - ] - }, - "coreference": [ - 13, - 14, - 15, - 16, - 17, - 18, - 19, - 20, - 21 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 20, - "start_indexes": 223, - "end_indexes": 345, - "elements": [ - { - "target": null, - "subject": { - "lemma": "it", - "source": "he", - "index": 0 - }, - "source": { - "index": 2, - "lemma": "serve", - "source": "served" - }, - "value": 0.612 - } - ], - "sentence": "he previously served as a U.S. senator from Illinois from 2005to 2008 and as an Illinois state senator from 1997to 2004 .", - "values": { - "positive": 0.612, - "negative": 0, - "total": 0.612 - } - } - ], - "values": { - "positive": 0.612, - "negative": 0, - "total": 0.612 - }, - "elements": [ - { - "target": null, - "subject": { - "lemma": "it", - "source": "he", - "index": 0 - }, - "source": { - "index": 2, - "lemma": "serve", - "source": "served" - }, - "value": 0.612 - } - ] - }, - "emotion": { - "subsentences": [ - { - "start_id": 0, - "end_id": 20, - "start_indexes": 223, - "end_indexes": 345, - "elements": [ - { - "target": null, - "subject": { - "lemma": "it", - "source": "he", - "index": 0 - }, - "source": { - "index": 2, - "lemma": "serve", - "source": "served" - }, - "value": { - "neutral": 1 - } - } - ], - "sentence": "he previously served as a U.S. senator from Illinois from 2005to 2008 and as an Illinois state senator from 1997to 2004 .", - "values": { - "neutral": 1 - } - } - ], - "values": [ - { - "type": "neutral", - "value": 1 - } - ], - "elements": [ - { - "target": null, - "subject": { - "lemma": "it", - "source": "he", - "index": 0 - }, - "source": { - "index": 2, - "lemma": "serve", - "source": "served" - }, - "value": { - "neutral": 1 - } - } - ] - }, - "sentence_type": "assert" - } - ], - "emoticon": { - "happy": 0, - "very_happy": 0, - "laugh": 0, - "sad": 0, - "very_sad": 0, - "lol": 0, - "cry": 0, - "horror": 0, - "surprise": 0, - "kiss": 0, - "wink": 0, - "playful": 0, - "hesitant": 0, - "indecision": 0, - "embarrassed": 0, - "muted": 0, - "angel": 0, - "devil": 0, - "love": 0, - "notlove": 0 - }, - "emoticon_data": [], - "coreference": { - "spans": [ - { - "sentence_index": 0, - "token_indexes": [ - 0 - ], - "cluster_index": 1 - }, - { - "sentence_index": 0, - "token_indexes": [ - 2, - 3, - 4 - ], - "cluster_index": 0 - }, - { - "sentence_index": 0, - "token_indexes": [ - 5 - ], - "cluster_index": 0 - }, - { - "sentence_index": 0, - "token_indexes": [ - 8, - 9, - 10, - 11, - 12, - 13 - ], - "cluster_index": 2 - }, - { - "sentence_index": 0, - "token_indexes": [ - 14, - 15, - 16 - ], - "cluster_index": 3 - }, - { - "sentence_index": 0, - "token_indexes": [ - 15 - ], - "cluster_index": 4 - }, - { - "sentence_index": 0, - "token_indexes": [ - 15, - 16 - ], - "cluster_index": 5 - }, - { - "sentence_index": 0, - "token_indexes": [ - 16 - ], - "cluster_index": 6 - }, - { - "sentence_index": 1, - "token_indexes": [ - 0, - 1, - 2, - 3, - 4 - ], - "cluster_index": 7 - }, - { - "sentence_index": 1, - "token_indexes": [ - 3, - 4 - ], - "cluster_index": 8 - }, - { - "sentence_index": 1, - "token_indexes": [ - 6 - ], - "cluster_index": 1 - }, - { - "sentence_index": 1, - "token_indexes": [ - 8, - 9, - 10, - 11, - 12, - 13, - 14 - ], - "cluster_index": 9 - }, - { - "sentence_index": 1, - "token_indexes": [ - 13, - 14 - ], - "cluster_index": 10 - }, - { - "sentence_index": 2, - "token_indexes": [ - 0 - ], - "cluster_index": 1 - }, - { - "sentence_index": 2, - "token_indexes": [ - 8 - ], - "cluster_index": 11 - }, - { - "sentence_index": 2, - "token_indexes": [ - 9, - 10, - 11 - ], - "cluster_index": 12 - }, - { - "sentence_index": 2, - "token_indexes": [ - 10, - 11 - ], - "cluster_index": 13 - }, - { - "sentence_index": 2, - "token_indexes": [ - 14, - 15, - 16 - ], - "cluster_index": 14 - }, - { - "sentence_index": 2, - "token_indexes": [ - 17, - 18, - 19 - ], - "cluster_index": 15 - }, - { - "sentence_index": 2, - "token_indexes": [ - 18 - ], - "cluster_index": 16 - }, - { - "sentence_index": 2, - "token_indexes": [ - 18, - 19 - ], - "cluster_index": 17 - }, - { - "sentence_index": 2, - "token_indexes": [ - 19 - ], - "cluster_index": 18 - } - ], - "clusters": [ - [ - 2, - 1 - ], - [ - 10, - 0, - 13 - ], - [ - 3 - ], - [ - 4 - ], - [ - 5 - ], - [ - 6 - ], - [ - 7 - ], - [ - 8 - ], - [ - 9 - ], - [ - 11 - ], - [ - 12 - ], - [ - 14 - ], - [ - 15 - ], - [ - 16 - ], - [ - 17 - ], - [ - 18 - ], - [ - 19 - ], - [ - 20 - ], - [ - 21 - ] - ] - }, - "sentiment": 0.666, - "emotion": [ - { - "type": "pride", - "value": 1 - }, - { - "type": "neutral", - "value": 1 - } - ], - "patterns": null - }, - "standardized_response": { - "items": [ - { - "entity": "Barack Hussein Obama", - "category": null, - "importance": null - }, - { - "entity": "United States", - "category": null, - "importance": null - }, - { - "entity": "Democratic Party", - "category": null, - "importance": null - }, - { - "entity": "Obama", - "category": null, - "importance": null - }, - { - "entity": "United States", - "category": null, - "importance": null - }, - { - "entity": "U.S.", - "category": null, - "importance": null - }, - { - "entity": "Illinois", - "category": null, - "importance": null - }, - { - "entity": "Illinois state", - "category": null, - "importance": null - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/lettria/outputs/text/sentiment_analysis_output.json b/edenai_apis/apis/lettria/outputs/text/sentiment_analysis_output.json deleted file mode 100644 index f7da2829..00000000 --- a/edenai_apis/apis/lettria/outputs/text/sentiment_analysis_output.json +++ /dev/null @@ -1,5736 +0,0 @@ -{ - "original_response": { - "language": "en", - "escapeHtml": false, - "splitNewLine": false, - "modules": [ - "EMOTICONS", - "DETECT_LANGUAGE", - "NER", - "TOKENIZE", - "POSTAGGER", - "LEMMATIZER", - "SENTENCE_ACTS", - "DEPENDENCY_PARSER", - "NLU", - "SPLIT_PROPOSITION", - "COREFERENCE", - "SENTIMENT", - "ML_NER", - "EXTRACT_PATTERN" - ], - "source_pure": "Overall I am satisfied with my experience at Amazon, but two areas of major improvement needed. First is the product reviews and pricing. There are thousands of positive reviews for so many items, and it's clear that the reviews are bogus or not really associated with that product. There needs to be a way to only view products sold by Amazon directly, because many market sellers way overprice items that can be purchased cheaper elsewhere (like Walmart, Target, etc). The second issue is they make it too difficult to get help when there's an issue with an order.", - "projectId": "5fb39e7f739cc549f6890f9e", - "domain": null, - "type": null, - "sentences": [ - { - "source": "Overall I am satisfied with my experience at Amazon, but two areas of major improvement needed.", - "sentence_indexes": [ - 0, - 95 - ], - "source_pure": "Overall I am satisfied with my experience at Amazon, but two areas of major improvement needed.", - "detail": [ - { - "source": "overall", - "source_pure": "Overall", - "indexes": [ - 0, - 7 - ], - "tag": "RB", - "lemmatizer": { - "category": null - }, - "lemma": "overall", - "meaning": [], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 3, - "index": 0, - "coreference": [] - }, - { - "source": "i", - "source_pure": "I", - "indexes": [ - 8, - 9 - ], - "tag": "CLS", - "lemmatizer": { - "pronom": 1 - }, - "lemma": "it", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 1 - }, - "len": 1, - "dep": "nsubj:pass", - "ref": 3, - "index": 1, - "coreference": [ - 0 - ] - }, - { - "source": "am", - "source_pure": "am", - "indexes": [ - 10, - 12 - ], - "tag": "V", - "lemmatizer": [], - "lemma": "be", - "meaning": [ - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [], - "len": 1, - "verb_meaning": {}, - "dep": "aux:pass", - "ref": 3, - "index": 2, - "coreference": [] - }, - { - "source": "satisfied", - "source_pure": "satisfied", - "indexes": [ - 13, - 22 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "satisfied", - "meaning": [ - { - "sub": "Happiness", - "super": null, - "derivates": null, - "extra": null, - "intensity": 2, - "is_perso": false - } - ], - "value": null, - "len": 1, - "transform": {}, - "dep": "root", - "ref": -1, - "index": 3, - "coreference": [] - }, - { - "source": "with", - "source_pure": "with", - "indexes": [ - 23, - 27 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "WITH", - "next": "NULL", - "category": "Manner" - }, - { - "sens": "WITH", - "next": "NULL", - "category": "Means" - }, - { - "sens": "WITH", - "next": "NULL", - "category": "Addition" - } - ] - }, - "lemma": "with", - "meaning": [ - { - "sub": "Manner", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Means", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Addition", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 6, - "index": 4, - "coreference": [] - }, - { - "source": "my", - "source_pure": "my", - "indexes": [ - 28, - 30 - ], - "tag": "D", - "lemmatizer": { - "possessing": 1, - "mode": "possessive", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "its", - "meaning": [], - "value": null, - "len": 1, - "dep": "nmod:poss", - "ref": 6, - "index": 5, - "coreference": [ - 1, - 2 - ] - }, - { - "source": "experience", - "source_pure": "experience", - "indexes": [ - 31, - 41 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "experience", - "meaning": [ - { - "sub": "event", - "super": "abstract|entity", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obl", - "ref": 3, - "index": 6, - "coreference": [ - 2 - ] - }, - { - "source": "at", - "source_pure": "at", - "indexes": [ - 42, - 44 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "AT", - "next": "NULL", - "category": "Position" - }, - { - "sens": "AT", - "next": "NULL", - "category": "Theme" - }, - { - "sens": "AT", - "next": "NULL", - "category": "Temporal Localisation" - } - ] - }, - "lemma": "at", - "meaning": [ - { - "sub": "Position", - "super": "AT", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Theme", - "super": "AT", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Temporal Localisation", - "super": "AT", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 8, - "index": 7, - "coreference": [] - }, - { - "source": "Amazon", - "tag": "NP", - "source_pure": "Amazon", - "indexes": [ - 45, - 51 - ], - "lemmatizer": {}, - "lemma": "Amazon", - "meaning": [ - { - "sub": "ORGANIZATION", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nmod", - "ref": 6, - "index": 8, - "coreference": [ - 3 - ] - }, - { - "source": ",", - "source_pure": ",", - "indexes": [ - 51, - 52 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ",", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 12, - "index": 9, - "coreference": [] - }, - { - "source": "but", - "source_pure": "but", - "indexes": [ - 53, - 56 - ], - "tag": "CC", - "lemmatizer": {}, - "lemma": "but", - "meaning": [ - { - "sub": "<>", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "cc", - "ref": 12, - "index": 10, - "coreference": [] - }, - { - "source": "two", - "tag": "CD", - "source_pure": "two", - "indexes": [ - 57, - 60 - ], - "lemmatizer": { - "number": 2 - }, - "lemma": "two", - "meaning": [ - { - "sub": "number", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 2 - }, - "len": 1, - "dep": "nummod", - "ref": 12, - "index": 11, - "coreference": [] - }, - { - "source": "areas", - "source_pure": "areas", - "indexes": [ - 61, - 66 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "area", - "meaning": [ - { - "sub": "surface", - "super": "abstract|features|attribute|physical_attributes|dimension", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "activity_field", - "super": "abstract|entity|activities_(n)", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "conj", - "ref": 3, - "index": 12, - "coreference": [] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 67, - 69 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "RELATIVE_TO", - "next": "NULL", - "category": "Relation" - } - ] - }, - "lemma": "of", - "meaning": [ - { - "sub": "Relation", - "super": "RELATIVE_TO", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 15, - "index": 13, - "coreference": [] - }, - { - "source": "major", - "source_pure": "major", - "indexes": [ - 70, - 75 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "major", - "meaning": [ - { - "sub": "company", - "super": "concret|natural_thing|person|human_group", - "derivates": "N", - "extra": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "soldier", - "super": "concret|natural_thing|person|person_by_activity", - "derivates": "N", - "extra": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "transform": {}, - "dep": "amod", - "ref": 15, - "index": 14, - "coreference": [] - }, - { - "source": "improvement", - "source_pure": "improvement", - "indexes": [ - 76, - 87 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "improvement", - "meaning": [], - "value": null, - "len": 1, - "dep": "nmod", - "ref": 12, - "index": 15, - "coreference": [] - }, - { - "source": "needed", - "source_pure": "needed", - "indexes": [ - 88, - 94 - ], - "tag": "VP", - "lemmatizer": [ - { - "infinit": "need", - "gender": { - "female": false, - "plural": false - } - } - ], - "lemma": "need", - "meaning": [ - { - "sub": "need", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "need" - ], - "len": 1, - "verb_meaning": { - "need": [ - "root|act|being|be_related|need" - ] - }, - "dep": "conj", - "ref": 3, - "index": 16, - "coreference": [] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 94, - 95 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 3, - "index": 17, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 17 - } - ], - "ml_ner": [ - { - "type": "ORGANIZATION", - "source": "Amazon", - "value": null, - "index": 8 - } - ], - "ml_sentiment": { - "sentence": { - "value": 0.71 - }, - "subsentence": [ - 0.71 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "desire", - "value": 1 - }, - { - "type": "joy", - "value": 1 - }, - { - "type": "pride", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "desire", - "value": 1 - }, - { - "type": "joy", - "value": 1 - }, - { - "type": "pride", - "value": 1 - } - ] - ] - }, - "coreference": [ - 0, - 1, - 2, - 3 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 17, - "elements": [], - "sentence": "overall i am satisfied with my experience at Amazon , but two areas of major improvement needed .", - "values": { - "positive": 0.71, - "negative": 0, - "total": 0.71 - } - } - ], - "elements": [], - "values": { - "positive": 0.71, - "negative": 0, - "total": 0.71 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 1, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "desire": 1, - "pride": 1, - "admiration": 0, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "disappointment": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "realization": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 0, - "end_id": 17, - "sentence": "overall i am satisfied with my experience at Amazon , but two areas of major improvement needed ." - } - ], - "elements": [], - "values": { - "happiness": 0.46, - "sadness": 0, - "anger": 0, - "fear": 0, - "disgust": 0, - "surprise": 0 - } - }, - "sentence_type": "assert" - }, - { - "source": "First is the product reviews and pricing.", - "sentence_indexes": [ - 95, - 137 - ], - "source_pure": " First is the product reviews and pricing.", - "detail": [ - { - "source": "first", - "source_pure": "First", - "indexes": [ - 96, - 101 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "time and aspect" - ] - }, - "lemma": "first", - "meaning": [ - { - "sub": "time and aspect", - "super": null, - "extra": "time and aspect", - "intensity": 1, - "derivates": "N", - "is_perso": false - }, - { - "sub": "ordinal", - "super": "abstract|features|quantities|numerals", - "extra": "time and aspect", - "intensity": 1, - "derivates": "N", - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 1, - "index": 0, - "coreference": [] - }, - { - "source": "is", - "source_pure": "is", - "indexes": [ - 102, - 104 - ], - "tag": "V", - "lemmatizer": [], - "lemma": "be", - "meaning": [ - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [], - "len": 1, - "verb_meaning": {}, - "dep": "root", - "ref": -1, - "index": 1, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 105, - 108 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 4, - "index": 2, - "coreference": [ - 4 - ] - }, - { - "source": "product", - "source_pure": "product", - "indexes": [ - 109, - 116 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "product", - "meaning": [ - { - "sub": "result", - "super": "abstract|entity|indefinite_things|related_things|agents/results|results", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "compound", - "ref": 4, - "index": 3, - "coreference": [ - 4 - ] - }, - { - "source": "reviews", - "source_pure": "reviews", - "indexes": [ - 117, - 124 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "review", - "meaning": [ - { - "sub": "essay", - "super": "abstract|features|communication_elements|communication_contents", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obj", - "ref": 1, - "index": 4, - "coreference": [ - 4 - ] - }, - { - "source": "and", - "source_pure": "and", - "indexes": [ - 125, - 128 - ], - "tag": "CC", - "lemmatizer": {}, - "lemma": "and", - "meaning": [ - { - "sub": "&", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "cc", - "ref": 6, - "index": 5, - "coreference": [] - }, - { - "source": "pricing", - "source_pure": "pricing", - "indexes": [ - 129, - 136 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "pricing", - "meaning": [], - "value": null, - "len": 1, - "dep": "conj", - "ref": 4, - "index": 6, - "coreference": [] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 136, - 137 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 1, - "index": 7, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 7 - } - ], - "ml_ner": [], - "ml_sentiment": { - "sentence": { - "value": 0.01 - }, - "subsentence": [ - 0.01 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "neutral", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "neutral", - "value": 1 - } - ] - ] - }, - "coreference": [ - 4 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 7, - "elements": [], - "sentence": "first is the product reviews and pricing .", - "values": { - "positive": 0.01, - "negative": 0, - "total": 0.01 - } - } - ], - "elements": [], - "values": { - "positive": 0.01, - "negative": 0, - "total": 0.01 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "admiration": 0, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disappointment": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "pride": 0, - "realization": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 0, - "end_id": 7, - "sentence": "first is the product reviews and pricing ." - } - ], - "elements": [], - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "fear": 0, - "disgust": 0, - "surprise": 0 - } - }, - "sentence_type": "assert" - }, - { - "source": "There are thousands of positive reviews for so many items, and it 's clear that the reviews are bogus or not really associated with that product.", - "sentence_indexes": [ - 137, - 282 - ], - "source_pure": " There are thousands of positive reviews for so many items, and it's clear that the reviews are bogus or not really associated with that product.", - "detail": [ - { - "source": "there", - "source_pure": "There", - "indexes": [ - 138, - 143 - ], - "tag": "CLO", - "lemmatizer": { - "pronom": -1, - "designation": [] - }, - "lemma": "there", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": -1 - }, - "len": 1, - "dep": "expl", - "ref": 1, - "index": 0, - "coreference": [] - }, - { - "source": "are", - "source_pure": "are", - "indexes": [ - 144, - 147 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "indicative", - "temps": "present", - "pronom": 2 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "root", - "ref": -1, - "index": 1, - "coreference": [] - }, - { - "source": "thousands", - "source_pure": "thousands", - "indexes": [ - 148, - 157 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "thousand", - "meaning": [ - { - "sub": "cardinal", - "super": "abstract|features|quantities|numerals", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 1, - "index": 2, - "coreference": [] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 158, - 160 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "RELATIVE_TO", - "next": "NULL", - "category": "Relation" - } - ] - }, - "lemma": "of", - "meaning": [ - { - "sub": "Relation", - "super": "RELATIVE_TO", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 5, - "index": 3, - "coreference": [] - }, - { - "source": "positive", - "source_pure": "positive", - "indexes": [ - 161, - 169 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "positive", - "meaning": [], - "value": null, - "len": 1, - "transform": {}, - "dep": "amod", - "ref": 5, - "index": 4, - "coreference": [ - 5 - ] - }, - { - "source": "reviews", - "source_pure": "reviews", - "indexes": [ - 170, - 177 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "review", - "meaning": [ - { - "sub": "essay", - "super": "abstract|features|communication_elements|communication_contents", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nmod", - "ref": 2, - "index": 5, - "coreference": [ - 5 - ] - }, - { - "source": "for", - "source_pure": "for", - "indexes": [ - 178, - 181 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "FOR", - "next": "NULL", - "category": "Duration" - }, - { - "sens": "FOR", - "next": "NULL", - "category": "Means" - }, - { - "sens": "FOR", - "next": "NULL", - "category": "Intention" - } - ] - }, - "lemma": "for", - "meaning": [ - { - "sub": "Duration", - "super": "FOR", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Means", - "super": "FOR", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Intention", - "super": "FOR", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 9, - "index": 6, - "coreference": [] - }, - { - "source": "so", - "source_pure": "so", - "indexes": [ - 182, - 184 - ], - "tag": "RB", - "lemmatizer": { - "category": null - }, - "lemma": "so", - "meaning": [], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 8, - "index": 7, - "coreference": [] - }, - { - "source": "many", - "source_pure": "many", - "indexes": [ - 185, - 189 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "many", - "meaning": [], - "value": null, - "len": 1, - "transform": {}, - "dep": "amod", - "ref": 9, - "index": 8, - "coreference": [] - }, - { - "source": "items", - "source_pure": "items", - "indexes": [ - 190, - 195 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "item", - "meaning": [], - "value": null, - "len": 1, - "dep": "nmod", - "ref": 5, - "index": 9, - "coreference": [] - }, - { - "source": ",", - "source_pure": ",", - "indexes": [ - 195, - 196 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ",", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 13, - "index": 10, - "coreference": [] - }, - { - "source": "and", - "source_pure": "and", - "indexes": [ - 197, - 200 - ], - "tag": "CC", - "lemmatizer": {}, - "lemma": "and", - "meaning": [ - { - "sub": "&", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "cc", - "ref": 13, - "index": 11, - "coreference": [] - }, - { - "source": "it", - "source_pure": "it", - "indexes": [ - 201, - 203 - ], - "tag": "CLO", - "lemmatizer": { - "pronom": -1, - "designation": [] - }, - "lemma": "it", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": -1 - }, - "len": 1, - "dep": "expl", - "ref": 13, - "index": 12, - "coreference": [] - }, - { - "source": "is", - "source_pure": "'s", - "indexes": [ - 203, - 205 - ], - "tag": "V", - "lemmatizer": [], - "lemma": "be", - "meaning": [ - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [], - "len": 1, - "verb_meaning": {}, - "dep": "conj", - "ref": 1, - "index": 13, - "coreference": [] - }, - { - "source": "clear", - "source_pure": "clear", - "indexes": [ - 206, - 211 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "clear", - "meaning": [ - { - "sub": "Trait", - "super": null, - "derivates": null, - "extra": null, - "intensity": 0, - "is_perso": false - } - ], - "value": null, - "len": 1, - "transform": {}, - "dep": "xcomp", - "ref": 13, - "index": 14, - "coreference": [] - }, - { - "source": "that", - "source_pure": "that", - "indexes": [ - 212, - 216 - ], - "tag": "C", - "lemmatizer": {}, - "lemma": "that", - "meaning": [], - "value": null, - "len": 1, - "dep": "mark", - "ref": 18, - "index": 15, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 217, - 220 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 17, - "index": 16, - "coreference": [ - 6 - ] - }, - { - "source": "reviews", - "source_pure": "reviews", - "indexes": [ - 221, - 228 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "review", - "meaning": [ - { - "sub": "essay", - "super": "abstract|features|communication_elements|communication_contents", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 18, - "index": 17, - "coreference": [ - 6 - ] - }, - { - "source": "are", - "source_pure": "are", - "indexes": [ - 229, - 232 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "indicative", - "temps": "present", - "pronom": 2 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "ccomp", - "ref": 14, - "index": 18, - "coreference": [] - }, - { - "source": "bogus", - "source_pure": "bogus", - "indexes": [ - 233, - 238 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "bogus", - "meaning": [], - "value": null, - "len": 1, - "transform": {}, - "dep": "xcomp", - "ref": 18, - "index": 19, - "coreference": [] - }, - { - "source": "or", - "source_pure": "or", - "indexes": [ - 239, - 241 - ], - "tag": "CC", - "lemmatizer": {}, - "lemma": "or", - "meaning": [], - "value": null, - "len": 1, - "dep": "cc", - "ref": 23, - "index": 20, - "coreference": [] - }, - { - "source": "not", - "source_pure": "not", - "indexes": [ - 242, - 245 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "negation" - ] - }, - "lemma": "not", - "meaning": [ - { - "sub": "negation", - "super": null, - "extra": null, - "intensity": -1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 23, - "index": 21, - "coreference": [] - }, - { - "source": "really", - "source_pure": "really", - "indexes": [ - 246, - 252 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "manner" - ] - }, - "lemma": "real", - "meaning": [ - { - "sub": "manner", - "super": null, - "extra": null, - "intensity": 1.8, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 23, - "index": 22, - "coreference": [] - }, - { - "source": "associated", - "source_pure": "associated", - "indexes": [ - 253, - 263 - ], - "tag": "VP", - "lemmatizer": [ - { - "infinit": "associat", - "gender": { - "female": false, - "plural": false - } - } - ], - "lemma": "associat", - "meaning": [ - { - "sub": "concern", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "associat" - ], - "len": 1, - "verb_meaning": { - "associat": [] - }, - "dep": "conj", - "ref": 19, - "index": 23, - "coreference": [] - }, - { - "source": "with", - "source_pure": "with", - "indexes": [ - 264, - 268 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "WITH", - "next": "NULL", - "category": "Manner" - }, - { - "sens": "WITH", - "next": "NULL", - "category": "Means" - }, - { - "sens": "WITH", - "next": "NULL", - "category": "Addition" - } - ] - }, - "lemma": "with", - "meaning": [ - { - "sub": "Manner", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Means", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Addition", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 26, - "index": 24, - "coreference": [] - }, - { - "source": "that", - "source_pure": "that", - "indexes": [ - 269, - 273 - ], - "tag": "PD", - "lemmatizer": { - "possessing": -1, - "mode": "demonstrative", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "this", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 26, - "index": 25, - "coreference": [ - 7 - ] - }, - { - "source": "product", - "source_pure": "product", - "indexes": [ - 274, - 281 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "product", - "meaning": [ - { - "sub": "result", - "super": "abstract|entity|indefinite_things|related_things|agents/results|results", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obl", - "ref": 23, - "index": 26, - "coreference": [ - 7 - ] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 281, - 282 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 1, - "index": 27, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 14 - }, - { - "start_id": 15, - "end_id": 27 - } - ], - "ml_ner": [], - "ml_sentiment": { - "sentence": { - "value": -0.74 - }, - "subsentence": [ - 0.38, - -0.51 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "disappointment", - "value": 1 - }, - { - "type": "disapproval", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "admiration", - "value": 1 - }, - { - "type": "approval", - "value": 1 - } - ], - [ - { - "type": "disapproval", - "value": 1 - } - ] - ] - }, - "coreference": [ - 5, - 6, - 7 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 14, - "elements": [], - "sentence": "there are thousands of positive reviews for so many items , and it is clear", - "values": { - "positive": 0.38, - "negative": 0, - "total": 0.38 - } - }, - { - "start_id": 15, - "end_id": 27, - "elements": [], - "sentence": "that the reviews are bogus or not really associated with that product .", - "values": { - "positive": 0, - "negative": -0.51, - "total": -0.51 - } - } - ], - "elements": [], - "values": { - "positive": 0.23, - "negative": -0.29, - "total": -0.06 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "admiration": 1, - "approval": 1, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disappointment": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "pride": 0, - "realization": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 0, - "end_id": 14, - "sentence": "there are thousands of positive reviews for so many items , and it is clear" - }, - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "disapproval": 1, - "admiration": 0, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disappointment": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "pride": 0, - "realization": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 15, - "end_id": 27, - "sentence": "that the reviews are bogus or not really associated with that product ." - } - ], - "elements": [], - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "fear": 0, - "disgust": 0, - "surprise": 0 - } - }, - "sentence_type": "assert" - }, - { - "source": "There needs to be a way to only view products sold by Amazon directly, because many market sellers way overprice items that can be purchased cheaper elsewhere (like Walmart, Target, etc).", - "sentence_indexes": [ - 282, - 470 - ], - "source_pure": " There needs to be a way to only view products sold by Amazon directly, because many market sellers way overprice items that can be purchased cheaper elsewhere (like Walmart, Target, etc).", - "detail": [ - { - "source": "there", - "source_pure": "There", - "indexes": [ - 283, - 288 - ], - "tag": "CLO", - "lemmatizer": { - "pronom": -1, - "designation": [] - }, - "lemma": "there", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": -1 - }, - "len": 1, - "dep": "expl", - "ref": 1, - "index": 0, - "coreference": [] - }, - { - "source": "needs", - "source_pure": "needs", - "indexes": [ - 289, - 294 - ], - "tag": "V", - "lemmatizer": [], - "lemma": "need", - "meaning": [ - { - "sub": "need", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [], - "len": 1, - "verb_meaning": {}, - "dep": "root", - "ref": -1, - "index": 1, - "coreference": [] - }, - { - "source": "to", - "source_pure": "to", - "indexes": [ - 295, - 297 - ], - "tag": "SYM", - "lemmatizer": {}, - "lemma": "to", - "meaning": [], - "value": null, - "len": 1, - "dep": "mark", - "ref": 3, - "index": 2, - "coreference": [] - }, - { - "source": "be", - "source_pure": "be", - "indexes": [ - 298, - 300 - ], - "tag": "VINF", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "imperative", - "temps": "present", - "pronom": 5 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 1 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 4 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 4 - }, - { - "mode": "infinitive", - "temps": "infinitive", - "pronom": -1 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 6 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 3 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 2 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 2 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 5 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "xcomp", - "ref": 1, - "index": 3, - "coreference": [] - }, - { - "source": "a", - "source_pure": "a", - "indexes": [ - 301, - 302 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 5, - "index": 4, - "coreference": [ - 8 - ] - }, - { - "source": "way", - "source_pure": "way", - "indexes": [ - 303, - 306 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "way", - "meaning": [ - { - "sub": "path_(fig)", - "super": "abstract|entity|indefinite_things|related_things|things_done", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "road", - "super": "concret|fabricated_thing|object|created_location|territory", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "way", - "super": "abstract|entity|space|space_between_things", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "manner_(n)", - "super": "abstract|features", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obj", - "ref": 1, - "index": 5, - "coreference": [ - 8 - ] - }, - { - "source": "to", - "source_pure": "to", - "indexes": [ - 307, - 309 - ], - "tag": "SYM", - "lemmatizer": {}, - "lemma": "to", - "meaning": [], - "value": null, - "len": 1, - "dep": "mark", - "ref": 8, - "index": 6, - "coreference": [] - }, - { - "source": "only", - "source_pure": "only", - "indexes": [ - 310, - 314 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "manner" - ] - }, - "lemma": "on", - "meaning": [ - { - "sub": "manner", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 8, - "index": 7, - "coreference": [] - }, - { - "source": "view", - "source_pure": "view", - "indexes": [ - 315, - 319 - ], - "tag": "VINF", - "lemmatizer": [ - { - "infinit": "view", - "conjugate": [ - { - "mode": "infinitive", - "temps": "infinitive", - "pronom": -1 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 2 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 4 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 5 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 6 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 2 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 3 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 4 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 5 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 6 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 1 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 2 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 3 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 4 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 5 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 6 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 2 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 4 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 5 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 1 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 2 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 3 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 4 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 5 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 6 - } - ] - } - ], - "lemma": "view", - "meaning": [ - { - "sub": "see", - "super": "root|interact|communicating|receive", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "view" - ], - "len": 1, - "verb_meaning": { - "view": [] - }, - "dep": "acl", - "ref": 5, - "index": 8, - "coreference": [] - }, - { - "source": "products", - "source_pure": "products", - "indexes": [ - 320, - 328 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "product", - "meaning": [ - { - "sub": "result", - "super": "abstract|entity|indefinite_things|related_things|agents/results|results", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obj", - "ref": 8, - "index": 9, - "coreference": [] - }, - { - "source": "sold", - "source_pure": "sold", - "indexes": [ - 329, - 333 - ], - "tag": "VP", - "lemmatizer": [ - { - "infinit": "sell", - "gender": { - "female": false, - "plural": false - } - } - ], - "lemma": "sell", - "meaning": [ - { - "sub": "sell_(sthg)", - "super": "root|interact|make_possess|money", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "sell" - ], - "len": 1, - "verb_meaning": { - "sell": [ - "root|interact|make_possess|money|sell_(sthg)" - ] - }, - "dep": "acl", - "ref": 9, - "index": 10, - "coreference": [] - }, - { - "source": "by", - "source_pure": "by", - "indexes": [ - 334, - 336 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "WITH", - "next": "NULL", - "category": "Relation" - }, - { - "sens": "HOW", - "next": "NULL", - "category": "Manner" - }, - { - "sens": "VIA", - "next": "NULL", - "category": "Passage" - }, - { - "sens": "BY", - "next": "NULL", - "category": "Passive" - }, - { - "sens": "NEXT", - "next": "NULL", - "category": "Spatial Approximation" - } - ] - }, - "lemma": "by", - "meaning": [ - { - "sub": "Relation", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Manner", - "super": "HOW", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Passage", - "super": "VIA", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Passive", - "super": "BY", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Spatial Approximation", - "super": "NEXT", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 12, - "index": 11, - "coreference": [] - }, - { - "source": "Amazon", - "tag": "NP", - "source_pure": "Amazon", - "indexes": [ - 337, - 343 - ], - "lemmatizer": {}, - "lemma": "Amazon", - "meaning": [ - { - "sub": "ORGANIZATION", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obl", - "ref": 10, - "index": 12, - "coreference": [ - 9 - ] - }, - { - "source": "directly", - "source_pure": "directly", - "indexes": [ - 344, - 352 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "manner" - ] - }, - "lemma": "direct", - "meaning": [ - { - "sub": "manner", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 10, - "index": 13, - "coreference": [] - }, - { - "source": ",", - "source_pure": ",", - "indexes": [ - 352, - 353 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ",", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 19, - "index": 14, - "coreference": [] - }, - { - "source": "because", - "source_pure": "because", - "indexes": [ - 354, - 361 - ], - "tag": "C", - "lemmatizer": {}, - "lemma": "because", - "meaning": [ - { - "sub": "Cause", - "super": "BECAUSE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Cause", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "mark", - "ref": 20, - "index": 15, - "coreference": [] - }, - { - "source": "many", - "source_pure": "many", - "indexes": [ - 362, - 366 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "many", - "meaning": [], - "value": null, - "len": 1, - "transform": {}, - "dep": "amod", - "ref": 18, - "index": 16, - "coreference": [ - 10 - ] - }, - { - "source": "market", - "source_pure": "market", - "indexes": [ - 367, - 373 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "market", - "meaning": [ - { - "sub": "market", - "super": "abstract|entity|activities_(n)|activity_field|economic_sector", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "fair", - "super": "abstract|entity|event", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "shop", - "super": "concret|fabricated_thing|object|created_location|building", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "compound", - "ref": 18, - "index": 17, - "coreference": [ - 10 - ] - }, - { - "source": "sellers", - "source_pure": "sellers", - "indexes": [ - 374, - 381 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "seller", - "meaning": [], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 19, - "index": 18, - "coreference": [ - 10 - ] - }, - { - "source": "way", - "source_pure": "way", - "indexes": [ - 382, - 385 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "way", - "meaning": [ - { - "sub": "path_(fig)", - "super": "abstract|entity|indefinite_things|related_things|things_done", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "road", - "super": "concret|fabricated_thing|object|created_location|territory", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "way", - "super": "abstract|entity|space|space_between_things", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "manner_(n)", - "super": "abstract|features", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advcl", - "ref": 1, - "index": 19, - "coreference": [] - }, - { - "source": "overprice", - "source_pure": "overprice", - "indexes": [ - 386, - 395 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "overprice", - "conjugate": [ - { - "mode": "imperative", - "temps": "present", - "pronom": 2 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 4 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 5 - } - ] - } - ], - "lemma": "overprice", - "meaning": [ - { - "sub": "overcome_(sthg)", - "super": "root|interact|interactions|positive", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "overprice" - ], - "len": 1, - "verb_meaning": { - "overprice": [] - }, - "dep": "advcl", - "ref": 1, - "index": 20, - "coreference": [] - }, - { - "source": "items", - "source_pure": "items", - "indexes": [ - 396, - 401 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "item", - "meaning": [], - "value": null, - "len": 1, - "dep": "obj", - "ref": 20, - "index": 21, - "coreference": [] - }, - { - "source": "that", - "source_pure": "that", - "indexes": [ - 402, - 406 - ], - "tag": "PROREL", - "lemmatizer": {}, - "lemma": "that", - "meaning": [], - "value": null, - "len": 1, - "dep": "nsubj:pass", - "ref": 25, - "index": 22, - "coreference": [ - 11 - ] - }, - { - "source": "can", - "source_pure": "can", - "indexes": [ - 407, - 410 - ], - "tag": "V", - "lemmatizer": [], - "lemma": "can", - "meaning": [ - { - "sub": "be_able", - "super": "root|act|modals", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_authorized", - "super": "root|act|modals", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [], - "len": 1, - "verb_meaning": {}, - "dep": "aux", - "ref": 25, - "index": 23, - "coreference": [] - }, - { - "source": "be", - "source_pure": "be", - "indexes": [ - 411, - 413 - ], - "tag": "VINF", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "imperative", - "temps": "present", - "pronom": 5 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 1 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 4 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 4 - }, - { - "mode": "infinitive", - "temps": "infinitive", - "pronom": -1 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 6 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 3 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 2 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 2 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 5 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "aux:pass", - "ref": 25, - "index": 24, - "coreference": [] - }, - { - "source": "purchased", - "source_pure": "purchased", - "indexes": [ - 414, - 423 - ], - "tag": "VP", - "lemmatizer": [ - { - "infinit": "purchas", - "gender": { - "female": false, - "plural": false - } - } - ], - "lemma": "purchas", - "meaning": [ - { - "sub": "fill_(sthg)", - "super": "root|interact|make_change|content", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "purchas" - ], - "len": 1, - "verb_meaning": { - "purchas": [] - }, - "dep": "acl:relcl", - "ref": 21, - "index": 25, - "coreference": [] - }, - { - "source": "cheaper", - "source_pure": "cheaper", - "indexes": [ - 424, - 431 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "cheaper", - "meaning": [], - "value": null, - "len": 1, - "transform": {}, - "dep": "xcomp", - "ref": 25, - "index": 26, - "coreference": [] - }, - { - "source": "elsewhere", - "source_pure": "elsewhere", - "indexes": [ - 432, - 441 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "location" - ] - }, - "lemma": "elsewhere", - "meaning": [ - { - "sub": "location", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 25, - "index": 27, - "coreference": [] - }, - { - "source": "(", - "source_pure": "(", - "indexes": [ - 442, - 443 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": "(", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 30, - "index": 28, - "coreference": [] - }, - { - "source": "like", - "source_pure": "like", - "indexes": [ - 443, - 447 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "ALIKE", - "next": "NULL", - "category": "Imitation" - } - ] - }, - "lemma": "like", - "meaning": [ - { - "sub": "Imitation", - "super": "ALIKE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 30, - "index": 29, - "coreference": [] - }, - { - "source": "Walmart", - "tag": "NP", - "source_pure": "Walmart", - "indexes": [ - 448, - 455 - ], - "lemmatizer": {}, - "lemma": "Walmart", - "meaning": [ - { - "sub": "ORGANIZATION", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nmod", - "ref": 21, - "index": 30, - "coreference": [ - 12 - ] - }, - { - "source": ",", - "source_pure": ",", - "indexes": [ - 455, - 456 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ",", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 32, - "index": 31, - "coreference": [] - }, - { - "source": "Target", - "tag": "NP", - "source_pure": "Target", - "indexes": [ - 457, - 463 - ], - "lemmatizer": {}, - "lemma": "Target", - "meaning": [ - { - "sub": "ORGANIZATION", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "conj", - "ref": 30, - "index": 32, - "coreference": [ - 13 - ] - }, - { - "source": ",", - "source_pure": ",", - "indexes": [ - 463, - 464 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ",", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 34, - "index": 33, - "coreference": [] - }, - { - "source": "etc", - "tag": "NP", - "source_pure": "etc", - "indexes": [ - 465, - 468 - ], - "lemmatizer": {}, - "lemma": "etc", - "meaning": [], - "value": null, - "len": 1, - "dep": "conj", - "ref": 30, - "index": 34, - "coreference": [] - }, - { - "source": ")", - "source_pure": ")", - "indexes": [ - 468, - 469 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ")", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 30, - "index": 35, - "coreference": [] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 469, - 470 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 1, - "index": 36, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 36 - } - ], - "ml_ner": [ - { - "type": "ORGANIZATION", - "source": "Amazon", - "value": null, - "index": 12 - }, - { - "type": "ORGANIZATION", - "source": "Walmart", - "value": null, - "index": 30 - }, - { - "type": "ORGANIZATION", - "source": "Target", - "value": null, - "index": 32 - } - ], - "ml_sentiment": { - "sentence": { - "value": -0.23 - }, - "subsentence": [ - -0.23 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "neutral", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "neutral", - "value": 1 - } - ] - ] - }, - "coreference": [ - 8, - 9, - 10, - 11, - 12, - 13 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 36, - "elements": [], - "sentence": "there needs to be a way to only view products sold by Amazon directly , because many market sellers way overprice items that can be purchased cheaper elsewhere ( like Walmart , Target , etc ) .", - "values": { - "positive": 0, - "negative": -0.23, - "total": -0.23 - } - } - ], - "elements": [], - "values": { - "positive": 0, - "negative": -0.23, - "total": -0.23 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "admiration": 0, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disappointment": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "pride": 0, - "realization": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 0, - "end_id": 36, - "sentence": "there needs to be a way to only view products sold by Amazon directly , because many market sellers way overprice items that can be purchased cheaper elsewhere ( like Walmart , Target , etc ) ." - } - ], - "elements": [], - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "fear": 0, - "disgust": 0, - "surprise": 0 - } - }, - "sentence_type": "assert" - }, - { - "source": "The second issue is they make it too difficult to get help when there 's an issue with an order.", - "sentence_indexes": [ - 470, - 566 - ], - "source_pure": " The second issue is they make it too difficult to get help when there's an issue with an order.", - "detail": [ - { - "source": "the", - "source_pure": "The", - "indexes": [ - 471, - 474 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 2, - "index": 0, - "coreference": [ - 14 - ] - }, - { - "source": "second", - "source_pure": "second", - "indexes": [ - 475, - 481 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "second", - "meaning": [ - { - "sub": "unit_of_time", - "super": "abstract|features|quantities|units", - "derivates": "N", - "extra": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "unit_of_measure", - "super": "abstract|features|quantities|units", - "derivates": "N", - "extra": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "ordinal", - "super": "abstract|features|quantities|numerals", - "derivates": "N", - "extra": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "short_period", - "super": "abstract|entity|time/period|periods|short/long_periods", - "derivates": "N", - "extra": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "transform": {}, - "dep": "amod", - "ref": 2, - "index": 1, - "coreference": [ - 14 - ] - }, - { - "source": "issue", - "source_pure": "issue", - "indexes": [ - 482, - 487 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "issue", - "meaning": [ - { - "sub": "issue", - "super": "abstract|entity|indefinite_things|related_things|agents/results|agents|issues/solutions", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "theme", - "super": "abstract|features|attribute", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 3, - "index": 2, - "coreference": [ - 14 - ] - }, - { - "source": "is", - "source_pure": "is", - "indexes": [ - 488, - 490 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "indicative", - "temps": "present", - "pronom": 3 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "root", - "ref": -1, - "index": 3, - "coreference": [] - }, - { - "source": "they", - "source_pure": "they", - "indexes": [ - 491, - 495 - ], - "tag": "CLS", - "lemmatizer": { - "pronom": 6 - }, - "lemma": "it", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 6 - }, - "len": 1, - "dep": "nsubj", - "ref": 5, - "index": 4, - "coreference": [] - }, - { - "source": "make", - "source_pure": "make", - "indexes": [ - 496, - 500 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "make", - "conjugate": [ - { - "mode": "indicative", - "temps": "future", - "pronom": 6 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 6 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 6 - } - ] - } - ], - "lemma": "make", - "meaning": [ - { - "sub": "make_(sthg)_be", - "super": "root|interact|make_be", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "make_do", - "super": "root|interact|do_on/with|make_do", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "do_(sthg)", - "super": "root|act|doing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "create", - "super": "root|interact|make_exist", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "obtain_(sthg)", - "super": "root|act|possessing|have", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "arrive", - "super": "root|act|moving|place|to/from", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "constrain", - "super": "root|interact|interpersonal|treatment|bad", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "cover_(sthg)", - "super": "root|interact|make_change|covering", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "make" - ], - "len": 1, - "verb_meaning": { - "make": [ - "root|act|moving|place|to/from|arrive", - "root|interact|do_on/with|attempt|make_success_of", - "root|act|possessing|have|obtain_(sthg)", - "root|interact|make_be|make_(sthg)_be", - "root|act|doing|do_(sthg)", - "root|interact|do_on/with|make_do|make_do", - "root|interact|make_exist|create", - "root|interact|interpersonal|treatment|bad|constrain", - "root|interact|make_change|covering|cover_(sthg)" - ] - }, - "dep": "ccomp", - "ref": 3, - "index": 5, - "coreference": [] - }, - { - "source": "it", - "source_pure": "it", - "indexes": [ - 501, - 503 - ], - "tag": "CLO", - "lemmatizer": { - "pronom": 3, - "designation": [] - }, - "lemma": "it", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 3 - }, - "len": 1, - "dep": "obj", - "ref": 5, - "index": 6, - "coreference": [] - }, - { - "source": "too", - "source_pure": "too", - "indexes": [ - 504, - 507 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "manner" - ] - }, - "lemma": "too", - "meaning": [ - { - "sub": "manner", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 8, - "index": 7, - "coreference": [] - }, - { - "source": "difficult", - "source_pure": "difficult", - "indexes": [ - 508, - 517 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "difficult", - "meaning": [ - { - "sub": "Difficulty", - "super": null, - "derivates": null, - "extra": null, - "intensity": -5, - "is_perso": false - } - ], - "value": null, - "len": 1, - "transform": {}, - "dep": "xcomp", - "ref": 5, - "index": 8, - "coreference": [] - }, - { - "source": "to", - "source_pure": "to", - "indexes": [ - 518, - 520 - ], - "tag": "SYM", - "lemmatizer": {}, - "lemma": "to", - "meaning": [], - "value": null, - "len": 1, - "dep": "mark", - "ref": 10, - "index": 9, - "coreference": [] - }, - { - "source": "get", - "source_pure": "get", - "indexes": [ - 521, - 524 - ], - "tag": "VINF", - "lemmatizer": [ - { - "infinit": "get", - "conjugate": [ - { - "mode": "indicative", - "temps": "present", - "pronom": 6 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 1 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 4 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 5 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 2 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 2 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 2 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 5 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 5 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 3 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 5 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 6 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 2 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 4 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 1 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 4 - }, - { - "mode": "infinitive", - "temps": "infinitive", - "pronom": -1 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "present", - "pronom": 4 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 5 - }, - { - "mode": "subjonctive", - "temps": "present", - "pronom": 2 - }, - { - "mode": "imperative", - "temps": "present", - "pronom": 4 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 3 - }, - { - "mode": "indicative", - "temps": "future", - "pronom": 6 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 6 - }, - { - "mode": "conditional", - "temps": "present", - "pronom": 3 - } - ] - } - ], - "lemma": "get", - "meaning": [ - { - "sub": "obtain_(sthg)", - "super": "root|act|possessing|have", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "find", - "super": "root|interact|interactions|neutral", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "make_do", - "super": "root|interact|do_on/with|make_do", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "arrive", - "super": "root|act|moving|place|to/from", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "understand", - "super": "root|act|thinking|brainwork", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "become", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "begin_(sthg)", - "super": "root|interact|make_exist|progression", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "contact", - "super": "root|interact|communicating", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "leave", - "super": "root|act|moving|place|to/from", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "irritate_(sbody)", - "super": "root|interact|make_feel|bad", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "prepare", - "super": "root|interact|do_on/with|managing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "endure_(sthg)", - "super": "root|interact|interactions|negative", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "take", - "super": "root|interact|do_on/with|handling", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "bring_(sthg)", - "super": "root|interact|make_move|place", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "get" - ], - "len": 1, - "verb_meaning": { - "get": [ - "root|act|thinking|brainwork|understand", - "root|act|being|identification/qualification|become", - "root|act|moving|place|to/from|arrive", - "root|act|possessing|have|obtain_(sthg)", - "root|interact|interactions|negative|endure_(sthg)", - "root|interact|do_on/with|make_do|make_do", - "root|interact|communicating|contact", - "root|interact|do_on/with|handling|take", - "root|interact|do_on/with|managing|prepare", - "root|act|moving|place|to/from|leave", - "root|interact|make_move|place|bring_(sthg)", - "root|interact|make_feel|bad|irritate_(sbody)", - "root|interact|make_exist|progression|begin_(sthg)", - "root|act|being|be_related|be_in_(situation)", - "root|interact|interactions|neutral|find" - ] - }, - "dep": "acl", - "ref": 8, - "index": 10, - "coreference": [] - }, - { - "source": "help", - "source_pure": "help", - "indexes": [ - 525, - 529 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "help", - "meaning": [ - { - "sub": "help", - "super": "abstract|entity|indefinite_things|related_things|agents/results|agents", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obj", - "ref": 10, - "index": 11, - "coreference": [] - }, - { - "source": "when", - "source_pure": "when", - "indexes": [ - 530, - 534 - ], - "tag": "RB_WH", - "lemmatizer": {}, - "lemma": "when", - "meaning": [], - "value": null, - "len": 1, - "dep": "mark", - "ref": 14, - "index": 12, - "coreference": [] - }, - { - "source": "there", - "source_pure": "there", - "indexes": [ - 535, - 540 - ], - "tag": "CLO", - "lemmatizer": { - "pronom": -1, - "designation": [] - }, - "lemma": "there", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": -1 - }, - "len": 1, - "dep": "expl", - "ref": 14, - "index": 13, - "coreference": [ - 15 - ] - }, - { - "source": "is", - "source_pure": "'s", - "indexes": [ - 540, - 542 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "indicative", - "temps": "present", - "pronom": 3 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "advcl", - "ref": 10, - "index": 14, - "coreference": [] - }, - { - "source": "an", - "source_pure": "an", - "indexes": [ - 543, - 545 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 16, - "index": 15, - "coreference": [ - 16 - ] - }, - { - "source": "issue", - "source_pure": "issue", - "indexes": [ - 546, - 551 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "issue", - "meaning": [ - { - "sub": "issue", - "super": "abstract|entity|indefinite_things|related_things|agents/results|agents|issues/solutions", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "theme", - "super": "abstract|features|attribute", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 14, - "index": 16, - "coreference": [ - 16 - ] - }, - { - "source": "with", - "source_pure": "with", - "indexes": [ - 552, - 556 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "WITH", - "next": "NULL", - "category": "Manner" - }, - { - "sens": "WITH", - "next": "NULL", - "category": "Means" - }, - { - "sens": "WITH", - "next": "NULL", - "category": "Addition" - } - ] - }, - "lemma": "with", - "meaning": [ - { - "sub": "Manner", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Means", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Addition", - "super": "WITH", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 19, - "index": 17, - "coreference": [] - }, - { - "source": "an", - "source_pure": "an", - "indexes": [ - 557, - 559 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 19, - "index": 18, - "coreference": [ - 17 - ] - }, - { - "source": "order", - "source_pure": "order", - "indexes": [ - 560, - 565 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "order", - "meaning": [ - { - "sub": "injunction", - "super": "abstract|features|communication_elements|communication_contents", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "taxonomic_kind", - "super": "abstract|features|attribute|kinds", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "structure", - "super": "abstract|features|manner_(n)", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "purchase", - "super": "abstract|entity|indefinite_things|related_things|possessed_things", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "social_system", - "super": "abstract|entity|system", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "tidiness_(n)", - "super": "abstract|features|state|tidiness/untidiness", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "professional_group", - "super": "concret|natural_thing|person|human_group", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "other_rank", - "super": "abstract|features|attribute|ranks", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "other_kind", - "super": "abstract|features|attribute|kinds", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nmod", - "ref": 16, - "index": 19, - "coreference": [ - 17 - ] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 565, - 566 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 3, - "index": 20, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 20 - } - ], - "ml_ner": [], - "ml_sentiment": { - "sentence": { - "value": -0.61 - }, - "subsentence": [ - -0.61 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "disappointment", - "value": 1 - }, - { - "type": "optimism", - "value": 1 - }, - { - "type": "surprise", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "disappointment", - "value": 1 - }, - { - "type": "optimism", - "value": 1 - }, - { - "type": "surprise", - "value": 1 - } - ] - ] - }, - "coreference": [ - 14, - 15, - 16, - 17 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 20, - "elements": [ - { - "target": null, - "subject": null, - "value": 0, - "source": { - "index": 10, - "lemma": "get", - "source": "get" - } - } - ], - "sentence": "the second issue is they make it too difficult to get help when there is an issue with an order .", - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - } - ], - "elements": [ - { - "target": null, - "subject": null, - "value": 0, - "source": { - "index": 10, - "lemma": "get", - "source": "get" - } - } - ], - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0.27, - "disgust": 0, - "fear": 0, - "surprise": 1, - "disappointment": 1, - "optimism": 1, - "admiration": 0, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "pride": 0, - "realization": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [ - { - "target": null, - "source": { - "index": 10, - "lemma": "get", - "source": "get" - }, - "subject": null, - "type": "surprise", - "value": 0.46 - }, - { - "target": null, - "source": { - "index": 10, - "lemma": "get", - "source": "get" - }, - "subject": null, - "type": "anger", - "value": 0.46 - } - ], - "start_id": 0, - "end_id": 20, - "sentence": "the second issue is they make it too difficult to get help when there is an issue with an order ." - } - ], - "elements": [ - { - "target": null, - "source": { - "index": 10, - "lemma": "get", - "source": "get" - }, - "subject": null, - "type": "surprise", - "value": 0.46 - }, - { - "target": null, - "source": { - "index": 10, - "lemma": "get", - "source": "get" - }, - "subject": null, - "type": "anger", - "value": 0.46 - } - ], - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0.17, - "fear": 0, - "disgust": 0, - "surprise": 0.46 - } - }, - "sentence_type": "assert" - } - ], - "emoticon": { - "happy": 0, - "very_happy": 0, - "laugh": 0, - "sad": 0, - "very_sad": 0, - "lol": 0, - "cry": 0, - "horror": 0, - "surprise": 0, - "kiss": 0, - "wink": 0, - "playful": 0, - "hesitant": 0, - "indecision": 0, - "embarrassed": 0, - "muted": 0, - "angel": 0, - "devil": 0, - "love": 0, - "notlove": 0 - }, - "emoticon_data": [], - "coreference": { - "spans": [ - { - "sentence_index": 0, - "token_indexes": [ - 1 - ], - "cluster_index": 0 - }, - { - "sentence_index": 0, - "token_indexes": [ - 5 - ], - "cluster_index": 0 - }, - { - "sentence_index": 0, - "token_indexes": [ - 5, - 6 - ], - "cluster_index": 3 - }, - { - "sentence_index": 0, - "token_indexes": [ - 8 - ], - "cluster_index": 2 - }, - { - "sentence_index": 1, - "token_indexes": [ - 2, - 3, - 4 - ], - "cluster_index": 1 - }, - { - "sentence_index": 2, - "token_indexes": [ - 4, - 5 - ], - "cluster_index": 1 - }, - { - "sentence_index": 2, - "token_indexes": [ - 16, - 17 - ], - "cluster_index": 1 - }, - { - "sentence_index": 2, - "token_indexes": [ - 25, - 26 - ], - "cluster_index": 1 - }, - { - "sentence_index": 3, - "token_indexes": [ - 4, - 5 - ], - "cluster_index": 4 - }, - { - "sentence_index": 3, - "token_indexes": [ - 12 - ], - "cluster_index": 2 - }, - { - "sentence_index": 3, - "token_indexes": [ - 16, - 17, - 18 - ], - "cluster_index": 5 - }, - { - "sentence_index": 3, - "token_indexes": [ - 22 - ], - "cluster_index": 6 - }, - { - "sentence_index": 3, - "token_indexes": [ - 30 - ], - "cluster_index": 7 - }, - { - "sentence_index": 3, - "token_indexes": [ - 32 - ], - "cluster_index": 8 - }, - { - "sentence_index": 4, - "token_indexes": [ - 0, - 1, - 2 - ], - "cluster_index": 9 - }, - { - "sentence_index": 4, - "token_indexes": [ - 13 - ], - "cluster_index": 10 - }, - { - "sentence_index": 4, - "token_indexes": [ - 15, - 16 - ], - "cluster_index": 11 - }, - { - "sentence_index": 4, - "token_indexes": [ - 18, - 19 - ], - "cluster_index": 12 - } - ], - "clusters": [ - [ - 1, - 0 - ], - [ - 6, - 5, - 4, - 7 - ], - [ - 3, - 9 - ], - [ - 2 - ], - [ - 8 - ], - [ - 10 - ], - [ - 11 - ], - [ - 12 - ], - [ - 13 - ], - [ - 14 - ], - [ - 15 - ], - [ - 16 - ], - [ - 17 - ] - ] - }, - "sentiment": -0.27, - "emotion": [ - { - "type": "desire", - "value": 1 - }, - { - "type": "disappointment", - "value": 1 - } - ], - "patterns": null - }, - "standardized_response": { - "general_sentiment": "Negative", - "general_sentiment_rate": 0.27, - "items": [ - { - "segment": "overall i am satisfied with my experience at Amazon , but two areas of major improvement needed .", - "sentiment": "Positive", - "sentiment_rate": 0.71 - }, - { - "segment": "first is the product reviews and pricing .", - "sentiment": "Positive", - "sentiment_rate": 0.01 - }, - { - "segment": "there are thousands of positive reviews for so many items , and it is clear", - "sentiment": "Positive", - "sentiment_rate": 0.38 - }, - { - "segment": "there needs to be a way to only view products sold by Amazon directly , because many market sellers way overprice items that can be purchased cheaper elsewhere ( like Walmart , Target , etc ) .", - "sentiment": "Negative", - "sentiment_rate": 0.23 - }, - { - "segment": "the second issue is they make it too difficult to get help when there is an issue with an order .", - "sentiment": "Neutral", - "sentiment_rate": 0.0 - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/lettria/outputs/text/syntax_analysis_output.json b/edenai_apis/apis/lettria/outputs/text/syntax_analysis_output.json deleted file mode 100644 index f4718269..00000000 --- a/edenai_apis/apis/lettria/outputs/text/syntax_analysis_output.json +++ /dev/null @@ -1,3307 +0,0 @@ -{ - "original_response": { - "language": "en", - "escapeHtml": false, - "splitNewLine": false, - "modules": [ - "EMOTICONS", - "DETECT_LANGUAGE", - "NER", - "TOKENIZE", - "POSTAGGER", - "LEMMATIZER", - "SENTENCE_ACTS", - "DEPENDENCY_PARSER", - "NLU", - "SPLIT_PROPOSITION", - "COREFERENCE", - "SENTIMENT", - "ML_NER", - "EXTRACT_PATTERN" - ], - "source_pure": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American president of the United States. He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "projectId": "5fb39e7f739cc549f6890f9e", - "domain": null, - "type": null, - "sentences": [ - { - "source": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017.", - "sentence_indexes": [ - 0, - 119 - ], - "source_pure": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017.", - "detail": [ - { - "source": "Barack Hussein Obama", - "tag": "NP", - "source_pure": "Barack Hussein Obama", - "indexes": [ - 0, - 20 - ], - "lemmatizer": {}, - "lemma": "Barack Hussein Obama", - "meaning": [ - { - "sub": "PERSON", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 1, - "index": 0, - "coreference": [ - 0 - ] - }, - { - "source": "is", - "source_pure": "is", - "indexes": [ - 21, - 23 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "indicative", - "temps": "present", - "pronom": 3 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "root", - "ref": -1, - "index": 1, - "coreference": [] - }, - { - "source": "an", - "source_pure": "an", - "indexes": [ - 24, - 26 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 4, - "index": 2, - "coreference": [ - 1 - ] - }, - { - "source": "american", - "source_pure": "American", - "indexes": [ - 27, - 35 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "american", - "meaning": [], - "value": null, - "len": 1, - "dep": "amod", - "ref": 4, - "index": 3, - "coreference": [ - 1 - ] - }, - { - "source": "politician", - "source_pure": "politician", - "indexes": [ - 36, - 46 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "politician", - "meaning": [ - { - "sub": "professional", - "super": "concret|natural_thing|person|person_by_activity", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obj", - "ref": 1, - "index": 4, - "coreference": [ - 1 - ] - }, - { - "source": "who", - "source_pure": "who", - "indexes": [ - 47, - 50 - ], - "tag": "PROREL", - "lemmatizer": {}, - "lemma": "who", - "meaning": [], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 6, - "index": 5, - "coreference": [ - 2 - ] - }, - { - "source": "served", - "source_pure": "served", - "indexes": [ - 51, - 57 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "serve", - "conjugate": [ - { - "mode": "indicative", - "temps": "past", - "pronom": 5 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 4 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 3 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 6 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 2 - } - ] - } - ], - "lemma": "serve", - "meaning": [ - { - "sub": "provide_(sbody)", - "super": "root|interact|make_possess|providing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "take_place_of", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "give_(sthg)", - "super": "root|interact|make_possess|transmitting", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "favour", - "super": "root|interact|interactions|positive", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "serve" - ], - "len": 1, - "verb_meaning": { - "serve": [ - "root|interact|make_possess|transmitting|give_(sthg)", - "root|interact|interactions|positive|favour", - "root|interact|make_possess|providing|provide_(sbody)", - "root|act|being|be_related|take_place_of" - ] - }, - "dep": "acl:relcl", - "ref": 4, - "index": 6, - "coreference": [] - }, - { - "source": "as", - "source_pure": "as", - "indexes": [ - 58, - 60 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "AS", - "next": "NULL", - "category": "Manner" - }, - { - "sens": "ALIKE", - "next": "NULL", - "category": "Comparison" - } - ] - }, - "lemma": "as", - "meaning": [ - { - "sub": "Manner", - "super": "AS", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Comparison", - "super": "ALIKE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 10, - "index": 7, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 61, - 64 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 10, - "index": 8, - "coreference": [] - }, - { - "source": "44th", - "tag": "ENTITY", - "source_pure": "44th", - "indexes": [ - 65, - 69 - ], - "lemmatizer": { - "number": 44 - }, - "lemma": "44", - "meaning": [ - { - "sub": "ordinal", - "super": "ENTITY", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "rank": "44", - "confidence": 0.99 - }, - "len": 2, - "dep": "amod", - "ref": 10, - "index": 9, - "coreference": [] - }, - { - "source": "president", - "source_pure": "president", - "indexes": [ - 70, - 79 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "president", - "meaning": [ - { - "sub": "card_game", - "super": "abstract|entity|activities_(n)|activity_field|game_(abstr.)", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obl", - "ref": 6, - "index": 10, - "coreference": [] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 80, - 82 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "RELATIVE_TO", - "next": "NULL", - "category": "Relation" - } - ] - }, - "lemma": "of", - "meaning": [ - { - "sub": "Relation", - "super": "RELATIVE_TO", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 10, - "index": 11, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 83, - 86 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 13, - "index": 12, - "coreference": [] - }, - { - "source": "united states", - "source_pure": "United States", - "indexes": [ - 87, - 100 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "united state", - "meaning": [], - "value": null, - "len": 1, - "dep": "amod", - "ref": 15, - "index": 13, - "coreference": [] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 101, - 105 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "FROM", - "next": "NULL", - "category": "Source" - }, - { - "sens": "FROM", - "next": "NULL", - "category": "Temporal Approximation" - }, - { - "sens": "BECAUSE", - "next": "NULL", - "category": "Cause" - } - ] - }, - "lemma": "from", - "meaning": [ - { - "sub": "Source", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Temporal Approximation", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Cause", - "super": "BECAUSE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 15, - "index": 14, - "coreference": [ - 3 - ] - }, - { - "source": "2009to", - "tag": "ENTITY", - "source_pure": "2009to", - "indexes": [ - 106, - 113 - ], - "lemmatizer": { - "number": 2009 - }, - "lemma": "2009", - "meaning": [ - { - "sub": "data_storage", - "super": "ENTITY", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "unit": "to", - "scalar": 2009, - "Mo": 2009000000, - "Gbit": 16072000, - "kbit": 16072000000000, - "Go": 2009000, - "To": 2009, - "confidence": 0.99 - }, - "len": 2, - "dep": "obl", - "ref": 16, - "index": 15, - "coreference": [ - 3, - 4, - 5 - ] - }, - { - "source": "2017", - "tag": "CD", - "source_pure": "2017", - "indexes": [ - 114, - 118 - ], - "lemmatizer": { - "number": 2017 - }, - "lemma": "2017", - "meaning": [ - { - "sub": "number", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 2017 - }, - "len": 1, - "dep": "obl", - "ref": 6, - "index": 16, - "coreference": [ - 3, - 5, - 6 - ] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 118, - 119 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 1, - "index": 17, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 17 - } - ], - "ml_ner": [ - { - "type": "PERSON", - "source": "Barack Hussein Obama", - "value": null, - "index": 0 - } - ], - "ml_sentiment": { - "sentence": { - "value": 0 - }, - "subsentence": [ - 0 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "realization", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "realization", - "value": 1 - } - ] - ] - }, - "coreference": [ - 0, - 1, - 2, - 3, - 4, - 5, - 6 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 17, - "elements": [], - "sentence": "Barack Hussein Obama is an american politician who served as the 44th president of the united states from 2009to 2017 .", - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - } - ], - "elements": [], - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "realization": 1, - "admiration": 0, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disappointment": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "pride": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 0, - "end_id": 17, - "sentence": "Barack Hussein Obama is an american politician who served as the 44th president of the united states from 2009to 2017 ." - } - ], - "elements": [], - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "fear": 0, - "disgust": 0, - "surprise": 0 - } - }, - "sentence_type": "assert" - }, - { - "source": "A member of the Democratic Party, Obama was the first African-American president of the United States.", - "sentence_indexes": [ - 119, - 222 - ], - "source_pure": " A member of the Democratic Party, Obama was the first African-American president of the United States.", - "detail": [ - { - "source": "a", - "source_pure": "A", - "indexes": [ - 120, - 121 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 1, - "index": 0, - "coreference": [] - }, - { - "source": "member", - "source_pure": "member", - "indexes": [ - 122, - 128 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "member", - "meaning": [ - { - "sub": "person_by_other_characteristic", - "super": "concret|natural_thing|person|person_by_characteristics", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obl", - "ref": 7, - "index": 1, - "coreference": [] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 129, - 131 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "RELATIVE_TO", - "next": "NULL", - "category": "Relation" - } - ] - }, - "lemma": "of", - "meaning": [ - { - "sub": "Relation", - "super": "RELATIVE_TO", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 5, - "index": 2, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 132, - 135 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 6, - "index": 3, - "coreference": [] - }, - { - "source": "democratic party", - "source_pure": "Democratic Party", - "indexes": [ - 136, - 152 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "democratic party", - "meaning": [ - { - "sub": "political_party", - "super": "concret|natural_thing|person|human_group", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "amod", - "ref": 6, - "index": 4, - "coreference": [] - }, - { - "source": ",", - "source_pure": ",", - "indexes": [ - 152, - 153 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ",", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 1, - "index": 5, - "coreference": [] - }, - { - "source": "Obama", - "tag": "NP", - "source_pure": "Obama", - "indexes": [ - 154, - 159 - ], - "lemmatizer": {}, - "lemma": "Obama", - "meaning": [ - { - "sub": "PERSON", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nsubj", - "ref": 7, - "index": 6, - "coreference": [ - 7 - ] - }, - { - "source": "was", - "source_pure": "was", - "indexes": [ - 160, - 163 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "be", - "conjugate": [ - { - "mode": "subjonctive", - "temps": "past", - "pronom": 1 - }, - { - "mode": "indicative", - "temps": "past", - "pronom": 1 - } - ] - } - ], - "lemma": "be", - "meaning": [ - { - "sub": "be_in_(situation)", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "exist", - "super": "root|act|existing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_measured", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_located", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_identified", - "super": "root|act|being|identification/qualification", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "be_characterized", - "super": "root|act|being|identification/qualification|characteristic", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "be" - ], - "len": 1, - "verb_meaning": { - "be": [ - "root|act|being|identification/qualification|be_identified", - "root|act|being|identification/qualification|characteristic|be_characterized", - "root|act|being|be_related|be_in_(situation)", - "root|act|existing|exist", - "root|act|being|identification/qualification|characteristic|be_measured", - "root|act|being|be_related|be_located" - ] - }, - "dep": "root", - "ref": -1, - "index": 7, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 164, - 167 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 11, - "index": 8, - "coreference": [] - }, - { - "source": "first", - "source_pure": "first", - "indexes": [ - 168, - 173 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "first", - "meaning": [], - "value": null, - "len": 1, - "dep": "amod", - "ref": 11, - "index": 9, - "coreference": [] - }, - { - "source": "african-american", - "source_pure": "African-American", - "indexes": [ - 174, - 190 - ], - "tag": "JJ", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "african-american", - "meaning": [], - "value": null, - "len": 1, - "dep": "amod", - "ref": 11, - "index": 10, - "coreference": [] - }, - { - "source": "president", - "source_pure": "president", - "indexes": [ - 191, - 200 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "president", - "meaning": [ - { - "sub": "card_game", - "super": "abstract|entity|activities_(n)|activity_field|game_(abstr.)", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obj", - "ref": 7, - "index": 11, - "coreference": [] - }, - { - "source": "of", - "source_pure": "of", - "indexes": [ - 201, - 203 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "RELATIVE_TO", - "next": "NULL", - "category": "Relation" - } - ] - }, - "lemma": "of", - "meaning": [ - { - "sub": "Relation", - "super": "RELATIVE_TO", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 14, - "index": 12, - "coreference": [] - }, - { - "source": "the", - "source_pure": "the", - "indexes": [ - 204, - 207 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "define", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "the", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 14, - "index": 13, - "coreference": [] - }, - { - "source": "united states", - "source_pure": "United States", - "indexes": [ - 208, - 221 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "united state", - "meaning": [], - "value": null, - "len": 1, - "dep": "advcl", - "ref": 7, - "index": 14, - "coreference": [] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 221, - 222 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 7, - "index": 15, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 15 - } - ], - "ml_ner": [ - { - "type": "PERSON", - "source": "Obama", - "value": null, - "index": 6 - } - ], - "ml_sentiment": { - "sentence": { - "value": 0 - }, - "subsentence": [ - 0 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "admiration", - "value": 1 - }, - { - "type": "realization", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "admiration", - "value": 1 - }, - { - "type": "realization", - "value": 1 - } - ] - ] - }, - "coreference": [ - 7 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 15, - "elements": [], - "sentence": "a member of the democratic party , Obama was the first african-american president of the united states .", - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - } - ], - "elements": [], - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "admiration": 1, - "realization": 1, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disappointment": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "pride": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 0, - "end_id": 15, - "sentence": "a member of the democratic party , Obama was the first african-american president of the united states ." - } - ], - "elements": [], - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "fear": 0, - "disgust": 0, - "surprise": 0 - } - }, - "sentence_type": "assert" - }, - { - "source": "He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "sentence_indexes": [ - 222, - 345 - ], - "source_pure": " He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "detail": [ - { - "source": "he", - "source_pure": "He", - "indexes": [ - 223, - 225 - ], - "tag": "CLS", - "lemmatizer": { - "pronom": 3 - }, - "lemma": "it", - "meaning": [ - { - "sub": "coreference", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 3 - }, - "len": 1, - "dep": "nsubj", - "ref": 2, - "index": 0, - "coreference": [ - 8 - ] - }, - { - "source": "previously", - "source_pure": "previously", - "indexes": [ - 226, - 236 - ], - "tag": "RB", - "lemmatizer": { - "category": [ - "time and aspect" - ] - }, - "lemma": "previously", - "meaning": [ - { - "sub": "time and aspect", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "advmod", - "ref": 2, - "index": 1, - "coreference": [] - }, - { - "source": "served", - "source_pure": "served", - "indexes": [ - 237, - 243 - ], - "tag": "V", - "lemmatizer": [ - { - "infinit": "serve", - "conjugate": [ - { - "mode": "indicative", - "temps": "past", - "pronom": 3 - } - ] - } - ], - "lemma": "serve", - "meaning": [ - { - "sub": "give_(sthg)", - "super": "root|interact|make_possess|transmitting", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "favour", - "super": "root|interact|interactions|positive", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "provide_(sbody)", - "super": "root|interact|make_possess|providing", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - }, - { - "sub": "take_place_of", - "super": "root|act|being|be_related", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "infinit": [ - "serve" - ], - "len": 1, - "verb_meaning": { - "serve": [ - "root|interact|make_possess|transmitting|give_(sthg)", - "root|interact|interactions|positive|favour", - "root|interact|make_possess|providing|provide_(sbody)", - "root|act|being|be_related|take_place_of" - ] - }, - "dep": "root", - "ref": -1, - "index": 2, - "coreference": [] - }, - { - "source": "as", - "source_pure": "as", - "indexes": [ - 244, - 246 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "AS", - "next": "NULL", - "category": "Manner" - }, - { - "sens": "ALIKE", - "next": "NULL", - "category": "Comparison" - } - ] - }, - "lemma": "as", - "meaning": [ - { - "sub": "Manner", - "super": "AS", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Comparison", - "super": "ALIKE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 6, - "index": 3, - "coreference": [] - }, - { - "source": "a", - "source_pure": "a", - "indexes": [ - 247, - 248 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 6, - "index": 4, - "coreference": [ - 9 - ] - }, - { - "source": "U.S.", - "tag": "NP", - "source_pure": "U.S.", - "indexes": [ - 249, - 253 - ], - "lemmatizer": {}, - "lemma": "U.S.", - "meaning": [ - { - "sub": "LOCATION", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "compound", - "ref": 6, - "index": 5, - "coreference": [ - 9 - ] - }, - { - "source": "senator", - "source_pure": "senator", - "indexes": [ - 254, - 261 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "senator", - "meaning": [ - { - "sub": "person_by_other_activity", - "super": "concret|natural_thing|person|person_by_activity", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "obl", - "ref": 2, - "index": 6, - "coreference": [ - 9 - ] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 262, - 266 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "FROM", - "next": "NULL", - "category": "Source" - }, - { - "sens": "FROM", - "next": "NULL", - "category": "Temporal Approximation" - }, - { - "sens": "BECAUSE", - "next": "NULL", - "category": "Cause" - } - ] - }, - "lemma": "from", - "meaning": [ - { - "sub": "Source", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Temporal Approximation", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Cause", - "super": "BECAUSE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 8, - "index": 7, - "coreference": [ - 9 - ] - }, - { - "source": "Illinois", - "tag": "NP", - "source_pure": "Illinois", - "indexes": [ - 267, - 275 - ], - "lemmatizer": {}, - "lemma": "Illinois", - "meaning": [ - { - "sub": "LOCATION", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "nmod", - "ref": 6, - "index": 8, - "coreference": [ - 9, - 10 - ] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 276, - 280 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "FROM", - "next": "NULL", - "category": "Source" - }, - { - "sens": "FROM", - "next": "NULL", - "category": "Temporal Approximation" - }, - { - "sens": "BECAUSE", - "next": "NULL", - "category": "Cause" - } - ] - }, - "lemma": "from", - "meaning": [ - { - "sub": "Source", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Temporal Approximation", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Cause", - "super": "BECAUSE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 10, - "index": 9, - "coreference": [ - 11 - ] - }, - { - "source": "2005to", - "tag": "ENTITY", - "source_pure": "2005to", - "indexes": [ - 281, - 288 - ], - "lemmatizer": { - "number": 2005 - }, - "lemma": "2005", - "meaning": [ - { - "sub": "data_storage", - "super": "ENTITY", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "unit": "to", - "scalar": 2005, - "Mo": 2005000000, - "Gbit": 16040000, - "kbit": 16040000000000, - "Go": 2005000, - "To": 2005, - "confidence": 0.99 - }, - "len": 2, - "dep": "obl", - "ref": 2, - "index": 10, - "coreference": [ - 11, - 12, - 13 - ] - }, - { - "source": "2008", - "tag": "CD", - "source_pure": "2008", - "indexes": [ - 289, - 293 - ], - "lemmatizer": { - "number": 2008 - }, - "lemma": "2008", - "meaning": [ - { - "sub": "number", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 2008 - }, - "len": 1, - "dep": "nmod", - "ref": 10, - "index": 11, - "coreference": [ - 11, - 13 - ] - }, - { - "source": "and", - "source_pure": "and", - "indexes": [ - 294, - 297 - ], - "tag": "CC", - "lemmatizer": {}, - "lemma": "and", - "meaning": [ - { - "sub": "&", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "cc", - "ref": 16, - "index": 12, - "coreference": [] - }, - { - "source": "as", - "source_pure": "as", - "indexes": [ - 298, - 300 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "AS", - "next": "NULL", - "category": "Manner" - }, - { - "sens": "ALIKE", - "next": "NULL", - "category": "Comparison" - } - ] - }, - "lemma": "as", - "meaning": [ - { - "sub": "Manner", - "super": "AS", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Comparison", - "super": "ALIKE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 16, - "index": 13, - "coreference": [] - }, - { - "source": "an", - "source_pure": "an", - "indexes": [ - 301, - 303 - ], - "tag": "D", - "lemmatizer": { - "possessing": -1, - "mode": "undefine", - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "a", - "meaning": [], - "value": null, - "len": 1, - "dep": "det", - "ref": 16, - "index": 14, - "coreference": [ - 14 - ] - }, - { - "source": "Illinois state", - "tag": "NP", - "source_pure": "Illinois state", - "indexes": [ - 304, - 318 - ], - "lemmatizer": {}, - "lemma": "Illinois state", - "meaning": [ - { - "sub": "LOCATION", - "super": null, - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "compound", - "ref": 16, - "index": 15, - "coreference": [ - 14 - ] - }, - { - "source": "senator", - "source_pure": "senator", - "indexes": [ - 319, - 326 - ], - "tag": "N", - "lemmatizer": { - "gender": { - "female": false, - "plural": false - } - }, - "lemma": "senator", - "meaning": [ - { - "sub": "person_by_other_activity", - "super": "concret|natural_thing|person|person_by_activity", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "conj", - "ref": 6, - "index": 16, - "coreference": [ - 14 - ] - }, - { - "source": "from", - "source_pure": "from", - "indexes": [ - 327, - 331 - ], - "tag": "P", - "lemmatizer": { - "sens": [ - { - "sens": "FROM", - "next": "NULL", - "category": "Source" - }, - { - "sens": "FROM", - "next": "NULL", - "category": "Temporal Approximation" - }, - { - "sens": "BECAUSE", - "next": "NULL", - "category": "Cause" - } - ] - }, - "lemma": "from", - "meaning": [ - { - "sub": "Source", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Temporal Approximation", - "super": "FROM", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - }, - { - "sub": "Cause", - "super": "BECAUSE", - "extra": null, - "derivates": null, - "intensity": 1, - "is_perso": false - } - ], - "value": null, - "len": 1, - "dep": "case", - "ref": 18, - "index": 17, - "coreference": [ - 15 - ] - }, - { - "source": "1997to", - "tag": "ENTITY", - "source_pure": "1997to", - "indexes": [ - 332, - 339 - ], - "lemmatizer": { - "number": 1997 - }, - "lemma": "1997", - "meaning": [ - { - "sub": "data_storage", - "super": "ENTITY", - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "unit": "to", - "scalar": 1997, - "Mo": 1997000000, - "Gbit": 15976000, - "kbit": 15976000000000, - "Go": 1997000, - "To": 1997, - "confidence": 0.99 - }, - "len": 2, - "dep": "nmod", - "ref": 16, - "index": 18, - "coreference": [ - 15, - 16, - 17 - ] - }, - { - "source": "2004", - "tag": "CD", - "source_pure": "2004", - "indexes": [ - 340, - 344 - ], - "lemmatizer": { - "number": 2004 - }, - "lemma": "2004", - "meaning": [ - { - "sub": "number", - "super": null, - "extra": null, - "intensity": 1, - "derivates": null, - "is_perso": false - } - ], - "value": { - "scalar": 2004 - }, - "len": 1, - "dep": "nmod", - "ref": 16, - "index": 19, - "coreference": [ - 15, - 17, - 18 - ] - }, - { - "source": ".", - "source_pure": ".", - "indexes": [ - 344, - 345 - ], - "tag": "PUNCT", - "lemmatizer": {}, - "lemma": ".", - "meaning": [], - "value": null, - "len": 1, - "dep": "punct", - "ref": 2, - "index": 20, - "coreference": [] - } - ], - "subsentences": [ - { - "start_id": 0, - "end_id": 20 - } - ], - "ml_ner": [ - { - "type": "LOCATION", - "source": "U.S.", - "value": null, - "index": 5 - }, - { - "type": "LOCATION", - "source": "Illinois", - "value": null, - "index": 8 - }, - { - "type": "LOCATION", - "source": "Illinois state", - "value": null, - "index": 15 - } - ], - "ml_sentiment": { - "sentence": { - "value": 0 - }, - "subsentence": [ - 0 - ] - }, - "ml_emotion": { - "sentence": [ - { - "type": "neutral", - "value": 1 - } - ], - "subsentence": [ - [ - { - "type": "neutral", - "value": 1 - } - ] - ] - }, - "coreference": [ - 8, - 9, - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18 - ], - "sentiment": { - "subsentences": [ - { - "start_id": 0, - "end_id": 20, - "elements": [], - "sentence": "he previously served as a U.S. senator from Illinois from 2005to 2008 and as an Illinois state senator from 1997to 2004 .", - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - } - ], - "elements": [], - "values": { - "positive": 0, - "negative": 0, - "total": 0 - } - }, - "emotion": { - "subsentences": [ - { - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "disgust": 0, - "fear": 0, - "surprise": 0, - "admiration": 0, - "amusement": 0, - "annoyance": 0, - "caring": 0, - "confusion": 0, - "curiosity": 0, - "desire": 0, - "disappointment": 0, - "disapproval": 0, - "embarrassment": 0, - "excitement": 0, - "gratitude": 0, - "grief": 0, - "love": 0, - "nervousness": 0, - "optimism": 0, - "pride": 0, - "realization": 0, - "relief": 0, - "remorse": 0 - }, - "elements": [], - "start_id": 0, - "end_id": 20, - "sentence": "he previously served as a U.S. senator from Illinois from 2005to 2008 and as an Illinois state senator from 1997to 2004 ." - } - ], - "elements": [], - "values": { - "happiness": 0, - "sadness": 0, - "anger": 0, - "fear": 0, - "disgust": 0, - "surprise": 0 - } - }, - "sentence_type": "assert" - } - ], - "emoticon": { - "happy": 0, - "very_happy": 0, - "laugh": 0, - "sad": 0, - "very_sad": 0, - "lol": 0, - "cry": 0, - "horror": 0, - "surprise": 0, - "kiss": 0, - "wink": 0, - "playful": 0, - "hesitant": 0, - "indecision": 0, - "embarrassed": 0, - "muted": 0, - "angel": 0, - "devil": 0, - "love": 0, - "notlove": 0 - }, - "emoticon_data": [], - "coreference": { - "spans": [ - { - "sentence_index": 0, - "token_indexes": [ - 0 - ], - "cluster_index": 1 - }, - { - "sentence_index": 0, - "token_indexes": [ - 2, - 3, - 4 - ], - "cluster_index": 0 - }, - { - "sentence_index": 0, - "token_indexes": [ - 5 - ], - "cluster_index": 0 - }, - { - "sentence_index": 0, - "token_indexes": [ - 14, - 15, - 16 - ], - "cluster_index": 2 - }, - { - "sentence_index": 0, - "token_indexes": [ - 15 - ], - "cluster_index": 3 - }, - { - "sentence_index": 0, - "token_indexes": [ - 15, - 16 - ], - "cluster_index": 4 - }, - { - "sentence_index": 0, - "token_indexes": [ - 16 - ], - "cluster_index": 5 - }, - { - "sentence_index": 1, - "token_indexes": [ - 6 - ], - "cluster_index": 1 - }, - { - "sentence_index": 2, - "token_indexes": [ - 0 - ], - "cluster_index": 1 - }, - { - "sentence_index": 2, - "token_indexes": [ - 4, - 5, - 6, - 7, - 8 - ], - "cluster_index": 6 - }, - { - "sentence_index": 2, - "token_indexes": [ - 8 - ], - "cluster_index": 7 - }, - { - "sentence_index": 2, - "token_indexes": [ - 9, - 10, - 11 - ], - "cluster_index": 8 - }, - { - "sentence_index": 2, - "token_indexes": [ - 10 - ], - "cluster_index": 9 - }, - { - "sentence_index": 2, - "token_indexes": [ - 10, - 11 - ], - "cluster_index": 10 - }, - { - "sentence_index": 2, - "token_indexes": [ - 14, - 15, - 16 - ], - "cluster_index": 11 - }, - { - "sentence_index": 2, - "token_indexes": [ - 17, - 18, - 19 - ], - "cluster_index": 12 - }, - { - "sentence_index": 2, - "token_indexes": [ - 18 - ], - "cluster_index": 13 - }, - { - "sentence_index": 2, - "token_indexes": [ - 18, - 19 - ], - "cluster_index": 14 - }, - { - "sentence_index": 2, - "token_indexes": [ - 19 - ], - "cluster_index": 15 - } - ], - "clusters": [ - [ - 2, - 1 - ], - [ - 7, - 0, - 8 - ], - [ - 3 - ], - [ - 4 - ], - [ - 5 - ], - [ - 6 - ], - [ - 9 - ], - [ - 10 - ], - [ - 11 - ], - [ - 12 - ], - [ - 13 - ], - [ - 14 - ], - [ - 15 - ], - [ - 16 - ], - [ - 17 - ], - [ - 18 - ] - ] - }, - "sentiment": 0.04, - "emotion": [ - { - "type": "neutral", - "value": 1 - } - ], - "patterns": null - }, - "standardized_response": { - "items": [ - { - "word": "Barack Hussein Obama", - "importance": null, - "tag": "proper noun", - "lemma": "Barack Hussein Obama", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "is", - "importance": null, - "tag": "verb", - "lemma": "be", - "others": { - "gender": null, - "plural": null, - "mode": null, - "infinitive": "be" - } - }, - { - "word": "an", - "importance": null, - "tag": "determiner", - "lemma": "a", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "american", - "importance": null, - "tag": "adjective", - "lemma": "american", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "politician", - "importance": null, - "tag": "common noun", - "lemma": "politician", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "who", - "importance": null, - "tag": "pronom relative", - "lemma": "who", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "served", - "importance": null, - "tag": "verb", - "lemma": "serve", - "others": { - "gender": null, - "plural": null, - "mode": null, - "infinitive": "serve" - } - }, - { - "word": "as", - "importance": null, - "tag": "preposition", - "lemma": "as", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "the", - "importance": null, - "tag": "determiner", - "lemma": "the", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "president", - "importance": null, - "tag": "common noun", - "lemma": "president", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "of", - "importance": null, - "tag": "preposition", - "lemma": "of", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "the", - "importance": null, - "tag": "determiner", - "lemma": "the", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "united states", - "importance": null, - "tag": "common noun", - "lemma": "united state", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "from", - "importance": null, - "tag": "preposition", - "lemma": "from", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "2017", - "importance": null, - "tag": "number", - "lemma": "2017", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": ".", - "importance": null, - "tag": "punctuation", - "lemma": ".", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "a", - "importance": null, - "tag": "determiner", - "lemma": "a", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "member", - "importance": null, - "tag": "common noun", - "lemma": "member", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "of", - "importance": null, - "tag": "preposition", - "lemma": "of", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "the", - "importance": null, - "tag": "determiner", - "lemma": "the", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "democratic party", - "importance": null, - "tag": "common noun", - "lemma": "democratic party", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": ",", - "importance": null, - "tag": "punctuation", - "lemma": ",", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "Obama", - "importance": null, - "tag": "proper noun", - "lemma": "Obama", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "was", - "importance": null, - "tag": "verb", - "lemma": "be", - "others": { - "gender": null, - "plural": null, - "mode": null, - "infinitive": "be" - } - }, - { - "word": "the", - "importance": null, - "tag": "determiner", - "lemma": "the", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "first", - "importance": null, - "tag": "adjective", - "lemma": "first", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "african-american", - "importance": null, - "tag": "adjective", - "lemma": "african-american", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "president", - "importance": null, - "tag": "common noun", - "lemma": "president", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "of", - "importance": null, - "tag": "preposition", - "lemma": "of", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "the", - "importance": null, - "tag": "determiner", - "lemma": "the", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "united states", - "importance": null, - "tag": "common noun", - "lemma": "united state", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": ".", - "importance": null, - "tag": "punctuation", - "lemma": ".", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "he", - "importance": null, - "tag": "pronoun", - "lemma": "it", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "previously", - "importance": null, - "tag": "adverb", - "lemma": "previously", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "served", - "importance": null, - "tag": "verb", - "lemma": "serve", - "others": { - "gender": null, - "plural": null, - "mode": null, - "infinitive": "serve" - } - }, - { - "word": "as", - "importance": null, - "tag": "preposition", - "lemma": "as", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "a", - "importance": null, - "tag": "determiner", - "lemma": "a", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "U.S.", - "importance": null, - "tag": "proper noun", - "lemma": "U.S.", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "senator", - "importance": null, - "tag": "common noun", - "lemma": "senator", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "from", - "importance": null, - "tag": "preposition", - "lemma": "from", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "Illinois", - "importance": null, - "tag": "proper noun", - "lemma": "Illinois", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "from", - "importance": null, - "tag": "preposition", - "lemma": "from", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "2008", - "importance": null, - "tag": "number", - "lemma": "2008", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "and", - "importance": null, - "tag": "co-ordinating conjunction", - "lemma": "and", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "as", - "importance": null, - "tag": "preposition", - "lemma": "as", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "an", - "importance": null, - "tag": "determiner", - "lemma": "a", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "Illinois state", - "importance": null, - "tag": "proper noun", - "lemma": "Illinois state", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "senator", - "importance": null, - "tag": "common noun", - "lemma": "senator", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "from", - "importance": null, - "tag": "preposition", - "lemma": "from", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": "2004", - "importance": null, - "tag": "number", - "lemma": "2004", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - }, - { - "word": ".", - "importance": null, - "tag": "punctuation", - "lemma": ".", - "others": { - "gender": "masculine", - "plural": "singular", - "mode": null, - "infinitive": null - } - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/neuralspace/__init__.py b/edenai_apis/apis/neuralspace/__init__.py deleted file mode 100644 index 052354ae..00000000 --- a/edenai_apis/apis/neuralspace/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .neuralspace_api import NeuralSpaceApi diff --git a/edenai_apis/apis/neuralspace/config.py b/edenai_apis/apis/neuralspace/config.py deleted file mode 100644 index 24bd6c13..00000000 --- a/edenai_apis/apis/neuralspace/config.py +++ /dev/null @@ -1,656 +0,0 @@ -from edenai_apis.utils.languages import ( - get_language_name_from_code, -) - -supported_domains = [ - { - "code": "en", - "language": "English", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-australia-default", "accent": "Australia"}, - {"domain": "general-v3-australia-latest_long", "accent": "Australia"}, - {"domain": "general-v3-canada-default", "accent": "Canada"}, - {"domain": "general-v3-ghana-default", "accent": "Ghana"}, - {"domain": "general-v3-hong_kong-default", "accent": "Hong Kong"}, - {"domain": "general-v3-india-default", "accent": "India"}, - {"domain": "general-v3-india-latest_long", "accent": "India"}, - {"domain": "general-v3-ireland-default", "accent": "Ireland"}, - {"domain": "general-v3-kenya-default", "accent": "Kenya"}, - {"domain": "general-v3-new_zealand-default", "accent": "New Zealand"}, - {"domain": "general-v3-nigeria-default", "accent": "Nigeria"}, - {"domain": "general-v3-pakistan-default", "accent": "Pakistan"}, - {"domain": "general-v3-philippines-default", "accent": "Philippines"}, - {"domain": "general-v3-singapore-default", "accent": "Singapore"}, - {"domain": "general-v3-south_africa-default", "accent": "South Africa"}, - {"domain": "general-v3-tanzania-default", "accent": "Tanzania"}, - {"domain": "general-v3-united_kingdom-default", "accent": "United Kingdom"}, - { - "domain": "general-v3-united_kingdom-latest_long", - "accent": "United Kingdom", - }, - {"domain": "general-v3-united_states-default", "accent": "United States"}, - { - "domain": "general-v3-united_states-latest_long", - "accent": "United States", - }, - ], - }, - { - "code": "hi", - "language": "Hindi", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-india-default", "accent": "India"}, - {"domain": "general-v3-india-latest_long", "accent": "India"}, - ], - }, - { - "code": "sv", - "language": "Swedish", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-sweden-default", "accent": "Sweden"}, - ], - }, - { - "code": "ar", - "language": "Arabic", - "domains": [ - {"domain": "multilingual-v3"}, - {"domain": "multilingual-v2"}, - {"domain": "general-v3-algeria-default", "accent": "Algeria"}, - {"domain": "general-v3-algeria-latest_long", "accent": "Algeria"}, - {"domain": "general-v3-bahrain-default", "accent": "Bahrain"}, - {"domain": "general-v3-bahrain-latest_long", "accent": "Bahrain"}, - {"domain": "general-v3-egypt-default", "accent": "Egypt"}, - {"domain": "general-v3-egypt-latest_long", "accent": "Egypt"}, - {"domain": "general-v3-iraq-default", "accent": "Iraq"}, - {"domain": "general-v3-iraq-latest_long", "accent": "Iraq"}, - {"domain": "general-v3-israel-default", "accent": "Israel"}, - {"domain": "general-v3-israel-latest_long", "accent": "Israel"}, - {"domain": "general-v3-jordan-default", "accent": "Jordan"}, - {"domain": "general-v3-jordan-latest_long", "accent": "Jordan"}, - {"domain": "general-v3-kuwait-default", "accent": "Kuwait"}, - {"domain": "general-v3-kuwait-latest_long", "accent": "Kuwait"}, - {"domain": "general-v3-lebanon-default", "accent": "Lebanon"}, - {"domain": "general-v3-lebanon-latest_long", "accent": "Lebanon"}, - {"domain": "general-v3-mauritania-latest_long", "accent": "Mauritania"}, - {"domain": "general-v3-morocco-default", "accent": "Morocco"}, - {"domain": "general-v3-morocco-latest_long", "accent": "Morocco"}, - {"domain": "general-v3-oman-default", "accent": "Oman"}, - {"domain": "general-v3-oman-latest_long", "accent": "Oman"}, - {"domain": "general-v3-qatar-default", "accent": "Qatar"}, - {"domain": "general-v3-qatar-latest_long", "accent": "Qatar"}, - {"domain": "general-v3-saudi_arabia-default", "accent": "Saudi Arabia"}, - {"domain": "general-v3-saudi_arabia-latest_long", "accent": "Saudi Arabia"}, - { - "domain": "general-v3-state_of_palestine-default", - "accent": "Palestinian Territories", - }, - { - "domain": "general-v3-state_of_palestine-latest_long", - "accent": "Palestinian Territories", - }, - {"domain": "general-v3-tunisia-default", "accent": "Tunisia"}, - {"domain": "general-v3-tunisia-latest_long", "accent": "Tunisia"}, - { - "domain": "general-v3-united_arab_emirates-default", - "accent": "United Arab Emirates", - }, - { - "domain": "general-v3-united_arab_emirates-latest_long", - "accent": "United Arab Emirates", - }, - {"domain": "general-v3-yemen-default", "accent": "Yemen"}, - {"domain": "general-v3-yemen-latest_long", "accent": "Yemen"}, - ], - }, - { - "code": "ru", - "language": "Russian", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-russia-default", "accent": "Russia"}, - {"domain": "general-v3-russia-latest_long", "accent": "Russia"}, - ], - }, - { - "code": "fr", - "language": "French", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-belgium-default", "accent": "Belgium"}, - {"domain": "general-v3-canada-default", "accent": "Canada"}, - {"domain": "general-v3-canada-latest_long", "accent": "Canada"}, - {"domain": "general-v3-france-default", "accent": "France"}, - {"domain": "general-v3-france-latest_long", "accent": "France"}, - {"domain": "general-v3-switzerland-default", "accent": "Switzerland"}, - ], - }, - { - "code": "uk", - "language": "Ukrainian", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-ukraine-default", "accent": "Ukraine"}, - {"domain": "general-v3-ukraine-latest_long", "accent": "Ukraine"}, - ], - }, - { - "code": "de", - "language": "German", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-austria-default", "accent": "Austria"}, - {"domain": "general-v3-germany-default", "accent": "Germany"}, - {"domain": "general-v3-germany-latest_long", "accent": "Germany"}, - {"domain": "general-v3-switzerland-default", "accent": "Switzerland"}, - ], - }, - { - "code": "el", - "language": "Greek", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-greece-default", "accent": "Greece"}, - ], - }, - { - "code": "fa", - "language": "Persian", - "domains": [{"domain": "general-v3-iran-default", "accent": "Iran"}], - }, - { - "code": "nl", - "language": "Dutch", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-belgium-default", "accent": "Belgium"}, - {"domain": "general-v3-netherlands-default", "accent": "Netherlands"}, - {"domain": "general-v3-netherlands-latest_long", "accent": "Netherlands"}, - ], - }, - { - "code": "pt", - "language": "Portuguese", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-brazil-default", "accent": "Brazil"}, - {"domain": "general-v3-brazil-latest_long", "accent": "Brazil"}, - {"domain": "general-v3-portugal-default", "accent": "Portugal"}, - {"domain": "general-v3-portugal-latest_long", "accent": "Portugal"}, - ], - }, - { - "code": "es", - "language": "Spanish", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-argentina-default", "accent": "Argentina"}, - {"domain": "general-v3-bolivia-default", "accent": "Bolivia"}, - {"domain": "general-v3-chile-default", "accent": "Chile"}, - {"domain": "general-v3-colombia-default", "accent": "Colombia"}, - {"domain": "general-v3-costa_rica-default", "accent": "Costa Rica"}, - { - "domain": "general-v3-dominican_republic-default", - "accent": "Dominican Republic", - }, - {"domain": "general-v3-ecuador-default", "accent": "Ecuador"}, - {"domain": "general-v3-el_salvador-default", "accent": "El Salvador"}, - {"domain": "general-v3-guatemala-default", "accent": "Guatemala"}, - {"domain": "general-v3-honduras-default", "accent": "Honduras"}, - {"domain": "general-v3-mexico-default", "accent": "Mexico"}, - {"domain": "general-v3-nicaragua-default", "accent": "Nicaragua"}, - {"domain": "general-v3-panama-default", "accent": "Panama"}, - {"domain": "general-v3-paraguay-default", "accent": "Paraguay"}, - {"domain": "general-v3-peru-default", "accent": "Peru"}, - {"domain": "general-v3-puerto_rico-default", "accent": "Puerto Rico"}, - {"domain": "general-v3-spain-default", "accent": "Spain"}, - {"domain": "general-v3-spain-latest_long", "accent": "Spain"}, - {"domain": "general-v3-united_states-default", "accent": "United States"}, - { - "domain": "general-v3-united_states-latest_long", - "accent": "United States", - }, - {"domain": "general-v3-uruguay-default", "accent": "Uruguay"}, - {"domain": "general-v3-venezuela-default", "accent": "Venezuela"}, - ], - }, - { - "code": "ca", - "language": "Catalan", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-spain-default", "accent": "Spain"}, - ], - }, - { - "code": "cs", - "language": "Czech", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-czech_republic-default", "accent": "Czech Republic"}, - ], - }, - { - "code": "ja", - "language": "Japanese", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-japan-default", "accent": "Japan"}, - {"domain": "general-v3-japan-latest_long", "accent": "Japan"}, - ], - }, - { - "code": "kk", - "language": "Kazakh", - "domains": [ - {"domain": "general-v3-kazakhstan-default", "accent": "Kazakhstan"} - ], - }, - { - "code": "tr", - "language": "Turkish", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-turkey-default", "accent": "Turkey"}, - {"domain": "general-v3-turkey-latest_long", "accent": "Turkey"}, - ], - }, - { - "code": "it", - "language": "Italian", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-italy-default", "accent": "Italy"}, - {"domain": "general-v3-italy-latest_long", "accent": "Italy"}, - {"domain": "general-v3-switzerland-default", "accent": "Switzerland"}, - ], - }, - {"code": "zh", "language": "Chinese", "domains": [{"domain": "multilingual-v1"}]}, - { - "code": "af", - "language": "Afrikaans", - "domains": [ - {"domain": "general-v3-south_africa-default", "accent": "South Africa"} - ], - }, - { - "code": "am", - "domains": [{"domain": "general-v3-ethiopia-default", "accent": "Ethiopia"}], - }, - { - "code": "az", - "language": "Azerbaijani", - "domains": [ - {"domain": "general-v3-azerbaijan-default", "accent": "Azerbaijan"} - ], - }, - { - "code": "bg", - "language": "Bulgarian", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-bulgaria-default", "accent": "Bulgaria"}, - ], - }, - { - "code": "bn", - "language": "Bengali", - "domains": [ - {"domain": "multilingual-v2"}, - {"domain": "general-v3-bangladesh-default", "accent": "Bangladesh"}, - {"domain": "general-v3-india-default", "accent": "India"}, - ], - }, - { - "code": "bs", - "language": "Bosnian", - "domains": [ - {"domain": "multilingual-v1"}, - { - "domain": "general-v3-bosnia_and_herzegovina-default", - "accent": "Bosnia And Herzegovina", - }, - ], - }, - { - "code": "da", - "language": "Danish", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-denmark-default", "accent": "Denmark"}, - {"domain": "general-v3-denmark-latest_long", "accent": "Denmark"}, - ], - }, - { - "code": "et", - "language": "Estonian", - "domains": [{"domain": "general-v3-estonia-default", "accent": "Estonia"}], - }, - { - "code": "eu", - "language": "Basque", - "domains": [{"domain": "general-v3-spain-default", "accent": "Spain"}], - }, - { - "code": "fi", - "language": "Finnish", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-finland-default", "accent": "Finland"}, - {"domain": "general-v3-finland-latest_long", "accent": "Finland"}, - ], - }, - { - "code": "gl", - "language": "Galician", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-spain-default", "accent": "Spain"}, - ], - }, - { - "code": "gu", - "language": "Gujarati", - "domains": [ - {"domain": "multilingual-v2"}, - {"domain": "general-v3-india-default", "accent": "India"}, - ], - }, - { - "code": "hr", - "language": "Croatian", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-croatia-default", "accent": "Croatia"}, - ], - }, - { - "code": "hu", - "language": "Hungarian", - "domains": [{"domain": "general-v3-hungary-default", "accent": "Hungary"}], - }, - { - "code": "hy", - "language": "Armenian", - "domains": [{"domain": "general-v3-armenia-default", "accent": "Armenia"}], - }, - { - "code": "id", - "language": "Indonesian", - "domains": [ - {"domain": "general-v3-indonesia-default", "accent": "Indonesia"}, - {"domain": "general-v3-indonesia-latest_long", "accent": "Indonesia"}, - ], - }, - { - "code": "is", - "language": "Icelandic", - "domains": [{"domain": "general-v3-iceland-default", "accent": "Iceland"}], - }, - { - "code": "jv", - "language": "Javanese", - "domains": [{"domain": "general-v3-indonesia-default", "accent": "Indonesia"}], - }, - { - "code": "ka", - "language": "Georgian", - "domains": [{"domain": "general-v3-georgia-default", "accent": "Georgia"}], - }, - { - "code": "km", - "domains": [{"domain": "general-v3-cambodia-default", "accent": "Cambodia"}], - }, - { - "code": "kn", - "language": "Kannada", - "domains": [ - {"domain": "multilingual-v2"}, - {"domain": "general-v3-india-default", "accent": "India"}, - ], - }, - { - "code": "ko", - "language": "Korean", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-south_korea-default", "accent": "South Korea"}, - {"domain": "general-v3-south_korea-latest_long", "accent": "South Korea"}, - ], - }, - { - "code": "lo", - "domains": [{"domain": "general-v3-laos-default", "accent": "Laos"}], - }, - { - "code": "lt", - "language": "Lithuanian", - "domains": [{"domain": "general-v3-lithuania-default", "accent": "Lithuania"}], - }, - { - "code": "lv", - "language": "Latvian", - "domains": [{"domain": "general-v3-latvia-default", "accent": "Latvia"}], - }, - { - "code": "mk", - "language": "Macedonian", - "domains": [ - { - "domain": "general-v3-north_macedonia-default", - "accent": "North Macedonia", - }, - { - "domain": "general-v3-north_macedonia-latest_long", - "accent": "North Macedonia", - }, - ], - }, - { - "code": "ml", - "language": "Malayalam", - "domains": [ - {"domain": "multilingual-v2"}, - {"domain": "general-v3-india-default", "accent": "India"}, - ], - }, - { - "code": "mn", - "domains": [{"domain": "general-v3-mongolia-default", "accent": "Mongolia"}], - }, - { - "code": "mr", - "language": "Marathi", - "domains": [ - {"domain": "multilingual-v2"}, - {"domain": "general-v3-india-default", "accent": "India"}, - ], - }, - { - "code": "ms", - "language": "Malay", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-malaysia-default", "accent": "Malaysia"}, - ], - }, - { - "code": "my", - "language": "Burmese", - "domains": [{"domain": "general-v3-myanmar-default", "accent": "Myanmar"}], - }, - { - "code": "ne", - "language": "Nepali", - "domains": [{"domain": "general-v3-nepal-default", "accent": "Nepal"}], - }, - { - "code": "no", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-norway-default", "accent": "Norway"}, - {"domain": "general-v3-norway-latest_long", "accent": "Norway"}, - ], - }, - { - "code": "pa", - "language": "Punjabi", - "domains": [ - {"domain": "multilingual-v2"}, - {"domain": "general-v3-gurmukhi_india-default", "accent": "Gurmukhi India"}, - ], - }, - { - "code": "pl", - "language": "Polish", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-poland-default", "accent": "Poland"}, - {"domain": "general-v3-poland-latest_long", "accent": "Poland"}, - ], - }, - { - "code": "ro", - "language": "Romanian", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-romania-default", "accent": "Romania"}, - {"domain": "general-v3-romania-latest_long", "accent": "Romania"}, - ], - }, - { - "code": "si", - "domains": [{"domain": "general-v3-sri_lanka-default", "accent": "Sri Lanka"}], - }, - { - "code": "sk", - "language": "Slovak", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-slovakia-default", "accent": "Slovakia"}, - ], - }, - { - "code": "sl", - "language": "Slovenian", - "domains": [{"domain": "general-v3-slovenia-default", "accent": "Slovenia"}], - }, - { - "code": "sq", - "language": "Albanian", - "domains": [{"domain": "general-v3-albania-default", "accent": "Albania"}], - }, - { - "code": "sr", - "language": "Serbian", - "domains": [{"domain": "general-v3-serbia-default", "accent": "Serbia"}], - }, - { - "code": "su", - "language": "Sundanese", - "domains": [{"domain": "general-v3-indonesia-default", "accent": "Indonesia"}], - }, - { - "code": "sw", - "language": "Swahili", - "domains": [ - {"domain": "general-v3-kenya-default", "accent": "Kenya"}, - {"domain": "general-v3-tanzania-default", "accent": "Tanzania"}, - ], - }, - { - "code": "ta", - "language": "Tamil", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-india-default", "accent": "India"}, - {"domain": "general-v3-malaysia-default", "accent": "Malaysia"}, - {"domain": "general-v3-singapore-default", "accent": "Singapore"}, - {"domain": "general-v3-sri_lanka-default", "accent": "Sri Lanka"}, - ], - }, - { - "code": "te", - "language": "Telugu", - "domains": [ - {"domain": "multilingual-v2"}, - {"domain": "general-v3-india-default", "accent": "India"}, - ], - }, - { - "code": "th", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-thailand-default", "accent": "Thailand"}, - {"domain": "general-v3-thailand-latest_long", "accent": "Thailand"}, - ], - }, - { - "code": "ur", - "language": "Urdu", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-india-default", "accent": "India"}, - {"domain": "general-v3-pakistan-default", "accent": "Pakistan"}, - ], - }, - { - "code": "uz", - "language": "Uzbek", - "domains": [ - {"domain": "general-v3-uzbekistan-default", "accent": "Uzbekistan"} - ], - }, - { - "code": "vi", - "language": "Vietnamese", - "domains": [ - {"domain": "multilingual-v1"}, - {"domain": "general-v3-vietnam-default", "accent": "Vietnam"}, - {"domain": "general-v3-vietnam-latest_long", "accent": "Vietnam"}, - ], - }, - { - "code": "zu", - "domains": [ - {"domain": "general-v3-south_africa-default", "accent": "South Africa"} - ], - }, -] - - -def get_domain_language_from_code(lang_code): - if not lang_code: - return None - language = lang_code - if len(lang_code) > 2: - code = lang_code[:2] - language_name = get_language_name_from_code(lang_code) - for domain in supported_domains: - if domain.get("code") == code: - domains = domain.get("domains") - try: - domain_language = next( - filter( - lambda dom: f"({dom.get('accent')}" in language_name, - domains, - ) - ) - if domain_language: - return { - "language": domain.get("code"), - "domain": domain_language.get("domain"), - } - except StopIteration: - pass - else: - for domain in supported_domains: - if domain.get("code") == language: - domain_language = domain.get("domains")[0] - return { - "language": domain.get("code"), - "domain": domain_language.get("domain"), - } diff --git a/edenai_apis/apis/neuralspace/errors.py b/edenai_apis/apis/neuralspace/errors.py deleted file mode 100644 index baf8efb4..00000000 --- a/edenai_apis/apis/neuralspace/errors.py +++ /dev/null @@ -1,15 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInvalidInputTextLengthError, - ProviderNotFoundError, -) - -# NOTE: error messages should be regex patterns -ERRORS: ProviderErrorLists = { - ProviderInvalidInputTextLengthError: [ - r"text supports maximum \d+ characters", - ], - ProviderNotFoundError: [ - r"getaddrinfo ENOTFOUND", - ], -} diff --git a/edenai_apis/apis/neuralspace/info.json b/edenai_apis/apis/neuralspace/info.json deleted file mode 100644 index 40cdc0cc..00000000 --- a/edenai_apis/apis/neuralspace/info.json +++ /dev/null @@ -1,461 +0,0 @@ -{ - "text": { - "named_entity_recognition": { - "constraints": { - "languages": [ - "as", - "bn", - "gu", - "hi", - "kn", - "ml", - "mr", - "ne", - "pa", - "ta", - "te", - "ur", - "my", - "id", - "jv", - "ms", - "su", - "ur", - "vi", - "ar", - "he", - "fa", - "ug", - "hy", - "az", - "zh", - "ka", - "ja", - "kk", - "ky", - "ko", - "ru", - "tl", - "tg", - "tt", - "uz", - "af", - "en", - "fr", - "mg", - "sw", - "yo", - "sq", - "an", - "ba", - "eu", - "be", - "bs", - "br", - "bg", - "ca", - "ce", - "cv", - "hr", - "cs", - "da", - "nl", - "en", - "et", - "fi", - "fr", - "gl", - "de", - "el", - "hu", - "is", - "ga", - "it", - "la", - "lv", - "lt", - "lb", - "mk", - "mt", - "nb", - "oc", - "pl", - "pt", - "ro", - "sr", - "sk", - "sl", - "es", - "sv", - "tr", - "uk", - "cy", - "en", - "ht", - "es" - ] - }, - "version": "v1" - } - }, - "audio": { - "speech_to_text_async": { - "constraints" : { - "languages" : [ - "af", - "af-ZA", - "am", - "am-ET", - "ar", - "ar-AE", - "ar-BH", - "ar-DZ", - "ar-EG", - "ar-IL", - "ar-IQ", - "ar-JO", - "ar-KW", - "ar-LB", - "ar-MA", - "ar-MR", - "ar-PS", - "ar-OM", - "ar-QA", - "ar-SA", - "ar-TN", - "ar-YE", - "az", - "az-AZ", - "bg", - "bg-BG", - "bn", - "bn-BD", - "bn-IN", - "bs", - "ca", - "ca-ES", - "cs", - "da", - "da-DK", - "de", - "de-AT", - "de-CH", - "de-DE", - "el", - "el-GR", - "en", - "en-AU", - "en-CA", - "en-GB", - "en-GH", - "en-HK", - "en-IE", - "en-IN", - "en-KE", - "en-NG", - "en-NZ", - "en-PH", - "en-PK", - "en-SG", - "en-TZ", - "en-US", - "en-ZA", - "es", - "es-AR", - "es-BO", - "es-CL", - "es-CO", - "es-CR", - "es-DO", - "es-EC", - "es-ES", - "es-GT", - "es-HN", - "es-MX", - "es-NI", - "es-PA", - "es-PE", - "es-PR", - "es-PY", - "es-SV", - "es-US", - "es-UY", - "es-VE", - "et", - "et-EE", - "eu", - "eu-ES", - "fa", - "fa-IR", - "fi", - "fi-FI", - "fr", - "fr-BE", - "fr-CA", - "fr-CH", - "fr-FR", - "gl", - "gl-ES", - "gu", - "gu-IN", - "hi", - "hi-IN", - "hr", - "hr-HR", - "hu", - "hu-HU", - "hy", - "hy-AM", - "id", - "id-ID", - "is", - "is-IS", - "it", - "it-CH", - "it-IT", - "ja", - "ja-JP", - "jv", - "jv-ID", - "ka", - "ka-GE", - "kk", - "kk-KZ", - "km", - "km-KH", - "kn", - "kn-IN", - "ko", - "ko-KR", - "lo", - "lo-LA", - "lt", - "lt-LT", - "lv", - "lv-LV", - "mk", - "mk-MK", - "ml", - "ml-IN", - "mn", - "mn-MN", - "mr", - "mr-IN", - "ms", - "ms-MY", - "my", - "my-MM", - "ne", - "ne-NP", - "nl", - "nl-BE", - "nl-NL", - "no", - "no-NO", - "pa", - "pl", - "pl-PL", - "pt", - "pt-BR", - "pt-PT", - "ro", - "ro-RO", - "ru", - "ru-RU", - "si", - "si-LK", - "sk", - "sk-SK", - "sl", - "sl-SI", - "sq", - "sq-AL", - "sr", - "sr-RS", - "su", - "su-ID", - "sv", - "sv-SE", - "sw", - "sw-KE", - "sw-TZ", - "ta", - "ta-IN", - "ta-LK", - "ta-MY", - "ta-SG", - "te", - "te-IN", - "th", - "th-TH", - "tr", - "tr-TR", - "uk", - "uk-UA", - "ur", - "ur-IN", - "ur-PK", - "uz", - "uz-UZ", - "vi", - "vi-VN", - "zu", - "zu-ZA", - "zh" - ], - "file_extensions": [ - "mp3", - "wav" - ] - }, - "version": "v1" - } - }, - "translation": { - "automatic_translation": { - "constraints": { - "languages": [ - "as", - "bn", - "gu", - "hi", - "kn", - "ml", - "mr", - "ne", - "or", - "pa", - "sd", - "si", - "ta", - "te", - "ur", - "my", - "ceb", - "dv", - "hmn", - "id", - "jv", - "km", - "ms", - "lo", - "su", - "tl", - "th", - "ur", - "vi", - "ar", - "he", - "ps", - "fa", - "ug", - "tk", - "hy", - "az", - "zh-CN", - "zh-TW", - "ka", - "ja", - "kk", - "ky", - "ko", - "ku", - "ky", - "mn", - "ru", - "tl", - "tg", - "tt", - "uz", - "af", - "am", - "bm", - "fr", - "ha", - "ig", - "rw", - "ln", - "mg", - "ny", - "om", - "st", - "sh", - "so", - "sw", - "ti", - "ts", - "tw", - "xh", - "yo", - "zu", - "sq", - "an", - "ba", - "eu", - "be", - "bs", - "br", - "bg", - "ca", - "ce", - "cv", - "co", - "hr", - "cs", - "da", - "nl", - "en", - "eo", - "et", - "fi", - "fr", - "fy", - "gl", - "de", - "el", - "hu", - "is", - "ga", - "it", - "la", - "lv", - "lt", - "lb", - "mk", - "mt", - "nb", - "oc", - "pl", - "pt", - "ro", - "gd", - "sr", - "sk", - "sl", - "es", - "sv", - "tr", - "uk", - "cy", - "yi", - "ay", - "nl", - "fr", - "gn", - "ht", - "haw", - "pt", - "qu", - "sm", - "es", - "yi", - "mi" - ] - }, - "version": "v1" - }, - "language_detection": { - "version": "v1" - } - } -} diff --git a/edenai_apis/apis/neuralspace/neuralspace_api.py b/edenai_apis/apis/neuralspace/neuralspace_api.py deleted file mode 100644 index d8fd7e8d..00000000 --- a/edenai_apis/apis/neuralspace/neuralspace_api.py +++ /dev/null @@ -1,259 +0,0 @@ -import json -from http import HTTPStatus -from typing import Dict, List, Optional, Sequence, Any -from edenai_apis.utils.parsing import extract - -import requests - -from edenai_apis.features import ProviderInterface, TextInterface, TranslationInterface -from edenai_apis.features.audio.speech_to_text_async import ( - SpeechToTextAsyncDataClass, - SpeechDiarization, -) -from edenai_apis.features.text import ( - InfosNamedEntityRecognitionDataClass, - NamedEntityRecognitionDataClass, -) -from edenai_apis.features.translation import ( - AutomaticTranslationDataClass, - LanguageDetectionDataClass, - InfosLanguageDetectionDataClass, -) -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from edenai_apis.utils.exception import ( - AsyncJobException, - AsyncJobExceptionReason, - ProviderException, -) -from edenai_apis.utils.languages import get_language_name_from_code -from edenai_apis.utils.types import ( - AsyncBaseResponseType, - AsyncPendingResponseType, - AsyncResponseType, - AsyncLaunchJobResponseType, - ResponseType, -) -from .config import get_domain_language_from_code - - -class NeuralSpaceApi(ProviderInterface, TextInterface, TranslationInterface): - provider_name = "neuralspace" - - def __init__(self, api_keys: Optional[Dict[str, Any]] = None) -> None: - self.api_settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys or {} - ) - self.api_key = self.api_settings["api"] - self.url = "https://platform.neuralspace.ai/api/" - self.header = { - "authorization": f"{self.api_key}", - "Content-Type": "application/json", - "Accept": "application/json", - } - - def text__named_entity_recognition( - self, language: str, text: str - ) -> ResponseType[NamedEntityRecognitionDataClass]: - url = f"{self.url}ner/v1/entity" - - files = {"text": text, "language": language} - - response = requests.request("POST", url, json=files, headers=self.header) - - try: - original_response = response.json() - except json.JSONDecodeError as exc: - raise ProviderException(message="Internal Server Error", code=500) from exc - - if response.status_code != 200: - if not original_response.get("success"): - raise ProviderException( - original_response.get("message"), code=response.status_code - ) - - data = original_response.get("data") or {} - - items: List[InfosNamedEntityRecognitionDataClass] = [] - - if len(data["entities"]) > 0: - for entity in data["entities"]: - text = entity["text"] - if entity["type"] == "time": - category = "DATE" - else: - category = entity["type"].upper() - - items.append( - InfosNamedEntityRecognitionDataClass( - entity=text, - importance=None, - category=category.replace("-", ""), - ) - ) - - standardized_response = NamedEntityRecognitionDataClass(items=items) - - return ResponseType[NamedEntityRecognitionDataClass]( - original_response=data, standardized_response=standardized_response - ) - - def translation__automatic_translation( - self, source_language: str, target_language: str, text: str - ) -> ResponseType[AutomaticTranslationDataClass]: - url = f"{self.url}translation/v1/translate" - - files = { - "text": text, - "sourceLanguage": source_language, - "targetLanguage": target_language, - } - - response = requests.request("POST", url, json=files, headers=self.header) - try: - original_response = response.json() - except json.JSONDecodeError as exc: - raise ProviderException(message="Internal Server Error", code=500) from exc - - data = original_response.get("data") or {} - - if original_response.get("success", False) is False: - raise ProviderException(data.get("error"), code=response.status_code) - - standardized_response = AutomaticTranslationDataClass( - text=data["translatedText"] - ) - - return ResponseType[AutomaticTranslationDataClass]( - original_response=data, standardized_response=standardized_response - ) - - def translation__language_detection( - self, text: str - ) -> ResponseType[LanguageDetectionDataClass]: - url = f"{self.url}language-detection/v1/detect" - files = {"text": text} - - response = requests.request("POST", url, json=files, headers=self.header) - - original_response = response.json() - if response.status_code != 200: - raise ProviderException( - message=original_response.get("data", {}).get("error"), - code=response.status_code, - ) - - items: Sequence[InfosLanguageDetectionDataClass] = [] - for lang in original_response["data"]["detected_languages"]: - confidence = float(lang["confidence"]) - if confidence > 0.1: - items.append( - InfosLanguageDetectionDataClass( - language=lang["language"], - display_name=get_language_name_from_code( - isocode=lang["language"] - ), - confidence=confidence, - ) - ) - return ResponseType[LanguageDetectionDataClass]( - original_response=original_response, - standardized_response=LanguageDetectionDataClass(items=items), - ) - - def audio__speech_to_text_async__launch_job( - self, - file: str, - language: str, - speakers: int, - profanity_filter: bool, - vocabulary: Optional[List[str]], - audio_attributes: tuple, - model: Optional[str] = None, - file_url: str = "", - provider_params: Optional[dict] = None, - ) -> AsyncLaunchJobResponseType: - provider_params = provider_params or {} - export_format, channels, frame_rate = audio_attributes - - url_file_upload = f"{self.url}file/upload" - url_file_transcribe = f"{self.url}transcription/v1/file/transcribe" - # first, upload file - headers = {"Authorization": f"{self.api_key}"} - with open(file, "rb") as file_: - files = {"files": file_} - response = requests.post(url=url_file_upload, headers=headers, files=files) - - if response.status_code != 200: - raise ProviderException( - "Failed to upload file for transcription", response.status_code - ) - - original_response = response.json() - fileId = original_response.get("data").get("fileId") - - # then, call spech to text api - language_domain = get_domain_language_from_code(language) - payload = {"fileId": fileId} - - if language_domain: - payload.update( - { - "language": language_domain.get("language"), - "domain": language_domain.get("domain"), - } - ) - payload.update(provider_params) - - response = requests.post(url=url_file_transcribe, headers=headers, data=payload) - - if response.status_code != 201: - status = response.status_code - message = HTTPStatus(status).phrase - try: - data = response.json() - message = extract(data, ["data", "error"], fallback=message) - except requests.JSONDecodeError: - pass - raise ProviderException(message, code=status) - - original_response = response.json() - transcribeId = original_response.get("data").get("transcribeId") - return AsyncLaunchJobResponseType(provider_job_id=transcribeId) - - def audio__speech_to_text_async__get_job_result( - self, provider_job_id: str - ) -> AsyncBaseResponseType[SpeechToTextAsyncDataClass]: - url_transcribe = f"{self.url}transcription/v1/single/transcription?transcribeId={provider_job_id}" - headers = {"Authorization": f"{self.api_key}"} - - response = requests.get(url=url_transcribe, headers=headers) - - status_code = response.status_code - if status_code != 200: - data = response.json().get("data") or {} - # two message possible - # ref: https://docs.neuralspace.ai/speech-to-text/transcribe-file - error = response.json().get("message") or data.get("message") - if "Invalid transcribeId" in error: - raise AsyncJobException( - reason=AsyncJobExceptionReason.DEPRECATED_JOB_ID, code=status_code - ) - raise ProviderException(error, code=status_code) - - diarization = SpeechDiarization(total_speakers=0, entries=[]) - original_response = response.json() - status = original_response.get("data").get("transcriptionStatus") - if status != "Completed": - return AsyncPendingResponseType[SpeechToTextAsyncDataClass]( - provider_job_id=provider_job_id - ) - - return AsyncResponseType[SpeechToTextAsyncDataClass]( - original_response=original_response, - standardized_response=SpeechToTextAsyncDataClass( - text=original_response.get("data").get("transcripts"), - diarization=diarization, - ), - provider_job_id=provider_job_id, - ) diff --git a/edenai_apis/apis/neuralspace/outputs/audio/speech_to_text_async_output.json b/edenai_apis/apis/neuralspace/outputs/audio/speech_to_text_async_output.json deleted file mode 100644 index 104f782b..00000000 --- a/edenai_apis/apis/neuralspace/outputs/audio/speech_to_text_async_output.json +++ /dev/null @@ -1,127 +0,0 @@ -{ - "status": "succeeded", - "provider_job_id": "fb32e730-3b9a-42fe-9ac6-69c5e8ff088e", - "original_response": { - "success": true, - "message": "Data fetched succssfully", - "data": { - "fileId": "83cdf1d7-3db2-4eb1-8220-d6420c65c78c", - "language": "en", - "transcribeId": "fb32e730-3b9a-42fe-9ac6-69c5e8ff088e", - "fileName": "conversation.mp3", - "transcriptionStatus": "Completed", - "transcriptionProgress": [ - "Queued", - "Loading Model", - "Model Loaded", - "Preparing File", - "Transcribing", - "Transcribed", - "Uploading Transcript", - "Transcript Uploaded", - "Updating Result", - "Result Updated", - "Completed" - ], - "apikey": "e4a25e0d-780f-4747-85a2-3df1cd2bacc0", - "appType": "transcription", - "duration": 17, - "fileSize": 582786, - "domain": "general-v3-united_states-default", - "suburl": "en-US-default-v3-16", - "message": "Transcription completed successfully", - "createAt": 1671203121757, - "transcribingTime": 7.730082, - "timestamp": [ - { - "start": 0, - "end": 0.5, - "conf": 0.987629, - "word": "Unit" - }, - { - "start": 0.5, - "end": 0.9, - "conf": 0.903686, - "word": "1" - }, - { - "start": 0.9, - "end": 1.8, - "conf": 0.987629, - "word": "page" - }, - { - "start": 1.8, - "end": 2.6, - "conf": 0.927603, - "word": "14." - }, - { - "start": 2.6, - "end": 3.7, - "conf": 0.956043, - "word": "Real" - }, - { - "start": 3.7, - "end": 4.7, - "conf": 0.971582, - "word": "conversations." - }, - { - "start": 6.7, - "end": 7.2, - "conf": 0.959612, - "word": "Hello." - }, - { - "start": 10.8, - "end": 11.7, - "conf": 0.813165, - "word": "I'm" - }, - { - "start": 11.7, - "end": 12.2, - "conf": 0.864487, - "word": "Chihiro" - }, - { - "start": 12.2, - "end": 13, - "conf": 1, - "word": "nice" - }, - { - "start": 13, - "end": 13.2, - "conf": 0.935028, - "word": "to" - }, - { - "start": 13.2, - "end": 13.4, - "conf": 0.987629, - "word": "meet" - }, - { - "start": 13.4, - "end": 16, - "conf": 0.886184, - "word": "you." - } - ], - "transcripts": "Unit 1 page 14. Real conversations. Hello. I'm Chihiro nice to meet you.", - "publicUrl": "https://platformlargefilestore.blob.core.windows.net/common/uploads/83cdf1d7-3db2-4eb1-8220-d6420c65c78c" - } - }, - "standardized_response": { - "text": "Unit 1 page 14. Real conversations. Hello. I'm Chihiro nice to meet you.", - "diarization": { - "total_speakers": 0, - "entries": [], - "error_message": null - } - } -} \ No newline at end of file diff --git a/edenai_apis/apis/neuralspace/outputs/text/named_entity_recognition_output.json b/edenai_apis/apis/neuralspace/outputs/text/named_entity_recognition_output.json deleted file mode 100644 index 306c0398..00000000 --- a/edenai_apis/apis/neuralspace/outputs/text/named_entity_recognition_output.json +++ /dev/null @@ -1,185 +0,0 @@ -{ - "original_response": { - "text": "Barack Hussein Obama is an American politician who served as the 44th president of the United States from 2009 to 2017. A member of the Democratic Party, Obama was the first African-American president of the United States. He previously served as a U.S. senator from Illinois from 2005 to 2008 and as an Illinois state senator from 1997 to 2004.", - "entities": [ - { - "start_idx": 0, - "end_idx": 20, - "text": "Barack Hussein Obama", - "type": "person", - "value": "Barack Hussein Obama" - }, - { - "start_idx": 27, - "end_idx": 35, - "text": "American", - "type": "norp", - "value": "American" - }, - { - "start_idx": 65, - "end_idx": 69, - "text": "44th", - "type": "ordinal", - "value": "44th" - }, - { - "start_idx": 83, - "end_idx": 100, - "text": "the United States", - "type": "geo-political-entities", - "value": "the United States" - }, - { - "start_idx": 106, - "end_idx": 110, - "text": "2009", - "type": "date", - "value": "2009" - }, - { - "start_idx": 65, - "end_idx": 69, - "text": "44th", - "type": "ordinal", - "value": "44" - }, - { - "start_idx": 101, - "end_idx": 118, - "text": "from 2009 to 2017", - "type": "money", - "value": { - "to": 2017, - "from": 2009 - } - }, - { - "start_idx": 101, - "end_idx": 118, - "text": "from 2009 to 2017", - "type": "time", - "value": { - "to": null, - "from": "2009-01-01T00:00:00.000-08:00" - } - }, - { - "start_idx": 164, - "end_idx": 173, - "text": "the first", - "type": "time", - "value": "2022-12-01T00:00:00.000-08:00" - }, - { - "start_idx": 276, - "end_idx": 293, - "text": "from 2005 to 2008", - "type": "money", - "value": { - "to": 2008, - "from": 2005 - } - }, - { - "start_idx": 276, - "end_idx": 293, - "text": "from 2005 to 2008", - "type": "time", - "value": { - "to": null, - "from": "2005-01-01T00:00:00.000-08:00" - } - }, - { - "start_idx": 327, - "end_idx": 344, - "text": "from 1997 to 2004", - "type": "money", - "value": { - "to": 2004, - "from": 1997 - } - }, - { - "start_idx": 327, - "end_idx": 344, - "text": "from 1997 to 2004", - "type": "time", - "value": { - "to": null, - "from": "1997-01-01T00:00:00.000-08:00" - } - } - ] - }, - "standardized_response": { - "items": [ - { - "entity": "Barack Hussein Obama", - "category": "PERSON", - "importance": null - }, - { - "entity": "American", - "category": "NORP", - "importance": null - }, - { - "entity": "44th", - "category": "ORDINAL", - "importance": null - }, - { - "entity": "the United States", - "category": "GEOPOLITICALENTITIES", - "importance": null - }, - { - "entity": "2009", - "category": "DATE", - "importance": null - }, - { - "entity": "44th", - "category": "ORDINAL", - "importance": null - }, - { - "entity": "from 2009 to 2017", - "category": "MONEY", - "importance": null - }, - { - "entity": "from 2009 to 2017", - "category": "DATE", - "importance": null - }, - { - "entity": "the first", - "category": "DATE", - "importance": null - }, - { - "entity": "from 2005 to 2008", - "category": "MONEY", - "importance": null - }, - { - "entity": "from 2005 to 2008", - "category": "DATE", - "importance": null - }, - { - "entity": "from 1997 to 2004", - "category": "MONEY", - "importance": null - }, - { - "entity": "from 1997 to 2004", - "category": "DATE", - "importance": null - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/neuralspace/outputs/translation/automatic_translation_output.json b/edenai_apis/apis/neuralspace/outputs/translation/automatic_translation_output.json deleted file mode 100644 index dda471b6..00000000 --- a/edenai_apis/apis/neuralspace/outputs/translation/automatic_translation_output.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "original_response": { - "text": "\u4eba\u5de5\u667a\u80fd \u4ea6\u7a31\u667a\u68b0\u3001\u6a5f\u5668\u667a\u80fd\uff0c\u6307\u7531\u4eba\u88fd\u9020\u51fa\u4f86\u7684\u6a5f\u5668\u6240\u8868\u73fe\u51fa\u4f86\u7684\u667a\u6167\u3002\u901a\u5e38\u4eba\u5de5\u667a\u80fd\u662f\u6307\u901a\u8fc7\u666e\u901a\u96fb\u8166\u7a0b\u5f0f\u4f86\u5448\u73fe\u4eba\u985e\u667a\u80fd\u7684\u6280\u8853\u3002\u8a72\u8a5e\u4e5f\u6307\u51fa\u7814\u7a76\u9019\u6a23\u7684\u667a\u80fd\u7cfb\u7d71\u662f\u5426\u80fd\u5920\u5be6\u73fe\uff0c\u4ee5\u53ca\u5982\u4f55\u5be6\u73fe\u3002\u540c\u65f6\uff0c\u901a\u904e\u91ab\u5b78\u3001\u795e\u7d93\u79d1\u5b78\u3001\u6a5f\u5668\u4eba\u5b78\u53ca\u7d71\u8a08\u5b78\u7b49\u7684\u9032\u6b65\uff0c\u5e38\u614b\u9810\u6e2c\u5247\u8a8d\u70ba\u4eba\u985e\u7684\u5f88\u591a\u8077\u696d\u4e5f\u9010\u6f38\u88ab\u5176\u53d6\u4ee3", - "translatedText": "Artificial intelligence, also known as omniscient and machine intelligence, refers to the wisdom expressed by machines made by humans. Usually artificial intelligence refers to the technology that presents human intelligence through ordinary computer programs. The term also points to research into whether and how such intelligent systems can be realized. At the same time, through advances in medicine, neuroscience, robotics, and statistics, the norm predicts that many human occupations are gradually being replaced by them.", - "suggestions": [ - "Artificial intelligence, also known as omniscient and machine intelligence, refers to the wisdom expressed by machines made by humans. Usually artificial intelligence refers to the technology that presents human intelligence through ordinary computer programs. The term also points to research into whether and how such intelligent systems can be realized. At the same time, through advances in medicine, neuroscience, robotics, and statistics, the norm predicts that many human occupations are gradually being replaced by them." - ] - }, - "standardized_response": { - "text": "Artificial intelligence, also known as omniscient and machine intelligence, refers to the wisdom expressed by machines made by humans. Usually artificial intelligence refers to the technology that presents human intelligence through ordinary computer programs. The term also points to research into whether and how such intelligent systems can be realized. At the same time, through advances in medicine, neuroscience, robotics, and statistics, the norm predicts that many human occupations are gradually being replaced by them." - } -} \ No newline at end of file diff --git a/edenai_apis/apis/neuralspace/outputs/translation/language_detection_output.json b/edenai_apis/apis/neuralspace/outputs/translation/language_detection_output.json deleted file mode 100644 index 7107b1e9..00000000 --- a/edenai_apis/apis/neuralspace/outputs/translation/language_detection_output.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "original_response": { - "success": true, - "message": "Data fetched succssfully", - "data": { - "text": "Ogni individuo ha diritto all'istruzione. L'istruzione deve essere gratuita almeno per quanto riguarda le classi elementari e fondamentali. L'istruzione elementare deve essere obbligatoria. L'istruzione tecnica e professionale deve essere messa alla portata di tutti e l'istruzione superiore deve essere egualmente accessibile a tutti sulla base del merito.\nL'istruzione deve essere indirizzata al pieno sviluppo della personalit\u00e0 umana ed al rafforzamento del rispetto dei diritti umani e delle libert\u00e0 fondamentali. Essa deve promuovere la comprensione, la tolleranza, l'amicizia fra tutte le Nazioni, i gruppi razziali e religiosi, e deve favorire l'opera delle Nazioni Unite per il mantenimento della pace.\nI genitori hanno diritto di priorit\u00e0 nella scelta del genere di istruzione da impartire ai loro figli.", - "detected_languages": [ - { - "language": "it", - "confidence": "0.9916812777519226" - }, - { - "language": "en", - "confidence": "0.001273233094252646" - }, - { - "language": "fr", - "confidence": "0.0009758637752383947" - }, - { - "language": "es", - "confidence": "0.0007690886850468814" - }, - { - "language": "ia", - "confidence": "0.0005468289600685239" - } - ] - } - }, - "standardized_response": { - "items": [ - { - "language": "it", - "display_name": "Italian", - "confidence": 0.9916812777519226 - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/__init__.py b/edenai_apis/apis/nlpcloud/__init__.py deleted file mode 100644 index 176147a6..00000000 --- a/edenai_apis/apis/nlpcloud/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .nlpcloud_api import NlpCloudApi diff --git a/edenai_apis/apis/nlpcloud/errors.py b/edenai_apis/apis/nlpcloud/errors.py deleted file mode 100644 index aba846d1..00000000 --- a/edenai_apis/apis/nlpcloud/errors.py +++ /dev/null @@ -1,8 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInvalidInputPayloadSize, -) - -ERRORS: ProviderErrorLists = { - ProviderInvalidInputPayloadSize: [r"Request Entity Too Large"] -} diff --git a/edenai_apis/apis/nlpcloud/info.json b/edenai_apis/apis/nlpcloud/info.json deleted file mode 100644 index c107c26a..00000000 --- a/edenai_apis/apis/nlpcloud/info.json +++ /dev/null @@ -1,766 +0,0 @@ -{ - "text": { - "spell_check": { - "version": "v1", - "constraints": { - "languages": [ - "en", - "ace", - "acm", - "acq", - "aeb", - "af", - "ajp", - "ak", - "am", - "apc", - "ar-001", - "ars", - "ary", - "arz", - "as", - "ast", - "awa", - "ayr", - "azb", - "azj", - "ba", - "bm", - "ban", - "be", - "bem", - "bn", - "bho", - "bjn", - "bo", - "bs", - "bug", - "bg", - "ca", - "ceb", - "cs", - "cjk", - "ckb", - "crh", - "cy", - "da", - "de", - "dik", - "dyu", - "dz", - "el", - "eo", - "et", - "eu", - "ee", - "fo", - "fj", - "fi", - "fon", - "fr", - "fur", - "fuv", - "gd", - "ga", - "gl", - "gn", - "gu", - "ht", - "ha", - "he", - "hi", - "hne", - "hr", - "hu", - "hy", - "ig", - "ilo", - "id", - "is", - "it", - "jv", - "ja", - "kab", - "kac", - "kam", - "kn", - "ks", - "ks", - "ka", - "knc", - "knc", - "kk", - "kbp", - "kea", - "km", - "ki", - "rw", - "ky", - "kmb", - "kmr", - "kg", - "ko", - "lo", - "lij", - "li", - "ln", - "lt", - "lmo", - "ltg", - "lb", - "lu", - "lg", - "luo", - "lus", - "lvs", - "mag", - "mai", - "ml", - "mr", - "min", - "mk", - "plt", - "mt", - "mni", - "khk", - "mos", - "mi", - "my", - "nl", - "nn", - "nb", - "ne", - "nso", - "nus", - "ny", - "oc", - "gaz", - "or", - "pag", - "pa", - "pap", - "fa", - "pl", - "pt", - "fa-AF", - "pbt", - "quy", - "ro", - "rn", - "ru", - "sg", - "sa", - "sat", - "scn", - "shn", - "si", - "sk", - "sl", - "sm", - "sn", - "sd", - "so", - "st", - "es", - "als", - "sc", - "sr", - "ss", - "su", - "sv", - "sw", - "szl", - "ta", - "tt", - "te", - "tg", - "tl", - "th", - "ti", - "tmh", - "tmh", - "tpi", - "tn", - "ts", - "tk", - "tum", - "tr", - "tw", - "tzm", - "ug", - "uk", - "umb", - "ur", - "uzn", - "vec", - "vi", - "war", - "wo", - "xh", - "ydd", - "yo", - "yue", - "zh", - "zh-Hant", - "zsm", - "zu" - ] - } - }, - "keyword_extraction": { - "version": "v1", - "constraints": { - "languages": [ - "en", - "ace", - "acm", - "acq", - "aeb", - "af", - "ajp", - "ak", - "am", - "apc", - "ar-001", - "ars", - "ary", - "arz", - "as", - "ast", - "awa", - "ayr", - "azb", - "azj", - "ba", - "bm", - "ban", - "be", - "bem", - "bn", - "bho", - "bjn", - "bo", - "bs", - "bug", - "bg", - "ca", - "ceb", - "cs", - "cjk", - "ckb", - "crh", - "cy", - "da", - "de", - "dik", - "dyu", - "dz", - "el", - "eo", - "et", - "eu", - "ee", - "fo", - "fj", - "fi", - "fon", - "fr", - "fur", - "fuv", - "gd", - "ga", - "gl", - "gn", - "gu", - "ht", - "ha", - "he", - "hi", - "hne", - "hr", - "hu", - "hy", - "ig", - "ilo", - "id", - "is", - "it", - "jv", - "ja", - "kab", - "kac", - "kam", - "kn", - "ks", - "ks", - "ka", - "knc", - "knc", - "kk", - "kbp", - "kea", - "km", - "ki", - "rw", - "ky", - "kmb", - "kmr", - "kg", - "ko", - "lo", - "lij", - "li", - "ln", - "lt", - "lmo", - "ltg", - "lb", - "lu", - "lg", - "luo", - "lus", - "lvs", - "mag", - "mai", - "ml", - "mr", - "min", - "mk", - "plt", - "mt", - "mni", - "khk", - "mos", - "mi", - "my", - "nl", - "nn", - "nb", - "ne", - "nso", - "nus", - "ny", - "oc", - "gaz", - "or", - "pag", - "pa", - "pap", - "fa", - "pl", - "pt", - "fa-AF", - "pbt", - "quy", - "ro", - "rn", - "ru", - "sg", - "sa", - "sat", - "scn", - "shn", - "si", - "sk", - "sl", - "sm", - "sn", - "sd", - "so", - "st", - "es", - "als", - "sc", - "sr", - "ss", - "su", - "sv", - "sw", - "szl", - "ta", - "tt", - "te", - "tg", - "tl", - "th", - "ti", - "tmh", - "tmh", - "tpi", - "tn", - "ts", - "tk", - "tum", - "tr", - "tw", - "tzm", - "ug", - "uk", - "umb", - "ur", - "uzn", - "vec", - "vi", - "war", - "wo", - "xh", - "ydd", - "yo", - "yue", - "zh", - "zh-Hant", - "zsm", - "zu" - ] - } - }, - "sentiment_analysis": { - "version": "v1", - "constraints": { - "languages": [ - "en" - ] - } - }, - "code_generation": { - "version": "v1", - "constraints": { - "languages": [ - "en", - "ace", - "acm", - "acq", - "aeb", - "af", - "ajp", - "ak", - "am", - "apc", - "ar-001", - "ars", - "ary", - "arz", - "as", - "ast", - "awa", - "ayr", - "azb", - "azj", - "ba", - "bm", - "ban", - "be", - "bem", - "bn", - "bho", - "bjn", - "bo", - "bs", - "bug", - "bg", - "ca", - "ceb", - "cs", - "cjk", - "ckb", - "crh", - "cy", - "da", - "de", - "dik", - "dyu", - "dz", - "el", - "eo", - "et", - "eu", - "ee", - "fo", - "fj", - "fi", - "fon", - "fr", - "fur", - "fuv", - "gd", - "ga", - "gl", - "gn", - "gu", - "ht", - "ha", - "he", - "hi", - "hne", - "hr", - "hu", - "hy", - "ig", - "ilo", - "id", - "is", - "it", - "jv", - "ja", - "kab", - "kac", - "kam", - "kn", - "ks", - "ks", - "ka", - "knc", - "knc", - "kk", - "kbp", - "kea", - "km", - "ki", - "rw", - "ky", - "kmb", - "kmr", - "kg", - "ko", - "lo", - "lij", - "li", - "ln", - "lt", - "lmo", - "ltg", - "lb", - "lu", - "lg", - "luo", - "lus", - "lvs", - "mag", - "mai", - "ml", - "mr", - "min", - "mk", - "plt", - "mt", - "mni", - "khk", - "mos", - "mi", - "my", - "nl", - "nn", - "nb", - "ne", - "nso", - "nus", - "ny", - "oc", - "gaz", - "or", - "pag", - "pa", - "pap", - "fa", - "pl", - "pt", - "fa-AF", - "pbt", - "quy", - "ro", - "rn", - "ru", - "sg", - "sa", - "sat", - "scn", - "shn", - "si", - "sk", - "sl", - "sm", - "sn", - "sd", - "so", - "st", - "es", - "als", - "sc", - "sr", - "ss", - "su", - "sv", - "sw", - "szl", - "ta", - "tt", - "te", - "tg", - "tl", - "th", - "ti", - "tmh", - "tmh", - "tpi", - "tn", - "ts", - "tk", - "tum", - "tr", - "tw", - "tzm", - "ug", - "uk", - "umb", - "ur", - "uzn", - "vec", - "vi", - "war", - "wo", - "xh", - "ydd", - "yo", - "yue", - "zh", - "zh-Hant", - "zsm", - "zu" - ] - } - }, - "named_entity_recognition": { - "version": "v1", - "constraints": { - "languages": [ - "en", - "ja", - "fr", - "zh", - "da", - "nl", - "de", - "el", - "it", - "lt", - "nb", - "pl", - "pt", - "ro", - "es" - ] - } - }, - "emotion_detection": { - "version": "v1", - "constraints": { - } - }, - "summarize": { - "version": "v1", - "constraints": { - "models": [ - "bart-large-cnn", - "fast-gpt-j", - "chatdolphin", - "finetuned-llama-2-70b" - ], - "default_model":"finetuned-llama-2-70b", - "languages": [ - "en", - "ar", - "hy", - "awa", - "az", - "ba", - "eu", - "be", - "bn", - "bho", - "bs", - "pt-BR", - "bg", - "yue", - "ca", - "ca", - "cs", - "da", - "doi", - "nl", - "en", - "et", - "fo", - "fi", - "fr", - "gl", - "ka", - "de", - "el", - "gu", - "ha", - "hi", - "hu", - "id", - "ga", - "it", - "ja", - "jv", - "kn", - "ks", - "kk", - "kok", - "km", - "ko", - "ku", - "ky", - "lv", - "lt", - "mk", - "mai", - "ms", - "mt", - "mr", - "nan", - "mo", - "mn", - "me", - "ne", - "no", - "or", - "ps", - "fa", - "pl", - "pt", - "pa", - "ra", - "ro", - "ru", - "sa", - "sat", - "scn", - "shn", - "si", - "sk", - "sl", - "sl", - "es", - "sw", - "sv", - "tg", - "ta", - "tt", - "te", - "th", - "tr", - "tk", - "uk", - "ur", - "uz", - "vi", - "cy", - "wuu" - ] - } - } - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/nlpcloud_api.py b/edenai_apis/apis/nlpcloud/nlpcloud_api.py deleted file mode 100644 index bbee67a3..00000000 --- a/edenai_apis/apis/nlpcloud/nlpcloud_api.py +++ /dev/null @@ -1,231 +0,0 @@ -from typing import Dict, Sequence, Optional, List - -import requests - -from edenai_apis.apis.nlpcloud.utils import Iso_to_code -from edenai_apis.features import ProviderInterface, TextInterface -from edenai_apis.features.text import ( - KeywordExtractionDataClass, - InfosKeywordExtractionDataClass, - SentimentAnalysisDataClass, - SegmentSentimentAnalysisDataClass, - CodeGenerationDataClass, - NamedEntityRecognitionDataClass, - InfosNamedEntityRecognitionDataClass, - EmotionDetectionDataClass, - EmotionItem, - EmotionEnum, - SummarizeDataClass, -) -from edenai_apis.features.text.spell_check import ( - SpellCheckDataClass, - SpellCheckItem, - SuggestionItem, -) -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from edenai_apis.utils.exception import ProviderException -from edenai_apis.utils.types import ResponseType - - -class NlpCloudApi(ProviderInterface, TextInterface): - provider_name = "nlpcloud" - - def __init__(self, api_keys: Optional[Dict] = None): - self.api_settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys or {} - ) - self.api_key = self.api_settings["subscription_key"] - - self.url = { - "basic": "https://api.nlpcloud.io/v1/", - "spell_check": "https://api.nlpcloud.io/v1/gpu/finetuned-llama-2-70b/gs-correction", - "keyword_extraction": "https://api.nlpcloud.io/v1/gpu/finetuned-llama-2-70b/kw-kp-extraction", - "sentiment_analysis": "https://api.nlpcloud.io/v1/distilbert-base-uncased-finetuned-sst-2-english/sentiment", - "code_generation": "https://api.nlpcloud.io/v1/gpu/finetuned-llama-2-70b/code-generation", - "emotion_detection": "https://api.nlpcloud.io/v1/distilbert-base-uncased-emotion/sentiment", - } - - self.headers = { - "Content-Type": "application/json", - "authorization": f"Token {self.api_key}", - } - - def text__spell_check( - self, text: str, language: str - ) -> ResponseType[SpellCheckDataClass]: - if language == "en": - url = self.url["spell_check"] - else: - url = f"{self.url['basic']}gpu/{Iso_to_code.get(language)}/finetuned-llama-2-70b/gs-correction" - - response = requests.post( - url=url, - json={"text": text}, - headers=self.headers, - ) - - if response.status_code != 200: - raise ProviderException(response.text, code=response.status_code) - - original_response = response.json() - data = original_response["correction"] - items: Sequence[SpellCheckItem] = [ - SpellCheckItem( - text=text, - offset=0, - length=len(data), - suggestions=[SuggestionItem(suggestion=data, score=None)], - type=None, - ) - ] - return ResponseType[SpellCheckDataClass]( - original_response=original_response, - standardized_response=SpellCheckDataClass(text=text, items=items), - ) - - def text__keyword_extraction( - self, language: str, text: str - ) -> ResponseType[KeywordExtractionDataClass]: - if language == "en": - url = self.url["keyword_extraction"] - else: - url = ( - self.url["basic"] - + f"gpu/{Iso_to_code.get(language)}/finetuned-llama-2-70b/kw-kp-extraction" - ) - response = requests.post( - url=url, - json={"text": text}, - headers=self.headers, - ) - if response.status_code != 200: - raise ProviderException(response.text, code=response.status_code) - original_response = response.json() - items: List[InfosKeywordExtractionDataClass] = [] - for keyword in original_response["keywords_and_keyphrases"]: - items.append( - InfosKeywordExtractionDataClass(keyword=keyword, importance=None) - ) - return ResponseType[KeywordExtractionDataClass]( - original_response=original_response, - standardized_response=KeywordExtractionDataClass(items=items), - ) - - def text__sentiment_analysis( - self, language: str, text: str - ) -> ResponseType[SentimentAnalysisDataClass]: - response = requests.post( - url=self.url["sentiment_analysis"], - json={"text": text}, - headers=self.headers, - ) - if response.status_code != 200: - raise ProviderException(response.text, code=response.status_code) - original_response = response.json() - items: Sequence[SegmentSentimentAnalysisDataClass] = [] - standardized_response = SentimentAnalysisDataClass( - general_sentiment=original_response["scored_labels"][0]["label"], - general_sentiment_rate=float( - abs(original_response["scored_labels"][0]["score"]) - ), - items=items, - ) - return ResponseType[SentimentAnalysisDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - - def text__code_generation( - self, instruction: str, temperature: float, max_tokens: int, prompt: str = "" - ) -> ResponseType[CodeGenerationDataClass]: - response = requests.post( - url=self.url["code_generation"], - json={"instruction": instruction}, - headers=self.headers, - ) - if response.status_code != 200: - raise ProviderException(response.text, code=response.status_code) - original_response = response.json() - standardized_response = CodeGenerationDataClass( - generated_text=original_response["generated_code"] - ) - return ResponseType[CodeGenerationDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - - def text__named_entity_recognition( - self, language: str, text: str - ) -> ResponseType[NamedEntityRecognitionDataClass]: - url_model = "news" - if language == "en" or language == "zh": - url_model = "web" - url = self.url["basic"] + f"{language}_core_{url_model}_lg/entities" - response = requests.post( - url=url, - json={"text": text}, - headers=self.headers, - ) - if response.status_code != 200: - raise ProviderException(response.text, code=response.status_code) - original_response = response.json() - items: Sequence[InfosNamedEntityRecognitionDataClass] = [] - for entity in original_response["entities"]: - items.append( - InfosNamedEntityRecognitionDataClass( - entity=entity["text"], category=entity["type"], importance=None - ) - ) - return ResponseType[NamedEntityRecognitionDataClass]( - original_response=original_response, - standardized_response=NamedEntityRecognitionDataClass(items=items), - ) - - def text__emotion_detection( - self, text: str - ) -> ResponseType[EmotionDetectionDataClass]: - response = requests.post( - url=self.url["emotion_detection"], - json={"text": text}, - headers=self.headers, - ) - if response.status_code != 200: - raise ProviderException(message=response.text, code=response.status_code) - original_response = response.json() - items: Sequence[EmotionItem] = [] - for entity in original_response.get("scored_labels", []): - items.append( - EmotionItem( - emotion=EmotionEnum.from_str(entity.get("label", "")), - emotion_score=round(entity.get("score", 0) * 100, 2), - ) - ) - return ResponseType[EmotionDetectionDataClass]( - original_response=original_response, - standardized_response=EmotionDetectionDataClass(items=items, text=text), - ) - - def text__summarize( - self, - text: str, - output_sentences: int, - language: str, - model: Optional[str] = None, - ) -> ResponseType[SummarizeDataClass]: - # Check none model - url = self.url["basic"] + "gpu/" + model + "/summarization" - response = requests.post( - url=url, - json={"text": text}, - headers=self.headers, - ) - if response.status_code != 200: - raise ProviderException(message=response.text, code=response.status_code) - original_response = response.json() - return ResponseType[SummarizeDataClass]( - original_response=original_response, - standardized_response=SummarizeDataClass( - result=original_response.get("summary_text", "") - ), - ) diff --git a/edenai_apis/apis/nlpcloud/outputs/text/code_generation_output.json b/edenai_apis/apis/nlpcloud/outputs/text/code_generation_output.json deleted file mode 100644 index 39fddb06..00000000 --- a/edenai_apis/apis/nlpcloud/outputs/text/code_generation_output.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "original_response": { - "generated_code": "def is_leap_year(year):\n if (year%4 == 0 and year%100 != 0) or (year%400 == 0):\n return True\n return False" - }, - "standardized_response": { - "generated_text": "def is_leap_year(year):\n if (year%4 == 0 and year%100 != 0) or (year%400 == 0):\n return True\n return False" - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/outputs/text/emotion_detection_output.json b/edenai_apis/apis/nlpcloud/outputs/text/emotion_detection_output.json deleted file mode 100644 index c9af1c00..00000000 --- a/edenai_apis/apis/nlpcloud/outputs/text/emotion_detection_output.json +++ /dev/null @@ -1,59 +0,0 @@ -{ - "original_response": { - "scored_labels": [ - { - "label": "fear", - "score": 0.9974229335784912 - }, - { - "label": "anger", - "score": 0.0011927795130759478 - }, - { - "label": "surprise", - "score": 0.0005393747123889625 - }, - { - "label": "sadness", - "score": 0.00039018591633066535 - }, - { - "label": "joy", - "score": 0.00032625734456814826 - }, - { - "label": "love", - "score": 0.00012847629841417074 - } - ] - }, - "standardized_response": { - "text": "I'm scared", - "items": [ - { - "emotion": "Fear", - "emotion_score": 99.74 - }, - { - "emotion": "Anger", - "emotion_score": 0.12 - }, - { - "emotion": "Surprise", - "emotion_score": 0.05 - }, - { - "emotion": "Sadness", - "emotion_score": 0.04 - }, - { - "emotion": "Joy", - "emotion_score": 0.03 - }, - { - "emotion": "Love", - "emotion_score": 0.01 - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/outputs/text/keyword_extraction_output.json b/edenai_apis/apis/nlpcloud/outputs/text/keyword_extraction_output.json deleted file mode 100644 index ba8e1a19..00000000 --- a/edenai_apis/apis/nlpcloud/outputs/text/keyword_extraction_output.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "original_response": { - "keywords_and_keyphrases": [ - "Barack Obama", - "44th president", - "United States", - "Democratic Party", - "African-American", - "U.S. senator", - "Illinois", - "2005-2008", - "Illinois state senator", - "1997-2004." - ] - }, - "standardized_response": { - "items": [ - { - "keyword": "Barack Obama", - "importance": null - }, - { - "keyword": "44th president", - "importance": null - }, - { - "keyword": "United States", - "importance": null - }, - { - "keyword": "Democratic Party", - "importance": null - }, - { - "keyword": "African-American", - "importance": null - }, - { - "keyword": "U.S. senator", - "importance": null - }, - { - "keyword": "Illinois", - "importance": null - }, - { - "keyword": "2005-2008", - "importance": null - }, - { - "keyword": "Illinois state senator", - "importance": null - }, - { - "keyword": "1997-2004.", - "importance": null - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/outputs/text/named_entity_recognition_output.json b/edenai_apis/apis/nlpcloud/outputs/text/named_entity_recognition_output.json deleted file mode 100644 index 992b79b5..00000000 --- a/edenai_apis/apis/nlpcloud/outputs/text/named_entity_recognition_output.json +++ /dev/null @@ -1,153 +0,0 @@ -{ - "original_response": { - "entities": [ - { - "start": 0, - "end": 20, - "type": "PERSON", - "text": "Barack Hussein Obama" - }, - { - "start": 27, - "end": 35, - "type": "NORP", - "text": "American" - }, - { - "start": 65, - "end": 69, - "type": "ORDINAL", - "text": "44th" - }, - { - "start": 83, - "end": 100, - "type": "GPE", - "text": "the United States" - }, - { - "start": 106, - "end": 118, - "type": "DATE", - "text": "2009 to 2017" - }, - { - "start": 132, - "end": 152, - "type": "ORG", - "text": "the Democratic Party" - }, - { - "start": 168, - "end": 173, - "type": "ORDINAL", - "text": "first" - }, - { - "start": 174, - "end": 181, - "type": "NORP", - "text": "African" - }, - { - "start": 204, - "end": 221, - "type": "GPE", - "text": "the United States" - }, - { - "start": 249, - "end": 253, - "type": "GPE", - "text": "U.S." - }, - { - "start": 267, - "end": 275, - "type": "GPE", - "text": "Illinois" - }, - { - "start": 304, - "end": 312, - "type": "GPE", - "text": "Illinois" - }, - { - "start": 332, - "end": 344, - "type": "DATE", - "text": "1997 to 2004" - } - ] - }, - "standardized_response": { - "items": [ - { - "entity": "Barack Hussein Obama", - "category": "PERSON", - "importance": null - }, - { - "entity": "American", - "category": "NORP", - "importance": null - }, - { - "entity": "44th", - "category": "ORDINAL", - "importance": null - }, - { - "entity": "the United States", - "category": "GPE", - "importance": null - }, - { - "entity": "2009 to 2017", - "category": "DATE", - "importance": null - }, - { - "entity": "the Democratic Party", - "category": "ORG", - "importance": null - }, - { - "entity": "first", - "category": "ORDINAL", - "importance": null - }, - { - "entity": "African", - "category": "NORP", - "importance": null - }, - { - "entity": "the United States", - "category": "GPE", - "importance": null - }, - { - "entity": "U.S.", - "category": "GPE", - "importance": null - }, - { - "entity": "Illinois", - "category": "GPE", - "importance": null - }, - { - "entity": "Illinois", - "category": "GPE", - "importance": null - }, - { - "entity": "1997 to 2004", - "category": "DATE", - "importance": null - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/outputs/text/sentiment_analysis_output.json b/edenai_apis/apis/nlpcloud/outputs/text/sentiment_analysis_output.json deleted file mode 100644 index 9004b09e..00000000 --- a/edenai_apis/apis/nlpcloud/outputs/text/sentiment_analysis_output.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "original_response": { - "scored_labels": [ - { - "label": "NEGATIVE", - "score": 0.973714292049408 - } - ] - }, - "standardized_response": { - "general_sentiment": "Negative", - "general_sentiment_rate": 0.97, - "items": [] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/outputs/text/spell_check_output.json b/edenai_apis/apis/nlpcloud/outputs/text/spell_check_output.json deleted file mode 100644 index db391205..00000000 --- a/edenai_apis/apis/nlpcloud/outputs/text/spell_check_output.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "original_response": { - "correction": "Hello, world! How are you?" - }, - "standardized_response": { - "text": "Hollo, wrld! How r yu?", - "items": [ - { - "text": "Hollo, wrld! How r yu?", - "type": null, - "offset": 0, - "length": 26, - "suggestions": [ - { - "suggestion": "Hello, world! How are you?", - "score": null - } - ] - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/outputs/text/summarize_output.json b/edenai_apis/apis/nlpcloud/outputs/text/summarize_output.json deleted file mode 100644 index d410d268..00000000 --- a/edenai_apis/apis/nlpcloud/outputs/text/summarize_output.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "original_response": { - "summary_text": "Barack Obama was the 44th president of the United States from 2009 to 2017. He was the first African-American president of the United States, and a member of the Democratic Party. Prior to his presidency, Obama served as a U.S. senator from Illinois from 2005 to 2008, and an Illinois state senator from 1997 to 2004." - }, - "standardized_response": { - "result": "Barack Obama was the 44th president of the United States from 2009 to 2017. He was the first African-American president of the United States, and a member of the Democratic Party. Prior to his presidency, Obama served as a U.S. senator from Illinois from 2005 to 2008, and an Illinois state senator from 1997 to 2004." - } -} \ No newline at end of file diff --git a/edenai_apis/apis/nlpcloud/utils.py b/edenai_apis/apis/nlpcloud/utils.py deleted file mode 100644 index 5e6357bf..00000000 --- a/edenai_apis/apis/nlpcloud/utils.py +++ /dev/null @@ -1,198 +0,0 @@ -Iso_to_code = { - "ace": "ace_Arab", - "acm": "acm_Arab", - "acq": "acq_Arab", - "aeb": "aeb_Arab", - "af": "afr_Latn", - "ajp": "ajp_Arab", - "ak": "aka_Latn", - "am:": "amh_Ethi", - "apc": "apc_Arab", - "ar-001": "arb_Arab", - "ars": "ars_Arab", - "ary": "ary_Arab", - "arz": "arz_Arab", - "as": "asm_Beng", - "ast": "ast_Latn", - "awa": "awa_Deva", - "ayr": "ayr_Latn", - "azb": "azb_Arab", - "azj": "azj_Latn", - "ba": "bak_Cyrl", - "bm": "bam_Latn", - "ban": "ban_Latn", - "be": "bel_Cyrl", - "bem": "bem_Latn", - "bn": "ben_Beng", - "bho": "bho_Deva", - "bjn": "bjn_Arab", - "bo": "bod_Tibt", - "bs": "bos_Latn", - "bug": "bug_Latn", - "bg": "bul_Cyrl", - "ca": "cat_Latn", - "ceb": "ceb_Latn", - "cs": "ces_Latn", - "cjk": "cjk_Latn", - "ckb": "ckb_Arab", - "crh": "crh_Latn", - "cy": "cym_Latn", - "da": "dan_Latn", - "de": "deu_Latn", - "dik": "dik_Latn", - "dyu": "dyu_Latn", - "dz": "dzo_Tibt", - "el": "ell_Grek", - "eo": "epo_Latn", - "et": "est_Latn", - "eu": "eus_Latn", - "ee": "ewe_Latn", - "fo": "fao_Latn", - "fj": "fij_Latn", - "fi": "fin_Latn", - "fon": "fon_Latn", - "fr": "fra_Latn", - "fur": "fur_Latn", - "fuv": "fuv_Latn", - "gd": "gla_Latn", - "ga": "gle_Latn", - "gl": "glg_Latn", - "gn": "grn_Latn", - "gu": "guj_Gujr", - "ht": "hat_Latn", - "ha": "hau_Latn", - "he": "heb_Hebr", - "hi": "hin_Deva", - "hne": "hne_Deva", - "hr": "hrv_Latn", - "hu": "hun_Latn", - "hy": "hye_Armn", - "ig": "ibo_Latn", - "ilo": "ilo_Latn", - "id": "ind_Latn", - "is": "isl_Latn", - "it": "ita_Latn", - "jv": "jav_Latn", - "ja": "jpn_Jpan", - "kab": "kab_Latn", - "kac": "kac_Latn", - "kam": "kam_Latn", - "kn": "kan_Knda", - "ks": "kas_Arab", - "ka": "kat_Geor", - "knc": "knc_Arab", - "kk": "kaz_Cyrl", - "kbp": "kbp_Latn", - "kea": "kea_Latn", - "km": "khm_Khmr", - "ki": "kik_Latn", - "rw": "kin_Latn", - "ky": "kir_Cyrl", - "kmb": "kmb_Latn", - "kmr": "kmr_Latn", - "kg": "kon_Latn", - "ko": "kor_Hang", - "lo": "lao_Laoo", - "lij": "lij_Latn", - "li": "lim_Latn", - "ln": "lin_Latn", - "lt": "lit_Latn", - "lmo": "lmo_Latn", - "ltg": "ltg_Latn", - "lb": "ltz_Latn", - "lu": "lua_Latn", - "lg": "lug_Latn", - "luo": "luo_Latn", - "lus": "lus_Latn", - "lvs": "lvs_Latn", - "mag": "mag_Deva", - "mai": "mai_Deva", - "ml": "mal_Mlym", - "mr": "mar_Deva", - "min": "min_Arab", - "mk": "mkd_Cyrl", - "plt": "plt_Latn", - "mt": "mlt_Latn", - "mni": "mni_Beng", - "knk": "khk_Cyrl", - "mos": "mos_Latn", - "mi": "mri_Latn", - "my": "mya_Mymr", - "nl": "nld_Latn", - "nn": "nno_Latn", - "nb": "nob_Latn", - "ne": "npi_Deva", - "nso": "nso_Latn", - "nus": "nus_Latn", - "ny": "nya_Latn", - "oc": "oci_Latn", - "gaz": "gaz_Latn", - "or": "ory_Orya", - "pag": "pag_Latn", - "pa": "pan_Guru", - "pap": "pap_Latn", - "fa": "pes_Arab", - "pl": "pol_Latn", - "pt": "por_Latn", - "fa-AF": "prs_Arab", - "pbt": "pbt_Arab", - "quy": "quy_Latn", - "ro": "ron_Latn", - "rn": "run_Latn", - "ru": "rus_Cyrl", - "sg": "sag_Latn", - "sa": "san_Deva", - "sat": "sat_Olck", - "scn": "scn_Latn", - "shn": "shn_Mymr", - "si": "sin_Sinh", - "sk": "slk_Latn", - "sl": "slv_Latn", - "sm": "smo_Latn", - "sn": "sna_Latn", - "sd": "snd_Arab", - "so": "som_Latn", - "st": "sot_Latn", - "es": "spa_Latn", - "als": "als_Latn", - "sc": "srd_Latn", - "sr": "srp_Cyrl", - "ss": "ssw_Latn", - "su": "sun_Latn", - "sv": "swe_Latn", - "sw": "swh_Latn", - "szl": "szl_Latn", - "ta": "tam_Taml", - "tt": "tat_Cyrl", - "te": "tel_Telu", - "tg": "tgk_Cyrl", - "tl": "tgl_Latn", - "th": "tha_Thai", - "ti": "tir_Ethi", - "tmh": "taq_Tfng", - "tpi": "tpi_Latn", - "tn": "tsn_Latn", - "ts": "tso_Latn", - "tk": "tuk_Latn", - "tum": "tum_Latn", - "tr": "tur_Latn", - "tw": "twi_Latn", - "tzm": "tzm_Tfng", - "ug": "uig_Arab", - "uk": "ukr_Cyrl", - "umb": "umb_Latn", - "ur": "urd_Arab", - "uzn": "uzn_Latn", - "vec": "vec_Latn", - "vi": "vie_Latn", - "war": "war_Latn", - "wo": "wol_Latn", - "xh": "xho_Latn", - "ydd": "ydd_Hebr", - "yo": "yor_Latn", - "yue": "yue_Hant", - "zh": "zho_Hans", - "zh-Hant": "zho_Hant", - "zsm": "zsm_Latn", - "zu": "zul_Latn" -} diff --git a/edenai_apis/apis/phedone/__init__.py b/edenai_apis/apis/phedone/__init__.py deleted file mode 100644 index 8943137a..00000000 --- a/edenai_apis/apis/phedone/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .phedone_api import PhedoneApi diff --git a/edenai_apis/apis/phedone/errors.py b/edenai_apis/apis/phedone/errors.py deleted file mode 100644 index c72b5017..00000000 --- a/edenai_apis/apis/phedone/errors.py +++ /dev/null @@ -1,22 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInvalidInputError, - ProviderInvalidInputTextLengthError, - ProviderInternalServerError, - ProviderMissingInputError, - ProviderLimitationError, -) - -# NOTE: error messages should be regex patterns -ERRORS: ProviderErrorLists = { - ProviderInvalidInputTextLengthError: [ - r"The text must not be greater than 4000 characters.", - ], - ProviderInvalidInputError: [ - r"The language defined in \w+ locale is not yet supported", - r"Invalid language format for: \w+.", - ], - ProviderInternalServerError: [r"Server Error"], - ProviderMissingInputError: [r"The \w+ locale field is required."], - ProviderLimitationError: [r"Too Many Attempts."], -} diff --git a/edenai_apis/apis/phedone/info.json b/edenai_apis/apis/phedone/info.json deleted file mode 100644 index bd40f68c..00000000 --- a/edenai_apis/apis/phedone/info.json +++ /dev/null @@ -1,120 +0,0 @@ -{ - "translation": { - "automatic_translation": { - "constraints": { - "languages": [ - "af", - "sq", - "am", - "ar", - "hy", - "az", - "eu", - "be", - "bn", - "bs", - "bg", - "ca", - "ceb", - "ny", - "zh-CN", - "zh-TW", - "co", - "hr", - "cs", - "da", - "nl", - "en", - "eo", - "et", - "tl", - "fi", - "fr", - "fy", - "gl", - "ka", - "de", - "el", - "gu", - "ht", - "ha", - "haw", - "he", - "hi", - "hmn", - "hu", - "is", - "ig", - "id", - "ga", - "it", - "ja", - "kn", - "kk", - "km", - "rw", - "ko", - "ku", - "ky", - "lo", - "la", - "lv", - "lt", - "lb", - "mk", - "mg", - "ms", - "ml", - "mt", - "mi", - "mr", - "mn", - "my", - "ne", - "no", - "or", - "ps", - "fa", - "pl", - "pt", - "pa", - "ro", - "ru", - "sm", - "gd", - "sr", - "st", - "sn", - "sd", - "si", - "sk", - "sl", - "so", - "es", - "su", - "sw", - "sv", - "tg", - "ta", - "tt", - "te", - "th", - "tr", - "tk", - "uk", - "ur", - "ug", - "uz", - "vi", - "cy", - "xh", - "yi", - "yo", - "zu" - ], - "allow_null_language" : true - }, - "version": "-" - } - } -} diff --git a/edenai_apis/apis/phedone/outputs/translation/automatic_translation_output.json b/edenai_apis/apis/phedone/outputs/translation/automatic_translation_output.json deleted file mode 100644 index 415b6453..00000000 --- a/edenai_apis/apis/phedone/outputs/translation/automatic_translation_output.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "original_response": { - "translation": [ - "Artificial intelligence, also known as omniscient, machine intelligence, refers to the wisdom expressed by machines made by humans. Usually artificial intelligence refers to the technology that presents human intelligence through ordinary computer programs. The term also points to research into whether and how such intelligent systems can be realized. At the same time, through advances in medicine, neuroscience, robotics, and statistics, the norm predicts that many human occupations are gradually being replaced by them." - ] - }, - "standardized_response": { - "text": "Artificial intelligence, also known as omniscient, machine intelligence, refers to the wisdom expressed by machines made by humans. Usually artificial intelligence refers to the technology that presents human intelligence through ordinary computer programs. The term also points to research into whether and how such intelligent systems can be realized. At the same time, through advances in medicine, neuroscience, robotics, and statistics, the norm predicts that many human occupations are gradually being replaced by them." - } -} \ No newline at end of file diff --git a/edenai_apis/apis/phedone/phedone_api.py b/edenai_apis/apis/phedone/phedone_api.py deleted file mode 100644 index 0732040b..00000000 --- a/edenai_apis/apis/phedone/phedone_api.py +++ /dev/null @@ -1,86 +0,0 @@ -import json -from typing import Dict, Optional, Any - -import requests - -from edenai_apis.features import TranslationInterface -from edenai_apis.features.provider.provider_interface import ProviderInterface -from edenai_apis.features.translation import ( - AutomaticTranslationDataClass, -) -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from edenai_apis.utils.exception import ProviderException -from edenai_apis.utils.types import ResponseType - - -class PhedoneApi(ProviderInterface, TranslationInterface): - """ - attributes: - provider_name: str = 'phedone' - """ - - provider_name: str = "phedone" - - def __init__(self, api_keys: Optional[Dict[str, Any]] = {}) -> None: - self.api_settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys or {} - ) - self.api_key = self.api_settings["api_key"] - self.base_url = "https://execute.phedone.com/api/models/" - - def translation__automatic_translation( - self, source_language: str, target_language: str, text: str - ) -> ResponseType[AutomaticTranslationDataClass]: - """ - Parameters: - source_languages: str - target_languages: str - text: str - - Return: - { - original_response: {}, - standardized_response: {}, - } - """ - - if not source_language: - source_language = "auto" - file = { - "text": text, - "input_locale": source_language, - "output_locale": target_language, - } - headers = { - "content-type": "application/json", - "Authorization": f"Bearer {self.api_key}", - } - - url = f"{self.base_url}translation" - - response = requests.post(url=url, headers=headers, json=file) - - try: - original_response = response.json() - except json.JSONDecodeError as exc: - raise ProviderException("Internal Server Error", code=500) from exc - - if response.status_code != 200: - raise ProviderException( - original_response.get("message"), code=response.status_code - ) - - if not original_response.get("translation")[0]: - raise ProviderException("Provider returned an empty response", 200) - - standardized_response = AutomaticTranslationDataClass( - text=original_response.get("translation")[0] - ) - - result = ResponseType[AutomaticTranslationDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - - return result diff --git a/edenai_apis/apis/picpurify/__init__.py b/edenai_apis/apis/picpurify/__init__.py deleted file mode 100644 index 3d330088..00000000 --- a/edenai_apis/apis/picpurify/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .picpurify_api import PicpurifyApi diff --git a/edenai_apis/apis/picpurify/errors.py b/edenai_apis/apis/picpurify/errors.py deleted file mode 100644 index 0e75a466..00000000 --- a/edenai_apis/apis/picpurify/errors.py +++ /dev/null @@ -1,16 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInvalidInputError, - ProviderInvalidInputImageResolutionError, -) - -# NOTE: error messages should be regex patterns -ERRORS: ProviderErrorLists = { - ProviderInvalidInputError: [ - r"Unable to process this image", - r"File is not an image", - ], - ProviderInvalidInputImageResolutionError: [ - r"Image size too large : \d+x\d+, Maximum size authorized: 4096x4096", - ], -} diff --git a/edenai_apis/apis/picpurify/helpers.py b/edenai_apis/apis/picpurify/helpers.py deleted file mode 100644 index 8b137891..00000000 --- a/edenai_apis/apis/picpurify/helpers.py +++ /dev/null @@ -1 +0,0 @@ - diff --git a/edenai_apis/apis/picpurify/info.json b/edenai_apis/apis/picpurify/info.json deleted file mode 100644 index 910433cc..00000000 --- a/edenai_apis/apis/picpurify/info.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "image": { - "explicit_content": { - "version": "v1.1" - }, - "face_detection": { - "version": "v1.1" - } - } -} diff --git a/edenai_apis/apis/picpurify/outputs/image/explicit_content_output.json b/edenai_apis/apis/picpurify/outputs/image/explicit_content_output.json deleted file mode 100644 index b63ffbd9..00000000 --- a/edenai_apis/apis/picpurify/outputs/image/explicit_content_output.json +++ /dev/null @@ -1,98 +0,0 @@ -{ - "original_response": { - "suggestive_nudity_moderation": { - "compute_time": 0.1543, - "confidence_score": 0.9999997615814209, - "suggestive_nudity_content": false - }, - "gore_moderation": { - "compute_time": 0.2001, - "confidence_score": 0.990346372127533, - "gore_content": true - }, - "weapon_moderation": { - "compute_time": 0.1976, - "confidence_score": 0.9999998807907104, - "weapon_content": false - }, - "drug_moderation": { - "compute_time": 0.1972, - "confidence_score": 0.9862111806869507, - "drug_content": false - }, - "hate_sign_moderation": { - "compute_time": 0.2011, - "confidence_score": 0.9999889135360718, - "hate_sign_content": false - }, - "task_call": "suggestive_nudity_moderation,gore_moderation,weapon_moderation,drug_moderation,hate_sign_moderation", - "sub_calls": [ - "suggestive_nudity_moderation", - "gore_moderation", - "weapon_moderation", - "drug_moderation", - "hate_sign_moderation" - ], - "status": "success", - "performed": [ - "suggestive_nudity_moderation", - "gore_moderation", - "weapon_moderation", - "drug_moderation", - "hate_sign_moderation" - ], - "final_decision": "KO", - "reject_criteria": [ - "gore_moderation" - ], - "confidence_score_decision": 0.990346372127533, - "media": { - "url_image": "", - "file_image": "explicit_content.jpeg", - "media_id": "9fe5196fa5f0377d3894260ba285a7b8" - }, - "units_consumed": 5, - "total_compute_time": 0.4083418846130371 - }, - "standardized_response": { - "nsfw_likelihood": 5, - "nsfw_likelihood_score": 0.990346372127533, - "items": [ - { - "label": "suggestive_nudity_content", - "likelihood": 1, - "likelihood_score": 0.2, - "category": "Sexual", - "subcategory": "Suggestive" - }, - { - "label": "gore_content", - "likelihood": 5, - "likelihood_score": 0.990346372127533, - "category": "Violence", - "subcategory": "GraphicViolenceOrGore" - }, - { - "label": "weapon_content", - "likelihood": 1, - "likelihood_score": 0.2, - "category": "Violence", - "subcategory": "WeaponViolence" - }, - { - "label": "drug_content", - "likelihood": 1, - "likelihood_score": 0.2, - "category": "DrugAndAlcohol", - "subcategory": "DrugProducts" - }, - { - "label": "hate_sign_content", - "likelihood": 1, - "likelihood_score": 0.2, - "category": "HateAndExtremism", - "subcategory": "Hate" - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/picpurify/outputs/image/face_detection_output.json b/edenai_apis/apis/picpurify/outputs/image/face_detection_output.json deleted file mode 100644 index 446f46b2..00000000 --- a/edenai_apis/apis/picpurify/outputs/image/face_detection_output.json +++ /dev/null @@ -1,181 +0,0 @@ -{ - "original_response": { - "face_detection": { - "compute_time": 0.0108, - "confidence_score": 0.9884552359581, - "nb_face": 1, - "results": [ - { - "age_majority": { - "confidence_score": 0.98300695419312, - "decision": "major" - }, - "face": { - "confidence_score": 0.9884552359581, - "face_rectangle": { - "bottom": 175, - "left": 85, - "right": 183, - "top": 35 - } - }, - "gender": { - "confidence_score": 0.98267048597336, - "decision": "male" - } - } - ], - "thumbnail": { - "bottom": 224, - "left": 1, - "right": 225, - "top": 0 - } - }, - "task_call": "face_gender_age_detection", - "sub_calls": [ - "face_detection", - "gender_detection", - "age_detection" - ], - "status": "success", - "performed": [ - "face_detection", - "gender_detection", - "age_detection" - ], - "media": { - "url_image": "", - "file_image": "face.jpeg", - "media_id": "e94eee116f4c4160fcf49d014a58ec16" - }, - "units_consumed": 3, - "total_compute_time": 0.21130394935608 - }, - "standardized_response": { - "items": [ - { - "confidence": 0.9884552359581, - "landmarks": { - "left_eye": [], - "left_eye_top": [], - "left_eye_right": [], - "left_eye_bottom": [], - "left_eye_left": [], - "right_eye": [], - "right_eye_top": [], - "right_eye_right": [], - "right_eye_bottom": [], - "right_eye_left": [], - "left_eyebrow_left": [], - "left_eyebrow_right": [], - "left_eyebrow_top": [], - "right_eyebrow_left": [], - "right_eyebrow_right": [], - "left_pupil": [], - "right_pupil": [], - "nose_tip": [], - "nose_bottom_right": [], - "nose_bottom_left": [], - "mouth_left": [], - "mouth_right": [], - "right_eyebrow_top": [], - "midpoint_between_eyes": [], - "nose_bottom_center": [], - "nose_left_alar_out_tip": [], - "nose_left_alar_top": [], - "nose_right_alar_out_tip": [], - "nose_right_alar_top": [], - "nose_root_left": [], - "nose_root_right": [], - "upper_lip": [], - "under_lip": [], - "under_lip_bottom": [], - "under_lip_top": [], - "upper_lip_bottom": [], - "upper_lip_top": [], - "mouth_center": [], - "mouth_top": [], - "mouth_bottom": [], - "left_ear_tragion": [], - "right_ear_tragion": [], - "forehead_glabella": [], - "chin_gnathion": [], - "chin_left_gonion": [], - "chin_right_gonion": [], - "upper_jawline_left": [], - "mid_jawline_left": [], - "mid_jawline_right": [], - "upper_jawline_right": [], - "left_cheek_center": [], - "right_cheek_center": [] - }, - "emotions": { - "joy": null, - "sorrow": null, - "anger": null, - "surprise": null, - "disgust": null, - "fear": null, - "confusion": null, - "calm": null, - "unknown": null, - "neutral": null, - "contempt": null - }, - "poses": { - "pitch": null, - "roll": null, - "yaw": null - }, - "age": 21.0, - "gender": "male", - "bounding_box": { - "x_min": 0.37777777777777777, - "x_max": 0.8133333333333334, - "y_min": 0.15555555555555556, - "y_max": 0.7777777777777778 - }, - "hair": { - "hair_color": [], - "bald": null, - "invisible": null - }, - "facial_hair": { - "moustache": null, - "beard": null, - "sideburns": null - }, - "quality": { - "noise": null, - "exposure": null, - "blur": null, - "brightness": null, - "sharpness": null - }, - "makeup": { - "eye_make": null, - "lip_make": null - }, - "accessories": { - "sunglasses": null, - "reading_glasses": null, - "swimming_goggles": null, - "face_mask": null, - "eyeglasses": null, - "headwear": null - }, - "occlusions": { - "eye_occluded": null, - "forehead_occluded": null, - "mouth_occluded": null - }, - "features": { - "eyes_open": null, - "smile": null, - "mouth_open": null - } - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/picpurify/picpurify_api.py b/edenai_apis/apis/picpurify/picpurify_api.py deleted file mode 100644 index 6634d9f1..00000000 --- a/edenai_apis/apis/picpurify/picpurify_api.py +++ /dev/null @@ -1,184 +0,0 @@ -from json import JSONDecodeError -from typing import Dict - -import requests -from edenai_apis.features import ImageInterface, ProviderInterface -from edenai_apis.features.image import ( - ExplicitContentDataClass, - ExplicitItem, - FaceBoundingBox, - FaceDetectionDataClass, - FaceItem, -) -from edenai_apis.features.image.explicit_content.category import CategoryType -from edenai_apis.features.image.face_detection.face_detection_dataclass import ( - FaceAccessories, - FaceEmotions, - FaceFacialHair, - FaceFeatures, - FaceHair, - FaceLandmarks, - FaceMakeup, - FaceOcclusions, - FacePoses, - FaceQuality, -) -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from edenai_apis.utils.conversion import standardized_confidence_score_picpurify -from edenai_apis.utils.exception import ProviderException -from edenai_apis.utils.parsing import extract -from edenai_apis.utils.types import ResponseType -from PIL import Image as Img - - -class PicpurifyApi(ProviderInterface, ImageInterface): - provider_name = "picpurify" - - def __init__(self, api_keys: Dict = {}) -> None: - self.api_settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys - ) - self.key = self.api_settings["API_KEY"] - self.url = "https://www.picpurify.com/analyse/1.1" - - def _raise_on_error(self, response: requests.Response) -> None: - """ - Raises: - ProviderException: when response status is different than 2XX - """ - try: - data = response.json() - if not "error" in data and response.ok: - # picpurify can return error even with status 200 - return - code = data["error"]["errorCode"] - message = data["error"]["errorMsg"] - raise ProviderException(message=message, code=code) - except (JSONDecodeError, KeyError): - # in case of 5XX err picpurify server doesn't return json object - raise ProviderException(message=response.text, code=response.status_code) - - def image__face_detection( - self, file: str, file_url: str = "" - ) -> ResponseType[FaceDetectionDataClass]: - payload = { - "API_KEY": self.key, - "task": "face_gender_age_detection", - } - with open(file, "rb") as file_: - files = {"image": file_} - response = requests.post(self.url, files=files, data=payload) - self._raise_on_error(response) - original_response = response.json() - - # Std response - with Img.open(file) as img: - width, height = img.size - face_detection = extract( - original_response, - ["face_detection", "results"], - fallback=[], - type_validator=list, - ) - faces = [] - for face in face_detection: - age = face["age_majority"]["decision"] - if age == "major": - age = 21.0 - else: - age = 18.0 - gender = face["gender"]["decision"] - box = FaceBoundingBox( - x_min=float(face["face"]["face_rectangle"]["left"] / width), - x_max=float(face["face"]["face_rectangle"]["right"] / width), - y_min=float(face["face"]["face_rectangle"]["top"] / height), - y_max=float(face["face"]["face_rectangle"]["bottom"] / height), - ) - confidence = face["face"]["confidence_score"] - faces.append( - FaceItem( - age=age, - gender=gender, - confidence=confidence, - bounding_box=box, - # Not supported by picpurify - # --------------------------- - landmarks=FaceLandmarks(), - emotions=FaceEmotions.default(), - poses=FacePoses.default(), - hair=FaceHair.default(), - accessories=FaceAccessories.default(), - facial_hair=FaceFacialHair.default(), - quality=FaceQuality.default(), - makeup=FaceMakeup.default(), - occlusions=FaceOcclusions.default(), - features=FaceFeatures.default(), - # --------------------------- - ) - ) - standardized_response = FaceDetectionDataClass(items=faces) - return ResponseType[FaceDetectionDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - - def _standardized_confidence(self, confidence_score: float, nsfw: bool) -> float: - if nsfw: - return confidence_score - else: - return 0.2 - - def image__explicit_content( - self, file: str, file_url: str = "" - ) -> ResponseType[ExplicitContentDataClass]: - payload = { - "API_KEY": self.key, - "task": "suggestive_nudity_moderation,gore_moderation," - + "weapon_moderation,drug_moderation,hate_sign_moderation", - } - with open(file, "rb") as file_: - files = {"image": file_} - response = requests.post(self.url, files=files, data=payload) - self._raise_on_error(response) - original_response = response.json() - - # get moderation label keys from categegories found in image - # (eg: 'drug_moderation', 'gore_moderation' etc.) - moderation_labels = original_response.get("performed", []) - items = [] - for label in moderation_labels: - classificator = CategoryType.choose_category_subcategory( - label.replace("moderation", "content") - ) - original_response_label = original_response.get(label, {}) - items.append( - ExplicitItem( - label=label.replace("moderation", "content"), - category=classificator["category"], - subcategory=classificator["subcategory"], - likelihood_score=self._standardized_confidence( - original_response_label.get("confidence_score", 0), - original_response_label.get( - label.replace("moderation", "content"), True - ), - ), - likelihood=standardized_confidence_score_picpurify( - original_response[label]["confidence_score"], - original_response[label][ - label.replace("moderation", "content") - ], - ), - ) - ) - - nsfw = ExplicitContentDataClass.calculate_nsfw_likelihood(items) - nsfw_score = ExplicitContentDataClass.calculate_nsfw_likelihood_score(items) - standardized_response = ExplicitContentDataClass( - items=items, nsfw_likelihood=nsfw, nsfw_likelihood_score=nsfw_score - ) - res = ResponseType[ExplicitContentDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) - return res diff --git a/edenai_apis/apis/revai/__init__.py b/edenai_apis/apis/revai/__init__.py deleted file mode 100644 index 48563b65..00000000 --- a/edenai_apis/apis/revai/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .revai_api import RevAIApi diff --git a/edenai_apis/apis/revai/errors.py b/edenai_apis/apis/revai/errors.py deleted file mode 100644 index 358a49df..00000000 --- a/edenai_apis/apis/revai/errors.py +++ /dev/null @@ -1,19 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInvalidInputAudioDurationError, - ProviderInvalidInputFileFormatError, - ProviderInvalidInputError, -) - -# NOTE: error messages should be regex patterns -ERRORS: ProviderErrorLists = { - ProviderInvalidInputAudioDurationError: [ - r"Audio duration below minimum limit of 2 seconds", - ], - ProviderInvalidInputError: [ - r"filter_profanity: This option is not allowed for foreign languages. Use \w+ language for profanity filter" - ], - ProviderInvalidInputFileFormatError: [ - r"File extension not supported. Use one of the following extensions: \w+" - ], -} diff --git a/edenai_apis/apis/revai/info.json b/edenai_apis/apis/revai/info.json deleted file mode 100644 index 3e7b2283..00000000 --- a/edenai_apis/apis/revai/info.json +++ /dev/null @@ -1,55 +0,0 @@ -{ - "audio": { - "speech_to_text_async": { - "constraints": { - "languages": [ - "ar", - "bg", - "ca", - "hr", - "cs", - "da", - "nl", - "en", - "fa", - "fi", - "fr", - "de", - "el", - "he", - "hi", - "hu", - "id", - "it", - "ja", - "ko", - "lv", - "lt", - "ms", - "cmn", - "no", - "pl", - "pt", - "ro", - "ru", - "sk", - "sl", - "es", - "sv", - "ta", - "te", - "tr" - ], - "file_extensions": [ - "ogg", - "flac", - "mp4", - "wav", - "mp3" - ], - "allow_null_language": true - }, - "version": "v1" - } - } -} \ No newline at end of file diff --git a/edenai_apis/apis/revai/outputs/audio/speech_to_text_async_output.json b/edenai_apis/apis/revai/outputs/audio/speech_to_text_async_output.json deleted file mode 100644 index f98c4ce5..00000000 --- a/edenai_apis/apis/revai/outputs/audio/speech_to_text_async_output.json +++ /dev/null @@ -1,605 +0,0 @@ -{ - "status": "succeeded", - "provider_job_id": "D7NDeAIYI4eOdScf", - "original_response": { - "monologues": [ - { - "speaker": 0, - "elements": [ - { - "type": "text", - "value": "Unit", - "ts": 0.1, - "end_ts": 0.59, - "confidence": 0.98 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "one", - "ts": 0.59, - "end_ts": 0.99, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Page", - "ts": 1.46, - "end_ts": 1.95, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "14", - "ts": 2.35, - "end_ts": 2.63, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "," - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "real", - "ts": 3.34, - "end_ts": 3.83, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "conversations", - "ts": 3.83, - "end_ts": 4.67, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - } - ] - }, - { - "speaker": 1, - "elements": [ - { - "type": "text", - "value": "Hello", - "ts": 6.83, - "end_ts": 7.39, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "?" - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Hi", - "ts": 7.76, - "end_ts": 8.11, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "What's", - "ts": 8.11, - "end_ts": 8.63, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "your", - "ts": 8.63, - "end_ts": 8.75, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "name", - "ts": 8.75, - "end_ts": 8.95, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "?" - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Claudia", - "ts": 9.08, - "end_ts": 9.75, - "confidence": 0.97 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "What's", - "ts": 10.42, - "end_ts": 11.03, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "your", - "ts": 11.03, - "end_ts": 11.19, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "name", - "ts": 11.19, - "end_ts": 11.39, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "?" - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "I'm", - "ts": 11.45, - "end_ts": 11.87, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Chihiro", - "ts": 11.87, - "end_ts": 12.35, - "confidence": 0.81 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Nice", - "ts": 12.66, - "end_ts": 13.15, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "to", - "ts": 13.15, - "end_ts": 13.31, - "confidence": 0.98 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "meet", - "ts": 13.31, - "end_ts": 13.47, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "you", - "ts": 13.47, - "end_ts": 13.71, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Chihiro", - "ts": 14.48, - "end_ts": 15.15, - "confidence": 0.9 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Yeah", - "ts": 15.15, - "end_ts": 15.55, - "confidence": 0.95 - }, - { - "type": "punct", - "value": "," - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "that's", - "ts": 15.55, - "end_ts": 15.83, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "right", - "ts": 15.83, - "end_ts": 15.95, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "." - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "Uh", - "ts": 16.12, - "end_ts": 16.47, - "confidence": 0.52 - }, - { - "type": "punct", - "value": "," - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "where", - "ts": 16.47, - "end_ts": 16.63, - "confidence": 0.99 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "you", - "ts": 16.63, - "end_ts": 16.75, - "confidence": 0.91 - }, - { - "type": "punct", - "value": " " - }, - { - "type": "text", - "value": "from", - "ts": 16.75, - "end_ts": 16.87, - "confidence": 0.99 - }, - { - "type": "punct", - "value": "?" - } - ] - } - ] - }, - "standardized_response": { - "text": "Unit one. Page 14, real conversations. Hello? Hi. What's your name? Claudia. What's your name? I'm Chihiro. Nice to meet you. Chihiro. Yeah, that's right. Uh, where you from?", - "diarization": { - "total_speakers": 2, - "entries": [ - { - "segment": "Unit", - "start_time": "0.1", - "end_time": "0.59", - "speaker": 1, - "confidence": 0.98 - }, - { - "segment": "one", - "start_time": "0.59", - "end_time": "0.99", - "speaker": 1, - "confidence": 0.99 - }, - { - "segment": "Page", - "start_time": "1.46", - "end_time": "1.95", - "speaker": 1, - "confidence": 0.99 - }, - { - "segment": "14", - "start_time": "2.35", - "end_time": "2.63", - "speaker": 1, - "confidence": 0.99 - }, - { - "segment": "real", - "start_time": "3.34", - "end_time": "3.83", - "speaker": 1, - "confidence": 0.99 - }, - { - "segment": "conversations", - "start_time": "3.83", - "end_time": "4.67", - "speaker": 1, - "confidence": 0.99 - }, - { - "segment": "Hello", - "start_time": "6.83", - "end_time": "7.39", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "Hi", - "start_time": "7.76", - "end_time": "8.11", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "What's", - "start_time": "8.11", - "end_time": "8.63", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "your", - "start_time": "8.63", - "end_time": "8.75", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "name", - "start_time": "8.75", - "end_time": "8.95", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "Claudia", - "start_time": "9.08", - "end_time": "9.75", - "speaker": 2, - "confidence": 0.97 - }, - { - "segment": "What's", - "start_time": "10.42", - "end_time": "11.03", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "your", - "start_time": "11.03", - "end_time": "11.19", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "name", - "start_time": "11.19", - "end_time": "11.39", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "I'm", - "start_time": "11.45", - "end_time": "11.87", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "Chihiro", - "start_time": "11.87", - "end_time": "12.35", - "speaker": 2, - "confidence": 0.81 - }, - { - "segment": "Nice", - "start_time": "12.66", - "end_time": "13.15", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "to", - "start_time": "13.15", - "end_time": "13.31", - "speaker": 2, - "confidence": 0.98 - }, - { - "segment": "meet", - "start_time": "13.31", - "end_time": "13.47", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "you", - "start_time": "13.47", - "end_time": "13.71", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "Chihiro", - "start_time": "14.48", - "end_time": "15.15", - "speaker": 2, - "confidence": 0.9 - }, - { - "segment": "Yeah", - "start_time": "15.15", - "end_time": "15.55", - "speaker": 2, - "confidence": 0.95 - }, - { - "segment": "that's", - "start_time": "15.55", - "end_time": "15.83", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "right", - "start_time": "15.83", - "end_time": "15.95", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "Uh", - "start_time": "16.12", - "end_time": "16.47", - "speaker": 2, - "confidence": 0.52 - }, - { - "segment": "where", - "start_time": "16.47", - "end_time": "16.63", - "speaker": 2, - "confidence": 0.99 - }, - { - "segment": "you", - "start_time": "16.63", - "end_time": "16.75", - "speaker": 2, - "confidence": 0.91 - }, - { - "segment": "from", - "start_time": "16.75", - "end_time": "16.87", - "speaker": 2, - "confidence": 0.99 - } - ], - "error_message": null - } - } -} \ No newline at end of file diff --git a/edenai_apis/apis/revai/revai_api.py b/edenai_apis/apis/revai/revai_api.py deleted file mode 100644 index 306934bb..00000000 --- a/edenai_apis/apis/revai/revai_api.py +++ /dev/null @@ -1,290 +0,0 @@ -import json -import uuid -from pathlib import Path -from time import time -from typing import Dict, List, Optional - -import requests -from apis.amazon.config import storage_clients -from botocore.errorfactory import ClientError - -from edenai_apis.features import ProviderInterface, AudioInterface -from edenai_apis.features.audio import ( - SpeechToTextAsyncDataClass, - SpeechDiarizationEntry, - SpeechDiarization, -) -from edenai_apis.loaders.data_loader import ProviderDataEnum -from edenai_apis.loaders.loaders import load_provider -from edenai_apis.utils.exception import ( - AsyncJobException, - AsyncJobExceptionReason, - ProviderException, -) -from edenai_apis.utils.types import ( - AsyncBaseResponseType, - AsyncLaunchJobResponseType, - AsyncPendingResponseType, - AsyncResponseType, -) -from edenai_apis.utils.upload_s3 import upload_file_to_s3 - - -class RevAIApi(ProviderInterface, AudioInterface): - provider_name = "revai" - - def __init__(self, api_keys: Dict = {}) -> None: - self.api_settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys - ) - self.api_settings_aws = load_provider(ProviderDataEnum.KEY, "amazon") - self.public_settings = load_provider(ProviderDataEnum.KEY, "public_ressources") - self.key = self.api_settings["revai_key"] - self.bucket_name = self.public_settings["public_bucket"] - - def _create_vocabulary(self, list_vocabs: list): - vocab_name = str(uuid.uuid4()) - response = requests.post( - url="https://api.rev.ai/speechtotext/v1/vocabularies", - headers={ - "Authorization": f"Bearer {self.key}", - }, - data={"custom_vocabularies": [{"phrases": list_vocabs}]}, - ) - original_response = response.json() - if response.status_code != 200: - message = f"{original_response.get('title','')}: {original_response.get('details','')}" - raise ProviderException( - message=message, - code=response.status_code, - ) - vocab_name = original_response["id"] - - return vocab_name - - def _launch_transcribe( - self, - filename: str, - file_url: str, - language: str, - profanity_filter: bool, - vocab_name: Optional[str] = None, - initiate_vocab: bool = False, - provider_params: Optional[dict] = None - ): - provider_params = provider_params or {} - config = { - "filter_profanity": profanity_filter, - } - - source_config = {"url": file_url} - - if language: - config["language"] = language - - if vocab_name: - config["custom_vocabulary_id"] = vocab_name - - if initiate_vocab: - config["checked"] = False - filename = f"{vocab_name}_settings.txt" - storage_clients(self.api_settings_aws)["speech"].meta.client.put_object( - Bucket=self.bucket_name, - Body=json.dumps(config).encode(), - Key=filename, - ) - return - - data_config = {**config, "source_config": source_config, **provider_params} - response = requests.post( - url="https://ec1.api.rev.ai/speechtotext/v1/jobs", - headers={ - "Authorization": f"Bearer {self.key}", - "Content-type": "application/json", - }, - json=data_config, - # files=[("media", ("audio_file", file))], - ) - original_response = response.json() - - if response.status_code != 200: - parameters = original_response.get("parameters") - for key, value in parameters.items(): - if "filter_profanity" in key: - raise ProviderException( - f"{key}: {value[0]} Use 'en' language for profanity filter", - code = response.status_code - ) - message = f"{original_response.get('title','')}: {original_response.get('details','')}" - if message and message[0] == ":": - if len(message) > 2: - message = message[2:] - else: - message = "An error has occurred..." - raise ProviderException( - message=message, - code=response.status_code, - ) - return original_response["id"] - - def audio__speech_to_text_async__launch_job( - self, - file: str, - language: str, - speakers: int, - profanity_filter: bool, - vocabulary: Optional[List[str]], - audio_attributes: tuple, - model: Optional[str] = None, - file_url: str = "", - provider_params: Optional[dict] = None, - ) -> AsyncLaunchJobResponseType: - provider_params = provider_params or {} - export_format, channels, frame_rate = audio_attributes - - # upload file to amazon S3 - file_name = str(int(time())) + "_" + str(file.split("/")[-1]) - - content_url = file_url - if not content_url: - content_url = upload_file_to_s3( - file, Path(file_name).stem + "." + export_format - ) - - vocabulary = [] - - if vocabulary: - vocab_name = self._create_vocabulary(vocabulary) - self._launch_transcribe( - file_name, content_url, language, profanity_filter, vocab_name, True - ) - return AsyncLaunchJobResponseType( - provider_job_id=f"{vocab_name}EdenAI{file_name}" - ) - - provider_job_id = self._launch_transcribe( - file_name, content_url, language, profanity_filter, provider_params=provider_params - ) - provider_job_id = ( - f"{provider_job_id}EdenAI{file_name}" # file_name to delete file - ) - - return AsyncLaunchJobResponseType(provider_job_id=provider_job_id) - - def audio__speech_to_text_async__get_job_result( - self, provider_job_id: str - ) -> AsyncBaseResponseType[SpeechToTextAsyncDataClass]: - provider_job_id, file_name = provider_job_id.split("EdenAI") - headers = {"Authorization": f"Bearer {self.key}"} - # check if custom vocabulary - try: # check if job id of vocabulary or not - config_content = storage_clients(self.api_settings_aws)[ - "speech" - ].meta.client.get_object( - Bucket=self.bucket_name, Key=f"{provider_job_id}_settings.txt" - ) - config = json.loads(config_content["Body"].read().decode("utf-8")) - # check if vocab finished - if job_id := not config.get( - "provider_job_id" - ): # check if transcribe have been launched - response = requests.get( - url=f"https://ec1.api.rev.ai/speechtotext/v1/vocabularies/{provider_job_id}", - headers=headers, - ) - original_response = response.json() - if response.status_code != 200: - raise ProviderException( - message=f"{original_response.get('title','')}: {original_response.get('details','')}", - code=response.status_code, - ) - status = original_response["status"] - if status == "in_progress": - return AsyncPendingResponseType[SpeechToTextAsyncDataClass]( - provider_job_id=provider_job_id - ) - if status == "failed": - error = original_response.get("failure_detail") - raise ProviderException(error) - provider_job = self._launch_transcribe( - file_name, - config["source_config"]["url"], - config.get("language"), - config["filter_profanity"], - provider_job_id, - ) - config["provider_job_id"] = provider_job - return AsyncPendingResponseType[SpeechToTextAsyncDataClass]( - provider_job_id=provider_job_id - ) - provider_job_id = job_id - - except ClientError as exc: - pass - - response = requests.get( - url=f"https://ec1.api.rev.ai/speechtotext/v1/jobs/{provider_job_id}", - headers=headers, - ) - original_response = response.json() - if response.status_code != 200: - error_message = f"{original_response.get('title','')}: {original_response.get('details','')}" - if "could not find job" in error_message: - raise AsyncJobException( - reason=AsyncJobExceptionReason.DEPRECATED_JOB_ID, - code= response.status_code - ) - raise ProviderException( - message=error_message, - code=response.status_code, - ) - status = original_response["status"] - if status == "transcribed": - response = requests.get( - url=f"https://ec1.api.rev.ai/speechtotext/v1/jobs/{provider_job_id}/transcript", - headers=headers, - ) - if response.status_code != 200: - raise ProviderException( - message=f"{original_response.get('title','')}: {original_response.get('details','')}", - code=response.status_code, - ) - - diarization_entries = [] - speakers = set() - - original_response = response.json() - text = "" - for monologue in original_response["monologues"]: - text += "".join([element["value"] for element in monologue["elements"]]) - speakers.add(monologue["speaker"]) - for word_info in monologue["elements"]: - if word_info["type"] == "text": - diarization_entries.append( - SpeechDiarizationEntry( - speaker=monologue["speaker"] + 1, - segment=word_info["value"], - start_time=str(word_info["ts"]), - end_time=str(word_info["end_ts"]), - confidence=word_info["confidence"], - ) - ) - - diarization = SpeechDiarization( - total_speakers=len(speakers), entries=diarization_entries - ) - - standardized_response = SpeechToTextAsyncDataClass( - text=text, diarization=diarization - ) - return AsyncResponseType[SpeechToTextAsyncDataClass]( - original_response=original_response, - standardized_response=standardized_response, - provider_job_id=provider_job_id, - ) - elif status == "failed": - error = original_response.get("failure_detail") - raise ProviderException(error) - return AsyncPendingResponseType[SpeechToTextAsyncDataClass]( - provider_job_id=provider_job_id - ) diff --git a/edenai_apis/apis/skybiometry/__init__.py b/edenai_apis/apis/skybiometry/__init__.py deleted file mode 100644 index bab7ea58..00000000 --- a/edenai_apis/apis/skybiometry/__init__.py +++ /dev/null @@ -1 +0,0 @@ -from .skybiometry_api import SkybiometryApi diff --git a/edenai_apis/apis/skybiometry/errors.py b/edenai_apis/apis/skybiometry/errors.py deleted file mode 100644 index 0ad1d9ab..00000000 --- a/edenai_apis/apis/skybiometry/errors.py +++ /dev/null @@ -1,19 +0,0 @@ -from edenai_apis.utils.exception import ( - ProviderErrorLists, - ProviderInvalidInputFileSizeError, - ProviderParsingError, - ProviderInvalidInputFileFormatError, -) - -# NOTE: error messages should be regex patterns -ERRORS: ProviderErrorLists = { - ProviderParsingError: [ - r"Provider did not return any face", - ], - ProviderInvalidInputFileSizeError: [ - r"max image size is more than 2\.0 MB", - ], - ProviderInvalidInputFileFormatError: [ - r"DOWNLOAD_ERROR - Specified image is not supported" - ], -} diff --git a/edenai_apis/apis/skybiometry/info.json b/edenai_apis/apis/skybiometry/info.json deleted file mode 100644 index a153663c..00000000 --- a/edenai_apis/apis/skybiometry/info.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "image": { - "face_detection": { - "version": "v1" - } - } -} \ No newline at end of file diff --git a/edenai_apis/apis/skybiometry/outputs/image/face_detection_output.json b/edenai_apis/apis/skybiometry/outputs/image/face_detection_output.json deleted file mode 100644 index 38d0c733..00000000 --- a/edenai_apis/apis/skybiometry/outputs/image/face_detection_output.json +++ /dev/null @@ -1,287 +0,0 @@ -{ - "original_response": { - "uids": [], - "label": null, - "confirmed": false, - "manual": false, - "width": 44.44, - "height": 68.44, - "yaw": -20, - "roll": 4, - "pitch": 7, - "attributes": { - "face": { - "value": "true", - "confidence": 89 - }, - "gender": { - "value": "male", - "confidence": 40 - }, - "glasses": { - "value": "true", - "confidence": 60 - }, - "dark_glasses": { - "value": "true", - "confidence": 34 - }, - "smiling": { - "value": "false", - "confidence": 46 - }, - "age_est": { - "value": "44", - "confidence": 50 - }, - "mood": { - "value": "sad", - "confidence": 58 - }, - "lips": { - "value": "sealed", - "confidence": 54 - }, - "eyes": { - "value": "open", - "confidence": 25 - }, - "neutral_mood": { - "value": "false", - "confidence": 0 - }, - "anger": { - "value": "false", - "confidence": 42 - }, - "disgust": { - "value": "false", - "confidence": 0 - }, - "fear": { - "value": "false", - "confidence": 0 - }, - "happiness": { - "value": "false", - "confidence": 0 - }, - "sadness": { - "value": "true", - "confidence": 58 - }, - "surprise": { - "value": "false", - "confidence": 0 - }, - "ethnicity": { - "white": { - "value": "false", - "confidence": 24 - }, - "black": { - "value": "false", - "confidence": 4 - }, - "asian": { - "value": "false", - "confidence": 3 - }, - "indian": { - "value": "true", - "confidence": 66 - }, - "hispanic": { - "value": "false", - "confidence": 3 - } - }, - "beard": { - "value": "true", - "confidence": 57 - }, - "mustache": { - "value": "true", - "confidence": 16 - }, - "hat": { - "value": "false", - "confidence": 12 - }, - "liveness": { - "value": "true", - "confidence": 77 - } - }, - "points": null, - "similarities": null, - "tid": "TEMP_F@0e19027a075a58562d5551350086006b_ac38391966f34_59.56_47.56_0_1", - "recognizable": true, - "center": { - "x": 59.56, - "y": 47.56 - }, - "eye_left": { - "x": 74.67, - "y": 37.33, - "confidence": 100, - "id": 449 - }, - "eye_right": { - "x": 55.56, - "y": 35.11, - "confidence": 97, - "id": 450 - }, - "mouth_center": { - "x": 64.44, - "y": 60.44, - "confidence": 94, - "id": 615 - }, - "nose": { - "x": 68.0, - "y": 47.56, - "confidence": 98, - "id": 403 - } - }, - "standardized_response": { - "items": [ - { - "confidence": 89.0, - "landmarks": { - "left_eye": [ - 74.67, - 37.33 - ], - "left_eye_top": [], - "left_eye_right": [], - "left_eye_bottom": [], - "left_eye_left": [], - "right_eye": [ - 55.56, - 35.11 - ], - "right_eye_top": [], - "right_eye_right": [], - "right_eye_bottom": [], - "right_eye_left": [], - "left_eyebrow_left": [], - "left_eyebrow_right": [], - "left_eyebrow_top": [], - "right_eyebrow_left": [], - "right_eyebrow_right": [], - "left_pupil": [], - "right_pupil": [], - "nose_tip": [ - 74.67, - 37.33 - ], - "nose_bottom_right": [], - "nose_bottom_left": [], - "mouth_left": [], - "mouth_right": [], - "right_eyebrow_top": [], - "midpoint_between_eyes": [], - "nose_bottom_center": [], - "nose_left_alar_out_tip": [], - "nose_left_alar_top": [], - "nose_right_alar_out_tip": [], - "nose_right_alar_top": [], - "nose_root_left": [], - "nose_root_right": [], - "upper_lip": [], - "under_lip": [], - "under_lip_bottom": [], - "under_lip_top": [], - "upper_lip_bottom": [], - "upper_lip_top": [], - "mouth_center": [ - 0.0, - 0.0 - ], - "mouth_top": [], - "mouth_bottom": [], - "left_ear_tragion": [], - "right_ear_tragion": [], - "forehead_glabella": [], - "chin_gnathion": [], - "chin_left_gonion": [], - "chin_right_gonion": [], - "upper_jawline_left": [], - "mid_jawline_left": [], - "mid_jawline_right": [], - "upper_jawline_right": [], - "left_cheek_center": [], - "right_cheek_center": [] - }, - "emotions": { - "joy": 0, - "sorrow": 58, - "anger": 42, - "surprise": 0, - "disgust": 0, - "fear": 0, - "confusion": null, - "calm": null, - "unknown": null, - "neutral": 0, - "contempt": null - }, - "poses": { - "pitch": null, - "roll": null, - "yaw": null - }, - "age": 44.0, - "gender": "male", - "bounding_box": { - "x_min": null, - "x_max": null, - "y_min": null, - "y_max": null - }, - "hair": { - "hair_color": [], - "bald": null, - "invisible": null - }, - "facial_hair": { - "moustache": 1.0, - "beard": 1.0, - "sideburns": null - }, - "quality": { - "noise": null, - "exposure": null, - "blur": null, - "brightness": null, - "sharpness": null - }, - "makeup": { - "eye_make": null, - "lip_make": null - }, - "accessories": { - "sunglasses": 1.0, - "reading_glasses": null, - "swimming_goggles": null, - "face_mask": null, - "eyeglasses": 1.0, - "headwear": 0.0 - }, - "occlusions": { - "eye_occluded": null, - "forehead_occluded": null, - "mouth_occluded": null - }, - "features": { - "eyes_open": 1.0, - "smile": 0.0, - "mouth_open": 0.0 - } - } - ] - } -} \ No newline at end of file diff --git a/edenai_apis/apis/skybiometry/skybiometry_api.py b/edenai_apis/apis/skybiometry/skybiometry_api.py deleted file mode 100644 index 050d11ce..00000000 --- a/edenai_apis/apis/skybiometry/skybiometry_api.py +++ /dev/null @@ -1,178 +0,0 @@ -from typing import Dict, List - -import requests - -from edenai_apis.features import ProviderInterface -from edenai_apis.features.image import FaceItem, FaceDetectionDataClass -from edenai_apis.features.image import ImageInterface -from edenai_apis.features.image.face_detection.face_detection_dataclass import ( - FaceAccessories, - FaceEmotions, - FaceFacialHair, - FaceFeatures, - FaceHair, - FaceLandmarks, - FaceBoundingBox, - FaceMakeup, - FaceOcclusions, - FacePoses, - FaceQuality, -) -from edenai_apis.loaders.loaders import load_provider, ProviderDataEnum -from edenai_apis.utils.exception import ProviderException -from edenai_apis.utils.types import ResponseType - - -class SkybiometryApi(ProviderInterface, ImageInterface): - provider_name = "skybiometry" - - def __init__(self, api_keys: Dict = {}) -> None: - self.base_url = "https://api.skybiometry.com/fc/" - self.settings = load_provider( - ProviderDataEnum.KEY, self.provider_name, api_keys=api_keys - ) - self.api_key = self.settings["api_key"] - self.api_secret = self.settings["api_secret"] - - def image__face_detection( - self, file: str, file_url: str = "" - ) -> ResponseType[FaceDetectionDataClass]: - with open(file, "rb") as file_: - files = {"file": file_} - - endpoint = f"{self.base_url}faces/detect.json" - query_params = ( - f"api_key={self.api_key}&api_secret={self.api_secret}&attributes=all" - ) - response = requests.post(f"{endpoint}?{query_params}", files=files) - - original_response = response.json() - if response.status_code != 200: - raise ProviderException( - message=original_response["error_message"], code=response.status_code - ) - - if len(original_response["photos"][0]["tags"]) > 0: - original_response = original_response["photos"][0]["tags"] - else: - raise ProviderException( - message="Provider did not return any face", code=404 - ) - - items: List[FaceItem] = [] - for face in original_response: - items.append( - FaceItem( - confidence=face["attributes"].get("face", {}).get("confidence"), - landmarks=FaceLandmarks( - left_eye=[ - face.get("eye_left", {}).get("x", 0), - face.get("eye_left", {}).get("y", 0), - ], - right_eye=[ - face.get("eye_right", {}).get("x", 0), - face.get("eye_right", {}).get("y", 0), - ], - mouth_center=[ - face.get("mouse_center", {}).get("x", 0), - face.get("mouse_center", {}).get("y", 0), - ], - nose_tip=[ - face.get("eye_left", {}).get("x", 0), - face.get("eye_left", {}).get("y", 0), - ], - ), - bounding_box=FaceBoundingBox( - x_min=face["center"]["x"] - face["width"] / 2, - x_max=face["center"]["x"] + face["width"] / 2, - y_min=face["center"]["y"] - face["height"] / 2, - y_max=face["center"]["y"] + face["height"] / 2, - ), - emotions=FaceEmotions( - joy=face["attributes"].get("happiness", {}).get("confidence"), - sorrow=face["attributes"].get("sadness", {}).get("confidence"), - anger=face["attributes"].get("anger", {}).get("confidence"), - surprise=face["attributes"] - .get("surprise", {}) - .get("confidence"), - disgust=face["attributes"].get("disgust", {}).get("confidence"), - fear=face["attributes"].get("fear", {}).get("confidence"), - confusion=None, - calm=None, - unknown=None, - neutral=face["attributes"] - .get("neutral_mood", {}) - .get("confidence"), - contempt=None, - ), - age=face["attributes"].get("age_est", {}).get("value"), - gender=face["attributes"].get("gender", {}).get("value"), - facial_hair=FaceFacialHair( - moustache=( - 1.0 - if face["attributes"].get("mustache", {}).get("value") - == "true" - else 0.0 - ), - beard=( - 1.0 - if face["attributes"].get("beard", {}).get("value") - == "true" - else 0.0 - ), - sideburns=None, - ), - accessories=FaceAccessories( - sunglasses=( - 1.0 - if face["attributes"].get("dark_glasses", {}).get("value") - == "true" - else 0.0 - ), - eyeglasses=( - 1.0 - if face["attributes"].get("glasses", {}).get("value") - == "true" - else 0.0 - ), - headwear=( - 1.0 - if face["attributes"].get("hat", {}).get("value") == "true" - else 0.0 - ), - reading_glasses=None, - swimming_goggles=None, - face_mask=None, - ), - features=FaceFeatures( - eyes_open=( - 1.0 - if face["attributes"].get("eyes", {}).get("value") == "open" - else 0.0 - ), - smile=( - 1.0 - if face["attributes"].get("smiling", {}).get("value") - == "true" - else 0.0 - ), - mouth_open=( - 1.0 - if face["attributes"].get("lips", {}).get("value", "sealed") - != "sealed" - else 0.0 - ), - ), - poses=FacePoses.default(), - quality=FaceQuality.default(), - occlusions=FaceOcclusions.default(), - hair=FaceHair.default(), - makeup=FaceMakeup.default(), - ) - ) - - standardized_response = FaceDetectionDataClass(items=items) - return ResponseType[FaceDetectionDataClass]( - original_response=original_response, - standardized_response=standardized_response, - ) diff --git a/requirements.in b/requirements.in index 65b2f6a8..fd4f3535 100644 --- a/requirements.in +++ b/requirements.in @@ -51,10 +51,6 @@ google-cloud-videointelligence==2.11.2 google-cloud-automl==2.11.1 google-cloud-aiplatform==1.35.0 -#ibm -ibm-watson>=6.0.0 -watson-developer-cloud - #lettria lettria==6.0.0 @@ -64,7 +60,6 @@ azure-cognitiveservices-speech azure-core #modernMT -modernmt aleph_alpha_client==6.0.0 # openai diff --git a/requirements.txt b/requirements.txt index 33c845e2..b2aa4184 100644 --- a/requirements.txt +++ b/requirements.txt @@ -246,10 +246,6 @@ hyperlink==21.0.0 # via # autobahn # twisted -ibm-cloud-sdk-core==3.19.2 - # via ibm-watson -ibm-watson==8.0.0 - # via -r requirements.in idna==3.6 # via # anyio @@ -301,8 +297,6 @@ marshmallow==3.21.1 # via amazon-textract-response-parser mccabe==0.7.0 # via pylint -modernmt==1.5.1 - # via -r requirements.in msal==1.28.0 # via # azure-identity