from abc import abstractmethod, ABC
from typing import Any

import requests

from experiment.duckling.duckling_base_processing_task import DucklingBaseProcessingTask
from sziszapangma.integration.repository.experiment_repository import ExperimentRepository
from sziszapangma.integration.task.processing_task import ProcessingTask
from sziszapangma.model.relation_manager import RelationManager


class DucklingAsrProcessingTask(DucklingBaseProcessingTask):
    def __init__(self, duckling_endpoint: str, duckling_language: str, input_property_name: str,
                 duckling_property_name: str, task_name: str, require_update: bool):
        super().__init__(duckling_endpoint, duckling_language, input_property_name, duckling_property_name, task_name,
                         require_update)

    def get_transcript_to_process(self, property_value: Any) -> str:
        # print('property_value', property_value)
        return property_value['full_text']