api for dictionary/Markov