Regarding the sense ID as the part of speech, all-words WSD is a same problem as part of speech tagging.
to solve all-words WSD, we make a directed graph like Figure 1, and then estimate the optimum path from the start node 'S' to the end node 'E'.