Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
1–10 of 49 posts
Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#2I don't get the usage of "regex/heuristics" either. Why can that task not be completely handled by a classical algorithm?
Is it about the removal of non-content parts?
Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#3Maybe I am missing something here, but why would you run "AI" on that task when you go from formal language to formal language? I don't get the usage of "regex/heuristics" either. Why can that task not be completely handled by a classical algorithm? Is it about the removal of non-content parts?
Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#4Maybe I am missing something here, but why would you run "AI" on that task when you go from formal language to formal language? I don't get the usage of "regex/heuristics" either. Why can that task not be completely handled by a classical algorithm? Is it about the removal of non-content parts?
A nicely formatted subset of html is very different from a dom tag soup that is more or less the default nowadays.
Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#5Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#6Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#7Best I can tell, everyone is doing something similar, only differing in the amount of custom situation regex being used.
Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#8Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#9Feels surprising that there isn't a modern best-in-class non-LLM alternative for this task. Even in the post, they described that they used a hodgepodge of headless Chrome, readability, lots of regex to create content-only HTML. Best I can tell, everyone is doing something similar, only differing in the amount of custom situation regex being used.
Re: Reader-LM: Small Language Models for Cleaning and Converting HTML to Markdown
#10When does this SML perform better than hxdelete (or xmlstarlet or whatever) + rdrview + pandoc?
About their readability-markdown pipeline: "Some users found it too detailed, while others felt it wasn’t detailed enough. There were also reports that the Readability filter removed the wrong content or that Turndown struggled to convert certain parts of the HTML into markdown. Fortunately, many of these issues were successfully resolved by patching the existing pipeline with new regex patterns or heuristics."
To answer their question about the potention of a SML doing this, they see 'room for improvement' - but as their benchmark shows, it's not up to their classic pipeline.
You echo their research question: "instead of patching it with more heuristics and regex (which becomes increasingly difficult to maintain and isn’t multilingual friendly), can we solve this problem end-to-end with a language model?"