Implementation of discovery of end of a word.