Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MRG] Fix similarity bug in NMSLIB indexer + documentation fixes #2899

Merged
merged 14 commits into from
Jul 30, 2020
Merged
6 changes: 3 additions & 3 deletions docs/src/_matutils.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
:mod:`_matutils` -- Cython matutils
===================================
:mod:`_matutils` -- Compiled extension for math utils
=====================================================

.. automodule:: gensim._matutils
:synopsis: Cython math utils
:synopsis: Compiled extension for math utils
:members:
:inherited-members:
:undoc-members:
Expand Down
5 changes: 3 additions & 2 deletions docs/src/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ Modules:
models/_fasttext_bin
models/phrases
models/poincare
viz/poincare
models/coherencemodel
models/basemodel
models/callbacks
Expand All @@ -63,7 +64,8 @@ Modules:
models/wrappers/varembed
similarities/docsim
similarities/termsim
similarities/index
similarities/annoy
similarities/nmslib
sklearn_api/atmodel
sklearn_api/d2vmodel
sklearn_api/hdp
Expand Down Expand Up @@ -102,4 +104,3 @@ Modules:
summarization/summariser
summarization/syntactic_unit
summarization/textcleaner
viz/poincare
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/src/auto_examples/core/run_similarity_queries.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
a3eaf7347874a32d1d25a455753206dc
54804120deb345715247f0eed42b5e0e
28 changes: 14 additions & 14 deletions docs/src/auto_examples/core/run_similarity_queries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ no random-walk static ranks, just a semantic extension over the boolean keyword

.. code-block:: none

[(0, 0.4618210045327158), (1, 0.07002766527900064)]
[(0, 0.46182100453271613), (1, 0.07002766527900031)]



Expand Down Expand Up @@ -254,15 +254,15 @@ order, and obtain the final answer to the query `"Human computer interaction"`:

.. code-block:: none

(2, 0.9984453) Human machine interface for lab abc computer applications
(0, 0.998093) A survey of user opinion of computer system response time
(3, 0.9865886) The EPS user interface management system
(1, 0.93748635) System and human system engineering testing of EPS
(4, 0.90755945) Relation of user perceived response time to error measurement
(8, 0.050041765) The generation of random binary unordered trees
(7, -0.09879464) The intersection graph of paths in trees
(6, -0.10639259) Graph minors IV Widths of trees and well quasi ordering
(5, -0.12416792) Graph minors A survey
0.9984453 The EPS user interface management system
0.998093 Human machine interface for lab abc computer applications
0.9865886 System and human system engineering testing of EPS
0.93748635 A survey of user opinion of computer system response time
0.90755945 Relation of user perceived response time to error measurement
0.050041765 Graph minors A survey
-0.09879464 Graph minors IV Widths of trees and well quasi ordering
-0.10639259 The intersection graph of paths in trees
-0.12416792 The generation of random binary unordered trees



Expand Down Expand Up @@ -319,17 +319,17 @@ on large datasets easily, and to facilitate prototyping of new algorithms for re

.. code-block:: none

/Volumes/work/workspace/gensim_misha/docs/src/gallery/core/run_similarity_queries.py:194: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
plt.show()
/Volumes/work/workspace/vew/gensim3.6/lib/python3.6/site-packages/matplotlib/figure.py:445: UserWarning: Matplotlib is currently using agg, which is a non-GUI backend, so cannot show the figure.
% get_backend())




.. rst-class:: sphx-glr-timing

**Total running time of the script:** ( 0 minutes 0.663 seconds)
**Total running time of the script:** ( 0 minutes 1.211 seconds)

**Estimated memory usage:** 6 MB
**Estimated memory usage:** 39 MB


.. _sphx_glr_download_auto_examples_core_run_similarity_queries.py:
Expand Down
6 changes: 3 additions & 3 deletions docs/src/auto_examples/core/sg_execution_times.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

Computation times
=================
**00:00.844** total execution time for **auto_examples_core** files:
**00:01.211** total execution time for **auto_examples_core** files:

- **00:00.844**: :ref:`sphx_glr_auto_examples_core_run_topics_and_transformations.py` (``run_topics_and_transformations.py``)
- **00:01.211**: :ref:`sphx_glr_auto_examples_core_run_similarity_queries.py` (``run_similarity_queries.py``)
- **00:00.000**: :ref:`sphx_glr_auto_examples_core_run_core_concepts.py` (``run_core_concepts.py``)
- **00:00.000**: :ref:`sphx_glr_auto_examples_core_run_corpora_and_vector_spaces.py` (``run_corpora_and_vector_spaces.py``)
- **00:00.000**: :ref:`sphx_glr_auto_examples_core_run_similarity_queries.py` (``run_similarity_queries.py``)
- **00:00.000**: :ref:`sphx_glr_auto_examples_core_run_topics_and_transformations.py` (``run_topics_and_transformations.py``)
103 changes: 60 additions & 43 deletions docs/src/auto_examples/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ If you're thinking about contributing documentation, please see :ref:`sphx_glr_a

.. raw:: html

<div style='clear:both'></div>
<div class="sphx-glr-clear"></div>



Expand All @@ -33,9 +33,10 @@ Understanding this functionality is vital for using gensim effectively.

.. only:: html

.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_core_concepts_thumb.png
.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_core_concepts_thumb.png
:alt: Core Concepts

:ref:`sphx_glr_auto_examples_core_run_core_concepts.py`
:ref:`sphx_glr_auto_examples_core_run_core_concepts.py`

.. raw:: html

Expand All @@ -53,9 +54,10 @@ Understanding this functionality is vital for using gensim effectively.

.. only:: html

.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_corpora_and_vector_spaces_thumb.png
.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_corpora_and_vector_spaces_thumb.png
:alt: Corpora and Vector Spaces

:ref:`sphx_glr_auto_examples_core_run_corpora_and_vector_spaces.py`
:ref:`sphx_glr_auto_examples_core_run_corpora_and_vector_spaces.py`

.. raw:: html

Expand All @@ -73,9 +75,10 @@ Understanding this functionality is vital for using gensim effectively.

.. only:: html

.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_topics_and_transformations_thumb.png
.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_topics_and_transformations_thumb.png
:alt: Topics and Transformations

:ref:`sphx_glr_auto_examples_core_run_topics_and_transformations.py`
:ref:`sphx_glr_auto_examples_core_run_topics_and_transformations.py`

.. raw:: html

Expand All @@ -93,9 +96,10 @@ Understanding this functionality is vital for using gensim effectively.

.. only:: html

.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_similarity_queries_thumb.png
.. figure:: /auto_examples/core/images/thumb/sphx_glr_run_similarity_queries_thumb.png
:alt: Similarity Queries

:ref:`sphx_glr_auto_examples_core_run_similarity_queries.py`
:ref:`sphx_glr_auto_examples_core_run_similarity_queries.py`

.. raw:: html

Expand All @@ -108,7 +112,7 @@ Understanding this functionality is vital for using gensim effectively.
/auto_examples/core/run_similarity_queries
.. raw:: html

<div style='clear:both'></div>
<div class="sphx-glr-clear"></div>



Expand All @@ -127,9 +131,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_word2vec_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_word2vec_thumb.png
:alt: Word2Vec Model

:ref:`sphx_glr_auto_examples_tutorials_run_word2vec.py`
:ref:`sphx_glr_auto_examples_tutorials_run_word2vec.py`

.. raw:: html

Expand All @@ -147,9 +152,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_doc2vec_lee_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_doc2vec_lee_thumb.png
:alt: Doc2Vec Model

:ref:`sphx_glr_auto_examples_tutorials_run_doc2vec_lee.py`
:ref:`sphx_glr_auto_examples_tutorials_run_doc2vec_lee.py`

.. raw:: html

Expand All @@ -167,9 +173,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_fasttext_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_fasttext_thumb.png
:alt: FastText Model

:ref:`sphx_glr_auto_examples_tutorials_run_fasttext.py`
:ref:`sphx_glr_auto_examples_tutorials_run_fasttext.py`

.. raw:: html

Expand All @@ -187,9 +194,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_annoy_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_annoy_thumb.png
:alt: Fast Similarity Queries with Annoy and Word2Vec

:ref:`sphx_glr_auto_examples_tutorials_run_annoy.py`
:ref:`sphx_glr_auto_examples_tutorials_run_annoy.py`

.. raw:: html

Expand All @@ -207,9 +215,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_lda_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_lda_thumb.png
:alt: LDA Model

:ref:`sphx_glr_auto_examples_tutorials_run_lda.py`
:ref:`sphx_glr_auto_examples_tutorials_run_lda.py`

.. raw:: html

Expand All @@ -227,9 +236,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_distance_metrics_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_distance_metrics_thumb.png
:alt: Distance Metrics

:ref:`sphx_glr_auto_examples_tutorials_run_distance_metrics.py`
:ref:`sphx_glr_auto_examples_tutorials_run_distance_metrics.py`

.. raw:: html

Expand All @@ -247,9 +257,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_wmd_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_wmd_thumb.png
:alt: Word Movers' Distance

:ref:`sphx_glr_auto_examples_tutorials_run_wmd.py`
:ref:`sphx_glr_auto_examples_tutorials_run_wmd.py`

.. raw:: html

Expand All @@ -267,9 +278,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_summarization_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_summarization_thumb.png
:alt: Text Summarization

:ref:`sphx_glr_auto_examples_tutorials_run_summarization.py`
:ref:`sphx_glr_auto_examples_tutorials_run_summarization.py`

.. raw:: html

Expand All @@ -287,9 +299,10 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod

.. only:: html

.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_pivoted_doc_norm_thumb.png
.. figure:: /auto_examples/tutorials/images/thumb/sphx_glr_run_pivoted_doc_norm_thumb.png
:alt: Pivoted Document Length Normalization

:ref:`sphx_glr_auto_examples_tutorials_run_pivoted_doc_norm.py`
:ref:`sphx_glr_auto_examples_tutorials_run_pivoted_doc_norm.py`

.. raw:: html

Expand All @@ -302,7 +315,7 @@ Learning-oriented lessons that introduce a particular gensim feature, e.g. a mod
/auto_examples/tutorials/run_pivoted_doc_norm
.. raw:: html

<div style='clear:both'></div>
<div class="sphx-glr-clear"></div>



Expand All @@ -321,9 +334,10 @@ These **goal-oriented guides** demonstrate how to **solve a specific problem** u

.. only:: html

.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_downloader_api_thumb.png
.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_downloader_api_thumb.png
:alt: How to download pre-trained models and corpora

:ref:`sphx_glr_auto_examples_howtos_run_downloader_api.py`
:ref:`sphx_glr_auto_examples_howtos_run_downloader_api.py`

.. raw:: html

Expand All @@ -341,9 +355,10 @@ These **goal-oriented guides** demonstrate how to **solve a specific problem** u

.. only:: html

.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_doc_thumb.png
.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_doc_thumb.png
:alt: How to Author Gensim Documentation

:ref:`sphx_glr_auto_examples_howtos_run_doc.py`
:ref:`sphx_glr_auto_examples_howtos_run_doc.py`

.. raw:: html

Expand All @@ -361,9 +376,10 @@ These **goal-oriented guides** demonstrate how to **solve a specific problem** u

.. only:: html

.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_doc2vec_imdb_thumb.png
.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_doc2vec_imdb_thumb.png
:alt: How to Apply Doc2Vec to Reproduce the 'Paragraph Vector' paper

:ref:`sphx_glr_auto_examples_howtos_run_doc2vec_imdb.py`
:ref:`sphx_glr_auto_examples_howtos_run_doc2vec_imdb.py`

.. raw:: html

Expand All @@ -381,9 +397,10 @@ These **goal-oriented guides** demonstrate how to **solve a specific problem** u

.. only:: html

.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_compare_lda_thumb.png
.. figure:: /auto_examples/howtos/images/thumb/sphx_glr_run_compare_lda_thumb.png
:alt: How to Compare LDA Models

:ref:`sphx_glr_auto_examples_howtos_run_compare_lda.py`
:ref:`sphx_glr_auto_examples_howtos_run_compare_lda.py`

.. raw:: html

Expand All @@ -396,7 +413,7 @@ These **goal-oriented guides** demonstrate how to **solve a specific problem** u
/auto_examples/howtos/run_compare_lda
.. raw:: html

<div style='clear:both'></div>
<div class="sphx-glr-clear"></div>



Expand Down Expand Up @@ -440,7 +457,7 @@ Blog posts, tutorial videos, hackathons and other useful Gensim resources, from

.. raw:: html

<div style='clear:both'></div>
<div class="sphx-glr-clear"></div>



Expand All @@ -450,15 +467,15 @@ Blog posts, tutorial videos, hackathons and other useful Gensim resources, from
:class: sphx-glr-footer-gallery


.. container:: sphx-glr-download
.. container:: sphx-glr-download sphx-glr-download-python

:download:`Download all examples in Python source code: auto_examples_python.zip <//home/misha/git/gensim/docs/src/auto_examples/auto_examples_python.zip>`
:download:`Download all examples in Python source code: auto_examples_python.zip <//Volumes/work/workspace/gensim/trunk/docs/src/auto_examples/auto_examples_python.zip>`



.. container:: sphx-glr-download
.. container:: sphx-glr-download sphx-glr-download-jupyter

:download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip <//home/misha/git/gensim/docs/src/auto_examples/auto_examples_jupyter.zip>`
:download:`Download all examples in Jupyter notebooks: auto_examples_jupyter.zip <//Volumes/work/workspace/gensim/trunk/docs/src/auto_examples/auto_examples_jupyter.zip>`


.. only:: html
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading