Query Languages Aj. Khuanlux MitsophonsiriCS.426 INFORMATION RETRIEVAL.

Slides:



Advertisements
Similar presentations
Relevance Feedback & Query Expansion
Advertisements

Chapter 5: Introduction to Information Retrieval
Query Languages. Information Retrieval Concerned with the: Representation of Storage of Organization of, and Access to Information items.
Information Retrieval in Practice
Search Engines and Information Retrieval
1 Advanced information retrieval Chapter. 05: Query Reformulation.
T.Sharon - A.Frank 1 Internet Resources Discovery (IRD) Classic Information Retrieval (IR)
Query Operations: Automatic Local Analysis. Introduction Difficulty of formulating user queries –Insufficient knowledge of the collection –Insufficient.
Basic IR: Queries Query is statement of user’s information need. Index is designed to map queries to likely to be relevant documents. Query type, content,
Search Strategies Online Search Techniques. Universal Search Techniques Precision- getting results that are relevant, “on topic.” Recall- getting all.
1 Query Languages. 2 Boolean Queries Keywords combined with Boolean operators: –OR: (e 1 OR e 2 ) –AND: (e 1 AND e 2 ) –BUT: (e 1 BUT e 2 ) Satisfy e.
Slide 1 EE3J2 Data Mining EE3J2 Data Mining Lecture 7 Topic Spotting & Query Expansion Martin Russell.
Chapter 5: Query Operations Baeza-Yates, 1999 Modern Information Retrieval.
Query Languages: Patterns & Structures. Pattern Matching Pattern –a set of syntactic features that must occur in a text segment Types of patterns –Words:
Chapter 4 : Query Languages Baeza-Yates, 1999 Modern Information Retrieval.
Reference Collections: Task Characteristics. TREC Collection Text REtrieval Conference (TREC) –sponsored by NIST and DARPA (1992-?) Comparing approaches.
1 Query Language Baeza-Yates and Navarro Modern Information Retrieval, 1999 Chapter 4.
What is a document? Information need: From where did the metaphor, doing X is like “herding cats”, arise? quotation? “Managing senior programmers is like.
Information retrieval Finding relevant data using irrelevant keys Example: database of photographic images sorted by number, date. DBMS: Well structured.
Modern Information Retrieval Chapter 4 Query Languages.
1 CS 430 / INFO 430 Information Retrieval Lecture 9 Latent Semantic Indexing.
1 Query Languages. 2 Boolean Queries Keywords combined with Boolean operators: –OR: (e 1 OR e 2 ) –AND: (e 1 AND e 2 ) –BUT: (e 1 BUT e 2 ) Satisfy e.
Chapter 5: Information Retrieval and Web Search
Chapter 4 Query Languages.... Introduction Cover different kinds of queries posed to text retrieval systems Keyword-based query languages  include simple.
Query Relevance Feedback and Ontologies How to Make Queries Better.
COMP423: Intelligent Agent Text Representation. Menu – Bag of words – Phrase – Semantics – Bag of concepts – Semantic distance between two words.
Query Expansion.
Search Engines and Information Retrieval Chapter 1.
Information Retrieval and Web Search Relevance Feedback. Query Expansion Instructor: Rada Mihalcea Class web page:
COMP423.  Query expansion  Two approaches ◦ Relevance feedback ◦ Thesaurus-based  Most Slides copied from ◦
Chapter 2 Architecture of a Search Engine. Search Engine Architecture n A software architecture consists of software components, the interfaces provided.
Jennie Ning Zheng Linda Melchor Ferhat Omur. Contents Introduction WordNet Application – WordNet Data Structure - WordNet FrameNet Application – FrameNet.
Query Operations J. H. Wang Mar. 26, The Retrieval Process User Interface Text Operations Query Operations Indexing Searching Ranking Index Text.
Query Operations. Query Models n IR Systems usually adopt index terms to process queries; n Index term: u A keyword or a group of selected words; u Any.
Information Retrieval Introduction/Overview Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and Berthier Ribeiro-Neto.
1 Query Operations Relevance Feedback & Query Expansion.
1 University of Palestine Topics In CIS ITBS 3202 Ms. Eman Alajrami 2 nd Semester
1 Information Retrieval Acknowledgements: Dr Mounia Lalmas (QMW) Dr Joemon Jose (Glasgow)
Information Retrieval CSE 8337 Spring 2007 Query Languages & Matching Material for these slides obtained from: Modern Information Retrieval by Ricardo.
1 Fall 2004, CIS, Temple University CIS527: Data Warehousing, Filtering, and Mining Lecture 11 Mining Complex Types of Data: Information Retrieval Lecture.
1 CS 430: Information Discovery Lecture 3 Inverted Files.
Chapter 6: Information Retrieval and Web Search
Introduction to Digital Libraries hussein suleman uct cs honours 2003.
LIS618 lecture 3 Thomas Krichel Structure of talk Document Preprocessing Basic ingredients of query languages Retrieval performance evaluation.
Information Retrieval CSE 8337 (Part A) Spring 2009 Some Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates and.
WIRED Week 3 Syllabus Update (next week) Readings Overview - Quick Review of Last Week’s IR Models (if time) - Evaluating IR Systems - Understanding Queries.
Basic Implementation and Evaluations Aj. Khuanlux MitsophonsiriCS.426 INFORMATION RETRIEVAL.
Introduction to Information Retrieval Aj. Khuanlux MitsophonsiriCS.426 INFORMATION RETRIEVAL.
Query Suggestion. n A variety of automatic or semi-automatic query suggestion techniques have been developed  Goal is to improve effectiveness by matching.
A Repetition Based Measure for Verification of Text Collections and for Text Categorization Dmitry V.Khmelev Department of Mathematics, University of Toronto.
Information Retrieval
Information Retrieval and Web Search Relevance Feedback. Query Expansion Instructor: Rada Mihalcea.
CS798: Information Retrieval Charlie Clarke Information retrieval is concerned with representing, searching, and manipulating.
(Pseudo)-Relevance Feedback & Passage Retrieval Ling573 NLP Systems & Applications April 28, 2011.
Feature Assignment LBSC 878 February 22, 1999 Douglas W. Oard and Dagobert Soergel.
Selecting Relevant Documents Assume: –we already have a corpus of documents defined. –goal is to return a subset of those documents. –Individual documents.
Information Retrieval CSE 8337 Spring 2007 Query Operations Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates.
Information Retrieval CSE 8337 Spring 2003 Query Operations Material for these slides obtained from: Modern Information Retrieval by Ricardo Baeza-Yates.
Query expansion COMP423. Menu Query expansion Two approaches Relevance feedback Thesaurus-based Most Slides copied from
Sampath Jayarathna Cal Poly Pomona
Information Retrieval in Practice
Designing Cross-Language Information Retrieval System using various Techniques of Query Expansion and Indexing for Improved Performance  Hello everyone,
Advanced information retrieval
Lecture 12: Relevance Feedback & Query Expansion - II
Query Languages.
Relevance Feedback & Query Expansion
Chapter 5: Information Retrieval and Web Search
Semantic Similarity Methods in WordNet and their Application to Information Retrieval on the Web Yizhe Ge.
Query Languages Berlin Chen 2003 Reference:
Information Retrieval and Web Design
Presentation transcript:

Query Languages Aj. Khuanlux MitsophonsiriCS.426 INFORMATION RETRIEVAL

2 Boolean Queries Keywords combined with Boolean operators: OR: (e 1 OR e 2 ) AND: (e 1 AND e 2 ) BUT: (e 1 BUT e 2 ) Satisfy e 1 but not e 2

3 Boolean Retrieval with Inverted Index Primitive keyword: Retrieve containing documents using the inverted index OR: Recursively retrieve e 1 and e 2 and take union of results AND: Recursively retrieve e 1 and e 2 and take intersection of results BUT: Recursively retrieve e 1 and e 2 and take set difference of results

4 UNION (everything in A or B or both):

5 INTERSECTION (everything in both A and B):

6 “Natural Language” Queries Full text queries as arbitrary strings Typically just treated as a bag-of-words for a vector-space model Typically processed using standard vector-space retrieval methods

7 Context Queries Search word in a given context Phrasal Queries Proximity Queries

8 Phrasal Queries Retrieve documents with a specific phrase (ordered list of contiguous words) “information theory” May allow intervening stop words and/or stemming “buy camera” matches: “buy a camera” “buying the cameras” etc

9 Phrasal Retrieval with Inverted Index Must have an inverted index that also stores positions of each keyword in a document Retrieve documents and positions for each individual word, intersect documents, and then finally check for ordered contiguity of keyword positions Best to start contiguity check with the least common word in the phrase

10 Proximity Queries List of words with specific maximal distance constraints between terms Example: “dogs” and “race” within 4 words match “…dogs will begin the race…” May also perform stemming and/or not count stop words

11 Pattern Matching Allow queries that match strings rather than word tokens Requires more sophisticated data structures and algorithms than inverted indices to retrieve efficiently

12 Simple Patterns Prefixes: Pattern that matches start of word. “anti” matches “antiquity”, “antibody”, etc. Suffixes: Pattern that matches end of word: “ix” matches “fix”, “matrix”, etc. Substrings: Pattern that matches arbitrary subsequence of characters “rapt” matches “enrapture”, “velociraptor” etc. Ranges: Pair of strings that matches any word lexicographically (alphabetically) between them “tin” to “tix” matches “tip”, “tire”, “title”, etc

13 Allowing Errors What if query or document contains typos or misspellings? Judge similarity of words (or arbitrary strings) using: Edit distance (Levenstein distance) Longest Common Subsequence (LCS) Allow proximity search with bound on string similarity

14 Edit (Levenstein) Distance Minimum number of character deletions, additions, or replacements needed to make two strings equivalent “misspell” to “mispell” is distance 1 “misspell” to “mistell” is distance 2 “misspell” to “misspelling” is distance 3 Can be computed efficiently using dynamic programming in O(mn) time where m and n are the lengths of the two strings being compared

15 Longest Common Subsequence (LCS) Length of the longest subsequence of characters shared by two strings A subsequence of a string is obtained by deleting zero or more characters Examples: “misspell” to “mispell” is 7 “misspelled” to “misinterpretted” is 7 “mis…p…e…ed”

16 Regular Expressions Language for composing complex patterns from simpler ones An individual character is a regex Union: If e 1 and e 2 are regexes, then (e 1 | e 2 ) is a regex that matches whatever either e 1 or e 2 matches Concatenation: If e 1 and e 2 are regexes, then e 1 e 2 is a regex that matches a string that consists of a substring that matches e 1 immediately followed by a substring that matches e 2 Repetition (Kleene closure): If e 1 is a regex, then e 1 * is a regex that matches a sequence of zero or more strings that match e 1

17 Regular Expression Examples (u|e)nabl(e|ing) matches unable unabling enable enabling (un|en)*able matches able unable unenable enununenable

18 Structural Queries Assumes documents have structure that can be exploited in search Structure could be: Fixed set of fields, e.g. title, author, abstract, etc. Hierarchical (recursive) tree structure: chapter titlesectiontitlesection titlesubsection chapter book

19 Queries with Structure Allow queries for text appearing in specific fields: “nuclear fusion” appearing in a chapter title SFQL: Relational database query language SQL enhanced with “full text” search Select abstract from journal.papers where author contains “Teller” an title contains “nuclear fusion” and date < 1/1/1950

Query Operations

21 Relevance Feedback After initial retrieval results are presented, allow the user to provide feedback on the relevance of one or more of the retrieved documents Use this feedback information to reformulate the query Produce new results based on reformulated query Allows more interactive, multi-pass process

22 Relevance Feedback Architecture Rankings IR System Document corpus Ranked Documents 1. Doc1 2. Doc2 3. Doc3. 1. Doc1  2. Doc2  3. Doc3 . Feedback Query String Revise d Query ReRanked Documents 1. Doc2 2. Doc4 3. Doc5. Query Reformulation

23 Query Reformulation Revise query to account for feedback: Query Expansion: Add new terms to query from relevant documents Term Reweighting: Increase weight of terms in relevant documents and decrease weight of terms in irrelevant documents. Several algorithms for query reformulation

24 Comparison of Methods Overall, experimental results indicate no clear preference for any one of the specific methods All methods generally improve retrieval performance (recall & precision) with feedback Generally just let tunable constants equal 1

25 Evaluating Relevance Feedback By construction, reformulated query will rank explicitly-marked relevant documents higher and explicitly-marked irrelevant documents lower. Method should not get credit for improvement on these documents, since it was told their relevance. In machine learning, this error is called “testing on the training data.” Evaluation should focus on generalizing to other un-rated documents

26 Fair Evaluation of Relevance Feedback Remove from the corpus any documents for which feedback was provided. Measure recall/precision performance on the remaining residual collection. Compared to complete corpus, specific recall/precision numbers may decrease since relevant documents were removed. However, relative performance on the residual collection provides fair data on the effectiveness of relevance feedback

27 Why is Feedback Not Widely Used Users sometimes reluctant to provide explicit feedback. Results in long queries that require more computation to retrieve, and search engines process lots of queries and allow little time for each one. Makes it harder to understand why a particular document was retrieved

28 Pseudo Feedback Use relevance feedback methods without explicit user input. Just assume the top m retrieved documents are relevant, and use them to reformulate the query. Allows for query expansion that includes terms that are correlated with the query terms

29 Pseudo Feedback Architecture Rankings IR System Document corpus Ranked Documents 1. Doc1 2. Doc2 3. Doc3. Query String Revise d Query ReRanked Documents 1. Doc2 2. Doc4 3. Doc5. Query Reformulation 1. Doc1  2. Doc2  3. Doc3 . Pseudo Feedback

30 Pseudo Feedback Results Found to improve performance on TREC competition ad-hoc retrieval task. Works even better if top documents must also satisfy additional boolean constraints in order to be used in feedback

31 Query Expansion Expansion without human interaction Two Methods can be distinguished Global Methods Thesauri Co-occurrence model Local Methods Pseudo relevance feedback Local context analysis

32 Thesaurus A thesaurus provides information on synonyms and semantically related words and phrases Example: physician syn: ||croaker, doc, doctor, MD, medical, mediciner, medico, ||sawbones

33 Thesaurus-based Query Expansion For each term, t, in a query, expand the query with synonyms and related words of t from the thesaurus May weight added terms less than original query terms Generally increases recall May significantly decrease precision, particularly with ambiguous terms “interest rate”  “interest rate fascinate evaluate”

34 WordNet A more detailed database of semantic relationships between English words Developed by famous cognitive psychologist George Miller and a team at Princeton University About 144,000 English words Nouns, adjectives, verbs, and adverbs grouped into about 109,000 synonym sets called synsets

35 WordNet Synset Relationships Antonym: front  back Attribute: benevolence  good (noun to adjective) Pertainym: alphabetical  alphabet (adjective to noun) Similar: unquestioning  absolute Cause: kill  die Entailment: breathe  inhale Holonym: chapter  text (part-of) Meronym: computer  cpu (whole-of) Hyponym: tree  plant (specialization) Hypernym: fruit  apple (generalization)

36 WordNet Query Expansion Add synonyms in the same synset Add hyponyms to add specialized terms Add hypernyms to generalize a query Add other related terms to expand query

37 Statistical Thesaurus Existing human-developed thesauri are not easily available in all languages Human thesauri are limited in the type and range of synonymy and semantic relations they represent Semantically related terms can be discovered from statistical analysis of corpora

38 Query Expansion Conclusions Expansion of queries with related terms can improve performance, particularly recall However, must select similar terms very carefully to avoid problems, such as loss of precision