Week 10 - Semantic Web Flashcards
summary to easy the brain
Introduction into semantic web before lecture goes in detail
Let me combine the intro you liked with clear examples for each concept:
The Semantic Web Basics:
Think of the regular web as books in a library - great for humans to read, but computers just see text. The Semantic Web adds “meaning” so computers can understand relationships and data better.
Quick Example:
Regular Web:
“Harry Potter was written by J.K. Rowling in 1997”
(To a computer, this is just text)
Semantic Web:
The same information but labeled with meaning:
Book (Harry Potter)
has author (J.K. Rowling)
published in (1997)
(Computer now understands these relationships)
Three Key Concepts to Watch For:
RDF - How we format data with meaning
Example:
Harry Potter -> hasAuthor -> J.K. Rowling
Harry Potter -> publishedIn -> 1997
Harry Potter -> hasGenre -> Fantasy
Ontologies - How we define relationships
Example:
Books have:
- authors (who are people)
- publication dates
- genres
- sequels
Linked Data - How everything connects together
Example:
Harry Potter links to:
- Author info (Wikipedia)
- Reviews (Goodreads)
- Movie version (IMDB)
This gives you a foundation for understanding how the Semantic Web makes data meaningful and connected!
Week 10 i used ipad goodnotes some slides i wrote good stuff to look at
eg the overview
some slides i did not
dhasoiphdapso;jVSA:
Q: What is an RDF statement and what are its parts?
An RDF statement (or triple) consists of three essential parts:
1) Subject: The resource being described
Example: Harry Potter
2 ) Predicate: How the subject and object relate
Example: hasAuthor
3) Object: What the subject is related to
Example: J.K. Rowling
Written as: subject predicate object .
So: Harry Potter hasAuthor J.K. Rowling .
Key Points:
The three parts together form a complete “triple”
Subject is what we’re talking about
Predicate defines the relationship
Object is what we’re relating it to
note
The subject and sometimes object of rdf statements are other resources
YOU CAN ALSO USE URIS IN RDFs ( since URIS identify resources)
Q: How can the same RDF statement be written at different levels of formality?
A: Let’s use the Harry Potter example:
Full URIs (Computer-readable):
https://books.example.com/HarryPotter[ subject : Harry Potter ]
http://schema.org/author [predicate hasAuthor]
https://authors.example.com/JKRowling . [object J.K Rowling]
With Prefixes (Developer-friendly):
Copy@prefix book: https://books.example.com/
@prefix rel: http://schema.org/
@prefix author: https://authors.example.com/
book:HarryPotter rel:author author:JKRowling .
Human-readable:
CopyHarry Potter hasAuthor J.K. Rowling
KEY NOTE
RDFS allow us to MAKE STATEMENTS about RESOURCES that can be READ BY SOFTWARE
Rds dont by themselves allow the software to reason about statements and determine how best to apply the info
Ontology does this
Flashcard: Domain and Range in RDF
Domain and range acts on predicates
eg worksIn
Definition:
Domain: Specifies the type of the subject of a property.
Range: Specifies the type of the object of a property.
Example 1:
ex:worksIn rdfs:domain ex:Person ;
rdfs:range ex:City .
Property ex:worksIn: Connects a Person (subject) to a City (object).
Valid Statement Example:
ex:JohnDoe a ex:Person .
ex:London a ex:City .
ex:JohnDoe ex:worksIn ex:London .
Subject (ex:JohnDoe): Person.
Object (ex:London): City.
Meaning: John Doe (a person) works in London (a city).
Reasoning Check (Type Mismatch Example):
ex:Bookstore a ex:Business .
ex:Bookstore ex:worksIn ex:London .
Issue: ex:Bookstore is of type Business, not Person.
Reasoner Explanation: The domain of ex:worksIn specifies that the subject must be a Person, so the statement is invalid.