ufal / neuralmonkey

An open-source tool for sequence learning in NLP built on TensorFlow.
BSD 3-Clause "New" or "Revised" License
411 stars 102 forks source link

Float of type 1e-3 is not parsed correctly in ini #725

Closed Simon-Will closed 6 years ago

Simon-Will commented 6 years ago

Floats of the type 1e-3 are not accepted by the parser because the FLOAT regex in the file parsing.py does not match. It only matches if there is a dot (like in 1.0e-3). 1e-3 is a correct python float, though, and floats like this are also generated by templating systems like jinja2.

Therefore the FLOAT regex should be adjusted. I would be happy to do this and will send a pull request if that’s okay.

jindrahelcl commented 6 years ago

Hi, thanks, we are aware of this issue. If you send a pull request it'll be great.

Simon-Will commented 6 years ago

I have sent it.