This is very economical of space and involves a clever computer ploy, but it does not provide a particularly useful synonym dictionary, for, as we all know, synonymy in language does not yield to the commutative law of mathematics; in language,  Things equal to the same thing are not (necessarily) equal to each other. 
The laws of linguistics have very little in common to the laws of mathematics.