gschles/gschlesjustinlh276 — pull request #4 by justinlh (2012-05-05 01:27:42+00:00)
Title: yo

Hey man,

I added in functionality for empirical probability, multiple edit support for uniform, and that enhancement you thought of.

The code for empirical probability is untested as of now. Also, I apologize for its complexity. It was either have overly complex code in that section or make substantial edits to a lot of existing working code.

Basically, the code for empirical probability first finds the best query of all queries within an edit distance one and stores that as the initial maximum probability query.

Then, it then takes each edit distance one query computed earlier and finds the set of queries one more edit distance away. Then, for each set of edit distance two queries it finds the maximum probability query and updates the global maximum probability query if necessary.

One confusing aspects in the calculation of the probability for an edit distance two query is we need to track the probability for the parent edit distance one query, to do this I created a dictionary "edit1_query_probabilities".

Anyways, if you have any questions let me know. Down to work on these whenever works for you tomorrow, I'll probably put more work in later tonight.

Justin