Skip to main content

Fast Sentence Tokenizer (fast-sentence-tokenize)

Best in class tokenizer

Usage

Import

from fast_sentence_tokenize import fast_sentence_tokenize

Call Tokenizer

results = fast_sentence_tokenize("isn't a test great!!?")

Results

[
   "isn't",
   "a",
   "test",
   "great",
   "!",
   "!",
   "?"
]

Note that whitespace is not preserved in the output by default.

This generally results in a more accurate parse from downstream components, but may make the reassembly of the original sentence more challenging.

Preserve Whitespace

results = fast_sentence_tokenize("isn't a test great!!?", eliminate_whitespace=False)

Results

[
   "isn't ",
   "a ",
   "test ",
   "great",
   "!",
   "!",
   "?"
]

This option preserves whitespace.

This is useful if you want to re-assemble the tokens using the pre-existing spacing

assert ''.join(tokens) == input_text

Metadata

Release files for fast-sentence-tokenize 0.1.15

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fast-sentence-tokenize 0.1.15
File Size Uploaded
fast_sentence_tokenize-0.1.15.tar.gz 9.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fast-sentence-tokenize 0.1.15
File Interpreter ABI Platform
fast_sentence_tokenize-0.1.15-py3-none-any.whl Python 3 none any Details

Total release size: 23.2 kB

Release files / fast_sentence_tokenize-0.1.15.tar.gz

Download URL fast_sentence_tokenize-0.1.15.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0f5d8f5691f8dc41e321eac720ddaf1cb59fd33259e5482f78992e26162ac294
BLAKE2b-256 checksum
How to use checksums
36591c68d48388ab9d7e6e77a2d6029d94317159bd1d6dadb6a533facd99cdf1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

Release files / fast_sentence_tokenize-0.1.15-py3-none-any.whl

Download URL fast_sentence_tokenize-0.1.15-py3-none-any.whl
Size 13.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85eed0ba762a6f919c7628b8c6951c5a09abf8f0544bfcf5add033c0e59e0b8d
BLAKE2b-256 checksum
How to use checksums
0ebc4f5de44e36700aff3303c1def32e7d155146cd9070d7f92ca8904e9983c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.5.1 CPython/3.11.4 Darwin/22.5.0

Release history Release notifications | RSS feed

This release

0.1.15 This release

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release 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