doc read from line and ignore word not in dictionary.
index of max pr
add inference