Which kind of model is better for keyword-set classification? There exists a similar task that is named text classification.

But I want to find a kind of model that the inputs are keyword set. And the keyword set is not from a sentence. 

For example:

input ["apple", "pear", "water melon"] --&gt; target class "fruit"
input ["tomato", "potato"] --&gt; target class "vegetable"


Another example:

input ["apple", "Peking", "in summer"]  --&gt;  target class "Chinese fruit"
input ["tomato", "New York", "in winter"]  --&gt;  target class "American vegetable"
input ["apple", "Peking", "in winter"]  --&gt;  target class "Chinese fruit"
input ["tomato", "Peking", "in winter"]  --&gt;  target class "Chinese vegetable"


Thank you.
You can leverage word-vector similarity in embedding models.

TL;DR similiar vectors of words (for example fruits) will be clustered together in this high (vector) dimensional space. For every possible class-set you will have a class-set representative (centroid) that is actually a key (so in your case fruit, vegetable etc) all you need to do is train/find a representative word embedding model of your corpus.