Skip to content

Conversation

alanakbik
Copy link
Collaborator

This PR adds two new parameters to ColumnCorpus and ColumnDataset to enable more customization in handling document boundaries.

documents_as_sentences: If set to True and a document_separator_token is also set, the corpus will create one sentence object not for each sentence, but for each document in the corpus.

every_sentence_is_independent: If set to True, the corpus will consider each sentence independent. This means that loaded sentences cannot expand their context beyond the sentence boundary. This is useful for corpora that store independent sentences, like tweets.

@alanakbik alanakbik merged commit ba41223 into master Jan 11, 2025
2 checks passed
@alanakbik alanakbik deleted the documents_as_sentences branch January 11, 2025 15:28
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.

1 participant