~ubuntu-branches/ubuntu/trusty/skktools/trusty-proposed

« back to all changes in this revision

Viewing changes to convert2skk/alpha-kana.pl

  • Committer: Bazaar Package Importer
  • Author(s): Takao KAWAMURA
  • Date: 2001-06-16 23:31:56 UTC
  • Revision ID: james.westby@ubuntu.com-20010616233156-zhpogneqxji6sv2y
Tags: upstream-1.0
Import upstream version 1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/usr/local/bin/jperl -Pw
 
2
 
 
3
# SKK�̎�������A
 
4
#   ���o�����A���t�@�x�b�g�ŁA�\�L���J�^�J�i�A
 
5
# �ł���G���g����T���A
 
6
#   ���o�����J�^�J�i�ŁA�\�L���J�^�J�i�A
 
7
# �ɕϊ����A�\������B
 
8
#
 
9
# written by nmaeda@SANSEIDO Printing Co.,Ltd. (Aug/1994)
 
10
 
 
11
open(handle, "| sort | uniq") || die "can't open pipe\n";
 
12
 
 
13
while(<>)       {
 
14
        chop;
 
15
 
 
16
        # �\�L���J�^�J�i(�����Ƃ̕�����ł͂Ȃ�)
 
17
        if(/^([a-zA-Z]+) .*\/([�@-��][�@-���[�E]+)\//)  {
 
18
                $alpha_read=$1;
 
19
 
 
20
                $count=0;
 
21
                while($_=~/\/([�@-��][�@-���[�E]+)\//)  {
 
22
                        $face=$1;
 
23
                        $kana_read=$face;
 
24
                        $kana_read=~s/�E//g;    # �ǂ݂���'�E'���폜
 
25
                        $kana_read=~tr/�@-��/��-��/;    # �ǂ݂��Ђ炪�Ȃ�
 
26
                        if($kana_read=~/[�@-��]/)       {
 
27
                                $_=$';
 
28
                                next;   # ��-�����ӂ��ރG���g���͍폜
 
29
                        }
 
30
                        printf(handle "%s /%s/\n", $kana_read, $face);
 
31
                        $_=$';
 
32
                        $count++;
 
33
                }
 
34
                printf(STDERR "%d %-50s\r", $count, $alpha_read);
 
35
        }       
 
36
}
 
37
 
 
38
close(handle);