docstr: Parses an utterance
  
  Args:
      string (str): an utterance in the class:`.Utterance` format
  
  Examples:
  
      >>> from snips_nlu.dataset.intent import IntentUtterance
      >>> u = IntentUtterance.                parse("president of [country:default](France)")
      >>> u.text
      'president of France'
      >>> len(u.chunks)
      2
      >>> u.chunks[0].text
      'president of '
      >>> u.chunks[1].slot_name
      'country'
      >>> u.chunks[1].entity
      'default'
docstr_tok: ["Parses","an","utterance","Args",":","string","(","str",")",":","an","utterance","in","the","class",":","`",".Utterance","`","format","Examples",":",">",">",">","from","snips_nlu.dataset.intent","import","IntentUtterance",">",">",">","u","=","IntentUtterance",".","parse","(","``","president","of","[","country",":","default","]","(","France",")","''",")",">",">",">","u.text","'president","of","France'",">",">",">","len","(","u.chunks",")","2",">",">",">","u.chunks","[","0","]",".text","'president","of","'",">",">",">","u.chunks","[","1","]",".slot_name","'country'",">",">",">","u.chunks","[","1","]",".entity","'default","'"]
code: def parse(cls, string):
      """Parses an utterance
  
          Args:
              string (str): an utterance in the class:`.Utterance` format
  
          Examples:
  
              >>> from snips_nlu.dataset.intent import IntentUtterance
              >>> u = IntentUtterance.\
                  parse("president of [country:default](France)")
              >>> u.text
              'president of France'
              >>> len(u.chunks)
              2
              >>> u.chunks[0].text
              'president of '
              >>> u.chunks[1].slot_name
              'country'
              >>> u.chunks[1].entity
              'default'
          """
      sm = SM(string)
      capture_text(sm)
      return cls(sm.chunks)
  
imports: from __future__ import absolute_import, print_function, unicode_literals
  from abc import ABCMeta, abstractmethod
  from builtins import object
  from io import IOBase
  from future.utils import with_metaclass
  from snips_nlu.constants import DATA, ENTITY, SLOT_NAME, TEXT, UTTERANCES
  from snips_nlu.exceptions import IntentFormatError
label_desc: Use image node_id 4 for calling the IntentUtterance obj's underlying member method code with example usage: obj.parse(cls, string) and returns: cls