EDGARDSRS: Tool for SEC 10-k files
| License | |
| Dependencies | |
| Meta |
Description:
EDGARDSRS is a Python library designed to clean and process SEC EDGAR 10-K filing HTML files. It removes unnecessary HTML elements, various types of noise/gibberish text, and extract tables with high numeric content to produce clean, readable text output suitable for analysis.
Features
- HTML cleaning and text extraction
- Removal of financial tables and numeric-heavy content
- Extract financial tables
- Elimination of noisy text and gibberish
- Unicode normalization
- Special character handling
- Multiple HTML parser support (html.parser, lxml, html5lib)
Installation
pip install edgardsrs
Required dependencies:
- beautifulsoup4
- lxml
- html5lib
- unicodedata
Usage
Basic usage to clean a 10-K HTML file:
from edgardsrs import EdgarDSRS
analyzer = EdgarDSRS()
# Cleaning the file
input_file = "your_10k_file.html"
cleaned_file = analyzer.process_html_file(input_file)
Cleaning Process
The tool performs the following cleaning operations:
- HTML Parsing: Attempts to parse HTML using multiple parsers (html.parser, lxml, html5lib)
- Tag Removal: Strips all HTML tags while preserving text content
- Unicode Normalization: Normalizes Unicode characters
- Noise Removal:
- Removes sequences with high special character density
- Eliminates base64 encoded patterns
- Cleans up lines with excessive non-alphanumeric characters
- Text Cleaning:
- Removes noisy words (mixed case with numbers, excessive length)
- Normalizes whitespace
Functions
clean_html_content(html_content)
Main function to clean HTML content and extract text.
text = EdgarDSRS.clean_html_content(html_content)
extract_and_format_tables
Function to extract tables.
soup = BeautifulSoup(html_content, "html.parser")
tables = extract_and_format_tables(soup)
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Pratik Relekar | Xinyao Qian
Background
This library was developed at Data Science Research Services(University of Illinois at Urbana-Champaign) in 2024 and has been under active development since then.
Getting help
For general questions and discussions, visit DSRS mailing list.
Release files for edgardsrs 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| edgardsrs-0.1.1.tar.gz | 5.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| edgardsrs-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / edgardsrs-0.1.1.tar.gz
| Download URL | edgardsrs-0.1.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1cbffe23f64f77e877b488506ab149b793511c6402f00a5714996d0bb1862c94
|
|
BLAKE2b-256 checksum How to use checksums |
36cf67cd979ede1ea2e433cfee2f7bc1907284177c127cd90ffde4c39a7b7905
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|
Release files / edgardsrs-0.1.1-py3-none-any.whl
| Download URL | edgardsrs-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
142965efd82940a40c64d41ce148fde6c9f170cd518d9ff4da9bf02d6a524d2a
|
|
BLAKE2b-256 checksum How to use checksums |
c9adca545486b2807dc9dca5b37e76d42744359828b7282fbe983a0afd89b5a3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.0.1 CPython/3.9.21
|