NLP - (Postings|Inverted) (Index|File)

> (Natural|Human) Language - Text (Mining|Analytics)

1 - About

An inverted index is an index data structure storing a mapping from:

  • token (content), such as words or numbers,
  • to its locations (in a database file, document or a set of documents)
  • In text search, a forward index maps documents in a data set to the tokens they contain.
  • An inverted index supports the inverse mapping.

Given a set of documents, an inverted index is a dictionary where each word is associated with a list of the document identifiers in which that word appears.

Advertising

3 - Procedure

4 - Aysnchronous Update

The full-text index is updated asynchronously (crawled) rather than being maintained transactionally.

5 - Example

map reduce without reduce function as we will get already an (iterator|list) structure of the tweets.

Input:

tweet1, ("I love pancakes for breakfast") \\ 
tweet2, ("I dislike pancakes") \\ 
tweet3, ("What should we eat for breakfast?") 
tweet4, ("I love to eat") 

Desired output:

"pancakes", (tweet1, tweet2)
"breakfast", (tweet1, tweet3)
"eat", (tweet3, tweet4)
"love" (tweet1, tweet4)

6 - Application

6.1 - Reduce running time of comparison

An inverted index is a data structure that allow to avoid making quadratically the running time of token comparisons. It maps each token in the dataset to the list of documents that contain the token. So, instead of comparing, record by record, each token to every other token to see if they match, the inverted indices is used to look up records that match on a particular token.

7 - Documentation / Reference

Advertising
natural_language/inverted_index.txt · Last modified: 2019/06/08 10:22 by gerardnico