Let me be more specific, On inputting some words I need to check whether those words comes under a language known as "Malayalam".
Example: enthayi ninakk sugamanno?
These are some malayalam words which are expressed in english. On giving some input like this, it need to check the trained data and if any of the input words comes under the category 'Malayalam' then it needs to display that it's Malayalam.
What I've tried to do..
I tried to classify it with a NaiveBayesClassifier, but it always shows a positive response for all the input data.
train = [
('aliya','Malayalam')]
cl = NaiveBayesClassifier(train)
print cl.classify('enthayi ninakk sugamanno')
But the print statement gives an output 'Malayalam'
Hope You'll help me out.. :)
--
You received this message because you are subscribed to the Google Groups "nltk-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nltk-users+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Well training data consists of some words which are "Malayalam" Words like this train = [
('aliya','Malayalam')]