finish document parsing for token names

add random split algorithm