added flag to allow a given number of unknown kanji