important parser error
huangruizhe opened this issue · 0 comments
huangruizhe commented
python-arpa/arpa/parsers/quick.py
Line 21 in 2284b81
The regular expression has an error here. Consider the case where the line is:
-2.310726 maybe when 9.609759e-05
The exponent in the backoff weight is not correctly parsed -- the e-05
will be missed.
Wrt the correct version, there should be an extra bracket/group in the expression. Like this:
"(\t ( (-?\d+(\.\d+)?)([eE]-?\d+)? ) )?$"