2

I've downloaded Protege 5.2.0 and I tried to open the YAGO taxonomy ontology( YAGOTaxonomy.ttl,YAGOTaxonomy.tsv).Every time i tried to open an ontology I got alot of errors, such that i won't be able to show all of them here.

turle syntax

org.semanticweb.owlapi.rdf.turtle.parser.ParseException: Encountered " <FULLIRI> "<wikicat_Companies_operating_former_Chicago,_Milwaukee,_St._Paul_and_Pacific_Railroad_lines<!--on_the_CC&P--> "" at line 5044, column 1.
Was expecting:
    <EOF> 



Full Stack Trace
-----------------------------------------------------------------------------------------

org.semanticweb.owlapi.rdf.turtle.parser.TurtleParserException: org.semanticweb.owlapi.rdf.turtle.parser.ParseException: Encountered " <FULLIRI> "<wikicat_Companies_operating_former_Chicago,_Milwaukee,_St._Paul_and_Pacific_Railroad_lines<!--on_the_CC&P--> "" at line 5044, column 1.
Was expecting:
    <EOF> 

    at org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParser.parse(TurtleOntologyParser.java:90)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:197)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1099)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1055)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1011)
    at org.protege.editor.owl.model.io.OntologyLoader.loadOntologyInternal(OntologyLoader.java:101)
    at org.protege.editor.owl.model.io.OntologyLoader.lambda$loadOntologyInOtherThread$210(OntologyLoader.java:60)
    at org.protege.editor.owl.model.io.OntologyLoader$$Lambda$106/2002289766.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.semanticweb.owlapi.rdf.turtle.parser.ParseException: Encountered " <FULLIRI> "<wikicat_Companies_operating_former_Chicago,_Milwaukee,_St._Paul_and_Pacific_Railroad_lines<!--on_the_CC&P--> "" at line 5044, column 1.
Was expecting:
    <EOF> 

    at org.semanticweb.owlapi.rdf.turtle.parser.TurtleParser.generateParseException(TurtleParser.java:1960)
    at org.semanticweb.owlapi.rdf.turtle.parser.TurtleParser.jj_consume_token(TurtleParser.java:1829)
    at org.semanticweb.owlapi.rdf.turtle.parser.TurtleParser.parseDocument(TurtleParser.java:122)
    at org.semanticweb.owlapi.rdf.turtle.parser.TurtleOntologyParser.parse(TurtleOntologyParser.java:82)
    ... 11 more

OBO format

LINENO: 11 - Could not find tag separator ':' in line.
LINE: #@ <id_AEcHoUuL2G_owS_ZJzFuvXiv2>


Full Stack Trace
-----------------------------------------------------------------------------------------

org.semanticweb.owlapi.io.OWLParserException: LINENO: 11 - Could not find tag separator ':' in line.
LINE: #@ <id_AEcHoUuL2G_owS_ZJzFuvXiv2>
    at org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:60)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyFactoryImpl.loadOWLOntology(OWLOntologyFactoryImpl.java:197)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.actualParse(OWLOntologyManagerImpl.java:1099)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:1055)
    at uk.ac.manchester.cs.owl.owlapi.OWLOntologyManagerImpl.loadOntologyFromOntologyDocument(OWLOntologyManagerImpl.java:1011)
    at org.protege.editor.owl.model.io.OntologyLoader.loadOntologyInternal(OntologyLoader.java:101)
    at org.protege.editor.owl.model.io.OntologyLoader.lambda$loadOntologyInOtherThread$210(OntologyLoader.java:60)
    at org.protege.editor.owl.model.io.OntologyLoader$$Lambda$106/2002289766.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: LINENO: 11 - Could not find tag separator ':' in line.
LINE: #@ <id_AEcHoUuL2G_owS_ZJzFuvXiv2>
    at org.obolibrary.oboformat.parser.OBOFormatParser.error(OBOFormatParser.java:1501)
    at org.obolibrary.oboformat.parser.OBOFormatParser.getParseTag(OBOFormatParser.java:897)
    at org.obolibrary.oboformat.parser.OBOFormatParser.parseHeaderClause(OBOFormatParser.java:528)
    at org.obolibrary.oboformat.parser.OBOFormatParser.parseHeaderClauseNl(OBOFormatParser.java:521)
    at org.obolibrary.oboformat.parser.OBOFormatParser.parseHeaderFrame(OBOFormatParser.java:504)
    at org.obolibrary.oboformat.parser.OBOFormatParser.parseOBODoc(OBOFormatParser.java:377)
    at org.obolibrary.oboformat.parser.OBOFormatParser.parse(OBOFormatParser.java:335)
    at org.obolibrary.oboformat.parser.OBOFormatParser.parse(OBOFormatParser.java:281)
    at org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:76)
    at org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:83)
    at org.semanticweb.owlapi.oboformat.OBOFormatOWLAPIParser.parse(OBOFormatOWLAPIParser.java:58)
    ... 11 more

I've attached an image that shows the group of errors protege has generated

protege error image. Any help to fix this problem would be greatly appreciated.

  • Given that Protege uses OWL API for all the OWL stuff, It's obviously the same problem as in your question yesterday: 1) the `ttl` file can be parsed once you remove the comment lines (`sed -i '/#@/d' yagoTaxonomy.ttl`) - it looks lie a bug in the OWL API Turtle parser. – UninformedUser Oct 18 '18 at 09:25
  • 2) the `tsv` file is **not** a proper RDF resp. OWL format. It's just TSV file containing 4 elements per row - it's even not a proper NQuad file given the missing dots at the end of each line and the usage of prefixes not allowed in NQuad at all. – UninformedUser Oct 18 '18 at 09:25
  • My question: why do you want to load such a huge hierarchy (**1,754,650 subclass axioms**) into Protege? It takes ages for loading with a weak machine and Java Swing with such a big class tree? Well... – UninformedUser Oct 18 '18 at 09:27
  • @AKSW 1)how exactly do i remove the comment lines? 2) got it won't try TSV 3) I even tried the simplified taxonomy and i got the same issue. – user2333103 Oct 18 '18 at 11:11
  • Just use a tool that can remove lines by a pattern. For example, I used `sed` because I'm on Linux: `sed -i '/#@/d' yagoTaxonomy.ttl`. For Windows, the Powershell also should support `sed` – UninformedUser Oct 18 '18 at 11:34
  • @AKSW i ran your command in my linux/ubuntu box. but when i ran it in Protege i got alot of warning about whitespace and at the end i got **ERROR OntologyLoader An error occurred whilst loading the ontology at Java heap space. Cause: {}** – user2333103 Oct 18 '18 at 19:05
  • the warnings don't matter. The error is obvious, the dataset is very big as I already told you. Indeed, you have to increase the Java heapspace of your Protege instance. – UninformedUser Oct 18 '18 at 19:12
  • @AKSW you were right. it finally loaded after i ran your query in ubuntu and opened it in protege It took forever. I'm just trying to find an efficent way to properly query the YAGO taxonomy for class hierarchies. having trouble with that. thanks – user2333103 Oct 19 '18 at 02:14
  • but then you should use a triple store + SPARQL or not? I mean, Protege is more designed for OWL ontology editing (yes it has SPARQL support, but it's not the main purpose and everything is in-memory) – UninformedUser Oct 19 '18 at 04:46
  • @AKSW i will try that. As you may know in my previous question, i tried to use JAVA owl api, but even that was a bit difficult to use. – user2333103 Oct 19 '18 at 12:08
  • @user2333103 You can use [Apache Jena Fuseki](https://jena.apache.org/documentation/fuseki2/) it's very simple to use and configure. You can load your ontology and query it easily. Give it a try and we are here to help if you have any question. Good luck – Zakariae Aloulen Oct 19 '18 at 13:16
  • @ZakariaeAloulen thanks. I never heard of Fuseki until you mentioned it. I will look into it, hopefully it helps. – user2333103 Oct 19 '18 at 15:48
  • Protégé 5.2 is old and used an old owlapi version. Try 5.5. – Ignazio Oct 26 '18 at 07:27
  • @Ignazio will do thanks. – user2333103 Oct 27 '18 at 04:29

0 Answers0