Predicting Composition of Chemical Compounds I have a dataset which has names of compounds and their compositions. Like below

Sulphuric Acid=>[H,S,O] (Hydrogen, sulphur, oxygen)
Oxalic Acid=>[H,C,O]
Sodium Oxalate=>[Na,C,O]
Potassium Sulphate=>[K,S,O]
...

Now I would need to train a model which can tell me Sodium Sulphate as [Na,S,O]. Note that sodium sulphate represents something not in training dataset.
I have tried searching for possible ideas but nothing came up. Then I thought it could be hierarchical clustering like

 Sodium-Oxalate
    |    |
Oxalate  Sodium
|  |      |
C  O      Na


But then in hierarchical clustering the base/leafs are different. But here they are shared. Its like a graph. So What machine learning algorithm can help? Any other clustering? NLP/word clustering (if yes How)?

Another approach I could think of is like Word2Vec where I generate embeddings for each word (C,H,Sodium), all will have embeddings. And based on what is closer to the word I am asking I will give output. But this needs huge amount of data. I only have around 1k common compounds. And the approach won't generalize to any problem like this with less data.
Try a one-hot encoding of the elements in your training set (H, C, I etc.) and the same for the chemical descriptors ('acid', 'oxalic' etc.). Then try feeding the data to a simple feed-forward neural network, mapping the one-hot encodings of the descriptors as your x_train and x_val to the chemical elements, which are your y_train and y_val.

For the encodings, take a look at the Scikit learn encoders. 

I think such a simple approach may work, as the chemical names are logically named, so any experienced chemist knows exactly which elements to expect in a compound, given its name. Your problem doesn't require further information in the predictions, e.g. the actual chemical makeup, like $CH_3CH_2OH$ (ethanol). 

Regarding a small amount of data: look into something like K-fold cross validation. Using this, you select some portion of the data to be your validation data, and train the model. You then repeat this process, selection a different portion of the data. This will help make the most of a limited dataset, although it may introduce overfitting because your model will eventually have seen all the data!

Here is a schematic of this method:



Scikit Learn has a class that implements it for you.