xirql: eine anfragesprache für information retrieval in ... · 2 - fuhr: xirql: eine...

38
1 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten XIRQL: Eine Anfragesprache für Information Retrieval in XML- Dokumenten Norbert Fuhr Universität Duisburg

Upload: others

Post on 28-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

1 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XIRQL: Eine Anfragesprache fürInformation Retrieval in XML-Dokumenten

Norbert FuhrUniversität Duisburg

Page 2: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Outline of Talk

I. XML retrieval

II. XIRQL: XML IR Query Language

III. XIRQL vs. XQuery

IV. User Interface

V. INEX: Initiative for the Evaluation of XML Retrieval

VI. Summary

Page 3: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

3 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

I. XML documents<book class="H.3.3"><author>John Smith</author><title>XML Retrieval</title><chapter> <heading>Introduction</heading>This text explains all about XML and IR.

</chapter><chapter><heading> XML Query Language XQL </heading><section>

<heading>Examples</heading></section><section>

<heading>Syntax</heading>Now we describe the XQL syntax.

</section></chapter>

</book>

Elements:start tagend tagcontentattribute

Page 4: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

4 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Tree view

document

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

headingheading

sectionheading

XML Query Language XQL

section

We describesyntax of XQL

chapter

Examples Syntax

Page 5: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

5 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XML query languages

Data-centric view: XML as exchange format for structured data

Document-centric view: XML as format for representing the logical structure of documents

W3C WG proposal for XML query language: XQueryFocuses on data-centric view here:

Information Retrieval for document-centric view

Starting point: XPath (XQL)

Page 6: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

6 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XPathdocument

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

headingheading

sectionheading

XML Query Language XQL

section

We describesyntax of XQL

chapter

Examples Syntax

Path condition: parent/child node chapter/heading

Page 7: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

7 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XPathdocument

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

headingheading

sectionheading

XML Query Language XQL

section

We describesyntax of XQL

chapter

Examples Syntax

Path condition: ancestor-descendant chapter//heading

Page 8: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

8 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XPathdocument

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

headingheading

sectionheading

XML Query Language XQL

section

We describesyntax of XQL

chapter

Examples Syntax

Filter wrt. structure: //chapter[heading]

Page 9: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

9 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XPathdocument

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

headingheading

sectionheading

XML Query Language XQL

section

We describesyntax of XQL

chapter

Examples Syntax

Filter wrt. content: /document[@class="H.3.3" ∧ author="John Smith"]

Page 10: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

10 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XPath properties

Conditions wrt. logical structureConditions wrt. contentResults are arbitrary (complete) elements of the original documents

- Boolean Retrieval (poor retrieval quality)- Relevance-oriented search (irrespective of

structure) not supported- Few data types only

Page 11: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

11 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

II. XIRQL: XML IR Query Language

Extend XPath by:

Probabilistic retrieval with weighted document indexing

Relevance-oriented search (irrespective of structure)

(Extensible) data types with vague predicatesStructural relativism

Page 12: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

12 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

II.1 Probabilistic Retrieval with XIRQL

Problem: weighting of different forms of occurrence of terms

/document[.//heading ∋ "XML" ∨ .//section//* ∋ "XML"]

Examples Syntax

document

Introduction

chapter

heading

headingheadingXML Query Language XQL

section

We describesyntax of XQL

chapter

heading sectionThis. . .

Page 13: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

13 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Weighting of term occurrences in documents

a) Weighting wrt. single query conditionsP(.//heading ∋ "XML“,d) = 0.5P(.//section//* ∋ "XML“,d) = 0.7

→ Possible overlapping of query conditions

→ Dependent probabilistic events

→ Only probability intervals for answers → No linear ranking of documents

Page 14: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

14 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Weighting of term occurrences in documents

b) Weighting wrt. document parts

→ Term weighting depends on context of term occurrence

→ All occurrences within same context refer to same probabilistic event

→ Only identical and independent events

→ Point probabilities for answers→ Linear ranking of documents

Page 15: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

15 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Index nodes as units for term weighting

1 2 3

4 5

document

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

heading

SyntaxExamples

heading

sectionheading

XML Query Lang. XQL

section

We describesyntax of

XQL

chapter

Application of known indexing functions (e.g. tf*idf)

Page 16: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

16 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Probabilistic events and event expressions

Problem: combination of term weights consistent with probability theory

Basic event: term occurrence in an index node

Basic events are independent (different terms, same term in different index nodes)

Event expressions describe combination of basic events in a document wrt. a query

Page 17: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

17 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Event expressionsdocument

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

heading

SyntaxExamples

heading

sectionheading

XML Query Lang. XQL

section

We describesyntax of

XQL

chapter

1 32

4 5

//section[.//* ∋ "XQL" ∧ .//* ∋ "syntax"]

[5,XQL] ∧ [5,syntax]

Page 18: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

18 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Event expressionsdocument

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

heading

SyntaxExamples

heading

sectionheading

XML Query Lang. XQL

section

We describesyntax of

XQL

chapter

1 32

4 5

/document/chapter [.//* ∋ "XQL" ∧ .//* ∋ "syntax"]

([3,XQL] ∨ [5,XQL]) ∧ [5,syntax]

Page 19: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

19 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Evaluation of event expressions

(as in probabilistic Datalog)1. Transform event expression into disjunctive normal

forme = C1 ∨ … ∨ Cn

Ci: Conjunction of event atomsEvent atom: positive or negated basic event

2. Application of inclusion/exclusion formula:)...()( 1 nCCPeP ∨∨=

∑ ∑= ≤<<≤

∧∧−=

n

i njjjj

i

i

iCCPeP1 ...1

1

1

1 )...()1()(

Page 20: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

20 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

II.2 Relevance-oriented search(Queries irrespective of document structure)1) Restrict possible answers

(not all elements suitable)2) Retrieval strategy: return most specific element

satisfying the querybut: combination with weighted indexing?

Solution:1) Index nodes as roots of possible answers2) Augmentation as concept for computing tradeoff

between indexing weights and specifity of answers

Page 21: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

21 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Index nodes for relevance-oriented search

3

4 5

document

class="H.3.3"

author

John Smith

title

XML Retrieval Introduction

chapter

heading This. . .

heading

SyntaxExamples

heading

sectionheading

XML Query Lang. XQL

section

We describesyntax of

XQL

chapter

1 2

Page 22: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

22 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Augmentation…by disjunction

0.5 example 0.8 XQL0.7 syntax

section1 section2

0.3 XQL

chapter

0.5 example0.7 syntax

0.86 0.7*0.5

Example query: syntax ∧ example

Page 23: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

23 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Augmentation…by disjunction

0.5 example 0.8 XQL0.7 syntax

section1 section2

0.3 XQL

chapter

0.5 example0.7 syntax

0.86 0.86

0.8

Example query: XQL

Page 24: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

24 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Augmentation…with augmentation weight

0.5 example 0.8 XQL0.7 syntax

section1 section2

0.3 XQL

chapter

0.30 example0.42 syntax

0.64

0.6 0.6

0.64

0.8

Example query: XQL

Page 25: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

25 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

II.3 XIRQL: Data types with vague predicates

XML markup allows for detailed markup of text elements

Exploit markup for more precise searches

Consider also vagueness and imprecision of IR

Data types with vague queries``Search for an artist named Ulbrich, living in the Rhine-Main area of

Germany about 100 years ago”Ernst Olbrich, Darmstadt, 1899

(Extensible) data types for document-centric view(person names, dates, geographic locations, classifications/ images,

audio,...)

Page 26: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

26 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Extensible type hierarchy

Extensible type hierarchy with vague predicates for each data type

1) text: substring-match2) Western language: single word search, truncation,

word distance3) English text: stemming, noun phrases

Data types of XML documents defined in extended DTD (XML schema)

Page 27: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

27 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

II.4 Structural Relativism

Drop distinction attribute/element:~author searches for attribute or element

Generalize to data types: #personname searches for attributes/elements of specific data type

Exploit ontology over element names:region – country – continent

Edit distance on paths:author=“Smith” vs. author/name vs. author/name/lastname

Page 28: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

28 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

III. XIRQL vs. XQuery

XQuery (proposed as standard XML query language by W3C WG):

No IR support (weighting, vague predicates, relevance-oriented search, structural relativism)Aggregation operators (sum, count, min, max, avg)

Restructuring of results

Page 29: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

29 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XIRQL as IR extension of XQuerysubset

XQuery structure:FOR PathExpressionWHERE AdditionalSelectionCriteriaRETURN ResultConstruction

XIRQL subset:FOR $X IN PathExpressionRETURN $X

Page 30: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

30 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

IV. User Interface

Query formulationResult visualization

Page 31: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

31 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Query Formulation: Layout-oriented

Page 32: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

32 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Query Formulation: Structure-oriented

Page 33: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

33 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Visualization of Results: Textbars

Page 34: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

34 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Visualization of Results : Treemaps

Page 35: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

35 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

V. INEX: Initiative for the Evaluation of XML Retrieval

Initially 50 groups from 20 countries (finally 27 active)Documents:

7 years of IEEE-CS journals (12107 articles, 494 MB)

Queries:30 content-only, 30 content+structural conditions

Results due: September 15, 2002Relevance judgements due: November 20Final Workshop: December 9-11, 2002

Page 36: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

36 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

Example query

Title: Nonmonotonic ReasoningDescription:

Retrieve all articles from the years 1999-2000 that deal with nonmonotonic reasoning. Do not retrieve articles that are calendar/calls for papers.

Condition:/article[./bdy/sec ∋ “nonmonotonic reasoning” ∧

./hdr/yr[.= 2000 ∨ . = 1999] ∧ .//. ∋ “belief revision” ∧¬ .//tig/atl ∋ “calendar”]

Page 37: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

37 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

VI. Summary

Data-centric vs. document-centric view on XML(database vs. IR view)

IR methods for XML must support uncertainty and vagueness…

Page 38: XIRQL: Eine Anfragesprache für Information Retrieval in ... · 2 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten Outline of Talk I. XML retrieval II. XIRQL: XML IR Query

38 - Fuhr: XIRQL: Eine Anfragesprache für IR in XML-Dokumenten

XIRQL: XML query language implementing

Combination of structural conditions with probabilistic weightingRelevance-oriented search by augmentationExtensible data types with vague predicatesStructural relativism

HyREX: Open source XML retrieval engine:http://ls6-www.cs.uni-dortmund.de/ir/projects/hyrex