I am looking for a multinomial naive Bayes text classification package in R that accepts a term document matrix (from tm) as input for training and classifies new text based on that. I have about 12000 short documents, which will belong to around 7 different topics and I would like to get a probability score for new documents.

# Multinomial Classification on text

**pjoshi15**#2

Hi @manishceeri

You can convert the term document matrix to a dataframe and then use **e1071** package to build a Naive Bayes model. Let me know if there is any doubt.

**manishceeri**#3

I have already converted the dtm to data frame and has cbind that with topics also.

As i mentioned i have to classify text into 7 topics means 7 different class which makes this problem as multiclass classification problem unlike the email-spam/ham binary classification problem.

thus kindly help in how to apply the multiclass classification, which algorithm to go with. practical codes snippets would be very useful.

BR