Products classification by name I am a beginner with machine learning, and I'm trying to build a model to classify products by category according to the words present in the product name.
My goal is to predict the category of some new product, just by observing the categories for existing products.
For example, having the following products:

PRODUCT                                     CATEGORY
soap bar johnsons green leaves              bath
cookie bauducco lemon 120gr                 cookie
nesfit cookie choc and st                   cookie
strawberry soap soft                        bath
spoon hercules medium                       kitchen
soap dish plastic medium                    bath
[...]


My first thought is to group the words (tokens) present in each product, indicating the designated category and the occurrences count (to be used as a weight). So, for this sample, I have:

WORD           CATEGORY         COUNT
soap           bath             3
cookie         cookie           2
medium         bath             1
medium         kitchen          1
bar            bath             1
johnsons       bath             1


Having this, I could be able to train a model, and use it to classify a new product. 

For example, having a new product hands liquid soap 120oz, it could be classified as bath, because it contains the word soap, which have a strong weight for the bath category.  

In other case, the new product medium hammer could be classified as bath or kitchen , according the occurrence of the word medium in the training set.

So, my doubts are: 


Am I going to the correct approach?
What is the best algorithm to be used in this case?
How can I apply this using Weka?
If you have enough data and reasonable number of classes, you can definitely train your model. The grouping of words that you have done is similar to an approach called bag-of-words model. You can use that to build a classifier using Naive Bayes or SVM etc. 
On a different note, you can also look at the KNN algorithm because it looks fit for your use case. You can have a look at this paper