Chapter 4 : Query Languages - PowerPoint PPT Presentation

1 / 38
About This Presentation
Title:

Chapter 4 : Query Languages

Description:

Patten Matching. Structural Queries. Query Protocols. Trends and Research Issues ... A query is formulation of a user information need. Keyword-based queries ... – PowerPoint PPT presentation

Number of Views:191
Avg rating:3.0/5.0
Slides: 39
Provided by: gua9
Category:

less

Transcript and Presenter's Notes

Title: Chapter 4 : Query Languages


1
Chapter 4 Query Languages
  • ?????
  • ??88522070
  • ???????
  • ????89/10/26

2
Outline
  • Keyword-Based Querying
  • Patten Matching
  • Structural Queries
  • Query Protocols
  • Trends and Research Issues

3
Keyword-Based Querying
  • A query is formulation of a user information need
  • Keyword-based queries are popular
  • 1.Single-Word Queries
  • 2.Context Queries
  • 3.Boolean Queries
  • 4.Natural Language

4
Single-Word Queries
  • A query is formulated by a word
  • A document is formulated by long sequences of
    words
  • A word is a sequence of letters surrounded by
    separators
  • What are letters and separators?e.g,on-line The
    division of the text into words is not arbitrary

5
Context Queries
  • definition
  • - Search words in a given context,e.g,near
    other words
  • types
  • -phrase
  • gta sequence of single-word queries
  • gte.g,enhance retrieval
  • -proximity
  • gta sequence of single words or phrases, and a
    maximum allowed distance between them are
    specified
  • gte.g,within distance(enhance,retrieval,4)
    will match enhance the power of retrieval

6
Boolean Queries
Definition -A syntax composed of atoms that
retrieve documents, and of Boolean operators
which work on their operands -e.g,translation AND
syntax OR syntactic
7
Boolean Queries
  • Operands
  • -(e1 OR e2)
  • select all documents which satisfy e1 or e2
  • -(e1 AND e2)
  • select all documents which satisfy both e1 and
    e2
  • -(e1 BUT e2)
  • select all documents which satisfy e1 but not
    e2
  • fuzzy boolean
  • -Retrieve documents appearing in some
    operands(The AND may require it to appear in more
    operands than the OR)

8
Natural Language
  • generalization of fuzzy Boolean
  • A query is an enumeration of words and context
    queries
  • All the documents matching a portion of the user
    query are retrieved

9
Pattern Matching
  • A pattern is a set of syntactic features that
    must occur in a text segment
  • Types
  • -words
  • -prefixes
  • e.q comput-gtcomputer ,computation,com
    puting,etc
  • -suffixes
  • e.q ters-gtcomputers,testers,painters
    ,etc
  • -substrings
  • e.q tal-gtcoastal,talk,metallic,etc
  • -Ranges
  • between held and hold-gthoax and
    hissing

10
Pattern Matching
  • Allowing errors
  • Retrieve all text words which all similar to
    the given word
  • edit distance
  • the minimum number of character
    insertions,deletions,and replacements needed to
    make two strings equal , e.q , flower and flo
    wer
  • maximum allowed edit distance
  • query specifies the maximum number of allowed
    errors for a word to match the pattern

11
Pattern Matching
  • Regular expressions
  • union if e1 and e2 are regular expressions ,
    then(e1e2) matches what e1 or e2 matches
  • concatenation if e1 and e2 are regular
    expressions , the occurrences of (e1e2) are
    formed by the occurrences of e1 immediately
    followed by those of e2
  • repetition if e is a regular expression , then
    (e) matches a sequence of zero or more
    contiguous occurrence of e
  • pro(blemtein)(s?)(012)-gtproblem2 and
    proteins

12
Structural Queries
  • Mixing contents and structure in queries
  • -contentswords,phrases,or patterns
  • -structural constraintscontainment,proximity,o
    r other restrictions on structural elements
  • Three main structures
  • -fixed structure
  • -hypertext structure
  • -hierarchical structure

13
Fixed Structure
Documenta fixed set of fields EX a mail has a
sender, a receiver, a date, a subject and a body
field Search for the mails sent to a given person
with football in the Subject field
14
Hypertext
A hypertext is a directed graph where nodes hold
some text (text contents) the links represent
connections between nodes or between positions
inside nodes (structural connectivity)
15
Hypertext WebGlimpse
WebGlimpse combine browsing and searching on the
Web
16
Hierarchical Structure
Recursive decomposition of the text
17
Hierarchical Structure
18
Hierarchical Structure
19
Hierarchical Structure
20
Hierarchical Structure
  • PAT Expressions
  • Overlapped Lists
  • Lists of References
  • Proximal Nodes
  • Tree Matching

21
PAT Expressions
  • What is PAT tree?
  • The areas of a region cannot nest or overlap

22
PAT Tree
23
Overlapped Lists
  • The model allow for the areas of a region to
    overlap,but not to nest
  • It is not clear,whether overlapping is good or
    not for capturing the structural properties

24
Lists of References
  • Overlap and nest are not allowed
  • All elements must be of the same type,e.g only
    sections,or only paragraphs.
  • A reference is a pointer to a region of the
    database.

25
Proximal Nodes
  • This model tries to find a good compromise
    between expressiveness and efficiency.
  • It does not define a specific language, but a
    model in which it is shown that a number of
    useful operators can be included achieving good
    efficiency.

26
Tree Matching
  • The leaves of the query can be not only
    structural elements but also text patterns,
    meaning that the ancestor of the leaf must
    contain that pattern.

27
Query Protocols
  • Z39.50
  • WAIS (Wide Area Information Service)

28
Z39.50
  • American National Standard Information Retrieval
    Application Service Definition
  • Can be implemented on any platform
  • Query bibliographical information using a
    standard interface between the client and the
    host database manager
  • Z39.50 protocol is part of WAIS

29
Z39.50 Brief history
  • Z39.50-1988(version 1)
  • Z39.50-1992(version 2)
  • Z39.50-1995(version 3)
  • Version 4,development began in Autumn 1995

30
Using Z39.50 over the WWW
WWW Client
WWW Z39.50
Z39.50 Server
Repository Digital library
Z39.50 Client
31
WAIS (Wide Area Information Service)
  • Beginning in the 1990s
  • Query databases through the Internet

32
Trends and Research Issues
Model
Queries allowed
word,set operations words words words
Boolean Vector Probabilistic BBN
Relationship between types of queries and models
33
Boolean Model
  • ?????????????, ???????????????????????
  • ???????, ????????????????, ???????????????

34
Vector Model
  • ??(1)?Term-weight ?????????????(2)???????????(3
    )???????????,????????????
  • ???????????????,????????????, ?????weight ???0
    ????????????????????????

35
Probabilistic Model
  • Probabilistic Model
  • ?????????????????, ??????? (1)????????????????
    ??(2)???????????????(3)???????????? ?

36
Bayesian Belief Network
  • ??????????,?????????????,?????????????????????????
    ?????,????????????????????
  • ??????,????????????,??????????????????????,???????
    ???????????????? ?

37
Bayesian Belief Network
  • ??(P)?????(H)??(ie.????????)?????(S)??????????????
    ??(B)?????(U)??????

38
Trends and Research Issues
The types of queries covered and how they are
structured
Write a Comment
User Comments (0)
About PowerShow.com