Skip to main content

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

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docforge_swedish-0.1.0-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

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

Hashes for docforge_swedish-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e597918e68487f5e9351a394f62d4d1f179f09396b5462eaf5dd77c5734cf8ec
MD5 846367fa27c1fdd71647951a590dcf33
BLAKE2b-256 a063fe3d257e14e097840aa68ed92500b6fdcc364ad9e029b7fbfb389748c58c

See more details on using hashes here.

File details

Details for the file docforge_swedish-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for docforge_swedish-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bd294bb77d6088ba66bd06dfeda298b2c40ff704b425823447c8097688b7480
MD5 cbe75efe2482afd697574b10443fb347
BLAKE2b-256 b3f916c2ad41aa04d7f581a827ce6823f057be03aa29d5e272c2f7ccaac1e30b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page