声母
标准-坎兰
mb-b
[?]-c:[?]国际音标(?应少底下一个点)
nd-d
f-f
ng-g
h-h
j-j
g-k
l-l
m-m
n-n
b-p
{布依qy}-q
{布依ny}-r
s,sh-s
d-t
v-w
{英语v}-v
{布依w}-w
c-x
y-y
r-z
{汉z,zh}-ts
{汉c,ch}-tsh
(标准文中其它复辅音声母中的最后一个若是y,v,则改为坎兰中i,u紧接在倒数第二个辅音后)
韵母
(下面这些坎兰韵母其实前面都得加c)
标准-坎兰
a-a,ae-a
ai-ai,aei-ay
au-aw,aeu-au
ang-agn,aeng-ang
ap/ab-ap,aep/aeb-ab
at/ad-at,aet/aed-ad
ak/ag-ak,aek/aeg-ag
am-arm,aem-am
an-arn,aen-an
w-er,{汉e}-e
wi-ey,{汉ei}-ei
wu-eu,{汉ou}-ew
wng-eng,{汉eng}-egn
wp/wb-eb,()-ep
wt/wd-ed,()-et
wk/wg-eg,()-ek
wm-erm,()-em
wn-ern,()-en
e-ee/ae
eu-eo/ao
eng-eeng/aeng
ep/eb-eeb,aep
et/ed-eed,aet
ek/eg-eeg,aek
em-eem,aem
en-een,aen
o-o,oe-or
oi-oy,oei-oi
ou-ou,oeu-ow
ong-ong,oeng-ogn
op/ob-ob,oep/oeb-op
ot/od-od,oet/oed-ot
ok/og-og,oek/oeg-ok
om-om,oem-orm
on-on,oen-orn
i-i,{汉si}-ih
iu-iw,iu
ing-ing
ip/ib-ip
it/id-it
ik/ig-ik
im-im
in-in
u-u
ung-ung
up/ub-ub
ut/ud-ud
uk/ug-ug
um-um
un-un
wa-ea
aw-aer
wa后面还有韵尾的,按e+”a韵母”处理
声调:
调符标在音节第一元音上
调号 调值 调符
J 33 -
24 /
X 31 ∨
Z 11 ‥
Q 35 ∧
H 53 \
建议第4调符省略
sangj-sāgn
sang-ságn
sangx-sǎgn
sangz-sägn/sagn
sangq-sâgn
sangh-sàgn
byangj-pīagn
byang-píagn
byangx-pǐagn
byangz-pïagn/piagn
byangq-pîagn
byangh-pìagn
链接(布依论坛,需登录)※直接打开文件可输入坎兰拉丁大小写带帽元音字母
如果下载到本地,运行时需要允许阻止的内容…
如果直接在线打开,即可使用。
修改版本功能相对强大,但代码没有优化。
在线编辑框还没有做出来。
不要在文本框内按[Esc]键,会清空所有输入。还没设置该键为无效。
krm2ipa.htm
代码如下:
<!--
GNU通用公共许可证(GPL)
这是一个自由软件,任何人或机构都可以在遵守GPL守则下使用该软件。
原 作 者 :Robale (http://hi.baidu.com/robale)
版 本 :v4.0
推出日期 :2009-9-26
修改日期 :2009-10-03
致谢徐清白(http://py2ipa.sourceforge.net/py2ipa.htm)
-->
<html>
<head>
<title>坎兰字转写</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<SCRIPT language="javascript">
function py2ipa(s){
seq=s.split("\n");
var toneNumLetter=new Array(
'a1','a2','a3','a4','a5','a6',
'o1','o2','o3','o4','o5','o6',
'e1','e2','e3','e4','e5','e6',
'i1','i2','i3','i4','i5','i6',
'u1','u2','u3','u4','u5','u6',
'A1','A2','A3','A4','A5','A6',
'O1','O2','O3','O4','O5','O6',
'E1','E2','E3','E4','E5','E6',
'I1','I2','I3','I4','I5','I6',
'U1','U2','U3','U4','U5','U6'
);
var toneMarkLetter=new Array(
'ā','á','ǎ','ä','â','à',
'ō','ó','ǒ','ö','ô','ò',
'ē','é','ě','ë','ê','è',
'ī','í','ǐ','ï','î','ì',
'ū','ú','ǔ','ü','û','ù',
'Ā','Á','Ă','Ä','Â','À',
'Ō','Ó','Ŏ','Ö','Ô','Ò',
'Ē','É','Ĕ','Ë','Ê','È',
'Ī','Í','Ĭ','Ï','Î','Ì',
'Ū','Ú','Ŭ','Ü','Û','Ù'
);
var letters=new Array('a','e','i','o','u','A','E','I','O','U');
//因难于定位第一元音,正则时不再匹配声母,而从元音开始匹配。
for(i in seq)if(seq.charAt(0)!='#')seq=seq.replace(/[aeiouAEIOU]{1,4}
(b|p|d|t|g|k|m|n|gn|ng|r|rm|rn|y|w|h|B|P|D|T|G|K|M|N|GN|NG|R|RM|RN|Y|W|H){0,1}[1-6]/g,function
(py){
//寻找要标调的元音字母,并标调...[bcdfghjklmnpqrstvwxyz]*[aeiou]{1,3}
var tone=py.slice(-1);
py=py.slice(0,-1);
for(i in letters)if(py.indexOf(letters)==0){mark=letters;break;}//寻找第一元音
for(i in toneNumLetter)if(toneNumLetter==mark+tone){return py.replace
(mark,toneMarkLetter);}
return py+tone;
});
return seq.join('\n');
}
function refresh_output(){
document.getElementById("out").value=py2ipa(document.getElementById("seq").value);
}
/*//尚未实现光标定位,且输入框变动会导致结果框只得到输入框的转换结果,故不允许直接编辑
function out_output(){
document.getElementById("out").value=py2ipa(document.getElementById("out").value);
}
*/
function CopyAll(T){//复制结果框内全部内容
T.focus(); //使文本框得到焦点
T.select(); //把文本框中的内容全选
if (document.all){
therange=T.createTextRange();
therange.execCommand("Copy"); //复制
}
}
<!--
function resizeEditor(change) {//改变输入框高度
var newheight = parseInt(document.getElementById('seq').style.height, 10) + change;
if(newheight >= 100) {
document.getElementById('seq').style.height = newheight + 'px';
}
}
//-->
</SCRIPT>
<style type="text/css">
textarea{
font-size: 15px;
font-weight:normal;
color: #000000;
background-color: #E4F4FD;
font-familyucida Sans Unicode,Arial,华文彩云;>
}
</style>
</head>
<body onLoad="convert.seq.focus()"><!--表单名.对象名.焦点()使在刷新时仍可获得焦点-->
<form id="convert" name="convert" method="POST" target="in" onFocus="seq.focus">
<p>请输入字母+数字(1-6):
<input type="button" id="test" onclick="seq.value='不知从谁起,众人成烦悲就需要然后也爱自
个说“哈素”。\r\n Mi4 zee6 au1 fang3la4 tau1,jogn5wern4 pan4 rab5 beng2 xi4 cau2 day3 qia6 ya4 gai6
kar3 nau4 “har2su2”.\r\n建议省略第4调符:\r\n Mi zee6 au1 fang3la tau1,jogn5wern pan rab5 beng2 xi
cau2 day3 qia6 ya gai6 kar3 nau “har2su2”.';refresh_output();" value="示例" />
<INPUT TYPE="BUTTON" VALUE="复制转换结果" onclick="CopyAll(out)" />
<input type="button" value="框高+" onclick="resizeEditor(100)" />
<input type="button" value="框高-" onclick="resizeEditor(-100)" />
<input type="button" value="清空" onclick="seq.innerText='';out.innerText='';"/>
<br>
<center>
<textarea id="seq" name="seq" style="width:98%;height:120px;" onKeyup="refresh_output()"
onFocus="seq.focus"></textarea><br>
<textarea id="out" name="out" style="width:98%;height:430px;" onFocus="seq.focus"
readonly="readonly"></textarea><br>
</center>
</form>
</body>
</html>
[此贴子已经被作者于2009-10-3 19:49:37编辑过]