Giter VIP home page Giter VIP logo

Comments (3)

nufaylr avatar nufaylr commented on June 20, 2024 2

Hi, Thank you for your prompt replying.

Yes 👍 it worked once i install nltk.

I was trying to reproduce by doing a fresh installation. This what I get when I run an examples

test_1.py

from sinling import preprocess, word_joiner
w1 = preprocess('මුනි')
w2 = preprocess('උතුමා')
results = word_joiner.join(w1, w2)
print(results)

This the error I get

  File "test_1.py", line 1, in <module>
    from sinling import preprocess, word_joiner
  File "/usr/local/Caskroom/miniconda/base/envs/py38-sinling/lib/python3.8/site-packages/sinling/__init__.py", line 1, in <module>
    from sinling.sinhala import *
  File "/usr/local/Caskroom/miniconda/base/envs/py38-sinling/lib/python3.8/site-packages/sinling/sinhala/__init__.py", line 3, in <module>
    from sinling.sinhala.splitter import *
  File "/usr/local/Caskroom/miniconda/base/envs/py38-sinling/lib/python3.8/site-packages/sinling/sinhala/splitter.py", line 62, in <module>
    word_splitter = CorpusBasedSplitter(_data_path)
  File "/usr/local/Caskroom/miniconda/base/envs/py38-sinling/lib/python3.8/site-packages/sinling/sinhala/splitter.py", line 23, in __init__
    self.data = pickle.load(file)
ModuleNotFoundError: No module named 'nltk'

Dose Pickle module using nltk as dependency again i can see its under nltk is under requirements.txt

maybe its conda issue :) it might needs its own channel to install.

from sinling.

ysenarath avatar ysenarath commented on June 20, 2024 1

Thank you for providing the error. Yes, it seems that I used a nltk package in the pickled resource. It is not a problem of conda, just current version is not configured to automatically install nltk when installing via pip. I'll update the configurations to fix the issue.

P.S. All packages that will be automatically installed when installing the package are listed in this file.

from sinling.

ysenarath avatar ysenarath commented on June 20, 2024

Hi,

I'm unable to replicate the issue with my setup. Can you try installing nltk using pip before installing sinling? You can use following command

pip install nltk

However, the package does not require you to install nltk as a base package for it to work. If the above does not work for you, you might want to clone this repository and add the path to the cloned repository to PYTHONPATH env variable.

Let me know how it goes.

from sinling.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.