In production we've seen this happen:
The string: "2 st 25 öre 1949,1950.\r\n3 st 1 kr 1943.\r\n4 st 1 kr 1944" will generate an Math::DomainError. It comes from the punkt-segmenter gem and it's a known issue.
A possible fix/workaround for this is to use the fork harrisj/punkt-segmenter and use a trained tokenizer. A code doodle on how that could look can be found here: here.
In production we've seen this happen:
The string:
"2 st 25 öre 1949,1950.\r\n3 st 1 kr 1943.\r\n4 st 1 kr 1944"will generate anMath::DomainError. It comes from thepunkt-segmentergem and it's a known issue.A possible fix/workaround for this is to use the fork harrisj/punkt-segmenter and use a trained tokenizer. A code doodle on how that could look can be found here: here.