liwca.datasets.dictionaries.path#
- liwca.datasets.dictionaries.path(name, **kwargs)[source]#
Return the local path to the cached
.dicxfor a named dictionary.Calls the corresponding
fetch_<name>(**kwargs)to ensure the .dicx cache is populated, then returns the local path. Useful for handing off to tools that consume a .dicx file directly (e.g., the LIWC-22 CLI).- Parameters:
name (str) – Friendly dictionary name, matching one of the public
fetch_<name>functions (e.g.,"sleep","emfd","bigtwo").**kwargs – Forwarded to the underlying fetcher (e.g.,
version="b"for"bigtwo").
- Returns:
Path to the cached
.dicxfile.- Return type:
- Raises:
ValueError – If
namedoes not correspond to a known fetcher.
Examples
>>> from liwca.datasets import dictionaries >>> dictionaries.path("sleep") PosixPath('.../dictionaries/sleep.dicx') >>> dictionaries.path("bigtwo", version="b") PosixPath('.../dictionaries/bigtwo-vb.dicx') >>> dictionaries.path("wrad") PosixPath('.../dictionaries/wrad.dicx')