Flexible fusion part 1: CSV short-text document corpus format#863
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #863 +/- ##
=======================================
Coverage 99.64% 99.65%
=======================================
Files 99 99
Lines 7349 7446 +97
=======================================
+ Hits 7323 7420 +97
Misses 26 26 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Closed
juhoinkinen
approved these changes
Aug 5, 2025
Member
juhoinkinen
left a comment
There was a problem hiding this comment.
LGTM, please see the comment about lines without a comma.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR implements the first part of #813 (flexible fusion backend) which is independent from the rest and may be useful on its own: a new CSV short text corpus format. This is very similar to the existing TSV short text format, with two important differences:
csvmodule can read without custom options should be OK.Right now, only two columns are really supported (and required):
textandsubject_uris. Any other columns are silently ignored. My plan is to build on this when implementing #813 and enable the use of custom columns for additional document metadata; see #813 (comment) for details. However, this PR can be merged on its own.The code supports both uncompressed CSV files (file names must have extension
.csv, case-insensitive) as well as gzipped CSV files (.csv.gz, case-insensitive).Implementation notes:
DocumentFileclass toDocumentFileTSVand defined a new classDocumentFileCSV