atpaino / deep-text-corrector

Deep learning models trained to correct input errors in short, message-like text
Apache License 2.0
1.23k stars 266 forks source link

KeyError: 'UNK' #25

Open doudoubean opened 5 years ago

doudoubean commented 5 years ago

When I run your project ,this error occurs. How to solve this problem?

Traceback (most recent call last): File "correct_text.py", line 438, in tf.app.run() File "/usr/local/lib/python3.5/dist-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "correct_text.py", line 413, in main data_reader = MovieDialogReader(config, FLAGS.train_path) File "/opt/yangzhanku/correct_text/deep-text-corrector-master/text_corrector_data_readers.py", line 88, in init self.UNKNOWN_ID = self.token_to_id[MovieDialogReader.UNKNOWN_TOKEN] KeyError: 'UNK'