static PositionalTokenIndex test_PositionalTokenIndex() { new PositionalTokenIndex idx; idx.addAll(map wordTok(tlft([[ you are here what is this hello world hello you ]]))); printStruct(idx); assertEqualsVerbose(ll("you are here"), map join(idx.byToken(0, "you"))); // index should preserve original order assertEqualsVerbose(ll("hello world", "hello you"), map join(idx.byToken(0, "hello"))); assertEqualsVerbose(ll("what is this"), map join(idx.byToken(1, "is"))); assertEqualsVerbose(ll(), unnull(map join(idx.byToken(3, "is")))); stresstest_PositionalTokenIndex(); ret idx; }