biye2014/lgr — pull request #1 by biye2014 (2014-09-18 17:05:21+00:00)
Title: Data struct update lattice gen

update of backward_bigram_lattice, so that backward_bigram_lattice[i][j][k] = bigram represented as the tuple (sent[k:j], sent[j:i]) if j in backward_bigram_lattice[i] and k in backward_bigram_lattice[i][j]

backward_bigram_lattice is still a list, while backward_bigram_lattice[i] is a nested dict of dict.

This change is for fast and *straightforward* (conceptually simple) retrieval and iteration of all the possible bigrams that ends at position i of the sentence.