hipster-philology / pandora

A Tagger-Lemmatizer for Natural Languages
MIT License
9 stars 4 forks source link

Fixing issue in the output of keras model.predict method #62

Closed Jean-Baptiste-Camps closed 6 years ago

Jean-Baptiste-Camps commented 6 years ago

The Keras model.predict outputs a list, when inputs are multiple, but an array otherwise. This caused a bug described in #16 . I'm trying to correct it. Not sure if this is the best solution, but it works.

Jean-Baptiste-Camps commented 6 years ago

Ok, I initially tried with it, without success, but I'll see if I can figure it out now.

PonteIneptique commented 6 years ago

Check https://github.com/hipster-philology/pandora/blob/master/pandora/tagger.py#L691 You need to import jumpy if it is not done. Also, do directly [var] instead of append

Jean-Baptiste-Camps commented 6 years ago

Ok, I initially missed the "as np", that's why it didn't work.

PonteIneptique commented 6 years ago

Go ahead and do a squash