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

escape string containing backslash #24

Closed
flamingofugang opened this issue Aug 11, 2016 · 1 comment
Closed

escape string containing backslash #24

flamingofugang opened this issue Aug 11, 2016 · 1 comment
Labels

Comments

@flamingofugang
Copy link
Contributor

flamingofugang commented Aug 11, 2016

Hi,

When I convert a hdt file using hdt-cpp tool hdt2rdf, the generated nt file cannot be read by hdt-mr.

I got the following error:

Error: java.lang.IllegalArgumentException: Unescaped backslash in: "buttpark 63\09-92"@en
        at org.rdfhdt.hdt.util.UnicodeEscape.unescapeString(UnicodeEscape.java:225)
        at org.rdfhdt.hdt.triples.TripleString.read(TripleString.java:217)
        at org.rdfhdt.mrbuilder.dictionary.DictionarySamplerMapper.map(DictionarySamplerMapper.java:40)
        at org.rdfhdt.mrbuilder.dictionary.DictionarySamplerMapper.map(DictionarySamplerMapper.java:33)
        at org.apache.hadoop.mapreduce.Mapper.run(Mapper.java:145)
        at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:784)
        at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
        at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
        at java.security.AccessController.doPrivileged(Native Method)
        at javax.security.auth.Subject.doAs(Subject.java:422)
        at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1642)
        at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:163)

shall we make less strict rule in the class org.rdfhdt.hdt.util.UnicodeEscape?

Best,
Gang

@artob
Copy link
Contributor

artob commented Aug 11, 2016

What does the original string here look like? Does it have a backslash character, or is it trying to escape the \09 character code?

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

No branches or pull requests

3 participants