from azure.core.credentials import AzureKeyCredential
from azure.ai.textanalytics import TextAnalyticsClient
from settings import TEXT_ANALYSIS_API_KEY, TEXT_ANALYSIS_ENDPOINT


def get_analysis_client(endpoint=TEXT_ANALYSIS_ENDPOINT, credential=AzureKeyCredential(TEXT_ANALYSIS_API_KEY)):
    text_analytics_client = TextAnalyticsClient(endpoint=endpoint, credential=credential)
    return text_analytics_client
