In our case, we treat our problem as: given the occurring context of an entity, retrieving categories corresponding to this entity.
we use context as query q and the categories of this candidate entity as d. We also treat the definition page of an entity as its context, and first train the model with definition pages, because definition pages exhibit more focused topic.