skillfed

tokenizer

A fast, compact pure-Python tokenizer for Icelandic text with sentence segmentation

tokenizer v3.6.4 121.1K downloads/30d#11,994 on PyPI32
Permissive license MIT Active released

What it is and what it does

Tokenizer is a pure-Python library and command-line tool for breaking Icelandic text into tokens (words, punctuation, numbers, dates, URLs, e-mails, measurements, and amounts) and segmenting them into sentences. It handles corner cases like abbreviations and dates mid-sentence. The package offers two modes: shallow tokenization, which returns space-separated tokens as strings, and deep tokenization, which returns annotated token objects with type information and extracted values (e.g., a date token yields a year/month/day tuple). It includes a built-in dictionary of common Icelandic abbreviations and runs on Python 3.10 or later, with both CPython and PyPy support.

The library is a spinoff from the Greynir natural language parser project and is designed as a preprocessing step for NLP tasks like word counting, parsing, spell checking, and corpus analysis. It can be used as a Python module via functions like `split_into_sentences()` and `tokenize()`, or invoked as a command-line tool with options for CSV/JSON output, punctuation normalization, and HTML escape handling.

Use it for:

  • Preprocess Icelandic text for downstream NLP pipelines such as parsing, spell checking, or statistical analysis.
  • Extract structured token information (dates, amounts, measurements, URLs) from Icelandic documents in JSON or CSV format.
  • Segment Icelandic text into sentences for corpus generation or document processing workflows.
  • Normalize Icelandic punctuation and typography (quotes, ellipsis, dashes) in text processing applications.
  • Build command-line text processing workflows using the tokenize tool to batch-process Icelandic documents.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Tokenizes Icelandic text into words, punctuation, numbers, dates, and other token types, with optional sentence segmentation and deep annotation of token properties.

Yes. The package is actively maintained, has zero known vulnerabilities, installs with no dependencies, and is production-stable. Install it if you need to tokenize or segment Icelandic text. It is not useful for other languages.

Install

tokenizer on PyPI

pip

pip install tokenizer

uv

uv add tokenizer

poetry

poetry add tokenizer

Installing tokenizer

Before you install

Low friction: pure-Python wheel with no runtime dependencies. Active maintenance—last release 35 days ago, repository updated 2026-07-10. Supports Python 3.10 through 3.14 on CPython and PyPy.

License in practice

MIT license (permissive): you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.

Quickstart

pip install tokenizer

from tokenizer import split_into_sentences, tokenize

# Shallow tokenization (returns sentences as strings)
for sent in split_into_sentences("Halló heimur. Þetta er prófun."):
    print(sent)

# Deep tokenization (returns token objects with type and value)
for token in tokenize("3. janúar 2026"):
    print(token.kind, token.txt, token.val)

Requires Python 3.10 or later; Icelandic-specific, not useful for other languages.

Verify before relying

  • Whether the included Abbrev.conf dictionary covers domain-specific abbreviations beyond common Icelandic ones.
  • Performance characteristics on non-ASCII or mixed-language input beyond the 1 MB Icelandic Gigaword Corpus benchmark.

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 35 days since the last release
Last repo commit
First released
Downloads 121,119/month — #11,994 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: tokenizer-3.6.4-py3-none-any.whl

Keywords: tokenizer, tokenization, icelandic, nlp, natural-language-processing, text-processing, sentence-segmentation, parsing

Development Status :: 5 - Production/StableIntended Audience :: DevelopersNatural Language :: IcelandicOperating System :: MacOSOperating System :: Microsoft :: WindowsOperating System :: POSIXOperating System :: UnixProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTopic :: Text Processing :: LinguisticTopic :: Utilities

Tags

icelandic text tokenizationsentence segmentation icelandicnlp tokenizer icelandictext processing icelandicword tokenizationicelandic language processingtoken classification
icelandic-nlpsentence-segmentation

More Python Modules packages