class_docstr: Abstraction of a entity parser implementing some basic caching
      
docstr: Search the given text for entities defined in the scope. If no
  scope is provided, search for all kinds of entities.
  
      Args:
          text (str): input text
          scope (list or set of str, optional): if provided the parser
              will only look for entities which entity kind is given in
              the scope. By default the scope is None and the parser
              will search for all kinds of supported entities
          use_cache (bool): if False the internal cache will not be use,
              this can be useful if the output of the parser depends on
              the current timestamp. Defaults to True.
  
      Returns:
          list of dict: list of the parsed entities formatted as a dict
              containing the string value, the resolved value, the
              entity kind and the entity range
code: def parse(self, text, scope=None, use_cache=True):
      """Search the given text for entities defined in the scope. If no
      scope is provided, search for all kinds of entities.
  
          Args:
              text (str): input text
              scope (list or set of str, optional): if provided the parser
                  will only look for entities which entity kind is given in
                  the scope. By default the scope is None and the parser
                  will search for all kinds of supported entities
              use_cache (bool): if False the internal cache will not be use,
                  this can be useful if the output of the parser depends on
                  the current timestamp. Defaults to True.
  
          Returns:
              list of dict: list of the parsed entities formatted as a dict
                  containing the string value, the resolved value, the
                  entity kind and the entity range
      """
      if not use_cache:
          return self._parse(text, scope)
      scope_key = tuple(sorted(scope)) if scope is not None else scope
      cache_key = (text, scope_key)
      if cache_key not in self._cache:
          parser_result = self._parse(text, scope)
          self._cache[cache_key] = parser_result
      return self._cache[cache_key]
  
file_path: snips-nlu/snips_nlu/entity_parser/entity_parser.py
imports: from __future__ import unicode_literals
  from abc import ABCMeta, abstractmethod
  from future.builtins import object
  from future.utils import with_metaclass
  from snips_nlu.common.dict_utils import LimitedSizeDict
label_desc: Use image node_id 2 for calling the EntityParser obj's underlying member method code with example usage: obj.parse(text, scope, use_cache) and returns: self, self