id int64 0 458k | file_name stringlengths 4 119 | file_path stringlengths 14 227 | content stringlengths 24 9.96M | size int64 24 9.96M | language stringclasses 1
value | extension stringclasses 14
values | total_lines int64 1 219k | avg_line_length float64 2.52 4.63M | max_line_length int64 5 9.91M | alphanum_fraction float64 0 1 | repo_name stringlengths 7 101 | repo_stars int64 100 139k | repo_forks int64 0 26.4k | repo_open_issues int64 0 2.27k | repo_license stringclasses 12
values | repo_extraction_date stringclasses 433
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7,100 | tfidfmodel.py | piskvorky_gensim/gensim/models/tfidfmodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2017 Mohit Rathore <mrmohitrathoremr@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module implements functionality related to ... | 21,476 | Python | .py | 457 | 37.234136 | 120 | 0.604616 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,101 | bm25model.py | piskvorky_gensim/gensim/models/bm25model.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""This module implements functionality related to the `Okapi Best Matching
<https://en.wikipedia.org/wiki/Okapi_BM25>`_ class of bag-of-words vector space models.
Robertson and Zaragoza [1]_ describe the original algorithm and its modifications.
.. [1] Robertson S., Zar... | 17,136 | Python | .py | 328 | 41.926829 | 104 | 0.624649 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,102 | ldamulticore.py | piskvorky_gensim/gensim/models/ldamulticore.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Jan Zikes, Radim Rehurek
# Copyright (C) 2014 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Online Latent Dirichlet Allocation (LDA) in Python, using all CPU cores to paral... | 17,462 | Python | .py | 291 | 50.223368 | 119 | 0.644848 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,103 | phrases.py | piskvorky_gensim/gensim/models/phrases.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Automatically detect common phrases -- aka multi-word expressions, word n-gram collocations -- from
a stream of s... | 34,071 | Python | .py | 673 | 40.320951 | 118 | 0.615086 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,104 | ensemblelda.py | piskvorky_gensim/gensim/models/ensemblelda.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Authors: Tobias Brigl <github.com/sezanzeb>, Alex Salles <alex.salles@gmail.com>,
# Alex Loosley <aloosley@alumni.brown.edu>, Data Reply Munich
# Copyright (C) 2021 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old... | 59,387 | Python | .py | 1,076 | 45.374535 | 120 | 0.655716 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,105 | word2vec.py | piskvorky_gensim/gensim/models/word2vec.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Gensim Contributors
# Copyright (C) 2018 RaRe Technologies s.r.o.
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Introduction
============
This module implements the word2vec family of algorithms, using high... | 107,470 | Python | .py | 1,986 | 43.098187 | 120 | 0.62792 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,106 | word2vec_inner.pyx | piskvorky_gensim/gensim/models/word2vec_inner.pyx | #!/usr/bin/env cython
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: cdivision=True
# cython: embedsignature=True
# coding: utf-8
#
# Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.... | 38,285 | Python | .py | 821 | 38.717418 | 292 | 0.62989 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,107 | nmf.py | piskvorky_gensim/gensim/models/nmf.py | """Online Non-Negative Matrix Factorization.
Implementation of the efficient incremental algorithm of Renbo Zhao, Vincent Y. F. Tan et al.
`[PDF] <https://arxiv.org/abs/1604.02634>`_.
This NMF implementation updates in a streaming fashion and works best with sparse corpora.
- W is a word-topic matrix
- h is a topic-d... | 28,493 | Python | .py | 608 | 36.139803 | 120 | 0.598556 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,108 | lsi_dispatcher.py | piskvorky_gensim/gensim/models/lsi_dispatcher.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Dispatcher process which orchestrates distributed :class:`~gensim.models.lsimodel.LsiModel` computations.
Run th... | 9,903 | Python | .py | 224 | 36.308036 | 119 | 0.644923 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,109 | rpmodel.py | piskvorky_gensim/gensim/models/rpmodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Random Projections (also known as Random Indexing).
For theoretical background on Random Projections, see [1]_... | 6,020 | Python | .py | 129 | 38.124031 | 109 | 0.619235 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,110 | doc2vec_corpusfile.pyx | piskvorky_gensim/gensim/models/doc2vec_corpusfile.pyx | #!/usr/bin/env cython
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: cdivision=True
# cython: embedsignature=True
# coding: utf-8
#
# Copyright (C) 2018 Dmitry Persiyanov <dmitry.persiyanov@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-lice... | 24,931 | Python | .py | 470 | 41.565957 | 145 | 0.611891 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,111 | translation_matrix.py | piskvorky_gensim/gensim/models/translation_matrix.py | #!/usr/bin/env python
# encoding: utf-8
"""Produce a translation matrix to translate words from one language to another, using either
a standard nearest neighbour method or a globally corrected neighbour retrieval method [1]_.
This method can be used to augment the existing phrase tables with more candidate translati... | 18,050 | Python | .py | 351 | 42.752137 | 118 | 0.635402 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,112 | ldaseqmodel.py | piskvorky_gensim/gensim/models/ldaseqmodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# Based on Copyright (C) 2016 Radim Rehurek <radimrehurek@seznam.cz>
"""Lda Sequence model, inspired by
`David M. Blei, John D. Lafferty: "Dynamic Topic Models"
<https://mimno... | 62,174 | Python | .py | 1,307 | 36.844682 | 120 | 0.597555 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,113 | fasttext.py | piskvorky_gensim/gensim/models/fasttext.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Authors: Gensim Contributors
# Copyright (C) 2018 RaRe Technologies s.r.o.
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Introduction
------------
Learn word representations via fastText: `Enriching Word Vectors wit... | 55,109 | Python | .py | 1,114 | 41.248654 | 120 | 0.652901 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,114 | lsimodel.py | piskvorky_gensim/gensim/models/lsimodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Module for `Latent Semantic Analysis (aka Latent Semantic Indexing)
<https://en.wikipedia.org/wiki/Latent_seman... | 45,136 | Python | .py | 896 | 40.15625 | 120 | 0.61118 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,115 | nmf_pgd.pyx | piskvorky_gensim/gensim/models/nmf_pgd.pyx | # Author: Timofey Yefimov
# cython: language_level=3
# cython: cdivision=True
# cython: boundscheck=False
# cython: wraparound=False
# cython: nonecheck=False
# cython: embedsignature=True
from libc.math cimport sqrt
from cython.parallel import prange
cdef double fmin(double x, double y) nogil:
return x if x < y... | 1,869 | Python | .py | 45 | 35.244444 | 104 | 0.661683 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,116 | lda_dispatcher.py | piskvorky_gensim/gensim/models/lda_dispatcher.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Dispatcher process which orchestrates distributed Latent Dirichlet Allocation
(LDA, :class:`~gensim.models.ldamo... | 11,131 | Python | .py | 251 | 36.350598 | 119 | 0.639822 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,117 | poincare.py | piskvorky_gensim/gensim/models/poincare.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Jayant Jain <jayantjain1992@gmail.com>
# Copyright (C) 2017 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Python implementation of Poincaré Embeddings.
These embeddings ar... | 70,370 | Python | .py | 1,457 | 38.0151 | 120 | 0.610969 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,118 | normmodel.py | piskvorky_gensim/gensim/models/normmodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
import logging
from gensim import interfaces, matutils
logger = logging.getLogger(__name__)
class NormModel(int... | 2,736 | Python | .py | 75 | 27.72 | 114 | 0.564706 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,119 | basemodel.py | piskvorky_gensim/gensim/models/basemodel.py | class BaseTopicModel:
def print_topic(self, topicno, topn=10):
"""Get a single topic as a formatted string.
Parameters
----------
topicno : int
Topic id.
topn : int
Number of words from topic that will be used.
Returns
-------
... | 1,554 | Python | .py | 40 | 29.35 | 114 | 0.553928 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,120 | lda_worker.py | piskvorky_gensim/gensim/models/lda_worker.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Worker ("slave") process used in computing distributed Latent Dirichlet Allocation
(LDA, :class:`~gensim.models.... | 7,555 | Python | .py | 183 | 34.387978 | 119 | 0.651176 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,121 | fasttext_corpusfile.pyx | piskvorky_gensim/gensim/models/fasttext_corpusfile.pyx | #!/usr/bin/env cython
# distutils: language = c++
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: cdivision=True
# cython: embedsignature=True
# coding: utf-8
#
# Copyright (C) 2018 Dmitry Persiyanov <dmitry.persiyanov@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://w... | 10,844 | Python | .py | 227 | 38.167401 | 121 | 0.6341 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,122 | coherencemodel.py | piskvorky_gensim/gensim/models/coherencemodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Calculate topic coherence for topic models. This is the implementation of the four stage topic coherence pipelin... | 26,161 | Python | .py | 579 | 35.386874 | 120 | 0.626896 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,123 | __init__.py | piskvorky_gensim/gensim/models/__init__.py | """
This package contains algorithms for extracting document representations from their raw
bag-of-word counts.
"""
# bring model classes directly into package namespace, to save some typing
from .coherencemodel import CoherenceModel # noqa:F401
from .hdpmodel import HdpModel # noqa:F401
from .ldamodel import LdaMod... | 2,519 | Python | .py | 52 | 44.134615 | 102 | 0.739308 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,124 | atmodel.py | piskvorky_gensim/gensim/models/atmodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2016 Olavur Mortensen <olavurmortensen@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Author-topic model.
This module trains the a... | 54,236 | Python | .py | 1,005 | 42.537313 | 120 | 0.621377 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,125 | hdpmodel.py | piskvorky_gensim/gensim/models/hdpmodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Jonathan Esterhazy <jonathan.esterhazy at gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
#
# HDP inference code is adapted from the onlinehdp.py script by
# Chong Wang (chongw at cs.princeton... | 46,954 | Python | .py | 958 | 39.303758 | 120 | 0.616948 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,126 | keyedvectors.py | piskvorky_gensim/gensim/models/keyedvectors.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Gensim Contributors
# Copyright (C) 2018 RaRe Technologies s.r.o.
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module implements word vectors, and more generally sets of vectors keyed by lookup tokens/i... | 92,030 | Python | .py | 1,769 | 41.787451 | 120 | 0.611656 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,127 | _fasttext_bin.py | piskvorky_gensim/gensim/models/_fasttext_bin.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Authors: Michael Penkov <m@penkov.dev>
# Copyright (C) 2019 RaRe Technologies s.r.o.
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Load models from the native binary format released by Facebook.
The main entry point... | 21,830 | Python | .py | 542 | 34.374539 | 116 | 0.670032 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,128 | lsi_worker.py | piskvorky_gensim/gensim/models/lsi_worker.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Worker ("slave") process used in computing distributed Latent Semantic Indexing (LSI,
:class:`~gensim.models.lsi... | 5,915 | Python | .py | 142 | 34.556338 | 120 | 0.655016 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,129 | logentropy_model.py | piskvorky_gensim/gensim/models/logentropy_model.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module allows simple Bag of Words (BoW) represented corpus to be transformed into log entropy space.
It implements Log Entropy Model that produces entropy-weighted log... | 5,329 | Python | .py | 118 | 36.525424 | 118 | 0.616187 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,130 | doc2vec.py | piskvorky_gensim/gensim/models/doc2vec.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Gensim Contributors
# Copyright (C) 2018 RaRe Technologies s.r.o.
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Introduction
============
Learn paragraph and document embeddings via the distributed memory a... | 54,757 | Python | .py | 994 | 44.140845 | 133 | 0.635681 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,131 | doc2vec_inner.pyx | piskvorky_gensim/gensim/models/doc2vec_inner.pyx | #!/usr/bin/env cython
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: cdivision=True
# cython: embedsignature=True
# coding: utf-8
#
# Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.... | 31,445 | Python | .py | 611 | 40.972177 | 147 | 0.605419 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,132 | ldamodel.py | piskvorky_gensim/gensim/models/ldamodel.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Optimized `Latent Dirichlet Allocation (LDA) <https://en.wikipedia.org/wiki/Latent_Dirichlet_allocation>`_ in Py... | 75,209 | Python | .py | 1,402 | 42.619829 | 120 | 0.622766 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,133 | callbacks.py | piskvorky_gensim/gensim/models/callbacks.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 RARE Technologies <info@rare-technologies.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Callbacks can be used to observe the training process.
Since training in huge corpora can be time cons... | 24,318 | Python | .py | 514 | 37.453307 | 120 | 0.624193 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,134 | fasttext_inner.pyx | piskvorky_gensim/gensim/models/fasttext_inner.pyx | #!/usr/bin/env cython
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: cdivision=True
# cython: embedsignature=True
# coding: utf-8
"""Optimized Cython functions for training a :class:`~gensim.models.fasttext.FastText` model.
The main entry point is :func:`~gensim.models.fas... | 24,433 | Python | .py | 605 | 32.856198 | 147 | 0.611193 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,135 | word2vec_corpusfile.pyx | piskvorky_gensim/gensim/models/word2vec_corpusfile.pyx | #!/usr/bin/env cython
# distutils: language = c++
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# cython: cdivision=True
# cython: embedsignature=True
# coding: utf-8
#
# Copyright (C) 2018 Dmitry Persiyanov <dmitry.persiyanov@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://w... | 17,788 | Python | .py | 366 | 37.784153 | 121 | 0.61123 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,136 | gensim_genmodel.py | piskvorky_gensim/gensim/examples/dmlcz/gensim_genmodel.py | #!/usr/bin/env python
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s LANGUAGE METHOD
Generate topic models for the specified subcorpus. METHOD is currently one \
of 'tfidf', 'lsi', ... | 2,946 | Python | .py | 60 | 43.516667 | 95 | 0.698745 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,137 | sources.py | piskvorky_gensim/gensim/examples/dmlcz/sources.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
This module contains implementations (= different classes) which encapsulate the
idea of a Digital Library docu... | 12,864 | Python | .py | 295 | 34.810169 | 114 | 0.626429 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,138 | gensim_xml.py | piskvorky_gensim/gensim/examples/dmlcz/gensim_xml.py | #!/usr/bin/env python
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s LANGUAGE METHOD
Generate similar.xml files, using a previously built model for METHOD.
Example: ./gensim_xml.py... | 4,709 | Python | .py | 95 | 42.557895 | 115 | 0.658239 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,139 | dmlcorpus.py | piskvorky_gensim/gensim/examples/dmlcz/dmlcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Corpus for the DML-CZ project.
"""
import logging
import os.path
from gensim import interfaces, matutils
im... | 8,459 | Python | .py | 176 | 39.386364 | 118 | 0.652913 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,140 | gensim_build.py | piskvorky_gensim/gensim/examples/dmlcz/gensim_build.py | #!/usr/bin/env python
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s LANGUAGE
Process the repository, accepting articles in LANGUAGE (or 'any').
Store the word co-occurence matr... | 2,297 | Python | .py | 54 | 37.796296 | 108 | 0.70207 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,141 | aggregation.py | piskvorky_gensim/gensim/topic_coherence/aggregation.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module contains functions to perform aggregation on a list of values obtained from the confirmation measure... | 1,074 | Python | .py | 29 | 32.37931 | 119 | 0.697585 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,142 | indirect_confirmation_measure.py | piskvorky_gensim/gensim/topic_coherence/indirect_confirmation_measure.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
r"""This module contains functions to compute confirmation on a pair of words or word subsets.
Notes
-----
The adv... | 12,786 | Python | .py | 275 | 38.545455 | 119 | 0.639778 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,143 | direct_confirmation_measure.py | piskvorky_gensim/gensim/topic_coherence/direct_confirmation_measure.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module contains functions to compute direct confirmation on a pair of words or word subsets."""
import log... | 8,366 | Python | .py | 174 | 40.045977 | 118 | 0.634625 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,144 | text_analysis.py | piskvorky_gensim/gensim/topic_coherence/text_analysis.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module contains classes for analyzing the texts of a corpus to accumulate
statistical information about wor... | 24,317 | Python | .py | 527 | 37.119545 | 114 | 0.632851 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,145 | __init__.py | piskvorky_gensim/gensim/topic_coherence/__init__.py | """
This package contains implementation of the individual components of
the topic coherence pipeline.
"""
| 107 | Python | .py | 4 | 25.75 | 68 | 0.825243 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,146 | segmentation.py | piskvorky_gensim/gensim/topic_coherence/segmentation.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module contains functions to perform segmentation on a list of topics."""
import logging
logger = logging... | 3,708 | Python | .py | 102 | 29.284314 | 108 | 0.52979 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,147 | probability_estimation.py | piskvorky_gensim/gensim/topic_coherence/probability_estimation.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module contains functions to perform segmentation on a list of topics."""
import itertools
import logging
from gensim.topic_coherence.text_analysis import (
Corp... | 9,900 | Python | .py | 227 | 36.198238 | 120 | 0.596866 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,148 | csvcorpus.py | piskvorky_gensim/gensim/corpora/csvcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Zygmunt ZajÄ…c <zygmunt@fastml.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Corpus in CSV format."""
from __future__ import with_statement
import logging
import csv
import itertools
from ... | 2,078 | Python | .py | 55 | 29.581818 | 97 | 0.599601 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,149 | svmlightcorpus.py | piskvorky_gensim/gensim/corpora/svmlightcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Corpus in SVMlight format."""
from __future__ import with_statement
import logging
from gensim import utils... | 6,083 | Python | .py | 149 | 31.530201 | 118 | 0.587886 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,150 | mmcorpus.py | piskvorky_gensim/gensim/corpora/mmcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Corpus in the `Matrix Market format <https://math.nist.gov/MatrixMarket/formats.html>`_."""
import logging
fro... | 4,260 | Python | .py | 91 | 38.472527 | 118 | 0.638118 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,151 | hashdictionary.py | piskvorky_gensim/gensim/corpora/hashdictionary.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Homer Strong, Radim Rehurek
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Implements the `"hashing trick" <https://en.wikipedia.org/wiki/Hashing-Trick>`_ -- a mapping between words
and their intege... | 13,219 | Python | .py | 277 | 38.086643 | 119 | 0.605644 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,152 | wikicorpus.py | piskvorky_gensim/gensim/corpora/wikicorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2012 Lars Buitinck <larsmans@gmail.com>
# Copyright (C) 2018 Emmanouil Stergiadis <em.stergiadis@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.... | 26,219 | Python | .py | 601 | 35.933444 | 118 | 0.621945 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,153 | _mmreader.pyx | piskvorky_gensim/gensim/corpora/_mmreader.pyx | # Copyright (C) 2018 Radim Rehurek <radimrehurek@seznam.cz>
# cython: embedsignature=True
# cython: language_level=3
"""Reader for corpus in the Matrix Market format."""
import logging
cimport cython
from libc.stdio cimport sscanf
from gensim import utils
logger = logging.getLogger(__name__)
cdef class MmReader()... | 7,392 | Python | .py | 166 | 32.957831 | 118 | 0.573757 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,154 | sharded_corpus.py | piskvorky_gensim/gensim/corpora/sharded_corpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Original author: Jan Hajic jr.
# Copyright (C) 2015 Radim Rehurek and gensim team.
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
This module implements a corpus class that stores its data in separate files called
"s... | 33,071 | Python | .py | 656 | 39.699695 | 118 | 0.623694 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,155 | __init__.py | piskvorky_gensim/gensim/corpora/__init__.py | """
This package contains implementations of various streaming corpus I/O format.
"""
# bring corpus classes directly into package namespace, to save some typing
from .indexedcorpus import IndexedCorpus # noqa:F401 must appear before the other classes
from .mmcorpus import MmCorpus # noqa:F401
from .bleicorpus impo... | 824 | Python | .py | 16 | 50.375 | 90 | 0.818859 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,156 | lowcorpus.py | piskvorky_gensim/gensim/corpora/lowcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Corpus in `GibbsLda++ format <https://gibbslda.sourceforge.net/>`_."""
import logging
from collections import C... | 9,535 | Python | .py | 221 | 32.886878 | 112 | 0.586356 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,157 | malletcorpus.py | piskvorky_gensim/gensim/corpora/malletcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Corpus in `Mallet format <http://mallet.cs.umass.edu/import.php>`_."""
from __future__ import with_statement
import logging
from gensim import utils
from gensim.corpora ... | 7,714 | Python | .py | 185 | 31.475676 | 114 | 0.573415 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,158 | opinosiscorpus.py | piskvorky_gensim/gensim/corpora/opinosiscorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Tobias B <proxima@sezanzeb.de>
# Copyright (C) 2021 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Creates a corpus and dictionary from the Opinosis dataset.
References
--... | 2,834 | Python | .py | 59 | 39.576271 | 116 | 0.666304 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,159 | dictionary.py | piskvorky_gensim/gensim/corpora/dictionary.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This module implements the concept of a Dictionary -- a mapping between words and their integer ids."""
from co... | 30,256 | Python | .py | 649 | 35.465331 | 178 | 0.57008 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,160 | bleicorpus.py | piskvorky_gensim/gensim/corpora/bleicorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Сorpus in Blei's LDA-C format."""
from __future__ import with_statement
from os import path
import logging
... | 5,769 | Python | .py | 144 | 29.805556 | 114 | 0.565723 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,161 | indexedcorpus.py | piskvorky_gensim/gensim/corpora/indexedcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Base Indexed Corpus class."""
import logging
import numpy
from gensim import interfaces, utils
logger = log... | 6,453 | Python | .py | 148 | 33.97973 | 117 | 0.603512 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,162 | ucicorpus.py | piskvorky_gensim/gensim/corpora/ucicorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Jonathan Esterhazy <jonathan.esterhazy at gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Corpus in `UCI format <http://archive.ics.uci.edu/ml/datasets/Bag+of+Words>`_."""
import loggin... | 9,563 | Python | .py | 227 | 32.132159 | 114 | 0.588673 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,163 | textcorpus.py | piskvorky_gensim/gensim/corpora/textcorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Module provides some code scaffolding to simplify use of built dictionary for constructing BoW vectors.
Notes
-----
Text corpora usually reside on disk, as text files in o... | 23,920 | Python | .py | 497 | 38.945674 | 120 | 0.645597 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,164 | annoy.py | piskvorky_gensim/gensim/similarities/annoy.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
This module integrates Spotify's `Annoy <https://github.com/spotify/annoy>`_ (Approximate Nearest Neighbors Oh Yea... | 6,503 | Python | .py | 152 | 33.572368 | 116 | 0.597625 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,165 | levenshtein.py | piskvorky_gensim/gensim/similarities/levenshtein.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Vit Novotny <witiko@mail.muni.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
This module allows fast fuzzy search between strings, using kNN queries with Levenshtein similarity.
"""
import log... | 4,526 | Python | .py | 87 | 43.712644 | 110 | 0.672246 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,166 | fastss.pyx | piskvorky_gensim/gensim/similarities/fastss.pyx | #!/usr/bin/env cython
# cython: language_level=3
# cython: boundscheck=False
# cython: wraparound=False
# coding: utf-8
#
# Copyright (C) 2021 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
# Code adapted from TinyFastSS (public dom... | 6,866 | Python | .py | 163 | 33.392638 | 113 | 0.587077 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,167 | docsim.py | piskvorky_gensim/gensim/similarities/docsim.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Compute similarities across a collection of documents in the Vector Space Model.
The main class is :class:`~gen... | 52,783 | Python | .py | 1,075 | 39.249302 | 120 | 0.626141 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,168 | termsim.py | piskvorky_gensim/gensim/similarities/termsim.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Vit Novotny <witiko@mail.muni.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
This module provides classes that deal with term similarities.
"""
from array import array
from itertools import ch... | 25,808 | Python | .py | 515 | 42.18835 | 120 | 0.672399 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,169 | __init__.py | piskvorky_gensim/gensim/similarities/__init__.py | """
This package contains implementations of pairwise similarity queries.
"""
# bring classes directly into package namespace, to save some typing
from .levenshtein import LevenshteinSimilarityIndex # noqa:F401
from .docsim import ( # noqa:F401
Similarity,
MatrixSimilarity,
SparseMatrixSimilarity,
So... | 518 | Python | .py | 16 | 29.0625 | 69 | 0.800399 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,170 | nmslib.py | piskvorky_gensim/gensim/similarities/nmslib.py | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com>
# Copyright (C) 2019 Masahiro Kazama <kazama.masa@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
This module integrates `NMSLIB <https://github.com/nmslib/nmslib>`_ fast si... | 9,211 | Python | .py | 188 | 41.989362 | 119 | 0.663845 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,171 | make_wiki_online_nodebug.py | piskvorky_gensim/gensim/scripts/make_wiki_online_nodebug.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2012 Lars Buitinck <larsmans@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s WIKI_XML_DUMP OUTPUT_PREFIX [VOCABU... | 4,603 | Python | .py | 87 | 48.172414 | 118 | 0.719216 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,172 | segment_wiki.py | piskvorky_gensim/gensim/scripts/segment_wiki.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Jayant Jain <jayant@rare-technologies.com>
# Copyright (C) 2016 RaRe Technologies
"""This script using for extracting plain text out of a raw Wikipedia dump. Input is an xml.bz2 file provided
by MediaWiki that looks like <LANG>wiki-<YYYYMMDD>-pages-articles.xml... | 15,638 | Python | .py | 323 | 39.866873 | 120 | 0.637133 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,173 | glove2word2vec.py | piskvorky_gensim/gensim/scripts/glove2word2vec.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2016 Manas Ranjan Kar <manasrkar91@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""This script allows to convert GloVe vectors into ... | 3,985 | Python | .py | 95 | 37.726316 | 118 | 0.690853 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,174 | word2vec_standalone.py | piskvorky_gensim/gensim/scripts/word2vec_standalone.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s -train CORPUS -output VECTORS -size SIZE -window WINDOW
-cbow CBOW -sample SAMPLE -hs HS -negative NEGATIVE -threads THREADS -iter ITER
-min_count MIN-... | 5,997 | Python | .py | 124 | 40.41129 | 118 | 0.65152 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,175 | make_wiki_online.py | piskvorky_gensim/gensim/scripts/make_wiki_online.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2012 Lars Buitinck <larsmans@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s WIKI_XML_DUMP OUTPUT_PREFIX [VOCABU... | 4,600 | Python | .py | 87 | 48.172414 | 118 | 0.719216 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,176 | benchmark.py | piskvorky_gensim/gensim/scripts/benchmark.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2020 Radim Rehurek <me@radimrehurek.com>
"""
Help script (template) for benchmarking. Run with:
/usr/bin/time --format "%E elapsed\n%Mk peak RAM" python -m gensim.scripts.benchmark ~/gensim-data/text9/text9.txt
"""
import logging
import sys
from gen... | 1,037 | Python | .py | 25 | 37.76 | 116 | 0.676647 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,177 | make_wiki.py | piskvorky_gensim/gensim/scripts/make_wiki.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2012 Lars Buitinck <larsmans@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s WIKI_XML_DUMP OUTPUT_PREFIX [VOCABU... | 4,553 | Python | .py | 85 | 48.823529 | 118 | 0.717372 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,178 | make_wikicorpus.py | piskvorky_gensim/gensim/scripts/make_wikicorpus.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2010 Radim Rehurek <radimrehurek@seznam.cz>
# Copyright (C) 2012 Lars Buitinck <larsmans@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
USAGE: %(program)s WIKI_XML_DUMP OUTPUT_PREFIX [VOCABU... | 4,553 | Python | .py | 85 | 48.823529 | 118 | 0.717372 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,179 | package_info.py | piskvorky_gensim/gensim/scripts/package_info.py | """Get basic information about gensim & dependencies (useful for bug-reporting).
Examples
--------
You can use it through python
.. sourcecode:: pycon
>>> from gensim.scripts.package_info import package_info
>>>
>>> info = package_info()
or using CLI interface
::
python -m gensim.scripts.package_i... | 1,546 | Python | .py | 45 | 29.666667 | 117 | 0.666218 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,180 | word2vec2tensor.py | piskvorky_gensim/gensim/scripts/word2vec2tensor.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Vimig Socrates <vimig.socrates@gmail.com>
# Copyright (C) 2016 Loreto Parisi <loretoparisi@gmail.com>
# Copyright (C) 2016 Silvio Olivastri <silvio.olivastri@gmail.com>
# Copyright (C) 2016 Radim Rehurek <radim@rare-technologies.com>
"""This script ... | 3,848 | Python | .py | 71 | 49.492958 | 120 | 0.707967 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,181 | installwheel.py | piskvorky_gensim/.github/workflows/installwheel.py | """Install a wheel for the current platform."""
import os
import platform
import subprocess
import sys
def main():
subdir = sys.argv[1]
vi = sys.version_info
if platform.system() in ('Linux', 'Darwin'):
arch = 'x86_64'
else:
arch = 'amd64'
want = f'-cp{vi.major}{vi.minor}-'
s... | 754 | Python | .py | 25 | 24.44 | 87 | 0.595271 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,182 | update_index.py | piskvorky_gensim/.github/workflows/update_index.py | """Update index.html for the bucket listing
http://gensim-wheels.s3-website-us-east-1.amazonaws.com/
We do this ourselves as opposed to using wheelhouse_uploader because it's
much faster this way (seconds as compared to nearly an hour).
"""
import sys
import boto3
def main():
bucket = sys.argv[1]
prefix = ... | 1,038 | Python | .py | 26 | 33.346154 | 139 | 0.639083 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,183 | test_wheel.py | piskvorky_gensim/.github/workflows/test_wheel.py | #!/usr/bin/env python
"""Test a Gensim wheel stored on S3.
Downloads the wheel, installs it into a fresh working environment, and then runs gensim tests.
usage:
python test_wheel.py <url> $(which python3.10)
where the URL comes from http://gensim-wheels.s3-website-us-east-1.amazonaws.com/
"""
import argparse
i... | 2,623 | Python | .py | 56 | 40.839286 | 120 | 0.661563 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,184 | check_wheels.py | piskvorky_gensim/release/check_wheels.py | # -*- coding: utf-8 -*-
#
# Authors: Michael Penkov <m@penkov.dev>
# Copyright (C) 2019 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Check that our wheels are all there."""
import os
import os.path
import re
import sys
#
# We exp... | 2,530 | Python | .py | 53 | 44.283019 | 95 | 0.705787 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,185 | annotate_pr.py | piskvorky_gensim/release/annotate_pr.py | """Helper script for including change log entries in an open PR.
Automatically constructs the change log entry from the PR title.
Copies the entry to the window manager clipboard.
Opens the change log belonging to the specific PR in a browser window.
All you have to do is paste and click "commit changes".
"""
import j... | 1,312 | Python | .py | 31 | 39.258065 | 97 | 0.709348 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,186 | update_changelog.py | piskvorky_gensim/release/update_changelog.py | """Updates the changelog with PRs merged since the last version."""
import datetime
import json
import os.path
import sys
import requests
URL = 'https://api.github.com/repos/RaRe-Technologies/gensim'
def summarize_prs(since_version):
"""Go through all closed PRs, summarize those merged after the previous relea... | 2,171 | Python | .py | 52 | 36.230769 | 108 | 0.648855 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,187 | generate_changelog.py | piskvorky_gensim/release/generate_changelog.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Gensim Contributors
# Copyright (C) 2020 RaRe Technologies s.r.o.
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Generate changelog entries for all PRs merged since the last release."""
import re
import reques... | 3,185 | Python | .py | 87 | 30.034483 | 115 | 0.622844 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,188 | bump_version.py | piskvorky_gensim/release/bump_version.py | """
Bump the version of Gensim in all the required places.
Usage: python3 bump_version.py <OLD_VERSION> <NEW_VERSION>
Example:
python3 bump_version.py "4.0.0beta" "4.0.0rc1"
"""
import os.path
import re
import sys
def bump(path, pattern, repl, check=True):
with open(path) as fin:
contents = fin.re... | 2,132 | Python | .py | 47 | 40.680851 | 83 | 0.652132 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,189 | hijack_pr.py | piskvorky_gensim/release/hijack_pr.py | #!/usr/bin/env python
"""Hijack a PR to add commits as a maintainer.
This is a two-step process:
1. Add a git remote that points to the contributor's repo
2. Check out the actual contribution by reference
As a maintainer, you can add changes by making new commits and pushing them
back to the remote.
An exam... | 3,099 | Python | .py | 72 | 38.388889 | 97 | 0.674 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,190 | to_python.py | piskvorky_gensim/docs/src/tools/to_python.py | """Convert a Jupyter notebook to Python source in Sphinx Gallery format.
How to use:
$ pip install m2r
$ cat tutorial.ipynb | python to_python.py > tutorial.py
That will do the bulk of the conversion for you.
Stuff that you'll need to change yourself:
* Replace the placeholder with a unique RST label,
* Rep... | 1,677 | Python | .pyt | 52 | 25.230769 | 77 | 0.589152 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,191 | ldamodel_python_3_5.id2word | piskvorky_gensim/gensim/test/test_data/ldamodel_python_3_5.id2word | Äcgensim.corpora.dictionary
Dictionary
q )Åq}q(X id2tokenq}q(K X humanqKX interfaceqKX computerqKX surveyqKX systemq KX responseq
KX timeqKX userqKX epsq
K X treesqK
X graphqKX minorsquX num_posqKX dfsq}q(K KKKKKKKKKKKKKKKKKK KK
K... | 430 | Python | .pyt | 8 | 52.875 | 124 | 0.598109 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,192 | ldamodel_python_2_7.state | piskvorky_gensim/gensim/test/test_data/ldamodel_python_2_7.state | €cgensim.models.ldamodel
LdaState
q)�q}q(U__numpysq]U__recursive_saveloadsq]U
__ignoredsq]Usstatsqcnumpy.core.multiarray
_reconstruct
qcnumpy
ndarray
q K …Ub‡Rq
(KKK†cnumpy
dtype
qUf8K K‡Rq(KU<NNNJÿÿÿÿJÿÿÿÿK tb‰UÀ 3ÇÛú…?¶<•+T‡?ºÛŸ_‡?pÒô]-Ï…?œ[XêÔpğ?E
ƒ?ÕL(˜-Ï…?ç
Àf3…?�»©“ƒ?™Ukñ@Ť.C... | 588 | Python | .pyt | 15 | 38.266667 | 184 | 0.559233 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,193 | ldamodel_python_3_5.state | piskvorky_gensim/gensim/test/test_data/ldamodel_python_3_5.state | Äcgensim.models.ldamodel
LdaState
q )Åq}q(X
__ignoredsq]qX __scipysq]qX __numpysq]qX numdocsq K X etaq
cnumpy.core.multiarray
_reconstruct
qcnumpy
ndarray
qK Öq
c_codecs
encode
qX bqX latin1qÜqRqáqRq(KKÖqcnumpy
dtype
qX f8qK KáqRq(KX <qNNNJˇˇˇˇJˇˇˇˇK tqbâhXl ... | 825 | Python | .pyt | 17 | 47.588235 | 326 | 0.467244 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,194 | ldamodel_python_3_5 | piskvorky_gensim/gensim/test/test_data/ldamodel_python_3_5 | €cgensim.models.ldamodel
LdaModel
q )�q}q(X chunksizeqMĞX optimize_etaq‰X distributedq‰X update_everyqKX
iterationsqK2X optimize_alphaq‰X
eval_everyq K
X etaq
cnumpy.core.multiarray
_reconstruct
qcnumpy
ndarray
qK …q
c_codecs
encode
qX bqX latin1q†qRq‡qRq(KK…qcnumpy
... | 4,911 | Python | .pyt | 34 | 143.470588 | 715 | 0.588971 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,195 | ldamodel_python_2_7 | piskvorky_gensim/gensim/test/test_data/ldamodel_python_2_7 | €cgensim.models.ldamodel
LdaModel
q)�q}q(Uper_word_topicsq‰U__recursive_saveloadsq]U
numworkersqKU
iterationsqK2Ugamma_thresholdqG?PbM񖩟Upassesq KdUnum_updatesq
K Uminimum_probabilityqG?„záG®{UdecayqG?à Udistributedq
‰Uoptimize_alphaq‰Urandom_stateqcnumpy.random
__RandomState_ctor
q)Rq... | 3,438 | Python | .pyt | 32 | 106.46875 | 472 | 0.578221 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,196 | ldamodel_python_2_7.id2word | piskvorky_gensim/gensim/test/test_data/ldamodel_python_2_7.id2word | Äcgensim.corpora.dictionary
Dictionary
q)Åq}q(Unum_docsqK Utoken2idq}q(X minorsqKX graphqK
X systemq KX treesq
K X epsqKX computerqKX surveyq
KX userqKX humanqKX timeqKX interfaceqK X responseqKuUdfsq}q(K KKKKKKKKKKKKKKKKKK KK
KKKuU... | 412 | Python | .pyt | 8 | 50.625 | 174 | 0.624691 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,197 | CouchPotato.py | CouchPotato_CouchPotatoServer/CouchPotato.py | #!/usr/bin/env python2
from __future__ import print_function
from logging import handlers
from os.path import dirname
import logging
import os
import select
import signal
import socket
import subprocess
import sys
import traceback
# Root path
base_path = dirname(os.path.abspath(__file__))
# Insert local directories i... | 4,661 | Python | .py | 129 | 26.844961 | 122 | 0.605912 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,198 | pkg_resources.py | CouchPotato_CouchPotatoServer/libs/pkg_resources.py | """Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipula... | 85,435 | Python | .py | 1,906 | 35.578699 | 94 | 0.622787 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,199 | argparse.py | CouchPotato_CouchPotatoServer/libs/argparse.py | # Author: Steven J. Bethard <steven.bethard@gmail.com>.
"""Command-line parsing library
This module is an optparse-inspired command-line parsing library that:
- handles both optional and positional arguments
- produces highly informative usage messages
- supports parsers that dispatch to sub-parsers
The... | 87,791 | Python | .py | 1,942 | 33.346035 | 80 | 0.574442 | CouchPotato/CouchPotatoServer | 3,869 | 1,214 | 1,266 | GPL-3.0 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |