How would I convert specific compounds into their formula and vice versa??

examples:
Dichlorine Heptaoxide (<-turned into formula)
P(4)S(3) (<-turned into compound)

I know how to convert it without using the Greek names, so the 'Di', 'Hexi' and 'Tri' are throwing me off.