本文へ移動
cccskills
無料GitHub で公開

gensim

Guides Gensim topic modelling, document indexing, embeddings, similarity retrieval, downloader, and script workflows for Python NLP and IR tasks.

インストール方法を見る

含まれるファイル(40)

  • SKILL.md5.3 KB
  • references/package-overview.md4.7 KB
  • references/repo-provenance.md2.4 KB
  • references/repo-routing-metadata.json508 B
  • references/troubleshooting.md4.7 KB
  • scripts/check_gensim_environment.py3.0 KB
  • scripts/core_workflow_smoke.py2.2 KB
  • sub-skills/corpora-and-vector-spaces/references/api-reference.md3.7 KB
  • sub-skills/corpora-and-vector-spaces/references/data-formats.md2.4 KB
  • sub-skills/corpora-and-vector-spaces/references/troubleshooting.md1.9 KB
  • sub-skills/corpora-and-vector-spaces/references/workflows.md2.8 KB
  • sub-skills/corpora-and-vector-spaces/scripts/corpus_io_smoke.py2.0 KB
  • sub-skills/corpora-and-vector-spaces/SKILL.md4.3 KB
  • sub-skills/data-and-cli-utilities/references/cli-reference.md1.7 KB
  • sub-skills/data-and-cli-utilities/references/downloader-and-data.md1.5 KB
  • sub-skills/data-and-cli-utilities/references/troubleshooting.md2.1 KB
  • sub-skills/data-and-cli-utilities/references/wiki-workflows.md1.6 KB
  • sub-skills/data-and-cli-utilities/scripts/convert_glove_to_word2vec.py1.5 KB
  • sub-skills/data-and-cli-utilities/scripts/segment_wiki_tiny.py3.0 KB
  • sub-skills/data-and-cli-utilities/scripts/word2vec_to_tensor_tsv.py1.8 KB
  • sub-skills/data-and-cli-utilities/SKILL.md3.7 KB
  • sub-skills/embeddings-and-phrases/references/keyedvectors-and-formats.md1.8 KB
  • sub-skills/embeddings-and-phrases/references/phrases.md1.5 KB
  • sub-skills/embeddings-and-phrases/references/troubleshooting.md2.2 KB
  • sub-skills/embeddings-and-phrases/references/word2vec-fasttext-doc2vec.md2.5 KB
  • sub-skills/embeddings-and-phrases/scripts/embedding_smoke.py2.3 KB
  • sub-skills/embeddings-and-phrases/SKILL.md4.3 KB
  • sub-skills/similarity-and-search/references/api-reference.md2.4 KB
  • sub-skills/similarity-and-search/references/optional-indexes-and-metrics.md1.5 KB
  • sub-skills/similarity-and-search/references/troubleshooting.md2.0 KB
  • sub-skills/similarity-and-search/references/workflows.md1.6 KB
  • sub-skills/similarity-and-search/scripts/similarity_query_smoke.py1.9 KB
  • sub-skills/similarity-and-search/SKILL.md4.1 KB
  • sub-skills/topic-modeling-and-transformations/references/api-reference.md3.2 KB
  • sub-skills/topic-modeling-and-transformations/references/evaluation-and-coherence.md1.5 KB
  • sub-skills/topic-modeling-and-transformations/references/lda-workflows.md2.0 KB
  • sub-skills/topic-modeling-and-transformations/references/troubleshooting.md2.2 KB
  • sub-skills/topic-modeling-and-transformations/references/workflows.md2.0 KB
  • sub-skills/topic-modeling-and-transformations/scripts/topic_transform_smoke.py2.0 KB
  • sub-skills/topic-modeling-and-transformations/SKILL.md4.5 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Gensim Repo Skill

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.

First checks

  1. 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
    
  2. For a privacy-safe diagnostic, run or adapt scripts/check_gensim_environment.py.

  3. For an end-to-end sanity check across core concepts, run scripts/core_workflow_smoke.py.

  4. Read references/repo-provenance.md before deciding whether this skill is current for a checkout.

Installation notes

  • Public install: python -m pip install --upgrade gensim.
  • Local checkout inspection/development: python -m pip install -e . from the checkout root.
  • Gensim 4.4.0 metadata requires Python >=3.9 and runtime dependencies numpy, scipy, and smart_open.
  • Optional surfaces are not part of the minimum install: 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.
  • Performance depends heavily on the BLAS/LAPACK libraries used by NumPy/SciPy. GPU hardware is not required for the workflows covered here.

Route map

If the task is about...Read
Documents, tokens, dictionaries, bag-of-words vectors, streaming corpora, Matrix Market/SVMlight/Blei/UCI/Mallet formats, TextCorpus, WikiCorpussub-skills/corpora-and-vector-spaces/SKILL.md
TF-IDF, BM25, LSI/LSA, LDA/LdaMulticore, HDP, NMF, topic coherence, model transforms and persistencesub-skills/topic-modeling-and-transformations/SKILL.md
Word2Vec, FastText, Doc2Vec, KeyedVectors, phrase detection, embedding persistence and vector formatssub-skills/embeddings-and-phrases/SKILL.md
MatrixSimilarity, SparseMatrixSimilarity, sharded Similarity, Soft Cosine, WMD, term-similarity matrices, Annoy/NMSLIB optional indexessub-skills/similarity-and-search/SKILL.md
gensim.downloader, GENSIM_DATA_DIR, GloVe/word2vec/TensorBoard conversions, package diagnostics, Wikipedia dump helper CLIssub-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.

Common workflow order

  1. Start with raw text documents or an existing vector corpus.
  2. Use corpora.Dictionary and doc2bow (or a streaming corpus class) to build a consistent feature space.
  3. Train a transformation/model such as TfidfModel, LsiModel, or LdaModel on that same feature space.
  4. Save models/corpora with .save(), .load(), or corpus-specific serialize() helpers.
  5. Build an index with MatrixSimilarity, SparseMatrixSimilarity, or Similarity only after choosing the transformed vector space and num_features.
  6. Use embeddings (Word2Vec, FastText, Doc2Vec, KeyedVectors) when the task needs token/document embeddings instead of bag-of-words topic models.

Decision shortcuts

  • Use Dictionary.doc2bow(tokens) only with token lists, never a raw string.
  • Use streaming iterators when a corpus may not fit in memory.
  • Use TfidfModel as a lightweight weighting transform before LSI or similarity.
  • Use LdaMulticore for CPU multicore LDA on one machine; optional distributed LDA/LSI requires Pyro4 and separate worker/dispatcher setup.
  • Use FastText rather than Word2Vec when out-of-vocabulary word vectors are required.
  • Use KeyedVectors when you only need stored vectors and similarity operations, not continued training.
  • Use Similarity rather than MatrixSimilarity when the indexed vectors do not fit in memory.
  • Check optional dependencies before selecting Annoy, NMSLIB, WMD/POT, Pyro4 distributed, or Visdom callback flows.

Runtime boundaries

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.

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Routes 3D ResNets PyTorch video action-recognition workflows across training, inference, and data preparation.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

3ddfa

無料

Guide 3DDFA Python inference, geometry rendering, training/evaluation, and optional C++ ONNX workflows for 3D dense face alignment.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

3ddfa-v2

無料

Routes 3DDFA_V2 face-alignment setup, still-image demos, video tracking, and ONNX benchmarking workflows.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

ab3dmot

無料

Operate AB3DMOT 3D multi-object tracking workflows for KITTI and nuScenes data, tracking, evaluation, and visualization.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

Use Hugging Face Accelerate for PyTorch training-loop migration, distributed launch/configuration, DeepSpeed/FSDP/TPU backend setup, big-model inference/offload, checkpointing, tracking, and troubleshooting.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

acme

無料

Route Acme reinforcement-learning framework tasks across core loops, replay/data, JAX agents, and TensorFlow/Sonnet agents.

日本語の概要は準備中です。原文の説明を表示しています。

VectorSpaceLab/AREX-Skill3322026年9月3日 更新

VectorSpaceLab のスキルをすべて見る

このスキルの問題を報告する