I am trying to write a data-driven spell correction component, which uses the edit distance algorithm to get an initial list of suggestions (alternatives) corresponding to each token. I can think of two ways to do this: 1. Export the inverted index that Solr (6.5) creates from the feed, which I can use later in python to get a list of initial suggestions (alternative) for my spell correction. 2. I can connect to Solr from my python program to get a list of alternative/suggestions corresponding to each token.
Now the question is, how can I do this?