python-crfsuite icon indicating copy to clipboard operation
python-crfsuite copied to clipboard

CRFsuiteDumpParser fails to parse dump if attributes contain newlines

Open CisterMoke opened this issue 3 years ago • 0 comments

The CRFsuiteDumpParser parses a dump line per line with the assumption that each line is complete. Whenever an attribute contains a newline however, some lines will be broken up over multiple lines. Take for example the following broken up state feature line

(0) -1:word.lower:
 
   
   --> O: 0.000003

This will break parse_STATE_FEATURES because the first line will not match the regex.

CisterMoke avatar Jun 02 '22 15:06 CisterMoke