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

Trying to fix Index Out Of Range Error #2652

Closed
wants to merge 14 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
build:
docker:
- image: circleci/python:2.7
- image: circleci/python:3.7.4

working_directory: ~/gensim

Expand All @@ -18,16 +18,20 @@ jobs:
sudo apt-get -yq update
sudo apt-get -yq remove texlive-binaries --purge
sudo apt-get -yq --no-install-suggests --no-install-recommends --force-yes install dvipng texlive-latex-base texlive-latex-extra texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended latexmk
sudo apt-get -yq install build-essential python3.7-dev

- run:
name: Basic installation (tox)
command: |
python -m virtualenv venv
python3.7 -m virtualenv venv
source venv/bin/activate
pip install tox
pip install tox --progress-bar off

- run:
name: Build documentation
environment:
TOX_PARALLEL_NO_SPINNER: 1
TOX_PIP_OPTS: --progress-bar=off
command: |
source venv/bin/activate
tox -e compile,docs -vv
Expand Down
12 changes: 5 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,15 @@ cache:
- $HOME/.pip-cache
dist: trusty
language: python
env:
TOX_PARALLEL_NO_SPINNER: 1


matrix:
include:
- python: '2.7'
env: TOXENV="flake8,flake8-docs"

- python: '3.6'
env: TOXENV="flake8,flake8-docs"

- python: '2.7'
env: TOXENV="py27-linux"

- python: '3.5'
env: TOXENV="py35-linux"

Expand All @@ -35,5 +31,7 @@ matrix:
sudo: true


install: pip install tox
install:
- pip install tox
- python ci/install_wheels.py
script: tox -vv
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
Changes
=======

## :warning: 3.8.x will be the last gensim version to support Py2.7. Starting with 4.0.0, gensim will only support Py3.5 and above

## 3.8.1, 2019-09-23

### :red_circle: Bug fixes
Expand Down Expand Up @@ -43,8 +45,6 @@ Changes

## 3.8.0, 2019-07-08

## :warning: 3.8.x will be the last gensim version to support Py2.7. Starting with 4.0.0, gensim will only support Py3.5 and above

### :star2: New Features

* Enable online training of Poincare models (__[koiizukag](https://github.com/koiizukag)__, [#2505](https://github.com/RaRe-Technologies/gensim/pull/2505))
Expand Down
35 changes: 35 additions & 0 deletions HACKTOBERFEST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# :pizza: Hacktoberfest 2019 :beer:

It's that time of the year again!
[Hacktoberfest](https://hacktoberfest.digitalocean.com) is here, and `gensim` needs **your** help.
We've prepared a list of good issues to work on: [gensim hacktoberfest issues](https://github.com/RaRe-Technologies/gensim/labels/hacktoberfest).

If the learning curve for `gensim` is a bit steep, give the [smart_open](https://github.com/RaRe-Technologies/smart_open) repository a try.
`smart_open` is an important dependency of `gensim`: it performs file I/O over a variety of protocols and formats.
There's also a list of Hacktoberfest-friendly issues to work on: [smart_open hacktoberfest issues](https://github.com/RaRe-Technologies/smart_open/labels/hacktoberfest).

Of course, we welcome contributions on any of the existing issues, not just the ones labeled `hacktoberfest`.
If the issue is simple & quick, you can just submit your PR, with a proper reference to the issue it addresses.
If the issue requires a little more work, but you have a good idea of how to proceed & know when you'll be submitting some initial work, please post a short note about your plans to the issue, or a "work-in-progress" ("[WIP]") pull-request indicating work is underway, to help avoid wasted duplicate work.

Furthermore, we also welcome contributions not connected to an existing issue.
This includes things like fixing typos in documentation, docstrings, etc.
If you make such contributions, please make the motivation behind the contribution clear.
You could start such a contribution with a new pull-request, or if you think it requires other discussion beforehand, as a separate new issue.
Please avoid making innocuous changes without sufficient motivation (e.g. changing code formatting, etc).

## Before Contributing

Check out the following:

- [First-time contributors guide](https://github.com/firstcontributions/first-contributions): if this is your first time contributing on GitHub.
- [Hacktoberfest rules](https://hacktoberfest.digitalocean.com/faq#rules): read this in full
- [Developer page](https://github.com/RaRe-Technologies/gensim/wiki/Developer-page) on our Wiki: for the git flow, code style, etc.

## Questions

If you have a general question about Gensim, please ask on the [mailing list](https://groups.google.com/forum/#!forum/gensim).
If you have a question a about a specific issue or PR, just ask there directly, and we'll get back to you as soon as we can.
Otherwise, ping @mpenkov on [Twitter](https://twitter.com/mpenkov) or [Telegram](https://t.me/mpenkov).

Happy Hacking!!
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ gensim – Topic Modelling in Python
[![Gitter](https://img.shields.io/badge/gitter-join%20chat%20%E2%86%92-09a3d5.svg)](https://gitter.im/RaRe-Technologies/gensim)
[![Follow](https://img.shields.io/twitter/follow/gensim_py.svg?style=social&label=Follow)](https://twitter.com/gensim_py)



Gensim is a Python library for *topic modelling*, *document indexing*
and *similarity retrieval* with large corpora. Target audience is the
*natural language processing* (NLP) and *information retrieval* (IR)
community.

## :pizza: Hacktoberfest 2019 :beer:

We are accepting PRs for Hacktoberfest!
See [here](HACKTOBERFEST.md) for details.

Features
--------

Expand Down Expand Up @@ -98,12 +101,10 @@ Documentation

- [QuickStart]
- [Tutorials]
- [Tutorial Videos]
- [Official API Documentation]

[QuickStart]: https://github.com/RaRe-Technologies/gensim/blob/develop/docs/notebooks/gensim%20Quick%20Start.ipynb
[Tutorials]: https://github.com/RaRe-Technologies/gensim/blob/develop/tutorials.md#tutorials
[Tutorial Videos]: https://github.com/RaRe-Technologies/gensim/blob/develop/tutorials.md#videos
[QuickStart]: https://radimrehurek.com/gensim/auto_examples/core/run_core_concepts.html
[Tutorials]: https://radimrehurek.com/gensim/auto_examples/
[Official Documentation and Walkthrough]: http://radimrehurek.com/gensim/
[Official API Documentation]: http://radimrehurek.com/gensim/apiref.html

Expand Down
8 changes: 3 additions & 5 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,9 @@ environment:
WHEELHOUSE_UPLOADER_USERNAME: "Lev.Konstantinovskiy"
WHEELHOUSE_UPLOADER_SECRET:
secure: qXqY3dFmLOqvxa3Om2gQi/BjotTOK+EP2IPLolBNo0c61yDtNWxbmE4wH3up72Be
TOX_PARALLEL_NO_SPINNER: 1

matrix:
- PYTHON: "C:\\Python27-x64"
PYTHON_VERSION: "2.7.12"
PYTHON_ARCH: "64"
TOXENV: "py27-win"

- PYTHON: "C:\\Python35-x64"
PYTHON_VERSION: "3.5.2"
PYTHON_ARCH: "64"
Expand Down Expand Up @@ -60,6 +56,8 @@ install:
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""

- "python ci/install_wheels.py"

build: false

test_script:
Expand Down
30 changes: 30 additions & 0 deletions ci/install_wheels.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""Install wheels for numpy and scipy.

Without wheels, installation requires doing a build, which is too much.
The versions of the packages for which wheels are available depends on
the current Python version.

We use this when building/testing gensim in a CI environment (Travis, AppVeyor,
etc).
"""

import subprocess
import sys


def main():
if sys.version_info[:2] == (3, 7):
packages = ['numpy==1.14.5', 'scipy==1.1.0']
else:
packages = ['numpy==1.11.3', 'scipy==1.0.0']
command = [sys.executable, '-m', 'pip', 'install'] + packages

print('sys.executable: %r' % sys.executable, file=sys.stderr)
print('sys.version_info: %r' % list(sys.version_info), file=sys.stderr)
print('command: %r' % command, file=sys.stderr)

subprocess.check_call(command)


if __name__ == '__main__':
main()
Loading