1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-21 06:55:39 +00:00
emacs/lisp/leim/quail/ipa-praat.el
2024-01-02 09:47:10 +08:00

360 lines
11 KiB
EmacsLisp
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

;;; ipa-praat.el --- Inputting IPA characters with the conventions of Praat -*- lexical-binding: t -*-
;; Copyright (C) 2011-2024 Free Software Foundation, Inc.
;; Author: Oliver Scholz <epameinondas@gmx.de>
;; Keywords: multilingual, input method, IPA
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This is a new input method for IPA characters and diacritics, which follows
;; the conventions of Praat, a GPLed program for phonetic analysis.
;;
;; This input method is much more complete than the current ipa.el.
;;; Code:
(require 'quail)
(quail-define-package
"ipa-praat" "IPA" "IPAP" t
"International Phonetic Alphabet input method.
This follows the input method of the phonetic analysis program
Praat (https://www.fon.hum.uva.nl/praat/).
* Vowels
- Unrounded
| front | centr. | back
-------------+-------+--------+------
close | i i | ɨ \\i- | ɯ \\mt
close centr. | ɪ \\ic | |
close-mid | e e | ɘ \\e- | ɤ \\rh
| | ə \\sw |
open-mid | ɛ \\ef | ɜ \\er | ʌ \\vt
| æ \\ae | ɐ \\at |
open | a a | | ɑ \\as
- Rounded
| front | centr. | back
-------------+-------+--------+-------
close | y y | ʉ \\u- | u u
close centr. | ʏ \\yc | | ʊ \\hs
close-mid | ø \\o/ | ɵ \\o- | o o
open-mid | œ \\oe | ɞ \\kb | ɔ \\ct
open | ɶ \\Oe | | ɒ \\ab
For most of the codes, the first letter tells you the most
similar letter of the English alphabet. The second letter can be
t (turned), c (capital), s (script), r (reversed), - (barred or
retracted), or / (slashed). One symbol (ɛ) is a phonetic version
of a Greek letter. The codes for ə, ɤ, ʊ and ɞ are abbreviations
for schwa, ram's horn, horseshoe, and kidney bean.
* Consonants
- Pulmonic
| plos. | nasal | fric. | approx. | trill | tap/flap | l. appr.
-----------+-------+-------+-------+---------+-------+----------+---------
bilabial | p p | m m | ɸ \\ff | | | |
| b b | | β \\bf | ʋ \\vs | ʙ \\bc | |
labiodent. | | ɱ \\mj | f f | | | |
| | | v v | | | |
dental | | | θ \\tf | | | |
| | | ð \\dh | | | |
alveolar | t t | n n | s s | | | ɾ \\fh |
| d d | | z z | ɹ \\rt | r r | | l l
alv. lat. | | | ɬ \\l- | | | ɺ \\rl |
| | | ɮ \\lz | l l | | | l l
postalv. | | | ʃ \\sh | | | |
| | | ʒ \\zh | | | |
retroflex | ʈ \\t. | ɳ \\n. | ʂ \\s. | | | ɽ \\f. |
| ɖ \\d. | | ʐ \\z. | ɻ \\r. | | | ɭ \\l.
alv.-pala. | | | ɕ \\cc | | | |
| | | ʑ \\zc | | | |
palatal | c c | ɲ \\nj | ç \\c, | | | |
| ɟ \\j. | | ʝ \\jc | j j | | | ʎ \\yt
lab.-pal. | | | | | | |
| | | | ɥ \\ht | | |
lab.-vela. | | | ʍ \\wt | | | |
| | | | w w | | |
velar | k k | ŋ \\ng | x x | | | | ʟ \\lc
| ɡ \\gs | | ɣ \\gf | ɰ \\ml | | |
uvular | q q | ɴ \\nc | χ \\cf | | | |
| ɢ \\gc | | ʁ \\ri | | ʀ \\rc | |
pharyngeal | | | ħ \\h- | | | |
| | | ʕ \\9e | | | |
epiglottal | ʡ \\?- | | ʜ \\hc | | | |
| | | ʢ \\9- | | | |
glottal | ʔ | | h h | | | |
| | | ɦ \\h^ | | | |
- Nonpulmonic
| implosive | click
----------+-----------+------
bilabial | ɓ \\b^ | ʘ \\O.
dental | | ǀ \\|1
alveolar | ɗ \\d^ |
alv.-lat. | | ǁ \\|2
postalv. | | ǂ \\|-
retrofl. | | ! !
palatal | ʄ \\j^ |
velar | ɠ \\g^ |
uvular | ʛ \\G^ |
For most of the codes, the first letter tells you the most
similar letter of the English alphabet. The second letter can
be t (turned), c (capital or curled), s (script), - (barred),
l (with leg), i (inverted), or j (left tail). Some phonetic
symbols are similar to Greek letters but have special
phonetic (f) versions with serifs (ɸ, β, ɣ) or are otherwise
slightly different (θ, χ). The codes for ŋ (engma), ð (eth),
ʃ (esh), and ʒ (yogh) are traditional alternative spellings.
The retroflexes have a period in the second place, because an
alternative traditional spelling is to write a dot under
them. The code for ɾ is an abbreviation for fishhook.
* Diacritics
- In line
input | example | description
------+---------+---------------------
\\:f | ː | phonetic length sign
\\'1 | ˈ | primary stress
\\'2 | ˌ | secondary stress
\\cn | t̚ | unreleased plosive
\\hr | ɜ˞ | rhotacized vowel
\\^h | ʰ | aspiration
\\^H | ʱ | voiced aspiration
\\^w | ʷ | labialized, rounded
\\^j | ʲ | palatalized
\\^g | ˠ | velarized
\\^9 | ˤ | pharyngealized
- Understrikes
input | example | description
------+---------+--------------------------------
\\|v | n̩ | syllabic consonant
\\0v | b̥ | voiceless
\\Tv | o̞ | lowered
\\T^ | o̝ | raised
\\T( | o̘ | advanced tongue root
\\T) | o̙ | retracted tongue root
\\-v | e̱ | backed
\\+v | o̟ | fronted
\\:v | o̤ | breathy voice
\\~v | o̰ | creaky voice
\\Nv | d̪ | dental (as opposed to alveolar)
\\Uv | d̺ | apical
\\Dv | d̻ | laminal
\\nv | u̯ | nonsyllabic
\\3v | e̹ | slightly rounded
\\cv | u̜ | slightly unrounded
- Overstrikes
input | example | description
------+---------+--------------------------------------------
\\0^ | ɣ̊ | voiceless
\\'^ | é | high tone
\\`^ | è | low tone
\\-^ | ē | mid tone
\\~^ | ẽ | nasalized
\\v^ | ě | rising tone
\\^^ | ê | falling tone
\\:^ | ë | centralized
\\N^ | ĕ | short
\\li | k͡p | simultaneous articulation or single segment
"
nil t nil nil nil nil nil nil nil nil t)
(quail-define-rules
;; plosives
("\\t." ) ; retroflex
("\\d." ) ; voiced retroflex
("\\j-" ) ; voiced palatal
("\\gs" ?ɡ) ; voiced velar
("\\gc" ) ; voiced uvular
("\\?-" ) ; epiglottal
("\\?g" ?ʔ) ; glottal
;; nasals
("\\mj" ) ; labiodental
("\\n." ) ; retroflex
("\\nj" ) ; palatal
("\\ng" ) ; velar
("\\nc" ) ; uvular
;; fricatives
("\\ff" ) ; bilabial
("\\bf" ) ; voiced bilabial
("\\tf" ) ; labiodental
("\\dh" ) ; voiced labiodental
("\\sh" ) ; postalveolar
("\\l-" ) ; alv. lateral
("\\lz" ) ; voiced alv. lateral
("\\zh" ) ; voiced postalveolar
("\\s." ) ; retroflex
("\\z." ) ; voiced retroflex
("\\cc" ) ; alveolo-palatal
("\\zc" ) ; voiced alveolo-palatal
("\\c," ) ; palatal
("\\jc" ) ; voiced palatal
("\\wt" ) ; labial-velar
("\\gf" ?ɣ) ; voiced velar
("\\cf" ) ; uvular
("\\ri" ) ; voiced uvular
("\\h-" ) ; pharyngeal
("\\9e" ) ; voiced pharyngeal
("\\hc" ) ; epiglottal
("\\9-" ) ; voiced epiglottal
("\\h^" ) ; voiced glottal
;; approximants
("\\vs" ?ʋ) ; labiodental
("\\rt" ) ; alveolar
("\\r." ) ; retroflex
("\\ht" ) ; labial-palatal
("\\ml" ) ; velar
;; trills
("\\bc" ) ; bilabial
("\\rc" ) ; uvular
;; taps or flaps
; ⱱ -- labiodental
("\\fh" ) ; alveolar
("\\rl" ) ; alv.-lateral
("\\f." ) ; retroflex
;; lateral approx.
("\\l." ) ; retroflex
("\\yt" ) ; palatal
("\\lc" ) ; velar
;; implosives
("\\b^" ) ; bilabial
("\\d^" ) ; alveolar
("\\j^" ) ; palatal
("\\g^" ) ; velar
("\\G^" ) ; uvular
;; clicks
("\\O." ) ; bilabial
("\\|1" ?ǀ) ; dental
("\\|2" ) ; alv. lateral
("\\|-" ) ; postalveolar
;; other
("\\l~" ) ; velarized l
("\\hj" ) ; post-alveolar & velar fricative
;; vowels
("\\i-" )
("\\u-" )
("\\mt" ?ɯ)
("\\ic" ?ɪ)
("\\yc" ?ʏ)
("\\hs" )
("\\o/" )
("\\e-" )
("\\o-" )
("\\rh" )
("\\sw" )
("\\ef" )
("\\oe" )
("\\er" )
("\\kb" )
("\\vt" )
("\\ct" )
("\\ae" )
("\\at" )
("\\Oe" )
("\\as" ?ɑ)
("\\ab" )
("\\sr" )
;; diacritics
("\\:f" ?ː) ; phonetic length sign
("\\'1" ?ˈ) ; primary stress
("\\'2" ) ; secondary stress
("\\cn" #x031A) ; t̚ unreleased plosive
("\\hr" #x02DE) ; ɜ˞ rhotacized vowel
("\\^h" ) ; ʰ aspiration (usually following a plosive)
("\\^H" ) ; ʱ voiced aspiration (usually following a plosive)
("\\^w" ) ; labialized
("\\^j" ) ; palatalized
("\\^g" ) ; velarized
("\\^9" ) ; pharyngealized
("\\|v" #x0329) ; n̩ syllabic consonant
("\\0v" #x0325) ; b̥ voiceless
("\\Tv" #x031E) ; o̞ lowered
("\\T^" #x031D ) ; o̝ raised
("\\T(" #x0318) ; o̘ advanced tongue root
("\\T)" #x0319) ; o̙ retracted tongue root
("\\-v" #x0331) ; e̱ backed
("\\+v" #x031F) ; o̟ fronted
("\\:v" #x0324) ; o̤ breathy voice
("\\~v" #x0330) ; o̰ creaky voice
("\\Nv" #x032A) ; d̪ dental (as opposed to alveolar)
("\\Uv" #x033A) ; d̺ apical
("\\Dv" #x033B) ; d̻ laminal
("\\nv" #x032F) ; u̯ nonsyllabic
("\\3v" #x0339) ; e̹ slightly rounded
("\\cv" #x031C) ; u̜ slightly unrounded
("\\0^" #x030A) ; ɣ̊ voiceless
("\\'^" #x0301) ; high tone
("\\`^" #x0300) ; low tone
("\\-^" #x0304) ; mid tone
("\\~^" #x0303) ; nasalized
("\\v^" #x030C) ; rising tone
("\\^^" #x0302) ; falling tone
("\\:^" #x0308) ; centralized
("\\N^" #x0306) ; short
("\\li" #x0361) ; k͡p simultaneous articulation or single segment
)
;; Local Variables:
;; coding: utf-8
;; End:
;;; ipa-praat.el ends here