Semantic Technology can be explained better with analogy comparison with RDBMS SQL instead of Search.
Semantic Technology takes a normal unorganized text and converts into a structured meaningful text (similar to RDBMS database) which can be queried using SPARQL (similar SQL queries)
In this blog, I take an example of a random text from a history book. Then, explain how it is converted to RDF and then what becomes possible on this RDF.
Article
“One of the most famous stories of decipherment comes from Egypt, a country in north Africa where there were kings and queens about 5000 years ago.
Rosetta is a town on the north coast of Egypt, and here an inscribed stone was found, which contained inscriptions in three different languages and scripts (Greek, and two forms of Egyptian). Scholars who could read Greek figured out that the names of kings and queens were enclosed in a little frame, called a cartouche. They then placed the Greek and the Egyptian signs side by side, and identified the sounds for which the Egyptian letters stood. As you can see, a lion stood for L, and a bird for A. Once they knew what the letters stood for, they could read other inscriptions as well.”
The text is converted in RDF Tuples:
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xml:base="http://xmlns.temp.org/rdf/"
xmlns:prop="http://xmlns.temp.org/rdf/property/"
xmlns:report="http://xmlns.temp.org/rdf/report/"
xmlns:med="http://127.0.0.1/ontology/my.owl/"
>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Famous stories of decipherment">
<rdf:type>#Story</rdf:type>
<prop:come_from resource="http://xmlns.temp.org/rdf/Egypt"/>
<prop:decipher resource="http://xmlns.temp.org/rdf/inscribed stone"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Egypt">
<rdf:type>#Country</rdf:type>
<prop:in>http://xmlns.temp.org/rdf/North Africa</prop:in>
<prop:where_there_were> kings and queens about 5000 years ago</prop:where_there_were>
<prop:circumtances> about 5000 years ago</prop:circumtances>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Rosetta">
<rdf:type>#Place</rdf:type>
<prop:north_coast resource="http://xmlns.temp.org/rdf/Egypt"/>
<prop:found rdf:resource="http://xmlns.temp.org/rdf/inscribed stone"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/inscribed stone">
<prop:contained>
inscriptions in three different languages and scripts Greek and two forms of Egyptian
</prop:contained>
<prop:read_by resource="http://xmlns.temp.org/rdf/Scholars"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Scholars">
<rdf:type>#Profession</rdf:type>
<prop:qualification>read Greek</prop:qualification>
<prop:figured rdf:resource="http://xmlns.temp.org/rdf/cartouche"/>
<prop:method_of_reading resource="http://xmlns.temp.org/rdf/Decipher Method"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/cartouche">
<prop:comment>
names of kings and queens were enclosed in a little frame
</prop:comment>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Decipher Method">
<prop:identified>
the sounds for which the Egyptian letters stood
</prop:identified >
<prop:method>
placed the Greek and the Egyptian signs side by side
</prop:method>
<prop:result>
a lion stood for L, and a bird for A
</prop:result>
<prop:coud_read resource="http://xmlns.temp.org/rdf/Other Inscriptions"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Other Inscriptions">
<prop:condition>
Once they knew what the letters stood for
</prop:condition>
</rdf:Description>
</rdf:RDF>
Now, I see it through a Jena Visualizer…
Queries
Natural language Query
What could Scholars identify?
Equivalent SPARQL:
BASE
PREFIX rdf:
PREFIX rdfs:
PREFIX prop:
PREFIX report:
SELECT $subject $relation $value
WHERE {
?subject ?property ?object .
?object ?relation ?value
FILTER (REGEX(STR(?subject), "Scholars", "i")
)
FILTER (REGEX(STR(?relation), "identified", "i")
)
}
Result
2. Natural Query
Where did the stories of decipherment come from? Also tell about that place?
Equivalent SPARQL
BASE
PREFIX rdf:
PREFIX rdfs:
PREFIX prop:
PREFIX report:
SELECT $object $relation $value
WHERE {
?subject ?property ?object .
?object ?relation ?value
FILTER (REGEX(STR(?subject), "Famous stories of decipherment", "i")
)
FILTER (REGEX(STR(?property), "come", "i")
)
FILTER (REGEX(STR(?relation), "", "i")
)
}
Result
Now, imagine all the course books are converted into such RDF tuples. Anybody can do a natural language query on it to retrieve the answer. Now, search would not return the list of book which have mentions of the keyword searched for, But would return the actual answer.
Scale this to World Wide Web; where all sites are expressed in form of a RDF. RDF is understandable by computers ....
Thus, it enables Tim Berners-Lee's vision of the Semantic Web. http://articles.techrepublic.com.com/5100-10878_11-5552998.html?part=rss&tag=feed&subj=tr
"The Web was designed as an information space, with the goal that it should be useful not only for human-human communication, but also that machines would be able to participate and help. ..."
Semantic Agent could be written
- To query for “Doctor who is a lady in within a 100 miles radius of my address and has open appointment between 2:30 PM – 3:30 PM”.
- If a successful query, book an appointment and SMS me the appointment#.
OR a scenario,
- Find me a holiday with a beach theme, has budget of between $1000-1500.
- If successful, find a return flight within that range of dates in budget of $500-600.
- If successful, find a car and hotel …
Future - World of Semantic Intelligence and Automation …
Semantic Technology takes a normal unorganized text and converts into a structured meaningful text (similar to RDBMS database) which can be queried using SPARQL (similar SQL queries)
In this blog, I take an example of a random text from a history book. Then, explain how it is converted to RDF and then what becomes possible on this RDF.
Article
“One of the most famous stories of decipherment comes from Egypt, a country in north Africa where there were kings and queens about 5000 years ago.
Rosetta is a town on the north coast of Egypt, and here an inscribed stone was found, which contained inscriptions in three different languages and scripts (Greek, and two forms of Egyptian). Scholars who could read Greek figured out that the names of kings and queens were enclosed in a little frame, called a cartouche. They then placed the Greek and the Egyptian signs side by side, and identified the sounds for which the Egyptian letters stood. As you can see, a lion stood for L, and a bird for A. Once they knew what the letters stood for, they could read other inscriptions as well.”
The text is converted in RDF Tuples:
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:owl="http://www.w3.org/2002/07/owl#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:skos="http://www.w3.org/2004/02/skos/core#"
xml:base="http://xmlns.temp.org/rdf/"
xmlns:prop="http://xmlns.temp.org/rdf/property/"
xmlns:report="http://xmlns.temp.org/rdf/report/"
xmlns:med="http://127.0.0.1/ontology/my.owl/"
>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Famous stories of decipherment">
<rdf:type>#Story</rdf:type>
<prop:come_from resource="http://xmlns.temp.org/rdf/Egypt"/>
<prop:decipher resource="http://xmlns.temp.org/rdf/inscribed stone"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Egypt">
<rdf:type>#Country</rdf:type>
<prop:in>http://xmlns.temp.org/rdf/North Africa</prop:in>
<prop:where_there_were> kings and queens about 5000 years ago</prop:where_there_were>
<prop:circumtances> about 5000 years ago</prop:circumtances>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Rosetta">
<rdf:type>#Place</rdf:type>
<prop:north_coast resource="http://xmlns.temp.org/rdf/Egypt"/>
<prop:found rdf:resource="http://xmlns.temp.org/rdf/inscribed stone"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/inscribed stone">
<prop:contained>
inscriptions in three different languages and scripts Greek and two forms of Egyptian
</prop:contained>
<prop:read_by resource="http://xmlns.temp.org/rdf/Scholars"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Scholars">
<rdf:type>#Profession</rdf:type>
<prop:qualification>read Greek</prop:qualification>
<prop:figured rdf:resource="http://xmlns.temp.org/rdf/cartouche"/>
<prop:method_of_reading resource="http://xmlns.temp.org/rdf/Decipher Method"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/cartouche">
<prop:comment>
names of kings and queens were enclosed in a little frame
</prop:comment>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Decipher Method">
<prop:identified>
the sounds for which the Egyptian letters stood
</prop:identified >
<prop:method>
placed the Greek and the Egyptian signs side by side
</prop:method>
<prop:result>
a lion stood for L, and a bird for A
</prop:result>
<prop:coud_read resource="http://xmlns.temp.org/rdf/Other Inscriptions"/>
</rdf:Description>
<rdf:Description rdf:about="http://xmlns.temp.org/rdf/Other Inscriptions">
<prop:condition>
Once they knew what the letters stood for
</prop:condition>
</rdf:Description>
</rdf:RDF>
Queries
Natural language Query
What could Scholars identify?
Equivalent SPARQL:
BASE
PREFIX rdf:
PREFIX rdfs:
PREFIX prop:
PREFIX report:
SELECT $subject $relation $value
WHERE {
?subject ?property ?object .
?object ?relation ?value
FILTER (REGEX(STR(?subject), "Scholars", "i")
)
FILTER (REGEX(STR(?relation), "identified", "i")
)
}
Result
subject | relation | value |
<http://xmlns.temp.org/rdf/Scholars> | <http://xmlns.temp.org/rdf/property/identified> | " the sounds for which the Egyptian letters stood" |
Where did the stories of decipherment come from? Also tell about that place?
Equivalent SPARQL
BASE
PREFIX rdf:
PREFIX rdfs:
PREFIX prop:
PREFIX report:
SELECT $object $relation $value
WHERE {
?subject ?property ?object .
?object ?relation ?value
FILTER (REGEX(STR(?subject), "Famous stories of decipherment", "i")
)
FILTER (REGEX(STR(?property), "come", "i")
)
FILTER (REGEX(STR(?relation), "", "i")
)
}
Result
object | relation | value |
<http://xmlns.temp.org/rdf/Egypt> | <http://xmlns.temp.org/rdf/property/circumtances> | "about 5000 years ago" |
<http://xmlns.temp.org/rdf/Egypt> | <http://xmlns.temp.org/rdf/property/where_there_was> | "kings and queens about 5000 years ago" |
<http://xmlns.temp.org/rdf/Egypt> | <http://xmlns.temp.org/rdf/property/in> | "http://xmlns.temp.org/rdf/North Africa" |
<http://xmlns.temp.org/rdf/Egypt> | <http://www.w3.org/1999/02/22/-rdf-syntax-ns#type> | "#Country" |
Now, imagine all the course books are converted into such RDF tuples. Anybody can do a natural language query on it to retrieve the answer. Now, search would not return the list of book which have mentions of the keyword searched for, But would return the actual answer.
Scale this to World Wide Web; where all sites are expressed in form of a RDF. RDF is understandable by computers ....
Thus, it enables Tim Berners-Lee's vision of the Semantic Web. http://articles.techrepublic.com.com/5100-10878_11-5552998.html?part=rss&tag=feed&subj=tr
"The Web was designed as an information space, with the goal that it should be useful not only for human-human communication, but also that machines would be able to participate and help. ..."
Semantic Agent could be written
- To query for “Doctor who is a lady in within a 100 miles radius of my address and has open appointment between 2:30 PM – 3:30 PM”.
- If a successful query, book an appointment and SMS me the appointment#.
OR a scenario,
- Find me a holiday with a beach theme, has budget of between $1000-1500.
- If successful, find a return flight within that range of dates in budget of $500-600.
- If successful, find a car and hotel …
Future - World of Semantic Intelligence and Automation …
No comments:
Post a Comment