I have a set of synonyms for example like this:
big large large huge small little apple banana
Meaning big is a synonym for large, large is synonym for huge, small for little, apple for banana and vice versa(large is synonym for big, etc). Another thing is "big" is a synonym for "huge" and "huge" is a synonym for "big" because of indirect relationship via "large".
This should be something like thesaurus? But I'm not sure how the data structure should look.