Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Patch for /arff/__init__.py #2

Closed
GoogleCodeExporter opened this issue Dec 15, 2015 · 2 comments
Closed

Patch for /arff/__init__.py #2

GoogleCodeExporter opened this issue Dec 15, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

This patch fixes two issues I experienced with a nominal attribute that uses 
quoted strings as options. (It's the glass.arff file from weka's standard data 
directory).
- Using shlex to parse the option strings preserves quoted strings
- Stripping names for both types of quotes (Is propably needed somewhere else, 
too)

Original issue reported on code.google.com by moschlar@metalabs.de on 30 Jan 2012 at 11:08

Attachments:

@GoogleCodeExporter
Copy link
Author

Shlex is problematic because it doesn't work with unicode in python 2.7


>>>shlex.split(u'asdf bb')
['a\x00\x00\x00s\x00\x00\x00d\x00\x00\x00f\x00\x00\x00', 
'\x00\x00\x00b\x00\x00\x00b\x00\x00\x00']

I'm fixing it using next(csv.reader(['line']))

Original comment by ubershmekel@gmail.com on 7 May 2012 at 8:45

@GoogleCodeExporter
Copy link
Author

http://code.google.com/p/arff/source/detail?r=3c1009d3d32f895199d40cdb8b04c93711
faa5c8

Original comment by ubershmekel@gmail.com on 7 May 2012 at 9:08

  • Changed state: Fixed

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

No branches or pull requests

1 participant