<commit_before>import contextlib
import re
import sys
import unicodedata
from collections import OrderedDict
from datetime import datetime
from typing import Dict, Union, List, Tuple, KeysView, Optional

from scripts.service.ws_re.register.author import Authors
from scripts.service.ws_re.register.base import RegisterException
from scripts.service.ws_re.volumes import Volume

if sys.version_info >= (3, 8):
    from typing import TypedDict  # pylint: disable=no-name-in-module

# type hints
if sys.version_info >= (3, 8):
    # typed dicts
    class ChapterDict(TypedDict):
        author: str
        start: int
        end: int

    LemmaItems = Union[str, bool, ChapterDict]

    class LemmaDict(TypedDict):
        lemma: str
        previous: str
        next: str<commit_msg>LemmaDict don't need to be complete all the time<commit_after>import contextlib
import re
import sys
import unicodedata
from collections import OrderedDict
from datetime import datetime
from typing import Dict, Union, List, Tuple, KeysView, Optional

from scripts.service.ws_re.register.author import Authors
from scripts.service.ws_re.register.base import RegisterException
from scripts.service.ws_re.volumes import Volume

if sys.version_info >= (3, 8):
    from typing import TypedDict  # pylint: disable=no-name-in-module

# type hints
if sys.version_info >= (3, 8):
    # typed dicts
    class ChapterDict(TypedDict):
        author: str
        start: int
        end: int

    LemmaItems = Union[str, bool, ChapterDict]

    class LemmaDict(TypedDict, total=False):
        lemma: str
        previous: str
        next: str
{'fraction_non_alphanumeric': 0.07372986369268897, 'fraction_numerical': 0.004956629491945477, 'mean_word_length': 3.6142857142857143, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7306530', 'n_tokens_mistral': 476, 'n_tokens_neox': 460, 'n_words': 158}