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

Add sentence labeler #3570

Merged
merged 4 commits into from
Feb 4, 2025
Merged

Conversation

MattGPT-ai
Copy link
Contributor

This is a simplified version of the chunking utility provided in #3520

@MattGPT-ai MattGPT-ai force-pushed the add-sentence-labeler branch 2 times, most recently from fdae4ef to a711cb6 Compare November 23, 2024 11:46
flair/training_utils.py Outdated Show resolved Hide resolved
@MattGPT-ai
Copy link
Contributor Author

I addressed your change request, is there anything else that you need me to change or can this be merged?

Copy link
Collaborator

@alanakbik alanakbik left a comment

Choose a reason for hiding this comment

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

Thanks a lot for adding this and sorry for taking so long to review! See the comments for suggested changes.

Generally, I think this is quite a useful helper function for all Flair dataset classes that have annotations labeled as character offsets.

Regarding the chunking/truncation, it would be nice in the future to have such functionality be attached to the Corpus class, similar to the filter_long_sentences method but with truncation or chunking rather than filtering. This way, it could be used for any corpus.

flair/training_utils.py Show resolved Hide resolved
flair/training_utils.py Outdated Show resolved Hide resolved
flair/training_utils.py Outdated Show resolved Hide resolved
@MattGPT-ai MattGPT-ai force-pushed the add-sentence-labeler branch from f726672 to 082e845 Compare February 4, 2025 04:36
@MattGPT-ai MattGPT-ai requested a review from alanakbik February 4, 2025 04:38
@alanakbik alanakbik merged commit ae592bf into flairNLP:master Feb 4, 2025
1 check passed
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.

3 participants