Giter Club home page Giter Club logo

Comments (7)

boudinfl avatar boudinfl commented on June 6, 2024

Hi @dipaweshpawarsn,

Do you also get that error when using the TfIdf model?

f.

from pke.

dipaweshpawarsn avatar dipaweshpawarsn commented on June 6, 2024

I will have to check that as I tried it 3 months ago

from pke.

dipaweshpawarsn avatar dipaweshpawarsn commented on June 6, 2024

Hi @dipaweshpawarsn,

Do you also get that error when using the TfIdf model?

f.

No I have not tried it.

from pke.

boudinfl avatar boudinfl commented on June 6, 2024

I am not able to reproduce your issue on my computer. Can you try to update your pke install and re-try?

Thanks,

from pke.

palle-k avatar palle-k commented on June 6, 2024

I am able to reproduce this issue in an Ubuntu-18.04 Docker Container with Python 3.6. It works on the host though, which is also 18.04 with python 3.6

from pke.

palle-k avatar palle-k commented on June 6, 2024

The fix is to run the following:

apt-get install locales
locale-gen en_US.UTF-8
update-locale LC_ALL= en_US.UTF-8 LANG= en_US.UTF-8
export PYTHONIOENCODING=utf8

Not sure whether all lines are necessary.

from pke.

MisooKim avatar MisooKim commented on June 6, 2024

I fixed the same bug as follows.

File: pke/util.py
Function: load_document_frequency_file(input_file, delimiter='\t'):
Lines: 51 ~ 53
Fixed code: (adding encoding="utf8" when open the file)

    # open the input file
    with gzip.open(input_file, 'rt', encoding="utf8") if input_file.endswith('.gz') else \
            codecs.open(input_file, 'rt', encoding="utf8") as f:
        # read the csv file
        df_reader = csv.reader(f, delimiter=delimiter)

from pke.

Related Issues (20)

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.