From 981fab53aa8c402e35cb10529fe145d3201d6105 Mon Sep 17 00:00:00 2001 From: Elia Robyn Lake Date: Thu, 10 Mar 2022 19:16:38 -0500 Subject: [PATCH] add py.typed --- wordfreq/numbers.py | 1 + wordfreq/preprocess.py | 1 + wordfreq/py.typed | 0 3 files changed, 2 insertions(+) create mode 100644 wordfreq/py.typed diff --git a/wordfreq/numbers.py b/wordfreq/numbers.py index 97d9bc1..c52a2b5 100644 --- a/wordfreq/numbers.py +++ b/wordfreq/numbers.py @@ -24,6 +24,7 @@ DIGIT_RE = regex.compile(r"\d") MULTI_DIGIT_RE = regex.compile(r"\d[\d.,]+") PURE_DIGIT_RE = regex.compile(r"\d+") + def benford_freq(text: str) -> float: """ Estimate the frequency of a digit sequence according to Benford's law. diff --git a/wordfreq/preprocess.py b/wordfreq/preprocess.py index 20d4cca..0c4dcb2 100644 --- a/wordfreq/preprocess.py +++ b/wordfreq/preprocess.py @@ -7,6 +7,7 @@ from langcodes import Language MARK_RE = regex.compile(r"[\p{Mn}\N{ARABIC TATWEEL}]", regex.V1) + def preprocess_text(text: str, language: Language) -> str: """ This function applies pre-processing steps that convert forms of words diff --git a/wordfreq/py.typed b/wordfreq/py.typed new file mode 100644 index 0000000..e69de29