from pathlib import Path
from typing import Dict
import json


def load(file: Path) -> Dict[str, str]:
    """Load the JSON file containing all words and their details."""
    with file.open(encoding="utf-8") as fh:
        words: Dict[str, str] = json.load(fh)
    print(f">>> Loaded {len(words):,} words from {file}", flush=True)
    return words