push thru index of what tokens are in what sentences to client side, maybe with corpus-wide dfs. would be small and help w/ explorer any time algorithm.
dynamic programming + exploration. as algo explores, keeps a structure that stories best possible configurations thus far, sort of like Viterbi.