/usr/share/cmigemo/tools/skk2migemo.pl is in cmigemo-common 1:1.2+gh0.20150404-2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | #!/usr/bin/perl
# vim:set ts=8 sts=4 sw=4 tw=0:
#
# conv.pl - Convert SKK-JISYO to migemo-dict
#
# Last Change: 16-May-2002.
# Written by: MURAOKA Taro <koron@tka.att.ne.jp>
binmode STDOUT;
while (<>)
{
chomp;
if (m/^;/)
{
print "$_\n";
next;
}
m/^([^ ]+) +(.*)$/;
my ($key, $value) = ($1, $2);
# Skip special key
next if $key =~ m/^[<>?]/ or $key =~ m/[<>?]$/;
# key have number expansion
my $have_number = ($key =~ m/#/) ? 1 : 0;
# Remove "okuri"
if ($key =~ m/[a-z]$/ and $key !~ m/^[ -~]+$/)
{
$key =~ s/.$//;
}
$value =~ s{^/}{};
$value =~ s{/$}{};
@values = grep {
# Remove lisp expressions.
$_ !~ m/^\([a-zA-Z].*\)$/;
} grep {
# Remove values have number expression
!$have_number || $_ !~ m/#/;
} map {
# Remove annotation
s/;.*$//; $_;
} split(/\//, $value);
# Output
if ($key ne '' and $#values >= 0)
{
print "$key\t" . join("\t", @values) . "\n";
}
}
|