Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

question regarding splitting corpus #1

Open
fschwiet opened this issue Aug 31, 2020 · 0 comments
Open

question regarding splitting corpus #1

fschwiet opened this issue Aug 31, 2020 · 0 comments

Comments

@fschwiet
Copy link

fschwiet commented Aug 31, 2020

First, thanks for putting this corpus together. I was hoping to ask a question.

I want to run some code against the corpus, but its problematic to load the entire files into memory as individual strings and run the code (using NLP tools, they tend to run out of memory). So I want to split it up without causing in splits at sentence boundaries. So I am reading small chunks via a text stream, splitting on a text pattern.

Is it safe to split on newlines (\n)? Or could that be splitting sentences? Or to paraphrase, are any sentences broken up across lines in the files?

Sentence boundaries can be difficult to detect, but it seems like this corpus uses a single line per paragraph (like example A) but it does not seem the corpus splits sentences to fit text in a page (like in B). I was hoping you could confirm.

A:

Sentence boundaries can be difficult to detect, but it seems like this corpus uses a single line per paragraph (like example A) but it does not seem the corpus splits sentences to fit text in a page (like in B).

B:

Sentence boundaries can be difficult to detect, but 
it seems like this corpus uses a single line per paragraph 
(like example A) but it does not seem the corpus splits 
sentences to fit text in a page (like in B).
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

No branches or pull requests

1 participant