This was a small experiment I had done relatively long back and sharing the results. Not sure how can it be useful in DSL context. May be during design? Or for suggestion to user in the DSL based IDE?
The idea originated during e-mail composition when I wanted to express something more than what typically is expressed in usual vocabulary in the given context. So thought of finding a common synonyms list for what I wanted to say and what is generally said, then select the best one, which satisfies both, if possible.
Wrote a bash script by taking a word and keeping the synonyms in a queue (appending to master synonyms file for the word). Like in BFS(tree) algorithm, take next element, generate synonyms, insert at the end of queue. As the distance increases, relevancy may come down.
During the testing, I had taken even 2 words which are antonyms and found a harmony !!
motility, immotility : fermentation
true, false : creation
The following one was not my find but a colleague has asked to find when showed the script:
ink, vomit: pen
There are times I did not get any common word. So they are orthogonal. In DSL domain language may be we can to some extent figure out these kind of relations or in the proposed language, can … ?? Not getting proper words on what to write. Wait, let me try my script
Hopefully my .02 cc (taken from my deposit in future crypto currency (which satisfies C in ACID)) for DSL design discussions.
As always, please feel free to correct me for any inconsistencies.
Edit: append:
Used Princeton university’s mysql database transformed english dictionary.