diff options
Diffstat (limited to 'lib/nola_plugins/txt_plugin/markov_native.ex')
-rw-r--r-- | lib/nola_plugins/txt_plugin/markov_native.ex | 33 |
1 files changed, 0 insertions, 33 deletions
diff --git a/lib/nola_plugins/txt_plugin/markov_native.ex b/lib/nola_plugins/txt_plugin/markov_native.ex deleted file mode 100644 index 4c403c2..0000000 --- a/lib/nola_plugins/txt_plugin/markov_native.ex +++ /dev/null @@ -1,33 +0,0 @@ -defmodule Nola.IRC.TxtPlugin.MarkovNative do - @behaviour Nola.IRC.TxtPlugin.Markov - - def start_link() do - ExChain.MarkovModel.start_link() - end - - def reload(data, markov) do - data = data - |> Enum.map(fn({_, data}) -> - for {line, _idx} <- data, do: line - end) - |> List.flatten - - ExChain.MarkovModel.populate_model(markov, data) - :ok - end - - def sentence(markov) do - case ExChain.SentenceGenerator.create_filtered_sentence(markov) do - {:ok, line, _, _} -> {:ok, line} - error -> error - end - end - - def complete_sentence(sentence, markov) do - case ExChain.SentenceGenerator.complete_sentence(markov, sentence) do - {line, _} -> {:ok, line} - error -> error - end - end - -end |