ottokart / punctuator2

A bidirectional recurrent neural network model with attention mechanism for restoring missing punctuation in unsegmented text
http://bark.phon.ioc.ee/punctuator
MIT License
657 stars 195 forks source link

TypeError: write() argument 1 must be unicode, not str #58

Closed nayanhalder closed 4 years ago

nayanhalder commented 4 years ago

i am getting the following error, please help me to resolve. i am running in python2.7.

Number of parameters is 17926152 Building model... WARNING (theano.tensor.blas): We did not found a dynamic library into the library_dir of the library we use for blas. If you use ATLAS, make sure to compile it with dynamics library. Traceback (most recent call last): File "punctuator.py", line 176, in restore(output_file, text, word_vocabulary, reverse_punctuation_vocabulary, predict) File "punctuator.py", line 112, in restore f_out.write(punctuations[j] if punctuations[j] != data.SPACE else " ") TypeError: write() argument 1 must be unicode, not str

nayanhalder commented 4 years ago

the issue resolved after running in python 3. very good utility.