documents as instances and words as the attributes this maps directly to the method of our invention in that the data files written to the hard disk are the documents and the textual contents of those files consisting either of words or of character n grams are the attributes to use the na u00efve bayes algorithm with a set of documents first an ordered set of attributes words or n grams is selected commonly the union of all words found in a corpus of documents the documents are then used to create a set of training vectors one vector for each document the length of the vectors is equal to the size of the set of entities used in the classification process and each coordinate t of the vector is either 1 or 0 indicating whether that word is present in the document to each vector is appended its class c representing the true class label of this document the training process for na u00efve bayes is at heart a probabilistic calculation using the well known bayes 39 rule based on the training vectors the following set of empirical probabilities can be calculated p t c of documents in class c including word t of documents in class c 1 p c of.