Bayes query results just 0.5 or 1
Posted: Sat Feb 01, 2014 10:55 pm
I don't get it ... since two hours I'm trying to train some website data, but don't get the expected results.
(bayes-query) returns 0.5 or 1
I'm using the complex pattern in (parse) to split up german texts, too.
Here's my code:
And the result
I'm expecting 0, because this phrase doesn't exist in my training data.
Am I missing some switch?
(bayes-query) returns 0.5 or 1
I'm using the complex pattern in (parse) to split up german texts, too.
Here's my code:
Code: Select all
(setq textdata "Now think about your brain. It’s a long running program running on very complex and error prone hardware. How does your brain keep itself sane over time? The answer may be found in something we spend a third of our lives doing. Sleep.")
(setq text (parse (lower-case textdata) "[^a-z0-9äöüß]+" 0))
(bayes-train text 'DICT)
(bayes-query (parse (lower-case "dsd skjsd ksdjkds sdkj") "[^a-z0-9äöüß]+" 0) 'DICT)
Code: Select all
"Now think about your brain. It\226\128\153s a long running program running on very complex and error prone hardware. How does your brain keep itself sane over time? The answer may be found in something we spend a third of our lives doing. Sleep."
("now" "think" "about" "your" "brain" "it" "s" "a" "long" "running" "program" "running"
"on" "very" "complex" "and" "error" "prone" "hardware" "how" "does" "your" "brain"
"keep" "itself" "sane" "over" "time" "the" "answer" "may" "be" "found" "in" "something"
"we" "spend" "a" "third" "of" "our" "lives" "doing" "sleep" "")
(45)
(0.5)
Am I missing some switch?