natasha / corus

Links to Russian corpora + Python functions for loading and parsing
MIT License
277 stars 20 forks source link

load_lenta2 не доступен при установке пакета из pip #73

Closed stllfe closed 3 years ago

stllfe commented 3 years ago

Привет! Есть идеи, почему при установке из pip в пакете не находится load_lenta2?

(venv) ➜  pip install --upgrade corus --no-cache
Collecting corus
  Downloading corus-0.7.0-py3-none-any.whl (81 kB)
     |████████████████████████████████| 81 kB 1.0 MB/s 
Installing collected packages: corus
Successfully installed corus-0.7.0
(venv) ➜  ipython

Python 3.8.0 (default, Jul 24 2020, 06:59:58) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import corus

In [2]: data = corus.load_lenta2('lenta-ru-news.csv.bz2')
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<ipython-input-3-0a0d2eb713fc> in <module>
----> 1 data = corus.load_lenta2('lenta-ru-news.csv.bz2')

AttributeError: module 'corus' has no attribute 'load_lenta2'

Попытка импорта из source так же не помогает...

Если напрямую установить из master, все ок:

(venv) ➜  git clone https://github.com/natasha/corus.git                                      
Cloning into 'corus'...
remote: Enumerating objects: 1033, done.
remote: Total 1033 (delta 0), reused 0 (delta 0), pack-reused 1033
Receiving objects: 100% (1033/1033), 1.01 MiB | 628.00 KiB/s, done.
Resolving deltas: 100% (655/655), done.
(venv) ➜  cd corus 
(venv) ➜  corus git:(master) pip install -e ./                     
Obtaining file:///home/opavlovich/projects/asr/corus
Installing collected packages: corus
  Running setup.py develop for corus
Successfully installed corus
Python 3.8.0 (default, Jul 24 2020, 06:59:58) 
Type 'copyright', 'credits' or 'license' for more information
IPython 7.19.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import corus

In [2]: data = corus.load_lenta2('lenta-ru-news.csv.bz2')

Кажется забыли в pypi обновить сурсы.

kuk commented 3 years ago

Спасибо! Обновил пакет pip install corus==0.9.0