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 a simple way to use preprocessors with SimpleTextDataSource #315

Open
olivierceulemans opened this issue Dec 29, 2022 · 1 comment
Open
Labels
enhancement New feature or request

Comments

@olivierceulemans
Copy link

I just tried using SimpleTextDataSource with a custom preprocessor but ended up creating a custom subclass of TextDataSource just for this.

I think it would be great if the class SimpleTextDataSource would accept a list of DocumentPreprocessor in its constructors' arguments. The parent class has these arguments.

@olivierceulemans olivierceulemans added the enhancement New feature or request label Dec 29, 2022
@Craigacp
Copy link
Member

We can add that, though SimpleTextDataSource constrains the input format for the text to an internal format we'd been using for years and we had expected that most users would prefer to write their own TextDataSource implementation for their own data rather than change their data to our half-baked format. If it's easier to change the data then we can expose the document preprocessors.

We should note in the docs that the expected path for more complicated text is to subclass TextDataSource and customize the read method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants