视觉画布设计
canvas-design
基于设计原则创作静态视觉作品,用于海报与品牌图形。
gensim【文档与办公】Guides Gensim topic modelling, document indexing, embeddings, similarity retrieval, downloader, and script workflows for Python NLP and IR tasks.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task needs Gensim for streaming corpora, vector-space models, topic modelling, word/document embeddings, document similarity, gensim-data resources, or package-provided conversion/Wikipedia utilities.
Gensim is a CPU-oriented Python package for topic modelling, document indexing, and similarity retrieval. It is optimized around streaming corpora and NumPy/SciPy linear algebra rather than GPU backends.
Confirm the package is importable in the target environment:
python - <<'PY'
import gensim
from gensim import corpora, models, similarities
print(gensim.__version__)
print(corpora.Dictionary, models.TfidfModel, similarities.MatrixSimilarity)
PY
For a privacy-safe diagnostic, run or adapt scripts/check_gensim_environment.py.
For an end-to-end sanity check across core concepts, run scripts/core_workflow_smoke.py.
Read references/repo-provenance.md before deciding whether this skill is current for a checkout.
python -m pip install --upgrade gensim.python -m pip install -e . from the checkout root.>=3.9 and runtime dependencies numpy, scipy, and smart_open.Pyro4 for distributed LDA/LSI, annoy or nmslib for approximate-neighbor helpers, POT/import name ot for WMD, NLTK/scikit/pandas/statsmodels for some documentation examples, and Visdom for selected callbacks.| If the task is about... | Read |
|---|---|
Documents, tokens, dictionaries, bag-of-words vectors, streaming corpora, Matrix Market/SVMlight/Blei/UCI/Mallet formats, TextCorpus, WikiCorpus | sub-skills/corpora-and-vector-spaces/SKILL.md |
| TF-IDF, BM25, LSI/LSA, LDA/LdaMulticore, HDP, NMF, topic coherence, model transforms and persistence | sub-skills/topic-modeling-and-transformations/SKILL.md |
| Word2Vec, FastText, Doc2Vec, KeyedVectors, phrase detection, embedding persistence and vector formats | sub-skills/embeddings-and-phrases/SKILL.md |
| MatrixSimilarity, SparseMatrixSimilarity, sharded Similarity, Soft Cosine, WMD, term-similarity matrices, Annoy/NMSLIB optional indexes | sub-skills/similarity-and-search/SKILL.md |
gensim.downloader, GENSIM_DATA_DIR, GloVe/word2vec/TensorBoard conversions, package diagnostics, Wikipedia dump helper CLIs | sub-skills/data-and-cli-utilities/SKILL.md |
For a compact package map and cross-workflow dependencies, read
references/package-overview.md. For install,
import, optional dependency, cache, and data-size failures, read
references/troubleshooting.md.
corpora.Dictionary and doc2bow (or a streaming corpus class) to build a consistent feature space.TfidfModel, LsiModel, or LdaModel on that same feature space..save(), .load(), or corpus-specific serialize() helpers.MatrixSimilarity, SparseMatrixSimilarity, or Similarity only after choosing the transformed vector space and num_features.Word2Vec, FastText, Doc2Vec, KeyedVectors) when the task needs token/document embeddings instead of bag-of-words topic models.Dictionary.doc2bow(tokens) only with token lists, never a raw string.TfidfModel as a lightweight weighting transform before LSI or similarity.LdaMulticore for CPU multicore LDA on one machine; optional distributed LDA/LSI requires Pyro4 and separate worker/dispatcher setup.FastText rather than Word2Vec when out-of-vocabulary word vectors are required.KeyedVectors when you only need stored vectors and similarity operations, not continued training.Similarity rather than MatrixSimilarity when the indexed vectors do not fit in memory.The guidance and bundled scripts in this skill are self-contained. Do not require future agents to open the original repository docs, examples, tests, scripts, or notebooks to complete normal Gensim tasks. Treat original repo files only as provenance evidence unless this skill has bundled an adapted helper or reference.