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 configuration option to parse HTML based on CSS selectors #8

Open
JohnGUnderwood opened this issue Jul 12, 2024 · 0 comments
Open

Comments

@JohnGUnderwood
Copy link

When using the 'web' data load the chunking will sometime split text in the middle of a sentence. I'd like to have an option to pass in a css selector that pulls out a list of paragraphs from the source page. Then each complete paragraph could be its own chunk.

See an example here: https://github.com/JohnGUnderwood/atlas-news-search/blob/main/backend/packages/main.py#L177-L198

In the screenshots below the source article content is an array of paragraphs extracted from HTML using selectors. Each item is then turned into its own document with embedding.

Screenshot 2024-07-12 at 16 01 31 Screenshot 2024-07-12 at 16 02 21
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

No branches or pull requests

1 participant