Skip to content
This repository has been archived by the owner on Nov 1, 2022. It is now read-only.

No module named utils #18

Open
itsdeekay opened this issue Jul 22, 2017 · 2 comments
Open

No module named utils #18

itsdeekay opened this issue Jul 22, 2017 · 2 comments

Comments

@itsdeekay
Copy link

  • markovipy version:
  • Python version:
  • Operating System:

Description

from markovipy.markovipy import MarkoviPy

obj = MarkoviPy("test.txt", 30)

obj.generate_sentence()
obj.generate_sentence()

What I Did

    from markovipy.markovipy import MarkoviPy
  File "C:\Python27\lib\site-packages\markovipy\__init__.py", line 3, in <module
>
    from .markovipy import MarkoviPy
  File "C:\Python27\lib\site-packages\markovipy\markovipy.py", line 8, in <modul
e>
    from markovipy.utils import get_word_list
ImportError: No module named utils
@tasdikrahman
Copy link
Owner

Hey @itsdeekay

The only interfaces exposed by the library is

  • Markovipy.Markovipy()
  • Markovipy.generate_sentence()

To use the package.

You just have to install the pip package and follow the README example.

And please pass the full path when you are training the corpus module here

obj = MarkoviPy("test.txt", 30)

Which means, markovipy is assuming that you are having the test.txt residing in your working environment.

@Kimice
Copy link

Kimice commented Jul 26, 2017

@itsdeekay

just change the source code in markovipy.py

  • from utils import get_word_list
  • from constants import PUNCTUATIONS

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants