// returns ranges from C to N static L fullPhraseCache_tokenRanges(FullPhraseCache cache, LS tok) { new L out; if (cache == null) ret out; for (int i = 1; i < l(tok); i += 2) { int j = fullPhraseCache_longestPhraseLength(cache, tok, i); if (j > i) { out.add(IntRange(i, j-1)); i = j; } } ret out; }