"""Narrow, auditable removal of three duplicated reading suffixes in gloss fields.

Do not strip suffixes generically or replace assigned synonyms with dictionary
synonyms. Each rule requires the specific character, old gloss and reading.
"""
from copy import deepcopy
FIXES = {
    '菓': ('과자 과', '과자', '과'),
    '占': ('점령할 점', '점령할', '점'),
    '陳': ('베풀 진', '베풀', '진'),
}
def normalize_meanings(char, meanings):
    result = deepcopy(meanings)
    rule = FIXES.get(char)
    if rule:
        old, new, reading = rule
        for glosses, readings in result:
            if reading in readings:
                for i, gloss in enumerate(glosses):
                    if gloss == old:
                        glosses[i] = new
    return result
