Grammar

Links: notebook, html, python, slides, GitHub

The chatbot relies on a grammar to interpret an order. By default, it interprets French.

from botadi.mokadi import interpret
cmd = "MOKADI lire mail"
interpret(cmd)
[('MOKADI', ':MOKADI:'),
 ('lire', ':verb_voir:'),
 ('mail', ':mails:'),
 ('<EOF>', ':P:')]
cmd = "MOKADI lire présentation 1 transparent numéro 2"
interpret(cmd)
[('MOKADI', ':MOKADI:'),
 ('lire', ':verb_voir:'),
 ('présentation', ':presentation:'),
 ('1', ':int:'),
 ('transparent', ':slide:'),
 ('numéro', ':numero:'),
 ('2', ':int:'),
 ('<EOF>', ':P:')]