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,000 | run_similarity_queries.ipynb | piskvorky_gensim/docs/src/auto_examples/core/run_similarity_queries.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\nSimilarity Que... | 12,229 | Python | .py | 198 | 55.060606 | 2,046 | 0.667055 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,001 | run_corpora_and_vector_spaces.ipynb | piskvorky_gensim/docs/src/auto_examples/core/run_corpora_and_vector_spaces.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Corpora and ... | 19,367 | Python | .py | 432 | 38.027778 | 1,392 | 0.627271 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,002 | run_similarity_queries.py | piskvorky_gensim/docs/src/auto_examples/core/run_similarity_queries.py | r"""
Similarity Queries
==================
Demonstrates querying a corpus for similar documents.
"""
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
###############################################################################
#
# Creating the Corpus
# ---... | 9,565 | Python | .py | 170 | 54.729412 | 208 | 0.711268 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,003 | run_word2vec.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_word2vec.py | r"""
Word2Vec Model
==============
Introduces Gensim's Word2Vec model and demonstrates its use on the `Lee Evaluation Corpus
<https://hekyll.services.adelaide.edu.au/dspace/bitstream/2440/28910/1/hdl_28910.pdf>`_.
"""
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging... | 25,529 | Python | .py | 579 | 41.336788 | 126 | 0.642739 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,004 | run_wmd.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_wmd.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Word Mover's... | 7,147 | Python | .py | 158 | 38.594937 | 1,344 | 0.636624 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,005 | run_lda.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_lda.py | r"""
LDA Model
=========
Introduces Gensim's LDA model and demonstrates its use on the NIPS corpus.
"""
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
###############################################################################
# The purpose of this tut... | 12,616 | Python | .py | 275 | 44.145455 | 128 | 0.695041 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,006 | run_scm.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_scm.py | r"""
Soft Cosine Measure
===================
Demonstrates using Gensim's implemenation of the SCM.
"""
###############################################################################
# Soft Cosine Measure (SCM) is a promising new tool in machine learning that
# allows us to submit a query and return the most relevan... | 6,658 | Python | .py | 133 | 48.744361 | 165 | 0.703094 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,007 | run_doc2vec_lee.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_doc2vec_lee.py | r"""
Doc2Vec Model
=============
Introduces Gensim's Doc2Vec model and demonstrates its use on the
`Lee Corpus <https://hekyll.services.adelaide.edu.au/dspace/bitstream/2440/28910/1/hdl_28910.pdf>`__.
"""
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
####... | 16,619 | Python | .py | 330 | 48.836364 | 139 | 0.674689 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,008 | run_fasttext.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_fasttext.py | r"""
FastText Model
==============
Introduces Gensim's fastText model and demonstrates its use on the Lee Corpus.
"""
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
###############################################################################
# Here, we'l... | 10,335 | Python | .py | 222 | 45.252252 | 306 | 0.589083 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,009 | run_lda.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_lda.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# LDA Model\n\... | 15,482 | Python | .py | 241 | 57.510373 | 2,199 | 0.665267 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,010 | run_scm.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_scm.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\nSoft Cosine Me... | 8,927 | Python | .py | 176 | 44.056818 | 1,431 | 0.658135 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,011 | run_fasttext.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_fasttext.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# FastText Mod... | 14,100 | Python | .py | 385 | 29.833766 | 1,688 | 0.600977 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,012 | run_ensemblelda.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_ensemblelda.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\nEnsemble LDA\n... | 7,873 | Python | .py | 205 | 31.702439 | 620 | 0.609206 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,013 | run_doc2vec_lee.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_doc2vec_lee.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\n# Doc2Vec Mode... | 20,217 | Python | .py | 327 | 55.061162 | 5,297 | 0.660148 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,014 | run_annoy.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_annoy.py | r"""
Fast Similarity Queries with Annoy and Word2Vec
===============================================
Introduces the Annoy library for similarity queries on top of vectors learned by Word2Vec.
"""
LOGS = False # Set to True if you want to see progress in logs.
if LOGS:
import logging
logging.basicConfig(forma... | 15,445 | Python | .py | 344 | 43.06686 | 101 | 0.661128 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,015 | run_word2vec.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_word2vec.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\nWord2Vec Model... | 31,352 | Python | .py | 513 | 54.319688 | 4,878 | 0.628664 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,016 | run_wmd.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_wmd.py | r"""
Word Mover's Distance
=====================
Demonstrates using Gensim's implemenation of the WMD.
"""
###############################################################################
# Word Mover's Distance (WMD) is a promising new tool in machine learning that
# allows us to submit a query and return the most r... | 5,165 | Python | .py | 109 | 46.183486 | 103 | 0.674871 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,017 | run_ensemblelda.py | piskvorky_gensim/docs/src/auto_examples/tutorials/run_ensemblelda.py | r"""
Ensemble LDA
============
Introduces Gensim's EnsembleLda model
"""
import logging
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
###############################################################################
# This tutorial will explain how to use the EnsembleLDA ... | 5,237 | Python | .py | 130 | 38.523077 | 118 | 0.66647 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,018 | run_annoy.ipynb | piskvorky_gensim/docs/src/auto_examples/tutorials/run_annoy.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"collapsed": false
},
"outputs": [],
"source": [
"%matplotlib inline"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"\nFast Similarit... | 19,202 | Python | .py | 312 | 54.798077 | 1,593 | 0.637076 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,019 | logentropy_model.rst | piskvorky_gensim/docs/src/models/logentropy_model.rst | :mod:`models.logentropy_model` -- LogEntropy model
======================================================
.. automodule:: gensim.models.logentropy_model
:synopsis: LogEntropy model
:members:
:inherited-members:
:undoc-members:
:show-inheritance:
| 267 | Python | .py | 8 | 29.75 | 54 | 0.577519 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,020 | 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 | .py | 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,021 | check_gallery.py | piskvorky_gensim/docs/src/tools/check_gallery.py | """Check that the gallery output is up to date with the input.
We do this so we can know in advance if "make html" is going to rebuild the
gallery. That's helpful to know because rebuilding usually takes a long time,
so we want to avoid it under some environments (e.g. CI).
The script returns non-zero if there are a... | 4,197 | Python | .py | 107 | 32.158879 | 100 | 0.631462 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,022 | wordcloud.ipynb | piskvorky_gensim/docs/src/tools/wordcloud.ipynb | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"'Generate wordcloud images for our core tutorials.'"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
... | 349,506 | Python | .py | 167 | 2,087.862275 | 90,244 | 0.96066 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,023 | nosy.py | piskvorky_gensim/gensim/nosy.py | #!/usr/bin/env python
"""
A simple testrunner for nose (or anything else).
Watch for changes in all file types specified in 'EXTENSIONS'.
If changes, run test executable in 'EXECUTABLE', with default
arguments 'DEFAULTARGS'.
The --with-color option needs the "rudolf" nose plugin. See:
https://pypi.org/project/rudolf... | 1,405 | Python | .py | 43 | 26.953488 | 89 | 0.628423 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,024 | utils.py | piskvorky_gensim/gensim/utils.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
"""Various general utility functions."""
from contextlib import contextmanager
import collections.abc
import loggi... | 66,616 | Python | .py | 1,683 | 31.14082 | 120 | 0.609588 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,025 | _matutils.pyx | piskvorky_gensim/gensim/_matutils.pyx | #!/usr/bin/env cython
# coding: utf-8
# cython: embedsignature=True
# cython: language_level=3
from __future__ import division
cimport cython
import numpy as np
cimport numpy as np
ctypedef cython.floating DTYPE_t
from libc.math cimport log, exp, fabs
from cython.parallel import prange
def mean_absolute_difference(a... | 8,993 | Python | .py | 271 | 27.154982 | 115 | 0.627128 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,026 | interfaces.py | piskvorky_gensim/gensim/interfaces.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
"""Basic interfaces used across the whole Gensim package.
These interfaces are used for building corpora, model tr... | 15,094 | Python | .py | 310 | 39.483871 | 119 | 0.637929 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,027 | __init__.py | piskvorky_gensim/gensim/__init__.py | """
This package contains functionality to transform documents (strings) into vectors, and calculate
similarities between documents.
"""
__version__ = '4.3.3'
import logging
from gensim import parsing, corpora, matutils, interfaces, models, similarities, utils # noqa:F401
logger = logging.getLogger('gensim')
if ... | 432 | Python | .py | 10 | 41.2 | 99 | 0.783654 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,028 | matutils.py | piskvorky_gensim/gensim/matutils.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
"""Math helper functions."""
from __future__ import with_statement
import logging
import math
from gensim impor... | 44,476 | Python | .py | 1,114 | 31.97307 | 119 | 0.612598 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,029 | downloader.py | piskvorky_gensim/gensim/downloader.py | """
This module is an API for downloading, getting information and loading datasets/models.
See `RaRe-Technologies/gensim-data <https://github.com/RaRe-Technologies/gensim-data>`_ repo
for more information about models/datasets/how-to-add-new/etc.
Give information about available models/datasets:
.. sourcecode:: pyc... | 16,881 | Python | .py | 430 | 31.881395 | 112 | 0.627287 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,030 | preprocessing.py | piskvorky_gensim/gensim/parsing/preprocessing.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 methods for parsing and preprocessing strings.
Examples
--------
.. sourcecode:: pycon
>>> from gensim.parsing.preprocessing import remove_stopw... | 14,532 | Python | .py | 358 | 34.944134 | 120 | 0.610218 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,031 | __init__.py | piskvorky_gensim/gensim/parsing/__init__.py | """This package contains functions to preprocess raw text"""
from .porter import PorterStemmer # noqa:F401
from .preprocessing import ( # noqa:F401
preprocess_documents,
preprocess_string,
read_file,
read_files,
remove_stopwords,
split_alphanum,
stem_text,
strip_multiple_whitespaces,
... | 421 | Python | .py | 17 | 20.647059 | 60 | 0.719603 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,032 | porter.py | piskvorky_gensim/gensim/parsing/porter.py | #!/usr/bin/env python
"""Porter Stemming Algorithm
This is the Porter stemming algorithm, ported to Python from the
version coded up in ANSI C by the author. It may be be regarded
as canonical, in that it follows the algorithm presented in [1]_, see also [2]_
Author - Vivake Gupta (v@nano.com), optimizations and clea... | 15,535 | Python | .py | 495 | 20.185859 | 120 | 0.431304 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,033 | test_nmf.py | piskvorky_gensim/gensim/test/test_nmf.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Timofey Yefimov <anotherbugmaster@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Automated tests for checking transformation algorithms (the models package).
"""
import unittest
import ... | 6,821 | Python | .py | 159 | 33.566038 | 106 | 0.631404 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,034 | test_fasttext.py | piskvorky_gensim/gensim/test/test_fasttext.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
import gzip
import io
import logging
import unittest
import os
import shutil
import subprocess
import struct
import sys
import numpy as np
import pytest
from gensim import utils
from gensim.models.word2vec import LineSentence
from gensim.... | 75,586 | Python | .py | 1,504 | 40.797872 | 136 | 0.625385 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,035 | test_matutils.py | piskvorky_gensim/gensim/test/test_matutils.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
import logging
import unittest
import numpy as np
from numpy.testing import assert_array_equal
from scipy import s... | 12,113 | Python | .py | 248 | 40.669355 | 111 | 0.648704 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,036 | test_lee.py | piskvorky_gensim/gensim/test/test_lee.py | #!/usr/bin/env python
# encoding: utf-8
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Automated test to reproduce the results of Lee et al. (2005)
Lee et al. (2005) compares different models for semantic
similarity and verifies the results with similarity judgem... | 4,160 | Python | .py | 85 | 42.352941 | 97 | 0.6875 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,037 | test_direct_confirmation.py | piskvorky_gensim/gensim/test/test_direct_confirmation.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
"""
Automated tests for direct confirmation measures in the direct_confirmation_measure module.
"""
import logging... | 3,088 | Python | .py | 62 | 42.516129 | 95 | 0.675963 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,038 | test_api.py | piskvorky_gensim/gensim/test/test_api.py | import logging
import unittest
import os
import gensim.downloader as api
import shutil
import numpy as np
@unittest.skipIf(
os.environ.get("SKIP_NETWORK_TESTS", False) == "1",
"Skip network-related tests (probably SSL problems on this CI/OS)"
)
class TestApi(unittest.TestCase):
def test_base_dir_creation(... | 3,583 | Python | .py | 73 | 40.684932 | 110 | 0.640206 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,039 | test_normmodel.py | piskvorky_gensim/gensim/test/test_normmodel.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unitte... | 5,790 | Python | .py | 126 | 37.388889 | 104 | 0.62378 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,040 | test_keyedvectors.py | piskvorky_gensim/gensim/test/test_keyedvectors.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
"""
Automated tests for checking the poincare module from the models ... | 22,477 | Python | .py | 413 | 44.445521 | 115 | 0.637014 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,041 | test_aggregation.py | piskvorky_gensim/gensim/test/test_aggregation.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unittes... | 797 | Python | .py | 22 | 32.318182 | 95 | 0.711864 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,042 | test_similarity_metrics.py | piskvorky_gensim/gensim/test/test_similarity_metrics.py | #!/usr/bin/env python
# encoding: utf-8
#
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Automated test to check similarity functions and isbow function.
"""
import logging
import unittest
from gensim import matutils
from scipy.sparse import csr_matrix
import nu... | 8,690 | Python | .py | 202 | 34.876238 | 100 | 0.596684 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,043 | test_rpmodel.py | piskvorky_gensim/gensim/test/test_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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unitte... | 2,374 | Python | .py | 50 | 41.4 | 118 | 0.703463 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,044 | test_tfidfmodel.py | piskvorky_gensim/gensim/test/test_tfidfmodel.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unitte... | 19,533 | Python | .py | 374 | 42.81016 | 111 | 0.620238 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,045 | test_tmdiff.py | piskvorky_gensim/gensim/test/test_tmdiff.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 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
import unittest
import numpy as np
from gensim.models import LdaModel
from gensim.test.utils import... | 2,944 | Python | .py | 53 | 46.339623 | 118 | 0.660167 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,046 | test_phrases.py | piskvorky_gensim/gensim/test/test_phrases.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
"""
Automated tests for the phrase detection module.
"""
import logging
import unittest
import numpy as np
from gensim.models.phrases import Phrases, FrozenPhrases, _Phrase... | 25,196 | Python | .py | 468 | 44.685897 | 119 | 0.638542 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,047 | basetmtests.py | piskvorky_gensim/gensim/test/basetmtests.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import numpy as np
class Te... | 1,837 | Python | .py | 42 | 35.142857 | 95 | 0.644619 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,048 | test_utils.py | piskvorky_gensim/gensim/test/test_utils.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
"""
Automated tests for checking various utils functions.
"""
import logging
import unittest
import numpy as np
from gensim import utils
from gensim.test.utils import datap... | 9,703 | Python | .py | 215 | 36.576744 | 95 | 0.604654 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,049 | test_miislita.py | piskvorky_gensim/gensim/test/test_miislita.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 replicates the miislita vector spaces from
"A Linear Algebra Approach to the Vector Space Model -- A Fast Track Tutorial"
by Dr. E. Garcia, admin@miislita.com
... | 3,675 | Python | .py | 80 | 38.7375 | 107 | 0.680684 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,050 | test_big.py | piskvorky_gensim/gensim/test/test_big.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Automated tests for checking processing/storing large inputs.
"""
import logging
import unittest
import os
i... | 2,460 | Python | .py | 57 | 34.719298 | 96 | 0.633012 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,051 | test_translation_matrix.py | piskvorky_gensim/gensim/test/test_translation_matrix.py | #!/usr/bin/env python
# encoding: utf-8
from collections import namedtuple
import unittest
import logging
import numpy as np
import pytest
from scipy.spatial.distance import cosine
from gensim.models.doc2vec import Doc2Vec
from gensim import utils
from gensim.models import translation_matrix
from gensim.models impor... | 5,980 | Python | .py | 110 | 46.436364 | 113 | 0.680822 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,052 | test_poincare.py | piskvorky_gensim/gensim/test/test_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
"""
Automated tests for checking the poincare module from the models ... | 18,513 | Python | .py | 328 | 48.219512 | 119 | 0.671985 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,053 | test_corpora_dictionary.py | piskvorky_gensim/gensim/test/test_corpora_dictionary.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
"""
Unit tests for the `corpora.Dictionary` class.
"""
from collections.abc import Mapping
from itertools import chain
import logging
import unittest
import codecs
import os
... | 15,569 | Python | .py | 317 | 40.189274 | 104 | 0.62246 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,054 | test_probability_estimation.py | piskvorky_gensim/gensim/test/test_probability_estimation.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
"""
Automated tests for probability estimation algorithms in the probability_estimation module.
"""
import logging... | 3,567 | Python | .py | 83 | 32.216867 | 95 | 0.600115 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,055 | test_similarities.py | piskvorky_gensim/gensim/test/test_similarities.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
"""
Automated tests for similarity algorithms (the similarities package).
"""
import logging
import unittest
impor... | 82,233 | Python | .py | 1,318 | 53.108498 | 120 | 0.671396 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,056 | utils.py | piskvorky_gensim/gensim/test/utils.py | #!/usr/bin/env python
# encoding: utf-8
"""Module contains common utilities used in automated code tests for Gensim modules.
Attributes:
module_path : str
Full path to this module directory.
common_texts : list of list of str
Toy dataset.
common_dictionary : :class:`~gensim.corpora.dictionary.Dictionary`
... | 6,211 | Python | .py | 161 | 33.074534 | 108 | 0.654096 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,057 | test_doc2vec.py | piskvorky_gensim/gensim/test/test_doc2vec.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
from __future__ import with_s... | 38,067 | Python | .py | 722 | 43.422438 | 114 | 0.639606 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,058 | test_atmodel.py | piskvorky_gensim/gensim/test/test_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
"""
Automated tests for the author-topic model (A... | 25,102 | Python | .py | 491 | 41.94501 | 109 | 0.651545 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,059 | test_scripts.py | piskvorky_gensim/gensim/test/test_scripts.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Vimig Socrates <vimig.socrates@gmail.com> heavily influenced from @AakaashRao
# Copyright (C) 2018 Manos Stergiadis <em.stergiadis@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Automate... | 6,158 | Python | .py | 123 | 41.682927 | 110 | 0.667945 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,060 | test_coherencemodel.py | piskvorky_gensim/gensim/test/test_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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unittes... | 13,506 | Python | .py | 267 | 41.846442 | 99 | 0.674198 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,061 | test_text_analysis.py | piskvorky_gensim/gensim/test/test_text_analysis.py | import logging
import unittest
from gensim.corpora.dictionary import Dictionary
from gensim.topic_coherence.text_analysis import (
InvertedIndexAccumulator, WordOccurrenceAccumulator, ParallelWordOccurrenceAccumulator,
CorpusAccumulator)
from gensim.test.utils import common_texts
class BaseTestCases:
cl... | 6,474 | Python | .py | 135 | 37.392593 | 100 | 0.613982 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,062 | test_indirect_confirmation.py | piskvorky_gensim/gensim/test/test_indirect_confirmation.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
"""
Automated tests for indirect confirmation measures in the indirect_confirmation_measure module.
"""
import log... | 2,931 | Python | .py | 60 | 41.683333 | 104 | 0.662583 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,063 | __init__.py | piskvorky_gensim/gensim/test/__init__.py | """
This package contains automated code tests for all other gensim packages.
"""
| 82 | Python | .py | 3 | 26.333333 | 73 | 0.78481 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,064 | simspeed.py | piskvorky_gensim/gensim/test/simspeed.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
"""
USAGE: %(program)s CORPUS_DENSE.mm CORPUS_SPARSE.mm [NUMDOCS]
Run speed test of similarity queries. Only us... | 7,650 | Python | .py | 170 | 36.482353 | 113 | 0.608684 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,065 | test_ldaseqmodel.py | piskvorky_gensim/gensim/test/test_ldaseqmodel.py | """
Tests to check DTM math functions and Topic-Word, Doc-Topic proportions.
"""
import unittest
import logging
import numpy as np # for arrays, array broadcasting etc.
from gensim.models import ldaseqmodel
from gensim.corpora import Dictionary
from gensim.test.utils import datapath
class TestLdaSeq(unittest.Test... | 20,273 | Python | .py | 229 | 76.139738 | 119 | 0.623615 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,066 | test_sharded_corpus.py | piskvorky_gensim/gensim/test/test_sharded_corpus.py | """
Tests for ShardedCorpus.
"""
import os
import unittest
import random
import shutil
import numpy as np
from scipy import sparse
from gensim.utils import is_corpus, mock_data
from gensim.corpora.sharded_corpus import ShardedCorpus
#############################################################################
cla... | 9,233 | Python | .py | 205 | 35.24878 | 108 | 0.604332 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,067 | test_hdpmodel.py | piskvorky_gensim/gensim/test/test_hdpmodel.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unitte... | 1,703 | Python | .py | 42 | 35.333333 | 96 | 0.695388 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,068 | test_word2vec.py | piskvorky_gensim/gensim/test/test_word2vec.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unittes... | 58,536 | Python | .py | 1,039 | 46.903754 | 120 | 0.651232 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,069 | test_corpora_hashdictionary.py | piskvorky_gensim/gensim/test/test_corpora_hashdictionary.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
"""
Unit tests for the `corpora.HashDictionary` class.
"""
import logging
import unittest
import os
import zlib
from gensim.corpora.hashdictionary import HashDictionary
fro... | 6,650 | Python | .py | 152 | 34.802632 | 95 | 0.589692 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,070 | test_bm25model.py | piskvorky_gensim/gensim/test/test_bm25model.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from collections import defaultdict
import math
import unittest
from gensim.models.bm25model import BM25ABC
from gensim.models import OkapiBM25Model, LuceneBM25Model, AtireBM25Model
from gensim.corpora import Dictionary
class BM25Stub(BM25ABC):
def __init__(self, *... | 12,489 | Python | .py | 202 | 53.054455 | 102 | 0.682209 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,071 | test_lsimodel.py | piskvorky_gensim/gensim/test/test_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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unitte... | 8,457 | Python | .py | 154 | 46.649351 | 120 | 0.678882 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,072 | test_ensemblelda.py | piskvorky_gensim/gensim/test/test_ensemblelda.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Author: Tobias B <proxima@sezanzeb.de>
"""
Automated tests for checking the EnsembleLda Class
"""
import os
import logging
import unittest
import numpy as np
from copy import deepcopy
import pytest
from gensim.models import EnsembleLda, LdaMulticore, LdaModel
from ... | 20,009 | Python | .py | 367 | 45.441417 | 115 | 0.679873 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,073 | svd_error.py | piskvorky_gensim/gensim/test/svd_error.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz>
"""USAGE: %(program)s MATRIX.mm [CLIP_DOCS] [CLIP_TERMS]
Check truncated SVD error for the algo in gensim, using a given corpus. This script
runs the decomposition with several internal parameters (number of r... | 7,390 | Python | .py | 163 | 36.846626 | 118 | 0.613118 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,074 | simspeed2.py | piskvorky_gensim/gensim/test/simspeed2.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
"""
USAGE: %(program)s CORPUS_DENSE.mm CORPUS_SPARSE.mm [NUMDOCS]
Run speed test of similarity queries. Only us... | 6,436 | Python | .py | 141 | 37.93617 | 113 | 0.624184 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,075 | test_glove2word2vec.py | piskvorky_gensim/gensim/test/test_glove2word2vec.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2016 Radim Rehurek <radimrehurek@seznam.cz>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""Test for gensim.scripts.glove2word2vec.py."""
import logging
import unittest
import os
import sys
import numpy... | 1,604 | Python | .py | 37 | 36.378378 | 115 | 0.659178 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,076 | test_lda_callback.py | piskvorky_gensim/gensim/test/test_lda_callback.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2018 Allenyl <allen7575@gmail.com>
# Licensed under the GNU LGPL v2.1 - https://www.gnu.org/licenses/old-licenses/lgpl-2.1.en.html
"""
Automated tests for checking visdom API
"""
import unittest
import subprocess
import time
from gensim.models import Lda... | 1,700 | Python | .py | 43 | 33.27907 | 115 | 0.675167 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,077 | test_ldamodel.py | piskvorky_gensim/gensim/test/test_ldamodel.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import number... | 21,720 | Python | .py | 416 | 42.942308 | 114 | 0.632081 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,078 | test_datatype.py | piskvorky_gensim/gensim/test/test_datatype.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
"""
Automated tests for checking various matutils functions.
"""
import logging
import unittest
import numpy as np
from gensim.test.utils import datapath
from gensim.models... | 1,965 | Python | .py | 42 | 39.904762 | 97 | 0.677132 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,079 | test_logentropy_model.py | piskvorky_gensim/gensim/test/test_logentropy_model.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
"""
Automated tests for checking transformation algorithms (the models package).
"""
import logging
import unitte... | 2,765 | Python | .py | 60 | 39.15 | 97 | 0.681666 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,080 | test_corpora.py | piskvorky_gensim/gensim/test/test_corpora.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
"""
Automated tests for checking corpus I/O formats (the corpora package).
"""
from __future__ import unicode_lite... | 35,490 | Python | .py | 756 | 37.832011 | 107 | 0.624532 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,081 | test_parsing.py | piskvorky_gensim/gensim/test/test_parsing.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Automated tests for the parsing module.
"""
import logging
import unittest
from unittest import mock
import numpy as np
from gensim.parsing.preprocessing import (
remove_short_tokens,
remove_stopword_tokens,
remove_stopwords,
stem_text,
split_alp... | 4,071 | Python | .py | 86 | 41.77907 | 112 | 0.679087 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,082 | test_segmentation.py | piskvorky_gensim/gensim/test/test_segmentation.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
"""
Automated tests for segmentation algorithms in the segmentation module.
"""
import logging
import unittest
i... | 2,076 | Python | .py | 53 | 31.377358 | 95 | 0.520139 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,083 | lda_3_0_1_model.expElogbeta.npy | piskvorky_gensim/gensim/test/test_data/lda_3_0_1_model.expElogbeta.npy | “NUMPY F {'descr': '<f8', 'fortran_order': False, 'shape': (2, 12), }
Ç%)Í=´?
¾�ݾ=´?™È›¢}?´?"”l«?]¤?wäÊ;KC¾?OæßÚo(Ä?d iÇ?´?³c&iÇ?´?[• ™�B´?c±Ñ1âmw? æmœª)w?›Q!Ð+w? ÷¬ŸÏ„?âú—9-Є?ËîV羄?E¨ió§²?Q²É£�´„?˜Œr뙄?ÏZÁ‘
¼„?.ƒI�
¼„?9H¾ÿ„ „?'r(¡\Ê?<¾SêaÊ?á&ÕÔÁ? | 272 | Python | .py | 3 | 87 | 183 | 0.451852 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,084 | word2vec_pre_kv_sep_py2.syn0.npy | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_sep_py2.syn0.npy | “NUMPY F {'descr': '<f4', 'fortran_order': False, 'shape': (9, 2), }
ED£@'é?.~‰@c>"?cx‰@æ'">ôW‚@ ?œ{@²ýú>ÉÍY@‚°=·D@úL‰>WÑ:@g‰>€6F@@#? | 152 | Python | .py | 2 | 70.5 | 79 | 0.403974 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,085 | word2vec_pre_kv_sep_py3.syn1neg.npy | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_sep_py3.syn1neg.npy | “NUMPY F {'descr': '<f4', 'fortran_order': False, 'shape': (9, 2), }
L¯q¾�
]>&.‘¾±j>Š›¾(î>>·I޾BùN><n¾Ô>6�¾ðñ>.…¾Ù>½Ûk¾I–F>¾�‹¾!ÔE> | 152 | Python | .py | 2 | 70.5 | 79 | 0.463576 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,086 | 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 | .py | 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,087 | word2vec_pre_kv_sep_py3.syn0.npy | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_sep_py3.syn0.npy | “NUMPY F {'descr': '<f4', 'fortran_order': False, 'shape': (9, 2), }
ñs@€¿BÀŒwX@�G.À*õX@CQÀ/R@)xÀ�U@ëÀÉ~6@&aÀ$ÿ@™è¿ ¯&@Oÿ¿I@þfî¿ | 152 | Python | .py | 2 | 70.5 | 79 | 0.456954 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,088 | 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 | .py | 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,089 | 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 | .py | 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,090 | word2vec_pre_kv_sep_py3_4 | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_sep_py3_4 | €cgensim.models.word2vec
Word2Vec
q )�q}q(X max_vocab_sizeqK2X train_countqKX raw_vocabqcUserString
defaultdict
qc__builtin__
long
q…qRq X hsq
K X
index2wordq]q(X theq
X toqX ofqX inqX andqX forqX hasqX haveqX areqeX
__ignoredsq]q(X syn0normqX cu... | 5,269 | Python | .py | 37 | 141.432432 | 796 | 0.60042 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,091 | word2vec_pre_kv_sep_py2.syn1neg.npy | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_sep_py2.syn1neg.npy | “NUMPY F {'descr': '<f4', 'fortran_order': False, 'shape': (9, 2), }
.{оMwh½'¡¢¾¡ô¼½¾l7; Œ¬¾5ä#=§å¸¾¦+½z ¾ÜtE½Žá—¾J®‡½Ðª¶¾ÿì—½rо‡ �= | 152 | Python | .py | 2 | 70.5 | 79 | 0.509934 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,092 | word2vec_pre_kv_sep_py2 | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_sep_py2 | €cgensim.models.word2vec
Word2Vec
q)�q}q(Utrain_countqKUbatch_wordsqM'U cbow_meanqKUrandomqcnumpy.random
__RandomState_ctor
q)Rq (UMT19937q
cnumpy.core.multiarray
_reconstruct
qcnumpy
ndarray
qK …Ub‡Rq
(KMp…cnumpy
dtype
qUu4K K‡Rq(KU<NNNJÿÿÿÿJÿÿÿÿK tb‰TÀ ş[É�hs|1h€ÙÏ1ûÜ1¡ÛpL4EšîÓvo3Ğï£)[ı—... | 3,806 | Python | .py | 42 | 89.619048 | 455 | 0.610624 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,093 | 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 | .py | 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,094 | atmodel_3_0_1_model.expElogbeta.npy | piskvorky_gensim/gensim/test/test_data/atmodel_3_0_1_model.expElogbeta.npy | “NUMPY F {'descr': '<f8', 'fortran_order': False, 'shape': (2, 12), }
’çu³?¡�¡Ö¯³?n¤D~´?dmV¡¯?å%ùÔö¼?*{¹.2Ã?.ÁÓ5Ò…³?À8Ç
Ñ…³?
ò ™í0¬?z�›‹V�?"ÜAnc†?~õ(Ul9�?3ã@°�?¯ËV·Î>�?Lö Ş*…?[Ş…e(r£?ï*Ú½ã}“?ñD/<rî—?Èû%ê�ı�?\}Qªı�?F¸¼æ¶¨?/K˜ÀóÆ?,ê¨kÉ1È?�´¾—œgÀ? | 272 | Python | .py | 4 | 65 | 127 | 0.449814 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,095 | word2vec_pre_kv_sep_py3 | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_sep_py3 | €cgensim.models.word2vec
Word2Vec
q )�q}q(X iterqKX layer1_sizeqKX train_countqKX negativeqKX workersqKX windowqKX __numpysq ]q
(X
syn0_lockfqX syn1negqX
neg_labelsq
X syn0qeX __scipysq]qX total_train_timeqG@ößhA X seedqKX
index2wordq]q(X theqX... | 5,246 | Python | .py | 35 | 148.857143 | 1,513 | 0.590752 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,096 | 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 | .py | 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,097 | word2vec_pre_kv_py3 | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_py3 | €cgensim.models.word2vec
Word2Vec
q )�q}q(X iterqKX layer1_sizeqKX train_countqKX negativeqKX workersqKX windowqKX
syn0_lockfq cnumpy.core.multiarray
_reconstruct
q
cnumpy
ndarray
qK …qc_codecs
encode
q
X bqX latin1q†qRq‡qRq(KK …qcnumpy
dtype
qX f4qK K‡qRq(KX... | 5,826 | Python | .py | 39 | 148.358974 | 1,513 | 0.586558 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,098 | word2vec_pre_kv_py2 | piskvorky_gensim/gensim/test/test_data/word2vec_pre_kv_py2 | €cgensim.models.word2vec
Word2Vec
q)�q}q(Utrain_countqKUbatch_wordsqM'U cbow_meanqKUrandomqcnumpy.random
__RandomState_ctor
q)Rq (UMT19937q
cnumpy.core.multiarray
_reconstruct
qcnumpy
ndarray
qK …Ub‡Rq
(KMp…cnumpy
dtype
qUu4K K‡Rq(KU<NNNJÿÿÿÿJÿÿÿÿK tb‰TÀ ş[É�hs|1h€ÙÏ1ûÜ1¡ÛpL4EšîÓvo3Ğï£)[ı—... | 4,212 | Python | .py | 42 | 99.285714 | 455 | 0.592424 | piskvorky/gensim | 15,546 | 4,374 | 408 | LGPL-2.1 | 9/5/2024, 5:10:17 PM (Europe/Amsterdam) |
7,099 | 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 | .py | 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) |