Fixing a bug that might cause Karma to quit on Arabic characters while learning the semantic type