contrib/gadict.el
changeset 987 6880ca22ec67
parent 984 73d6e2631338
child 998 14804339afc1
equal deleted inserted replaced
986:d22f0bd08553 987:6880ca22ec67
    50     cnt))
    50     cnt))
    51 
    51 
    52 (defun gadict--espeak-cleanup-accent (s)
    52 (defun gadict--espeak-cleanup-accent (s)
    53   "Remove accent if only one syllable in word."
    53   "Remove accent if only one syllable in word."
    54   (if (<= (gadict--vowel-group-count s) 1)
    54   (if (<= (gadict--vowel-group-count s) 1)
    55       (replace-regexp-in-string "$,1$h(B" "" s)
    55       (replace-regexp-in-string "[$,1$h$l(B]" "" s)
    56     s))
    56     s))
    57 
    57 
    58 (defun gadict--espeak-cleanup-accent-in-sentence (s)
    58 (defun gadict--espeak-cleanup-accent-in-sentence (s)
    59   "Remove accent if only one syllable in word."
    59   "Remove accent if only one syllable in word."
    60   (mapconcat #'gadict--espeak-cleanup-accent (split-string s " ") " "))
    60   (mapconcat #'gadict--espeak-cleanup-accent (split-string s " ") " "))