In[]:=
classifier=Classify[{"This is a happy example"->1,"This is a negative or bad example"->0}]
Out[]=
ClassifierFunction
Input type: Text
Classes: 0,1
Method: Markov
Number of training examples: 2

In[]:=
classifier["this is a good example"]
Out[]=
1
In[]:=
classifier["this is a bad example"]
Out[]=
0