Code Monkey home page Code Monkey logo

Comments (13)

jkdufair avatar jkdufair commented on August 15, 2024 3

This appears to be related to trying to run nea w/ Python 3. I had this until I switched to Python 2.7.

from nea.

quamar313 avatar quamar313 commented on August 15, 2024 3

I was facing same problem, I just added encoding="latin-1" after the file name and the problem get solved

from nea.

tim-hub avatar tim-hub commented on August 15, 2024 2

I got the same error, and fixed it. and I forked it to try to migrate to python3.6

https://github.com/tim-hub/nea

from nea.

rahuls321 avatar rahuls321 commented on August 15, 2024 1

Either you change the python version i.e from python 3 to python 2
OR
you can use this line with open(input_file, encoding="latin-1") as f: instead of the previous one in order to remove the error.

from nea.

brucerowan avatar brucerowan commented on August 15, 2024

I am getting this error too

from nea.

brucerowan avatar brucerowan commented on August 15, 2024

@jkdufair even after switching to Python 2.7 i am getting this error:
File "preprocess_asap.py", line 48, in
create_dataset(lines, 'fold_%d/%s.tsv' % (fold_idx, dataset_type))
File "preprocess_asap.py", line 25, in create_dataset
f_write = open(output_fname, 'w',encoding='utf-16')
TypeError: 'encoding' is an invalid keyword argument for this function

from nea.

brucerowan avatar brucerowan commented on August 15, 2024

I just removed the encoding keyword and it worked!

from nea.

DamonCC avatar DamonCC commented on August 15, 2024

I got the same error, and fixed it. and I forked it to try to migrate to python3.6

https://github.com/tim-hub/nea

Can you get the same result as the paper? My Kappa score is between 0.5 and 0.6, and I can't reach the score of the paper.

from nea.

jkdufair avatar jkdufair commented on August 15, 2024

@DamonCC See #13

from nea.

eiphy avatar eiphy commented on August 15, 2024

@jkdufair ,

By using your method, the result: (left for jkdufair's method and right is generated by python2)

Screenshot from 2020-07-19 02-27-55

@rahuls321,
The latin-1 also gives some mysterious symbols.

My solution is use with open(input_file, encoding="cp1251", errors='ignore') as f:.

from nea.

varunkhanna1993 avatar varunkhanna1993 commented on August 15, 2024

I got the same error, and fixed it. and I forked it to try to migrate to python3.6

https://github.com/tim-hub/nea

THIS worked. Thanks ;)

from nea.

zin288 avatar zin288 commented on August 15, 2024

I was facing same problem, I just added encoding="latin-1" after the file name and the problem get solved

This worked for me, thank you! :)

from nea.

tats2bzr avatar tats2bzr commented on August 15, 2024

i am facing the same error

from nea.

Related Issues (15)

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.