1 / 13

Information Retrieval

Information Retrieval. Lecture 9. Outline. Map Reduce, cont. Index compression [Amazon Web Services]. Map Reduce. Map: (key, value)  list(key ’, value’) Reduce: (key’, list(value ’)  list (value’). Example: counting occurrences of words in large collections of documents.

roden
Download Presentation

Information Retrieval

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Information Retrieval Lecture 9

  2. Outline • Map Reduce, cont. • Index compression • [Amazon Web Services]

  3. Map Reduce • Map: (key, value) list(key’, value’) • Reduce: (key’, list(value’)  list (value’)

  4. Example: counting occurrences of words in large collections of documents reduce(String key, Iterator values): // key: a word // values: a list of counts int result = 0; for each v in values: result += ParseInt(v); Emit(AsString(result)); map(String key, String value): // key: document name // value: document contents for each word w in value: EmitIntermediate(w, "1");

  5. Other Map-Reducible problems • Distributed Grep: The map function emits a line if it matches a supplied pattern. The reduce function is an identity function that just copies the supplied intermediate data to the output. • Count of URL Access Frequency: The map function processes logs of web page requests and outputs ⟨URL, 1⟩. The reduce function adds together all values for the same URL and emits a ⟨URL, total count⟩ pair. • Reverse Web-Link Graph: The map function outputs ⟨target, source⟩ pairs for each link to a target URL found in a page named source. The reduce function concatenates the list of all source URLs associated with a given target URL and emits the pair: ⟨target, list(source)⟩

  6. Compression: example • amendment allen-p/_sent_mail/465.:1:34 stclair-c/sent/993.:5:45,60,76,84,100 • Too verbose!

  7. Compression: example • amendment allen-p/_sent_mail/465.:1:34 stclair-c/sent/993.:5:45,60,76,84,100(that’s 74 characters) • compare to • 34 1342:1:34 9745:5:45,60,76,84,100 (that’s 33 characters) need to keep a mapping between numbers and names

More Related