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

Rolling Window splitter: alternatives to regex for pre-splitting #193

Open
klein-t opened this issue Mar 12, 2024 · 2 comments
Open

Rolling Window splitter: alternatives to regex for pre-splitting #193

klein-t opened this issue Mar 12, 2024 · 2 comments

Comments

@klein-t
Copy link

klein-t commented Mar 12, 2024

Regex is good for pre-splitting, but I've noticed it behaves weirdly sometimes, when more context is needed in a pre-split sentence. I propose to add an option to use SpaCy as a sentence pre-splitter

@klein-t klein-t changed the title Alternatives to regex for pre-splitting Rolling Window splitter: alternatives to regex for pre-splitting Mar 12, 2024
@bruvduroiu
Copy link
Member

Hi @klein-t, the spirit of the idea is good. Do you have some examples of weird regex behavior that could be fixed by using spaCy sentencizers ?

@klein-t
Copy link
Author

klein-t commented Mar 15, 2024

Hey @bruvduroiu,

sometimes, I'd have a short sentence split in two by a colon, which I'd like to keep as one sentence. Current regex seem to split it in two, SpaCy does not.

Don't get me wrong, I like regex, is fast, but I feel having SpaCy in the loop might help deal with more nuanced scenarios.

Btw, I added a PR #204

I just realize that adding SpaCy might mess with the lower bound for tokens?

lmk

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

2 participants