doctest: safely compute expected value

Errors occurring during the evaluation of a test's expected result are
caught and logged.

Also the code for the test being executed is logged.
started rewriting vocabulary w/ new data structure

Only a few test pass now.