You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

在Protégé 5.5.0中导入BBC Food Ontology遇406错误求助

Fixing BBC Food Ontology Import Errors in Protégé 5.5.0

Let’s break down why you’re hitting these HTTP 406 errors and walk through concrete fixes to get the ontology working in Protégé:

The Root Issue

BBC’s ontology servers return a 406 (Not Acceptable) error because Protégé’s default HTTP request headers don’t match what the server expects. This problem hits both the main Food Ontology and its dependent Provenance Ontology—even when importing a local .ttl file, Protégé still tries to auto-fetch external imports from the remote server by default.

Step-by-Step Solutions

1. Download All Dependent Ontologies Locally

First, grab every ontology in the import chain manually:

  • Save the BBC Food Ontology: https://www.bbc.co.uk/ontologies/fo/1.1.ttl to your computer
  • Save the BBC Provenance Ontology: Fetch https://www.bbc.co.uk/ontologies/provenance (add .ttl to the filename after downloading, since the server serves it as Turtle format)
  • Open the Provenance Ontology in a text editor and check for lines starting with @import—download any additional linked ontologies if present

2. Rewrite Imports to Point to Local Files

Open your downloaded 1.1.ttl file in a text editor:

  • Locate the line referencing the Provenance Ontology (looks like @prefix prov: <http://www.bbc.co.uk/ontologies/provenance> . or an @import statement)
  • Replace the remote URL with your local file path using the correct URI format:
    # Example for Windows
    @prefix prov: <file:///C:/Your/Download/Path/provenance.ttl> .
    
    # Example for macOS/Linux
    @prefix prov: <file:///home/your-username/Downloads/provenance.ttl> .
    

Repeat this for any other external imports in the Provenance Ontology file.

3. Import the Modified Local Ontology into Protégé

  • Open Protégé 5.5.0
  • Navigate to File > Import > Ontology from local file
  • Select your edited 1.1.ttl file
  • Protégé will now load the ontology using your local copies instead of trying to fetch from BBC’s servers, bypassing the 406 errors entirely.

Alternative: Tweak Protégé’s HTTP Headers (Advanced)

If you’d rather not modify files, adjust Protégé’s HTTP client to send headers the BBC server accepts:

  • Go to File > Preferences > HTTP(S) Settings
  • Add a custom header: Accept: text/turtle, application/rdf+xml
  • Save settings and retry importing the remote ontology. Note: This isn’t guaranteed to work for all cases, as some servers are strict with header formatting.

Pro Tip: Always audit an ontology’s import chain before importing—many public ontologies rely on external dependencies that can be unstable or require local hosting.

内容的提问来源于stack exchange,提问作者Petko

火山引擎 最新活动