This is because once the goodness measure is given, the decoding algorithm will segment any ambiguous strings into the same word sequences, no matter what their context is.
nonparametric Bayesian language models aim to segment character string into a "reasonable" sentence according to the posterior probability.