!1 skkdic: package init
Merge pull request !1 from daidai_is_here/dqw_test
This commit is contained in:
commit
678162bfb2
66
README-skkdic.rh.ja
Normal file
66
README-skkdic.rh.ja
Normal file
@ -0,0 +1,66 @@
|
||||
## -*- text -*-
|
||||
##
|
||||
## README file for skkdic
|
||||
## by SATO Satoru <ssato@redhat.com>
|
||||
##
|
||||
|
||||
|
||||
このファイルはパッケージ skkdic に含まれる各辞書について簡単に
|
||||
説明するものです。各辞書の詳細については、その本体および、
|
||||
OpenLab SKKプロジェクトの辞書についての説明のページ
|
||||
(http://openlab.ring.gr.jp/skk/dic-ja.html)を参照して下さい。
|
||||
|
||||
|
||||
SKK-JISYO.S, SKK-JISYO.M, SKK-JISYO.ML, SKK-JISYO.L:
|
||||
|
||||
SKKのための最も基本的な辞書です。S、M、L は辞書の大きさを表しますが、
|
||||
このパッケージに含まれているのは一番大きな SKK-JISYO.L だけです。
|
||||
|
||||
SKK-JISYO.JIS2:
|
||||
|
||||
JIS 第二水準の文字だけが収録されています。
|
||||
|
||||
SKK-JISYO.wrong:
|
||||
|
||||
以下前述のページより引用します。
|
||||
|
||||
=begin
|
||||
SKK-JISYO.{SML} に間違えて含まれていたエントリを抽出したものです。このファイル
|
||||
は SKK-JISYO.{SML} に再び誤ったエントリが含まれないようにするための指標であり、
|
||||
また、個人辞書から誤ったエントリを削除するためのファイルでもあります。
|
||||
|
||||
CVS 管理により作成されるファイルは、SKK-JISYO.wrong.annotated というファイルで
|
||||
す。このファイルに何が間違いなのかについての註釈付きで作成されます。このファイ
|
||||
ルを元に、openlab.ring.gr.jp により自動的に註釈が除かれて SKK-JISYO.wrong が作
|
||||
成されます。
|
||||
|
||||
個人辞書から誤ったエントリを取り除くには次のようにすれば良いでしょう。
|
||||
|
||||
% skkdic-expr ~/.skk-jisyo - SKK-JISYO.wrong | skkdic-sort - >.skk-jisyo
|
||||
|
||||
=end
|
||||
|
||||
|
||||
SKK-JISYO.geo:
|
||||
SKK-JISYO.zipcode, SKK-JISYO.office.zipcode:
|
||||
|
||||
郵政事業庁(旧郵政省)が使用、再配布、加工、移植、改良に制限を設けずに配布し
|
||||
ている、地名データ、郵便番号辞書をOpenLabの方々が SKK辞書形式に加工し、GPL
|
||||
を適用して配布しているものです。詳細についてはこのディレクトリ下のサブディ
|
||||
レクトリ zipcode/ の中にある README ファイルを参照して下さい。
|
||||
|
||||
.zipcode は 7 桁郵便番号辞書、.office.zipcode は事業所郵便番号辞書となって
|
||||
います。
|
||||
|
||||
|
||||
SKK-JISYO.okinawa:
|
||||
|
||||
沖縄辞書プロジェクトが作成、メンテナンスしている沖縄辞書を SKK 辞書形式に
|
||||
変換したものです。
|
||||
|
||||
|
||||
SKK-JISYO.law:
|
||||
|
||||
弁護士 小松 弘氏が開発なさっていて GPL で配布されている法律辞書
|
||||
"法律用語電子化辞書 LKKS"(http://home2.highway.ne.jp/sui_feng/kks/) が
|
||||
SKK 辞書形式に変換されたものです。
|
||||
14
create-skkdic-source.sh
Normal file
14
create-skkdic-source.sh
Normal file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
DATE=$(date '+%Y%m%d')
|
||||
TIME=$(date '+%H%M')
|
||||
|
||||
mkdir -p skkdic-$DATE
|
||||
cd skkdic-$DATE
|
||||
wget -N -r -nH -np --cut-dirs=3 \
|
||||
-R 'index.html*' \
|
||||
-R '*.gz' -R '*.gz.md5' \
|
||||
http://openlab.ring.gr.jp/skk/skk/dic/
|
||||
rm -rf robots.txt
|
||||
cd .. && tar cvfj skkdic-${DATE}T${TIME}.tar.bz2 skkdic-$DATE
|
||||
|
||||
BIN
skkdic-20181016T1609.tar.bz2
Normal file
BIN
skkdic-20181016T1609.tar.bz2
Normal file
Binary file not shown.
50
skkdic.spec
Normal file
50
skkdic.spec
Normal file
@ -0,0 +1,50 @@
|
||||
%undefine _changelog_trimtime
|
||||
|
||||
Name: skkdic
|
||||
Version: 20181016
|
||||
Release: 2
|
||||
Summary: Standard dictionary file for SKK
|
||||
License: GPLv2+
|
||||
URL: http://openlab.ring.gr.jp/skk/skk/dic/
|
||||
Source0: skkdic-20181016T1609.tar.bz2
|
||||
Source1: http://openlab.ring.gr.jp/skk/skk/tools/unannotation.awk
|
||||
Source2: create-skkdic-source.sh
|
||||
Source3: README-skkdic.rh.ja
|
||||
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
This package provides `SKK-JISYO', the standard dictionary file for SKK Japanese input systems.
|
||||
Currently, this package contains the large size dictionary file `SKK-JISYO.L' as the standard dictionary file.
|
||||
For faster access, install the skkdic-cdb package which provides the constant database (cdb) file of this dictionary.
|
||||
Other dictionary files, such as zipcode, personal names, small size, are provided by the skkdic-extra package.
|
||||
To merge or edit dictionaries, install the skktools package. To use dictionaries more conveniently,
|
||||
several SKK dictionary servers are available, such as dbskkd-cdb and skksearch.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{name}-%{version} -p1
|
||||
|
||||
install -p %{SOURCE1} ./
|
||||
install -p %{SOURCE3} ./
|
||||
|
||||
mv zipcode/README.ja zipcode/README-zipcode.ja
|
||||
|
||||
%build
|
||||
%make_build SKK-JISYO.L.unannotated TOOLS_DIR=.
|
||||
%make_build SKK-JISYO.wrong TOOLS_DIR=.
|
||||
|
||||
%install
|
||||
install -d $RPM_BUILD_ROOT%{_datadir}/skk
|
||||
|
||||
install -p -m 644 SKK-JISYO* $RPM_BUILD_ROOT%{_datadir}/skk
|
||||
install -p -m 644 zipcode/SKK-JISYO* $RPM_BUILD_ROOT%{_datadir}/skk
|
||||
|
||||
gzip -9 ChangeLog
|
||||
|
||||
%files
|
||||
%doc ChangeLog.gz README-skkdic.rh.ja READMEs/committers.txt edict_doc.txt zipcode/README-zipcode.ja
|
||||
%{_datadir}/skk/
|
||||
|
||||
%changelog
|
||||
* Thu Dec 12 2019 daiqianwen <daiqianwen@huawei.com> - 20181016-2
|
||||
- Package init
|
||||
75
unannotation.awk
Normal file
75
unannotation.awk
Normal file
@ -0,0 +1,75 @@
|
||||
# unannotation.awk: filter to remove annotations in dictionaries.
|
||||
#
|
||||
# Copyright (C) 2001, 2002 SKK Development Team <skk@ring.gr.jp>
|
||||
#
|
||||
# Maintainer: SKK Development Team <skk@ring.gr.jp>
|
||||
# Version: $Id: unannotation.awk,v 1.3 2006/01/04 10:35:06 skk-cvs Exp $
|
||||
# Last Modified: $Date: 2006/01/04 10:35:06 $
|
||||
#
|
||||
# This file is part of Daredevil SKK.
|
||||
#
|
||||
# Daredevil SKK 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 2, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# Daredevil SKK 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 Daredevil SKK, see the file COPYING. If not, write to
|
||||
# the Free Software Foundation Inc., 51 Franklin St, Fifth Floor,
|
||||
# Boston, MA 02110-1301, USA.
|
||||
|
||||
BEGIN{
|
||||
print ";; -*- text -*-";
|
||||
ctime = myctime(0);
|
||||
this = ARGV[1];
|
||||
if (match(this, "\.annotated$") != 0){
|
||||
this = substr(this, 1, RSTART - 1);
|
||||
} else
|
||||
this = this ".unannotated";
|
||||
printf(";; %s was generated automatically by unannotation.awk at %s\n",
|
||||
this, ctime);
|
||||
#getline modeindicator
|
||||
#if (match(modeindicator, /;; -*- text -*-/) != 0){
|
||||
# print modeindicator;
|
||||
#}
|
||||
}
|
||||
#$0 !~ /"^;; -\*- text -\*-\n"/{
|
||||
{
|
||||
if (match($0, /^;/) == 0) {
|
||||
gsub(";[^/]*/", "/");
|
||||
if (DEQUOTE && $0 ~ /\\073/) {
|
||||
$0 = dequote($0);
|
||||
}
|
||||
}
|
||||
print;
|
||||
}
|
||||
function myctime(ts, format) {
|
||||
format = "%a %b %e %H:%M:%S %Y";
|
||||
if (ts == 0)
|
||||
ts = systime(); # use current time as default
|
||||
return strftime(format, ts);
|
||||
}
|
||||
# convert '\073' to ';' and strip '(concat "...")'.
|
||||
# example: 'smile /(concat "^_^\073\073")/:-)/' to 'smile /^_^;;/:-)/'
|
||||
# @param s string to convert
|
||||
# @return converted string
|
||||
function dequote(s) {
|
||||
ret = "";
|
||||
n = split(s, a, "/");
|
||||
for (i = 1; i < n; i++) {
|
||||
if (a[i] ~ /^\(concat ".*\\073.*"\)$/) { # \073 = ';'
|
||||
gsub(/\\073/, ";", a[i]);
|
||||
if (a[i] !~ /\\/) { # no other quote
|
||||
a[i] = gensub(/^\(concat "(.*)"\)$/, "\\1", "g", a[i]);
|
||||
}
|
||||
}
|
||||
ret = ret a[i] "/";
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
# end of unannotation.awk.
|
||||
Loading…
x
Reference in New Issue
Block a user