Top-K semiring
This commit implements the Top-K semiring as described in Section 6 in 'Semiring Frameworks and Algorithms for Shortest-Distance Problems' (Mohri) https://cs.nyu.edu/~mohri/pub/jalc.pdf The main different is that I implementd the 'max' variant instead of min.