hired.taxonomy.build#
Build the skills taxonomy into the data root, and load it back as a SkillIndex.
build_skill_index() fetches the sources (ESCO via its API, O*NET via its
archive — see hired.taxonomy.sources), computes skill relatedness from
occupational co-occurrence (hired.taxonomy.graph), optionally embeds every
label (the embeddings extra), and writes the result under
<data root>/taxonomy/ with a NOTICE.md carrying the CC BY 4.0
attribution. Raw pages and archives are cached under taxonomy/raw/, so an
interrupted build resumes and a rebuild is offline (refresh=True re-fetches).
A full ESCO fetch takes tens of minutes (the occupation pages are slow); O*NET is one ~13 MB download. Nothing here runs at import time.
Functions
|
Fetch, compute and persist the taxonomy; return its |
|
Load the built taxonomy (raises |
- hired.taxonomy.build.build_skill_index(*, sources=('esco', 'onet'), embeddings=False, embedder=None, embedding_model='sentence-transformers/all-MiniLM-L6-v2', root=None, refresh=False, onet_version='30_0', graph_kwargs=None, get_json=None, get_bytes=None, progress=None)[source]#
Fetch, compute and persist the taxonomy; return its
metasummary.embeddings=True(or an explicitembedder) also stores one vector per node label.graph_kwargsgo torelatedness_edges().
- hired.taxonomy.build.load_skill_index(*, root=None, embedder='auto', **index_kwargs)[source]#
Load the built taxonomy (raises
FileNotFoundErrorwith the build hint).embedder="auto"uses the stored embedding model for query text when the taxonomy has vectors and theembeddingsextra is installed (loaded on first use); passNoneto compare stored vectors only, or any embedder.index_kwargsgo toSkillIndex(e.g.bridge_k).- Return type: