Convert HTML to Markdown using Regex, BeautifulSoup4, and filter repeating characters with Jina Embeddings and a similarity threshold.
Project description
Convert and Format HTML to Markdown
Purpose
For converting HTML to Markdown and formatting a dataset of HTML content into structured Markdown, with added capabilities of processing text embeddings to identify and remove repetitive content.
Installation & Setup
First clone the package: git clone https://github.com/daethyra/context-converter.git
To get started, run:
pip install context-converter
- Run
jina_embeddings.py
to preemptively download the embeddings model.
Example integration:
- Please see an example usage in gpt-crawler. This fork of
gpt-crawler
has thecontext-converter
package integrated into its processing pipeline.
Configuration:
- You can clone the package repository to configure similarity threshold for removing content, chunk size, maximum number of threads, the file pattern to match when loading files for conversion, and the output file's name.
git clone https://github.com/daethyra/context-converter.git
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for context_converter-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dfff557ef94bfa4294c86119daf34009fa996df3bb0d9f5ca89148adb8ed2a6 |
|
MD5 | 92ac4eec1480e71e70c105758fe77018 |
|
BLAKE2b-256 | 33cd1d22a4da0041a899773dd4ff99b1c3f1db4fb4e99ee3de4f4c9c842f4e90 |