21
Ontology-Based Ontology-Based Free-Form Query Free-Form Query Processing for the Processing for the Semantic Web Semantic Web by by Mark Vickers Mark Vickers Supported by:

Ontology-Based Free-Form Query Processing for the Semantic Web by Mark Vickers Supported by:

  • View
    219

  • Download
    1

Embed Size (px)

Citation preview

Ontology-Based Ontology-Based Free-Form Query Free-Form Query

Processing for the Processing for the Semantic WebSemantic Web

by by

Mark VickersMark Vickers

Supported by:

The ProblemThe Problem Searching the web for an answer to a Searching the web for an answer to a

question is hard.question is hard. Returns documents (usually too many)Returns documents (usually too many) Can it instead return just the right Can it instead return just the right

answers?answers? Semantic webSemantic web

Proposed ontology-based framework for Proposed ontology-based framework for making information machine-readablemaking information machine-readable

Better access to informationBetter access to information How should semantic web be searched?How should semantic web be searched?

Solution: AskOntos – a Solution: AskOntos – a Query System for the Query System for the

Semantic WebSemantic Web Allows free-form queries Allows free-form queries

Processes queries using information Processes queries using information

extractionextraction

Returns tables of extracted valuesReturns tables of extracted values

Extraction OntologiesExtraction Ontologies

Object sets

Relationship sets

Participation constraints

Lexical

Non-lexical

Primary object set

Aggregation

Generalization/Specialization

Extraction OntologiesExtraction Ontologies

Value Expression: \s*[$]\s*(\d{1,3})*(\.\d{2})?

Key Word Phrase

Left Context: $

Data Frame:

Internal Representation: float

Value Phrase

Key Word Expression: ([Pp]rice)|([Cc]ost)| …

Operation Phrase

Operator: >

Expression: (more\s*than)|(more\s*costly)|…

Query

AskOntosOntology Matching

Form XQuery

Answer

Extraction Ontology Repository

Extracted Values

Extracted Values

Extracted ValuesExtracted

Values

AskOntos OverviewAskOntos Overview

Extracted Query Values

Extracted Data

Web

Step 1. Parse Query Step 1. Parse Query “Find me the and of all s – I want a ”

price

mileage

red

Nissan

1998

or newer

>= Operator

Step 2. Find Corresponding Step 2. Find Corresponding OntologyOntology

Similarity value: 6

Similarity value: 2

>= Operator

“Find me the price and mileage of all red Nissans – I want a 1998 or newer”

Step 3. Formulate XQuery Step 3. Formulate XQuery ExpressionExpression

Conjunctive queries run over selected Conjunctive queries run over selected ontology’s extracted valuesontology’s extracted values

<Car rdf:ID="CarIns7"> <CarValue rdf:datatype="&xsd;string">7</CarValue>

</Car><Make rdf:ID="MakeIns7">

<MakeValue rdf:datatype="&xsd;string">Nissan</MakeValue> <ontos:URI rdf:datatype="&xsd;string">MakeIns7</ontos:URI> <offset rdf:datatype="&xsd;nonNegativeInteger">41893</offset>

</Make><Year rdf:ID="YearIns7">

<YearValue rdf:datatype="&xsd;string">1999</YearValue> <ontos:URI rdf:datatype="&xsd;string">YearIns7</ontos:URI> <offset rdf:datatype="&xsd;nonNegativeInteger">41641</offset>

</Year><Color rdf:ID="ColorIns7">

<ColorValue rdf:datatype="&xsd;string">red</ColorValue> <ontos:URI rdf:datatype="&xsd;string">ColorIns7</ontos:URI> <offset rdf:datatype="&xsd;nonNegativeInteger">42186</offset>

</Color>

<owl:Thing rdf:about="#CarIns7"> <hasMake rdf:resource="#MakeIns7" /> <hasYear rdf:resource="#YearIns7" /> <hasColor rdf:resource="#ColorIns7" /> <hasMileage rdf:resource="#MileageIns7" /> <hasPrice rdf:resource="#PriceIns7" />

</owl:Thing>

Value-phrase-matching words Value-phrase-matching words determine conditionsdetermine conditions

Conditions:Conditions: Color = “red”Color = “red” Make = “Nissan”Make = “Nissan” Year >= 1998Year >= 1998

>= Operator

Step 3. Formulate XQuery Step 3. Formulate XQuery ExpressionExpression

1: for $doc in document("file:///c:/ontos/owlLib/Car.OWL")/rdf:RDF2: for $Record in $doc/owl:Thing3:4: let $id := substring-after(xs:string($Record/@rdf:about), "CarIns")5: let $Color := $doc/car:Color[@rdf:ID=concat("ColorIns", $id)]/car:ColorValue/text()6: let $Make := $doc/car:Make[@rdf:ID=concat("MakeIns", $id)]/car:MakeValue/text()7: let $Year := $doc/car:Year[@rdf:ID=concat("YearIns", $id)]/car:YearValue/text()8: let $Price := $doc/car:Price[@rdf:ID=concat("PriceIns", $id)]/car:PriceValue/text()9: let $Mileage := $doc/car:Mileage[@rdf:ID=concat("MileageIns", $id)]/car:MileageValue/text()10:11: where($Color="red" or empty($Color)) and12: ($Make="Nissan" or empty($Make)) and13: ($Year>="1998" or empty($Year)) 14: return <Record ID="{$id}">15: <Price>{$Price}</Price>16: <Mileage>{$Mileage}</Mileage>17: <Color>{$Color}</Color>18: <Make>{$Make}</Make>19: <Year>{$Year}</Year>20: </Record>

For each owl:Thing

Get the instance ID and extracted values

Check conditions

Return values

Step 3. Formulate XQuery Step 3. Formulate XQuery ExpressionExpression

Step 4. Run XQuery Step 4. Run XQuery Expression OverExpression Over

Ontology’s Extracted Ontology’s Extracted DataData Uses Qexo 1.7, GNU’s XQuery engine for JavaUses Qexo 1.7, GNU’s XQuery engine for Java

Use XSLT to transform results to HTML tableUse XSLT to transform results to HTML table

Evaluation of AskOntosEvaluation of AskOntos

Measure success by: Measure success by: Ability to match query to correct ontologyAbility to match query to correct ontology Ability to translate free-form queries into Ability to translate free-form queries into

formal queriesformal queries We create:We create:

Extraction ontologies for: car ads, Extraction ontologies for: car ads, diamonds, …diamonds, …

Queries for preliminary evaluation: 10 Queries for preliminary evaluation: 10 Conjunctive queries for car adsConjunctive queries for car ads

Future work: do more evaluationFuture work: do more evaluation

Query Translation Query Translation MetricsMetrics

“Find me the price and mileage of all red Nissans – I want a 1998 or newer.”

Human conversion

for $doc in document("file:///.../Car.OWL")/rdf:RDF for $Record in $doc/owl:Thing

… where($Color="red" or empty($Color)) and ($Make="Nissan" or empty($Make)) and ($Year="1998" or empty($Year)) return <Record ID="{$id}"> <Price>{$Price}</Price> <Color>{$Color}</Color> <Make>{$Make}</Make> <Year>{$Year}</Year> </Record>

Automated conversion PrecisionPrecision RecallRecall

PROJECTPROJECT 100%100% 80%80%

SELECTSELECT 88%88% 88%88%

PROJECT: {Price,Color, Make, Year}

SELECT: {(Color,=,“red”), (Make,=,“Nissan”), (Year,=,“1998”)}

PROJECT: {Price, Mileage,Color, Make, Year}

SELECT: {(Color,=,“red”), (Make,=,“Nissan”), (Year,>=,“1998”)}

Preliminary ResultsPreliminary Results

PrecisionPrecision RecallRecall

PROJECTPROJECT 100%100% 95%95%

SELECTSELECT 78%78% 76%76%

1. Find me a 1994 red Nissan for $2000

2. Find me the price and mileage of all red Nissans – I want a 1998 or newer.

3. Find me a black Ford for under $8000 -- it should be a 1990 or newer and have

less than 120K miles on it.

4. Show me the year of all chevy corvettes for less than $25,000.

5. I want the year, price, mileage, and color of all Toyota Camrys

6. What 2002 cars cost less than $9,000?

7. I want a 1998 or newer Ford for $10,000 or less

8. I want the year of any Honda with at least 200K miles on it

9. What colors can I get a camry in between 1999 - 2004

10. I want to see all 2001 Toyota 4 Runners with less than 100K miles, that are

blue, and have AC

8. I want the year of any Honda with at least

200K miles on it

6. What 2002 cars cost less

than $9,000?

Conclusion/Conclusion/ContributionsContributions

AskOntos AskOntos Is a free-form query system for the semantic Is a free-form query system for the semantic

webweb Applies information extraction for query Applies information extraction for query

processingprocessing Answers questions with extracted data valuesAnswers questions with extracted data values

ContributionsContributions Web queries that use semantic annotationsWeb queries that use semantic annotations Web queries returning answers from extracted Web queries returning answers from extracted

datadata Processing free-form queries using ontologies Processing free-form queries using ontologies

TREC 2004 QA Question TREC 2004 QA Question TopicsTopics

Related ResearchRelated ResearchAskOntosAskOntos

NLIDBNLIDB(60’s-Now)(60’s-Now)

•Syntactic analysisSyntactic analysis•No structural No structural analysisanalysis

•Portability to new domainsPortability to new domains •Design new ontologyDesign new ontology

Bernstein Bernstein et alet al. (2005). (2005) •Subset of English (ACE)Subset of English (ACE) •Conjuntive queriesConjuntive queries

AQUAAQUA (2004)(2004)

•Target: Single domain Target: Single domain environmentenvironment

•Target: Semantic Target: Semantic webweb

•Part of speech recognitionPart of speech recognition •No recognitionNo recognition

•Returns passagesReturns passages•Returns extracted Returns extracted valuesvalues

SHOESHOE (2000)(2000)

•Form-based interfaceForm-based interface •Free-form interfaceFree-form interface

QUESTQUEST (1999)(1999)

•Graph-based interfaceGraph-based interface •Free-from interfaceFree-from interface

Evaluating the FrameworkEvaluating the Framework

AgeAge FuneralDateFuneralDate ViewingViewing Relationship/Relationship/

RelativeNameRelativeName

RecallRecall PrecisionPrecision RecallRecall PrecisionPrecision RecallRecall PrecisionPrecision RecallRecall PrecisionPrecision

New New OntosOntos

60%60% 50%50% 68%68% 76%76% 80%80% 63%63% 74%74% 43%43%

Legacy Legacy OntosOntos

57%57% 38%38% 63%63% 75%75% 93%93% 18%18% 73%73% 41%41%

Four of eighteen object sets shown above.

Data from Salt Lake Tribune and Arizona Daily Star

Input:

Obituaries ontology

25 obituaries from two newspapers

Scaling to the WebScaling to the Web

Ontologies crawl and harvest web Ontologies crawl and harvest web pagespages

Ontologies extract values from pagesOntologies extract values from pages Ontologies indexed (??)Ontologies indexed (??) Queries extracted by relevant Queries extracted by relevant

ontologiesontologies

Rely on Google-like technologyRely on Google-like technology