[WIP] Entity topic model

This is Wei's GSoC work in progress.

I am opening up a pull request to have a better place to discuss the code directly...