WojciechMula / pyahocorasick

Python module (C extension and plain python) implementing Aho-Corasick algorithm
BSD 3-Clause "New" or "Revised" License
927 stars 122 forks source link

iter_long function not exists in 1.4.0 version #128

Closed zhouxinhit closed 3 years ago

zhouxinhit commented 4 years ago

I found iter_long function in the documentation below

https://pyahocorasick.readthedocs.io/en/latest/#iter-long-string-start-end

But when i'm coding with it, it turns out not exits

macos 10.13.4 and 10.14.2

gunturbudi commented 4 years ago

I have similar issues.. I have python version 3.7 and get the library from pip

jeongukjae commented 4 years ago

I have a similar issue.

I found that iter_long was added at Feb 13, 2020 (https://github.com/WojciechMula/pyahocorasick/commits/master), but latest tag(1.4.0) was released at Jan 15, 2019 (https://github.com/WojciechMula/pyahocorasick/releases).

So I tried to install pyahocorasick with a git url (pip install git+https://github.com/WojciechMula/pyahocorasick), then I can use 'iter_long` without any problems.

(env) $ pip install git+https://github.com/WojciechMula/pyahocorasick                       
Collecting git+https://github.com/WojciechMula/pyahocorasick
  Cloning https://github.com/WojciechMula/pyahocorasick to /private/var/folders/22/wbprl_354kx9x3mhm616_4xw0000gn/T/pip-req-build-b_wb_mo2
  Running command git clone -q https://github.com/WojciechMula/pyahocorasick /private/var/folders/22/wbprl_354kx9x3mhm616_4xw0000gn/T/pip-req-build-b_wb_mo2
Building wheels for collected packages: pyahocorasick
  Building wheel for pyahocorasick (setup.py) ... done
  Created wheel for pyahocorasick: filename=pyahocorasick-1.4.0-cp37-cp37m-macosx_10_15_x86_64.whl size=31985 sha256=1b47718e2ac5e6a735bb1c7d8f6a983d2d3eec6f5ef20c03a4be74775a2ed8ad
  Stored in directory: /private/var/folders/22/wbprl_354kx9x3mhm616_4xw0000gn/T/pip-ephem-wheel-cache-a2ezehss/wheels/a2/38/94/83868459fe2c3043c5d421ec249239ecf58ba6f0f49c40fd98
Successfully built pyahocorasick
Installing collected packages: pyahocorasick
Successfully installed pyahocorasick-1.4.0
(env) $ python                                                       
Python 3.7.5 (default, Dec 23 2019, 12:52:20) 
[Clang 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ahocorasick import Automaton
>>> a = Automaton()
>>> a.iter_long
<built-in method iter_long of ahocorasick.Automaton object at 0x10b223500>
jeongukjae commented 4 years ago

Also there is no docs related to iter_long in version 1.4.0. https://pyahocorasick.readthedocs.io/en/1.4.0/ 😢

avatar-ship-it commented 4 years ago

I have a similar issue.

I found that iter_long was added at Feb 13, 2020 (https://github.com/WojciechMula/pyahocorasick/commits/master), but latest tag(1.4.0) was released at Jan 15, 2019 (https://github.com/WojciechMula/pyahocorasick/releases).

So I tried to install pyahocorasick with a git url (pip install git+https://github.com/WojciechMula/pyahocorasick), then I can use 'iter_long` without any problems.

(env) $ pip install git+https://github.com/WojciechMula/pyahocorasick                       
Collecting git+https://github.com/WojciechMula/pyahocorasick
  Cloning https://github.com/WojciechMula/pyahocorasick to /private/var/folders/22/wbprl_354kx9x3mhm616_4xw0000gn/T/pip-req-build-b_wb_mo2
  Running command git clone -q https://github.com/WojciechMula/pyahocorasick /private/var/folders/22/wbprl_354kx9x3mhm616_4xw0000gn/T/pip-req-build-b_wb_mo2
Building wheels for collected packages: pyahocorasick
  Building wheel for pyahocorasick (setup.py) ... done
  Created wheel for pyahocorasick: filename=pyahocorasick-1.4.0-cp37-cp37m-macosx_10_15_x86_64.whl size=31985 sha256=1b47718e2ac5e6a735bb1c7d8f6a983d2d3eec6f5ef20c03a4be74775a2ed8ad
  Stored in directory: /private/var/folders/22/wbprl_354kx9x3mhm616_4xw0000gn/T/pip-ephem-wheel-cache-a2ezehss/wheels/a2/38/94/83868459fe2c3043c5d421ec249239ecf58ba6f0f49c40fd98
Successfully built pyahocorasick
Installing collected packages: pyahocorasick
Successfully installed pyahocorasick-1.4.0
(env) $ python                                                       
Python 3.7.5 (default, Dec 23 2019, 12:52:20) 
[Clang 11.0.0 (clang-1100.0.33.8)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ahocorasick import Automaton
>>> a = Automaton()
>>> a.iter_long
<built-in method iter_long of ahocorasick.Automaton object at 0x10b223500>

thanks. it worked

syw2014 commented 4 years ago

Hello, I want to know when to update the released pyahocorasick whl?

failable commented 4 years ago

Any update of this?

Lion-Li commented 3 years ago

If you want to install by Pipenv, add #egg=pyahocorasick in the end.

 pipenv install git+https://github.com/WojciechMula/pyahocorasick#egg=pyahocorasick
WojciechMula commented 3 years ago

iter_long will be included added in 1.4.1. I'm planning the release in the coming week (28 December).

remintz commented 3 years ago

Hi! Any update of this? Thanks!

WojciechMula commented 3 years ago

@remintz Yes, I started to work on releasing.

WojciechMula commented 3 years ago

Version 1.4.1 was released.

WojciechMula commented 3 years ago

@pombredanne Would you please prepare wheels?

BTW, I tried to build and upload a wheel at least for Linux -- I built wheel with python3 setup.py bdist_wheel, but when tried to push it on pypi twine upload dist/pyahocorasick-1.4.1-cp39-cp39-linux_x86_64.whl there is error 400: "Binary wheel 'pyahocorasick-1.4.1-cp39-cp39-linux_x86_64.whl' has an unsupported platform tag 'linux_x86_64'."

I'm unfamiliar with wheels, any piece of advice warmly welcomed.