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

Any way to recover from unescaped double quotes? #350

Closed
excursus opened this issue May 7, 2023 · 2 comments
Closed

Any way to recover from unescaped double quotes? #350

excursus opened this issue May 7, 2023 · 2 comments

Comments

@excursus
Copy link

excursus commented May 7, 2023

The  2022-03 snapshot of dbpedia contains iris with unescaped double quotes such as this one:

<http://dbpedia.org/resource/"populate_or_perish"> <http://www.w3.org/2002/07/owl#sameAs> <http://rdf.freebase.com/ns/m.01182wk6> .

see here. This causes the lexer to throw this error:

    const err = new Error(`Unexpected "${issue}" on line ${this._line}.`);
                ^
Error: Unexpected "<http://dbpedia.org/resource/"populate_or_perish">" on line 820.

Is there any way to gracefully recover from errors such as these?

@jeswr
Copy link
Collaborator

jeswr commented May 8, 2023

No there is not, N3.js is designed to throw errors on invalid syntax as is the case with these IRIs (note that the definition of IRIREF explicitly forbids them in the production grammar).

I suggest you raise an issue with the DBPedia team to request they remove such invalid IRIs from their dataset.

@jeswr jeswr closed this as completed May 8, 2023
@TallTed
Copy link
Contributor

TallTed commented May 9, 2023

@excursus — I believe the DBpedia Information Extraction Framework is the best repository for issues such as this. If not, they should be able to point you in a better direction.

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

3 participants