Merge "Use word id to construct DicNode instead of isTerminal flag."