improving structure
This commit is contained in:
@@ -82,9 +82,9 @@ def normalize_text(text: str) -> str:
|
||||
@lru_cache(maxsize=1)
|
||||
def load_taxonomy() -> dict:
|
||||
root_dir = Path(__file__).resolve().parents[1]
|
||||
tax_path = root_dir / "data" / "iso" / "iso-14244-tax.json"
|
||||
tax_path = root_dir / "data" / "iso-14244-tax.json"
|
||||
if not tax_path.exists():
|
||||
tax_path = Path("/data/iso/iso-14244-tax.json")
|
||||
tax_path = Path("/data/iso-14244-tax.json")
|
||||
with tax_path.open("r", encoding="utf-8") as handle:
|
||||
return json.load(handle)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user