remove automatic setup of tokenizer directory

ICU tokenizer doesn't need any extra data anymore, so it doesn't
make sense to create a directory which then remains empty. If a
tokenizer needs such a directory in the future, it needs to create
it on its own and make sure to handle the situation correctly where
no project directory is used at all.
This commit is contained in:
Sarah Hoffmann
2025-04-02 20:20:04 +02:00
parent 9cf5eee5d4
commit 186f562dd7
8 changed files with 16 additions and 52 deletions

View File

@@ -2,7 +2,7 @@
#
# This file is part of Nominatim. (https://nominatim.org)
#
# Copyright (C) 2024 by the Nominatim developer community.
# Copyright (C) 2025 by the Nominatim developer community.
# For a full list of authors see the git log.
"""
Abstract class definitions for tokenizers. These base classes are here
@@ -10,7 +10,6 @@ mainly for documentation purposes.
"""
from abc import ABC, abstractmethod
from typing import List, Tuple, Dict, Any, Optional, Iterable
from pathlib import Path
from ..typing import Protocol
from ..config import Configuration
@@ -232,6 +231,6 @@ class TokenizerModule(Protocol):
own tokenizer.
"""
def create(self, dsn: str, data_dir: Path) -> AbstractTokenizer:
def create(self, dsn: str) -> AbstractTokenizer:
""" Factory for new tokenizers.
"""