medicine.ex 345 B

12345678910111213141516
  1. defmodule Medicine do
  2. def suggest(args) do
  3. opts = [
  4. model: :multinomial,
  5. storage: :file_system,
  6. file_path: "lib/medicine_dataset.txt"
  7. ]
  8. SimpleBayes.load(opts)
  9. #|> SimpleBayes.classify("i have some headache and cold")
  10. # we use args for getting parameter from elixir shell
  11. |> SimpleBayes.classify(args)
  12. end
  13. end