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

Character encoding issues in boilerplate processing #29

Open
tfmorris opened this issue Apr 4, 2016 · 2 comments
Open

Character encoding issues in boilerplate processing #29

tfmorris opened this issue Apr 4, 2016 · 2 comments
Milestone

Comments

@tfmorris
Copy link
Contributor

tfmorris commented Apr 4, 2016

The output from the boilerplate processeor, e.g. /dkpro-c4corpus-boilerplate/BoilerplateEvaluationOnCleanEval/JusText_Java_Defaults_CleanEvalHTMLTestSubset/105.txt, appears to use a character encoding other than UTF-8. This causes strings such as Epogen® and “A-thal” to be corrupted.

@tfmorris
Copy link
Contributor Author

tfmorris commented Apr 8, 2016

After downloading and looking at the original data set, it turns out that the character set decoding being done wrong on the input side. The output looks like it is correctly writing UTF-8, but the characters are already corrupted by then.

In the particular case of 105.html the source encoding is windows-1252. Rather than using the file utilities to read the file into a string, the HTML parser should be allowed to parse the byte stream directly and use the encoding that it finds there. The current scheme will corrupt all non-UTF-8 documents.

tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Apr 9, 2016
@tfmorris
Copy link
Contributor Author

tfmorris commented Apr 9, 2016

And to follow up on my last comment, this only affects the standalone program, not the Hadoop processing. Rather than allowing JSoup do the character set determination, I decided to keep the API the same and use the same character encoding detection that the Hadoop processing does in the standalone program.

I've got a PR with fixes for all the boilerplate problems that I've seen (and some related stuff).

tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Apr 9, 2016
tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Apr 10, 2016
tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Apr 13, 2016
@habernal habernal added this to the 1.0.1 milestone Apr 14, 2016
tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Apr 15, 2016
tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Apr 15, 2016
tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Apr 28, 2016
tfmorris added a commit to tfmorris/dkpro-c4corpus that referenced this issue Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants