dice-group / vectograph

GNU General Public License v3.0
1 stars 2 forks source link

Invalid NT File #6

Closed heindorf closed 3 years ago

heindorf commented 4 years ago

The NT files generated by Vectograph are invalid as they are missing the final dot. For example, the output <Event_0> <customer_id> "5800860" must be changed to <Event_0> <customer_id> "5800860" .

Moreover, the nt file should be readable by rdflib and rdflib requires valid IRIs, e.g., "http://ai4bd.com/resource/Event_0"

For validation, you might use https://www.w3.org/2015/03/ShExValidata/. For testing, you might create a test case and try to execute rdflib.Graph().parse(FILE, format='nt').

Demirrr commented 4 years ago

The NT files generated by Vectograph are invalid as they are missing the final dot. For example, the output "5800860" must be changed to "5800860" .

Consider it done.

FYI: this file is generated only for logging purposes.

Demirrr commented 4 years ago

It appears to me that rdflib throws a parser error due to literals not because of underscores. If an RDF triple in ntriple format contains literal even with a correct a tag, it throws ParseError. Besides, for the embedding learing part, I do not need any tag as literals are ignored. Aside from this, All is done. We have an extra default parameter for base IRI. In the below written example, base_iri=https://ai4bd.com/resource/

<Event0> <https://ai4bd.com/resource/customer_id> "5800860"^^<http://www.w3.org/2001/XMLSchema#integer> .
<Event0> <https://ai4bd.com/resource/customer_name> <customer_b> .
<Event0> <https://ai4bd.com/resource/site_id> "5317663159"^^<http://www.w3.org/2001/XMLSchema#integer> .
<Event0> <https://ai4bd.com/resource/customer_number> <S300034> .
<Event0> <https://ai4bd.com/resource/op_group_id> "5328102884.0"^^<http://www.w3.org/2001/XMLSchema#double> .
<Event0> <https://ai4bd.com/resource/logistic_type> <SMART_BIN_CLASSIC> .
<Event0> <https://ai4bd.com/resource/location_uuid> <196492C81502483B93A2628C76942705> .
Demirrr commented 3 years ago

According changes are performed. Invalid NT file problem appears to be solved. I kindly ask you @heindorf to validate the correctness of the changes. If problem appears to continue, please reopen this issue.

Screenshot from 2020-10-21 17-14-35