Swedish NLP utilities for DocForge — zero external dependencies
Project description
docforge-swedish
Swedish NLP utilities for the DocForge platform. Zero external dependencies — pure stdlib.
Install
pip install docforge-swedish
# or locally:
pip install -e src/docforge_swedish
Usage
from docforge_swedish import (
SwedishNormalizer,
SwedishNER,
SwedishFormats,
SwedishStopwords,
SwedishProcessor,
Domain,
)
normalizer = SwedishNormalizer()
normalized = normalizer.normalize("socialtjänstlagen § 4 kap")
# → "SoL § 4 kap"
ner = SwedishNER()
entities = ner.extract("JO har granskat Socialnämnden i Stockholm")
print(entities.authorities) # ['JO', 'Socialnämnden']
stopwords = SwedishStopwords.for_municipal()
filtered = stopwords.filter_text("nämnden beslutade att godkänna rapporten")
Modules
| Module | Description |
|---|---|
SwedishNormalizer |
OCR fixes, law reference normalization, municipality/authority name normalization |
SwedishNER |
Rule-based named entity recognition (authorities, courts, law refs, persons, dates) |
SwedishFormats |
Date, SEK amount, personnummer parsing and formatting |
SwedishStopwords |
Domain-specific stopword sets (general, legal, municipal, social, medical) |
SwedishProcessor |
High-level pipeline combining all of the above |
Domain |
Enum for stopword domains |
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
docforge_swedish-0.1.0.tar.gz
(11.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file docforge_swedish-0.1.0.tar.gz.
File metadata
- Download URL: docforge_swedish-0.1.0.tar.gz
- Upload date:
- Size: 11.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e597918e68487f5e9351a394f62d4d1f179f09396b5462eaf5dd77c5734cf8ec
|
|
| MD5 |
846367fa27c1fdd71647951a590dcf33
|
|
| BLAKE2b-256 |
a063fe3d257e14e097840aa68ed92500b6fdcc364ad9e029b7fbfb389748c58c
|
File details
Details for the file docforge_swedish-0.1.0-py3-none-any.whl.
File metadata
- Download URL: docforge_swedish-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bd294bb77d6088ba66bd06dfeda298b2c40ff704b425823447c8097688b7480
|
|
| MD5 |
cbe75efe2482afd697574b10443fb347
|
|
| BLAKE2b-256 |
b3f916c2ad41aa04d7f581a827ce6823f057be03aa29d5e272c2f7ccaac1e30b
|