currently the /search command in the discord bot doesn't actually search anything. It gets a few markov chains, then formats them into a sort of paragraph.
To make this searchy, we want to do something like this:
generate several (10 or so) candidate 'paragraphs' from the MatrixMarkov instance
compare the results to some target string, using some heuristic.
The simplest is probably just searching for any instances of that particular n-gram
more complex is computing the Levenshtein distance (https://en.wikipedia.org/wiki/Edit_distance) -- you'd probably want to tokenized the markov-text into n-grams of the same length as the input text, then compute the similarity for each n-gram
currently the
/search
command in the discord bot doesn't actually search anything. It gets a few markov chains, then formats them into a sort of paragraph.To make this searchy, we want to do something like this: