首页 > > 详细

讲解 ECS7028U/P: Data Semantics – Final Coursework讲解 Python编程

ECS7028U/P: Data Semantics – Final Coursework

(Mini project)

The goal of this mini project is to apply the semantic data modeling, ontology design, logic, data validation, and rule-based reasoning skills acquired through lectures and labs. This coursework is intentionally open-ended, allowing you to make your own decisions regarding the dataset you choose to work with, identify relevant data sources, and determine the most effective way to document your work. While examples and potential data sources are available on the QM+  module page, you are encouraged to explore and select data that align with your interests.

Your primary task is to define, populate, and query an ontology, incorporating both a T-Box (terminological component) and an A-Box (assertional component) on a topic of your choice. The ontology should be designed to integrate and reuse existing semantic data, ensuring interoperability with external knowledge bases. To achieve this, at least three concepts in your T- Box must be sourced from external semantic data repositories, enabling the ontology’s A-Box to be populated with real-world data.

For implementation, you will use Protégé to design the ontology and leverage Python-based semantic tools to populate it with actual data. Your final submission should include both a structured report and the corresponding code, demonstrating your methodology, design choices and reasoning processes.

You should specifically achieve the following:

Basic Task (data engineering): Define your ontology using OWL2. The T-Box must be created using Protégé and should be your own work (not an existing ontology but may import existing ontologies). Populate the knowledge base from an external semantic data repository using SPARQL 1.1 (or the 2025 update 1.2). Verify that you can also query the local ontology using SPARQL. Document your work and submit the ontology and queries.

Intermediate Task (data integration): Complete data collection as above, but your ontology should allow fusing  information  from at least two distinct external data repositories. The query to your local ontology should answer questions that cannot be  answered by either remote  knowledge bases alone. You may use semantic (typically graph structured data with an ontology) or non-semantic (e.g. dumps of data tables, CSV files etc.) sources as long as you describe your process of populating your ontology.

Advanced Task (reasoning): Use Description Logic (DL) to define as many concepts as possible with the help of SWRL rules to compensate for the limitations of the Protégé inference engines with DL. The A-Box (incl. individuals) must be created such that it demonstrates the correctness and effectiveness of the defined logic rules.

You should submit a PDF and a zip file with the following elements: Report: A PDF document describing how you constructed the ontology: you should say where you got the data from, and you should also say what difficulties you encountered and how you solved them. The document must have also a final section explaining what source code files and models are  included, and the required steps torun the code. You are expected to submit a report explaining your assignment. If you fail to submit a report with your ontology and python files, you might receive 0% as it is the only way of proving the work is yours.

Code and Ontology: The code including SPARQL queries and ontology should be submitted as a single .zip compressed file (not exceeding 50MB). In cases where a very large database is used for demonstration, your code should access the data from a remote resource instead of including the database in the submission. The zip should include at least the following elements:

A Protégé-OWL ontology (.owl file)

•    A python script. (.py) that can be used to populate the ontology from a  SPARQL endpoint.

•    Another python script. that queries the local store to demonstrate to the user that information can be easily accessed. To test the system, the user should be able to execute any arbitrary query supported by your ontology.

Further support:

This assignment is intended to be open ended and exploratory in nature. However, for illustration, examples of possible tasks could be:

•    Create and populate an ontology covering movies and cities, enabling queries such as finding movies filmed in cities with a population of less than 1 million.

•    Develop an ontology about companies, including details on location, employees, and

profits, which could be queried to identify UK-based companies with the highest profit per employee.

•    Construct an ontology focused on music, incorporating information about artists, genres, and concert venues, which could be queried to find jazz musicians who have performed in European venues with a capacity of over 5,000.

Some publicly available semantic web data sources that can be useful for this coursework are listed below:

Dbpedia (https://www.dbpedia.org/) provides an RDF version of the information available in the regular Wikipedia. It also provides an SPARQL endpoint for remote access

(https://www.dbpedia.org/resources/sparql/ )

Wikidata is a free and open knowledge base that can be read and edited by both humans and machines (https://www.wikidata.org/). Wikidata acts as central storage for

the structured data of its Wikimedia sister projects including Wikipedia, Wikivoyage,

Wiktionary, Wikisource and others, with a SPARQL end point: https://query.wikidata.org/

•    You  can  access  open  governmental  datasets  from data.gov.uk and data.gov.  In some  cases, you might need to download the dataset, as they don’t provide a SPARQL endpoint.

•    Datasets with SPARQL end points (updated in March 2025 but may include broken links):

https://www.wikidata.org/wiki/Wikidata:Lists/SPARQL_endpoints

•    A broad set of datasets from https://datahub.io/collections (some are in RDF).

•    There are additional links to resources and examples on QM+.

Marking criteria:

Basic task (60% coursework marks): Correctly designed ontology with basic taxonomy and property hierarchy (15%), correct domain and range restrictions (5%), correct and effective use of object properties (including constraints and characteristics such as functional, transitive and irreflexive), correct and effective use of data properties, logical and correct use Description Logic to define concepts (10%), Ontology population python script. and SPARQL queries (20%), justification explanation and validation of the ontological modeling decision in the report (10%). Intermediate task (20% coursework marks): Use of appropriate, diverse data sources (5%), correct mechanism to retrieve and transform. data to fit your ontology (10%), explanation of the mechanism in the report (5%). The data sources can be RDF dumps (e.g., loaded into a local database) and SPARQL end-points, and may include a non-semantic dataset you convert into  RDF locally for it to be queried.

Advanced task (20% coursework marks): Correctly working (inferencing) ontology with one of the reasoners provided with Protégé and use of SWRL rules: object and data properties and SWRL built-ins (10%). A correct A-Box with enough individuals to use with the defined logic rules, expecting majority of the relations defined by the data properties and concepts to be inferred by the engine, not hard coded (5%), correctly commented rules and explanations in the report (5%).

Fig. 1. SWRL rule examples in Protégé (using the SWRLTab plugin)

Coursework is due on QM+ in the exam period. Please check the date specified in the coursework area of the module page. Please do not be late with the coursework otherwise a late submission penalty is applied automatically. There is a final cut-off point after one week. About  four-six weeks should be sufficient to complete this coursework. All sources including the use of  tools must be referenced and acknowledged.


联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!