Example implementation of EM training algorithm with simple tags and observed data.