-2
$\begingroup$

I have a problem when I need to classify words in groups. For example: Input: apple, watermelon, knife, soap.

I need to split the input in groups

Food: apple, watermelon Object: knife Cleaning Product: Soap

But I don't know the best approach to do my objective. Has anyone else ever had a similar problem?

$\endgroup$
2
  • $\begingroup$ If you've a fix number of groups you can start from any classification method related to your features. $\endgroup$ Commented Apr 16, 2017 at 15:11
  • $\begingroup$ And if not that can be done with semi-supervised approaches, for example. $\endgroup$ Commented Apr 16, 2017 at 15:12

2 Answers 2

2
$\begingroup$

One possible approach is to use pretrained word embeddings like word2vec (https://blog.acolyer.org/2016/04/21/the-amazing-power-of-word-vectors/), which map a word to a real-valued vector in a high-dimensional space, and then use clustering techniques (k-means, etc.) to assign words to categories.

$\endgroup$
1
$\begingroup$

It looks like you have a classification problem and like you already know the correct classes. So I guess that you are asking for a supervised method from the area of Machine Learning (ML).

To find some ideas about ML in general and get some method you can have a look at the paper A Few Useful Things to Know about ML.

Beside simpler methods you could have a look to implementations of neural networks. In the paper Convolutional Neural Networks for Sentence Classification, but be aware that they classify for sentiments and also have whole sentences as input.

Moreover, there are also projects with an API available, which give you a class for a given word. I am not able to remember one. Maybe some other user know more about that.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.