1
# edict2skk.awk -- convert EDICT dictionary to SKK-JISYO format.
3
# Copyright (C) 1998, 1999, 2000 Mikio Nakajima <minakaji@osaka.email.ne.jp>
5
# Author: Mikio Nakajima <minakaji@osaka.email.ne.jp>
6
# Created: Dec. 5, 1998
7
# Last Modified: $Date: 2000/10/02 21:25:32 $
8
# Version: $Id: edict2skk.awk,v 1.3 2000/10/02 21:25:32 minakaji Exp $
10
# This file is part of Daredevil SKK.
12
# Daredevil SKK is free software; you can redistribute it and/or modify
13
# it under the terms of the GNU General Public License as published by
14
# the Free Software Foundation; either versions 2, or (at your option)
17
# Daredevil SKK is distributed in the hope that it will be useful
18
# but WITHOUT ANY WARRANTY; without even the implied warranty of
19
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
# GNU General Public License for more details.
22
# You should have received a copy of the GNU General Public License
23
# along with Daredevil SKK, see the file COPYING. If not, write to the
24
# Free Software Foundation Inc., 59 Temple Place - Suite 330, Boston,
28
# This file encoding should be Ja/EUC.
30
# ���Υ�����ץȤϡ�James William Breen �ˤ�� EDICT �� SKK-JISYO �ե���
31
# �ޥåȤ��Ѵ������ΤǤ����Ǥ������ä�����ϡ�SKK 10.x ���դ��Ƥ���
32
# skk-look.el ��Ȥ���ͭ�����ѤǤ���ΤǤϤʤ����ȹͤ��Ƥ��ޤ���
35
# ftp://ftp.u-aizu.ac.jp:/pub/SciEng/nihongo/ftp.cc.monash.edu.au/
38
# ���� edict �� edict2skk.awk �� SKK jisyo-tools �Υ��ޥ�ɤ�ȤäƲ�
41
# % jgawk -f edict2skk.awk edict | skkdic-sort > SKK-JISYO.E2J
43
# SKK-JISYO.E2J �λȤ����Ͽ����ͤ����ޤ�����
44
# % skkdic-expr SKK-JISYO.E2J + /usr/local/share/skk/SKK-JISYO.L | skkdic-sort > SKK-JISYO.L
45
# �ʤɤȤ��� SKK Large ����ȥޡ������ƻȤ��Τ���ñ�Ǥ���
47
# EDICT �ڤӤ��Υ��֥��å� (�ܥ�����ץȤˤ�� EDICT ��ȴ�褷����Τ�
48
# ���֥��åȤ�������Ǥ��礦) �ϡ�GPL �Ȥϰۤʤ����۾�郎�դ��Ƥ����
49
# �ǡ��ܺ٤ϡ�EDICT �ե��������Ƭ��ʬ�⤷���ϡ�EDICT ź�դ� edict.doc
54
print ";; okuri-ari entry";
55
# all entries are `okuri-nasi'.
56
print ";; okuri-nasi entry";
59
alt_yomi = 0; # initialize
60
# plural words that contain spaces cannot be yomi.
61
if (match($0, /\/[^ ][^ ]*\/$/) != 0) {
62
entries = substr($0, RSTART + 1, RLENGTH - 2);
63
num = split(entries, yomi, "/");
64
for (i = 1; i <= num; i++) {
65
gsub(/\"/, "", yomi[i]);
66
if (match(yomi[i], /\(-*[a-z]*[a-z]*-*\)/) != 0) {
67
head = substr(yomi[i], 1, RSTART - 1);
68
middle = substr(yomi[i], RSTART + 1 , RLENGTH - 2);
69
tail = substr(yomi[i], RSTART + RLENGTH);
71
gsub(/-/, "", middle);
72
if (((middle != "") ||
84
(match(middle, /.ed/) == 0) ) &&
85
(yomi[i] != head middle tail) ) {
86
alt_yomi = head middle tail;
87
gsub(/\"/, "", alt_yomi);
91
printf("%s /%s/\n", yomi[i], $1);
93
printf("%s /%s/\n", alt_yomi, $1);
96
printf("%s /%s/\n", yomi[i], $1);
101
# end of edict2skk.awk