Skip to content

Conversation

@jelmervdl
Copy link
Contributor

Some documents contain extremely long lines of generated text (most often links to search page results) that take forever to parse with the regular expressions in split-sentences.perl. Using the -c option these lines can be completely ignored.

Some documents contain extremely long lines of generated text (most often links to search page results) that take forever to parse with the regular expressions in split-sentences.perl. Using the -c option these lines can be completely ignored.
Comment on lines -271 to +279
$text = $text.$words[$i];
if (scalar(@words) > 0) {
$text = $text.$words[$i];
}
Copy link
Contributor Author

@jelmervdl jelmervdl Feb 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It apparently also contains a fix for warnings caused by blank (or only whitespace) lines in the input.

@kpu
Copy link
Owner

kpu commented Feb 17, 2021

Ideally we'd replace buffering then splitting with splitting on the fly. Then if there's something long and no split we throw it out. Here I'm a bit concerned we're throwing out stuff that would correctly split. I understand your immediate need though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants