# dialog specification schema version 2.0
# discussed with Jose Robins and team 2021-02-03 at wed night mob programming
#
# Additional features not yet discussed:
#   - next condition: `null` causes the chatbot program to say goodbye and exit
#   - `yes`, `y`, `true` creates a default list of affirmative intents
# If only a single next_condition intent string is found, additional intents are inferred:
#   - If there is another list of intents that starts with a single intent string? use that
#   - state names and keywords (like next_condition) fall back to normalized version that remove spaces, underscores, and fold case to lowercase (like wiki_normalize_text but dont delete/ignore digits)

-
  # optional defaults for this yml file
  state: __default__
  nlp:
    __default__: exact
  version: 2.0  # added by Hobson 2021-03-14
-
  state: welcome_state
  bot:
    - Are you ready for some questions about Python?
  next: __finish__  # state to go to if 'yes' or 'ok' are not the player responses
  nlp:
    Q1: exact  # only leading and trailing whitespace is stripped with the .strip() method
    Q2: normalize  # normalize text to delete all non word characters (\w=[a-zA-Z0-9_]) and perform case-insensitive exact matching
    Q3: keyword  # presence/absence of the intent str is checked, e.g. 'Yes'.lower() in user_statement.lower()
    Q4: case_sensitive_keyword  # same as keyword, but don't lower the user statement nor intent str
    welcome_state: lower  # case-insensitive exact str match, equivalent to "case_insensitive" and upper
    __default__: exact  # all states without an NLP parameter specified will use this matching algorithm
  next_score:
    Q1: "+= 1"
  next_condition:
    Q1:   # state to go to if 'yes' or 'ok' are entered.
      - 'yes'
      - ok
      - 'true'
      - 'y'
    welcome_state:
      - 'no'
      - go back
      - nope
    other_state:
      - "i don't know"   # uses welcome state `nlp: __default__: lower` algorithm to process this
      - "help"
      - "tell me more"
-
  state: Q1
  bot:
    - Name the two fundamental numerical data types in Python
  next_condition:
    next_score:
      Q2: "+= 2"
      __finish__: "+=1"
    __finish__:   # to test when only one value in the list is presetnt
      - finish
      - stop
      - I'm done
    Q2:
      - int, float
      - int float
      - float int
      - float, int
      - bool float int
      - integer float
      - float integer
      - integer, float
      - float, integer
    __finish__:
      - int
      - float
      - integer
      - float
-
  state: other_state
  bot:
    - I don't know
  next_condition:
    another_system_default_state:
      - "help me please"  # this would be processed with the global __default__ nlp algorithm
-
  state: another_system_default_state
  bot:
    - "I still don't know what to say"
-
  state: Q2
  Bot:
    - Name the fundamental Python data structure container type that can only contain unique items
-
  state: __finish__
  Bot:
    - Goodbye
-

