improving structure

This commit is contained in:
gulimabr
2026-01-28 15:40:47 -03:00
parent 08825bf817
commit 1461168af6
6 changed files with 10 additions and 20 deletions

View File

@@ -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)