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

MarkupConverter - convert HTML documents into plain text #3988

Open
sebjwallace opened this issue Jan 27, 2023 · 2 comments
Open

MarkupConverter - convert HTML documents into plain text #3988

sebjwallace opened this issue Jan 27, 2023 · 2 comments
Labels

Comments

@sebjwallace
Copy link

Is your feature request related to a problem? Please describe.
The Crawler component works great. However, once I've saved the HTML documents to disc I'd like to convert the markup into plain text. This is a similar feature request, however I believe it'll be useful to have a dedicated node to clean up markup in-memory. Typically we'd want to keep our source data in its raw state on disc. This allows a user to change the parameters of the converter to yield different conversions without mutating the source.

Describe the solution you'd like
MarkupConverter can use BeautifulSoup to exclude and/or include HTML tags. Given an input HTML document, a user can define that they want to exclude (link, style, script, etc.) Or they can define they'd only like paragraph tags. Allowing the user to define inclusive/exclusive sets allows flexibility of what kind of text they'd like to extract for their particular task.

Like the Markdown converter, the Markup converter can extract metadata from the header element.

@sebjwallace
Copy link
Author

If this logically fits in as a Converter then I can place a PR soon enough :)

@bogdankostic
Copy link
Contributor

Hi @sebjwallace! This seems to be an interesting feature request and is somehow related to #3838.
To make sure we're all on the same page before investing time into the actual implementation, we would ask you to file a design proposal detailing the changes you would like to see in Haystack. Once approved, you could implement the proposal yourself, wait for a contributor to pick it up, or ask the core developers to prioritise it.

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

No branches or pull requests

2 participants