# Yago TTL loading and strict.parsing

**URL:** <https://community.stardog.com/t/yago-ttl-loading-and-strict-parsing/551>\
**Category:** Support\
**Created:** [September 8, 2017, 5:35pm UTC](https://community.stardog.com/t/yago-ttl-loading-and-strict-parsing/551 "2017-09-08T17:35:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pierluigi](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/pierluigi/32/472_2.png) [@pierluigi](https://community.stardog.com/u/pierluigi)\
**Post date:** [September 8, 2017, 5:35pm UTC](https://community.stardog.com/t/yago-ttl-loading-and-strict-parsing/551/1 "2017-09-08T17:35:12Z")

</div>

SD 5.0.2 here. I have created a new DB for Yago content with strict.parsing=false, as Yago is rife with IRI encoding issues. Using stardog-admin db create … appears to work as intended: parsing errors are noted but the loading proceeds, e.g.:

…  
/opt/data/cg/yago/taxo/yagoTypes.ttl: IRI includes string escapes: ‘\92’ [line 474592]  
/opt/data/cg/yago/core/yagoLabels.ttl: IRI includes string escapes: ‘\92’ [line 30384]  
/opt/data/cg/yago/taxo/yagoTaxonomy.ttl: IRI includes string escapes: ‘\110’ [line 475602]  
/opt/data/cg/yago/taxo/yagoSimpleTypes.ttl: IRI includes string escapes: ‘\92’ [line 995714]  
Loaded 12,956,423 triples to CGDEV from 10 file(s) in 00:02:32.296 @ 85.1K triples/sec.  
Successfully created database ‘CGDEV’.

But loading additional files after db creation fails, like so:

pierluigi@elastic-eda-1:/opt/data/cg/yago/geon$ ~/sd/bin/stardog data add CGDEV -u cgdev -P yagoGeonamesClasses.ttl yagoGeonamesClassIds.ttl yagoGeonamesEntityIds.ttl yagoGeonamesGlosses.ttl yagoGeonamesTypes.ttl

Adding data from file: yagoGeonamesTypes.ttl  
Adding data from file: yagoGeonamesEntityIds.ttl  
Adding data from file: yagoGeonamesGlosses.ttl  
Adding data from file: yagoGeonamesClasses.ttl  
Adding data from file: yagoGeonamesClassIds.ttl  
There was a fatal failure during preparation of 585dc5fd-04b1-4d3e-84fd-ab4330ec15cf org.openrdf.rio.RDFParseException: IRI includes string escapes: ‘\92’ [line 1170651]

I am not entirely sure how strict.parsing is intended to work, but the difference in behavior between these 2 ops is not something I would expect.

Thanks!  
Pierluigi

---

<div class="post-metadata">

**Author:** ![stephen](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/stephen/32/27_2.png) [@stephen](https://community.stardog.com/u/stephen)\
**Post date:** [September 11, 2017, 2:07pm UTC](https://community.stardog.com/t/yago-ttl-loading-and-strict-parsing/551/2 "2017-09-11T14:07:43Z")

</div>

Can you confirm that there are any triples in the database after your db create? If I try to create a db with just yagoLabels.ttl, I see the parse error(s) and get an empty db. This would at least be consistent with the `data add` behavior you’re seeing.

For what it’s worth, I have pinpointed the cause of this not only to the bad encoding of Yago, but the Turtle parser we use. The version we are using does not contain a workaround for this particular problem.

On another side note, `strict.parsing=false` is not intended to ignore invalid IRIs; it ignores datatype errors like `{ :Foo :hasProp "Forty-two"^^xsd:integer }`

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [September 25, 2017, 2:07pm UTC](https://community.stardog.com/t/yago-ttl-loading-and-strict-parsing/551/3 "2017-09-25T14:07:45Z")

</div>

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
