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

Fix linking of sentences in sentence splitter #3397

Merged
merged 2 commits into from
Jan 30, 2024
Merged

Conversation

mariosaenger
Copy link
Collaborator

This PR fixes the missing linkage of sentences (see issue #3396), i.e., setting the previous and next sentence in the sentence objects, when calling the split method of a sentence splitter.

@mauryaland
Copy link
Contributor

Isn't the already implemented Sentence method set_context_for_sentences appropriate here?

def set_context_for_sentences(cls, sentences: List["Sentence"]) -> None:

@mariosaenger
Copy link
Collaborator Author

@mauryaland Thanks for the hint! I adapted the implementation accordingly.

@helpmefindaname
Copy link
Collaborator

Changes look good, the failing pipeline seems to be due to unrelated issues, I will look into those further in a separate PR

@alanakbik
Copy link
Collaborator

@mariosaenger thanks for fixing this!

@alanakbik alanakbik merged commit 347b9a8 into master Jan 30, 2024
1 check failed
@alanakbik alanakbik deleted the fix-splitter branch January 30, 2024 10:51
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.

4 participants