Dictionary API
Public dictionary-source API.
- pstrain.api.dictionary.default_cmudict_cache()[source]
Return the CMUdict cache within pstrain’s benchmark cache hierarchy.
- Return type:
- pstrain.api.dictionary.fetch_cmudict(ref='HEAD', cache=None)[source]
Fetch, convert, and cache CMUdict from its original upstream source.
refmay be a tag, branch, or commit SHA. Network access happens only in a fresh child process. On macOS, an in-process HTTPS download followed by a native worker spawn crashes the interpreter, so the download is kept out of any process that later spawns workers.- Parameters:
- Return type: