# Path: golem/core/parsing/entity_extractor.py
# class EntityExtractor(ABC):
#     """
#     Abstract class for entity extractors.
#     Responsible for processing text and extracting entities such as names, dates, places etc.
#     """
# 
#     def __init__(self):
#         pass
# 
#     @abstractmethod
#     def extract_entities(self, text: str, max_retries=5):
#         """
#         Extracts entities from text (a message from user).
#         :param text:        a string.
#         :param max_retries: how many times to retry on error.
#         :return: A dict of extracted entities.
#                  For example:
#                  {
#                     "place": [
#                         {"value": "Prague"},
#                         {"value": "New York", "metadata": {}}
#                     ],
#                     "name": [{"value": "Golem"}],
#                     ...
#                  }
#         """
#         return dict()


from golem.core.parsing.entity_extractor import EntityExtractor
            from golem.nlu.predict import GolemNLU


class GolemExtractor(EntityExtractor):

    def __init__(self):
        super().__init__()
        self.nlu = None

    def extract_entities(self, text: str, max_retries=1):
        if not self.nlu:

# Path: golem/core/parsing/entity_extractor.py
# class EntityExtractor(ABC):
#     """
#     Abstract class for entity extractors.
#     Responsible for processing text and extracting entities such as names, dates, places etc.
#     """
# 
#     def __init__(self):
#         pass
# 
#     @abstractmethod
#     def extract_entities(self, text: str, max_retries=5):
#         """
#         Extracts entities from text (a message from user).
#         :param text:        a string.
#         :param max_retries: how many times to retry on error.
#         :return: A dict of extracted entities.
#                  For example:
#                  {
#                     "place": [
#                         {"value": "Prague"},
#                         {"value": "New York", "metadata": {}}
#                     ],
#                     "name": [{"value": "Golem"}],
#                     ...
#                  }
#         """
#         return dict()


# Path: golem/core/parsing/golem_extractor.py
from golem.core.parsing.entity_extractor import EntityExtractor
            from golem.nlu.predict import GolemNLU



class GolemExtractor(EntityExtractor):

    def __init__(self):
        super().__init__()
        self.nlu = None

    def extract_entities(self, text: str, max_retries=1):
        if not self.nlu:

            self.nlu = GolemNLU()