Repository navigation
Query Rewriter (from old wiki) #3981
Closed
chenlica
started this conversation in
archived-wiki
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
From the page https://github.com/apache/texera/wiki/Query-Rewriter (may be dangling)
=====
Authors:
Shiladitya Sen, Kishore Narendran
Reviewer: Chen Li (DONE)
Synopsis
The purpose of the "QueryRewriter" operator is to correct errors of missing spaces in a query that can lead to incorrect tokenization. For instance, a query "newyork" can be rewritten by this operator to "new york". The operator is be used to return:
Status
As of 6/3/2016: COMPLETED
Modules
edu.uci.ics.texera.dataflow.queryrewriterRelated Issues
Design: Query Rewriter Issue - #29
Description
The operator inserts spaces to a query string to find likely words in order to rewrite the query. It has two implementations:
A dynamic programming algorithm that utilizes a word-frequency dictionary to find the most likely tokenization. This algorithm was adopted from the Chinese characters tokenization performed in the [Srch2 Chinese Tokenization] module (https://github.com/SRCH2/srch2-ngn/blob/master/src/core/analyzer/ChineseTokenizer.cpp#L197). The word-frequency dictionary was derived from Google unigrams and the NLTK English dictionary. The score for each word used for the algorithm is a reciprocal of frequency.
A recursive algorithm that uses an English dictionary (possibly without word frequencies) to find all combinations of valid tokenizations in a search string. This algorithm that can be found here
Presentation
Query Rewriter Dynamic Programming Algorithm
All reactions