There is multiple way to build such dictionary. But my question is about the implementation of dictionnaries in postgresql: Is postgresql supposed to take advantage of billion entries dictionaries ?
dictionary is just a program, so it's up to developer how to write efficient program to deal with billion entries. Specifically to synonym dictionary, it's not intended to work with a lot of entries. btw, have a look on contrib/dict_xsyn dictionary, which is more flexible than synonym.