How to employ Naive Bayes on a sentence
How would I write the pseudocode to classify a sentence as good or bad using the naive bayes algorithm?
I assume the first step would be to get experimental data to go from such that you have example sentences with good/bad words in them and you have example output for those sentences (classified as good or bad). But how would I be able to use this data to generate the algorithm开发者_StackOverflow中文版 itself?
I'm not sure what you mean by "good" or "bad" in this context, but you may find this research paper on Bayesian spam filtering useful, particularly the section about "domain-specific properties," which describes how various features were chosen to try to filter spam. If by "good" and "bad" sentences you are trying to find various criteria for those sentences, this paper may be a good lead. If by "good" and "bad" sentences you are looking for information about detecting grammar errors etc., this is probably not a very good place to look. :-)
精彩评论