In weka you can choose your own attribute. In this example, we have only 2 classes, and all unique words are used as attributes. If you choose the frequency of words as your attribute, then you assign “2” if this word appears twice in your text, and “0” if not, or “1” if this word occurs only once.
Here is an example of the .arff format.
@RELATION anyrelation @ATTRIBUTE word1 @ATTRIBUTE word2 ... @ATTRIBUTE wordn @ATTRIBUTE class {class1, class2} @DATA 1,2,....,0,class1 0,3,....,1,class2
kaylak
source share