From here : http://krdic.naver.com/help.nhn?page=3-1-2
‘ㅑ ㅒ ㅕ ㅖ ㅘ ㅙ ㅛ ㅝ ㅞ ㅠ ㅢ’ are to be pronounced as double vowels.
which means 의 is pronounced as ㅡ and ㅣ in succession. For example, 의 in 의사 would be pronounced as 으이 in succession.
Exception 3: When ㅢ is used on a consonant, it should pronounced as
[ㅣ].
Hence,
늴리리 [닐리리], 닁큼 [닝큼], 무늬 [무니]
Exception 4: An 의 which is not the first syllable of the word can be pronounced as 이; an 의 used as a postposition can be pronounced as 에
주의[주의/주이]
협의[혀븨/혀비]
우리의[우리의/우리에]
강의의[강ː의의/강ː이에]
의사 is a word with 2 syllables, and the first one is 의, hence it is pronounced as 으이
민주주의의 의의 -> [민주주이에 의이]
In 주의 의 is the second syllable, so is pronounced as 이
In 주의의, the last 의 is a postposition denoting a possessive, hence pronounced as 에
In 의의, the first 의 is the first syllable, hence pronounced as 의 [으이]
The second 의 is the second syllable, hence pronounced as 이
Some references from the web:
https://www.reddit.com/r/Korean/comments/36k5ft/i_still_cant_grasp_how_to_pronounce_%EC%9D%98/
http://i.imgur.com/jEAdAV4.jpg
https://www.italki.com/question/95634?hl=ko
http://cafe.naver.com/atspeech/703