mirror: 初始快照
This commit is contained in:
commit
bf87c99809
1011 files changed
+18247530
No files matched your search
@@ -0,0 +1,27 @@
|
||||
FREEDICT_TOOLS ?= ../../tools
|
||||
DISTFILES = Makefile ChangeLog README SZOTAR.ZIP \
|
||||
hun-eng.tei.header szotar-dbf2tei.pl
|
||||
supported_phonetics =
|
||||
include $(FREEDICT_TOOLS)/mk/dicts.mk
|
||||
|
||||
dbview_in_path := $(shell which dbview 2>/dev/null)
|
||||
|
||||
hun-eng.tei: hun-eng.tei.header SZOTAR.DBF szotar-dbf2tei.pl
|
||||
ifeq ($(dbview_in_path),)
|
||||
@echo "To get the data out of the dBase database, we require the tool"
|
||||
@echo "\`dbview' from Martin Schulze aka Joey."
|
||||
@echo "Try to get it from http://packages.debian.org/stable/misc/dbview"
|
||||
@false
|
||||
else
|
||||
cp $< $@
|
||||
./szotar-dbf2tei.pl >> $@
|
||||
sed -i 's/ô/ő/g; s/û/ű/g;' $@
|
||||
endif
|
||||
|
||||
SZOTAR.DBF: SZOTAR.ZIP
|
||||
unzip $< $@
|
||||
touch $@
|
||||
|
||||
clean::
|
||||
rm -f SZOTAR.DBF hun-eng.tei tmp.tei
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
Copyright (C) 1999 Vony Attila and Bui Pol
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
|
||||
The original version of this file is from 13/Nov/1999,
|
||||
made by Vony Attila and Bui Pol.
|
||||
Home: http://almos.vein.hu/~vonyoa
|
||||
(mindenkori legteljesebb v#ltozat)
|
||||
|
||||
To extract the data from the DBase3-File, the
|
||||
dbview tool from Martin Schulze is required (package
|
||||
dbview in SuSE). Since the (nowhere indicated)
|
||||
source encoding is MSDOS Codepage 437, iconv is
|
||||
required to convert it into ISO-8859-1.
|
||||
|
||||
DOSEMU worked nicely for me. You can run the original
|
||||
dictionary application in it :) Under DOS I could also
|
||||
unzip the help.DBF file, which the linux UnZip 5.50 program
|
||||
cannot extract for lack of support of the compression mechanism.
|
||||
|
||||
Michael Bunk <micha@luetzschena.de>
|
||||
|
||||
|
||||
The following is the complete README of the source package:
|
||||
-----------------------------------------------------------
|
||||
|
||||
English version is at the end of this file.
|
||||
|
||||
Tisztelt felhasznalo!
|
||||
Ha ezt a file-t olvasod, az azt jelenti, hogy sikeresen letoltotted
|
||||
es kicsomagoltad a szotarat. Gratulalok.
|
||||
Nagyon fontos, hogy a dict.exe kereso elinditasa utan a megjeleno menukbol
|
||||
legeloszor a "maintenance" pontot valaszd. Ekkor a program eloallitja az
|
||||
index allomanyokat, ami nelkul a szotar hasznalhatatlan.
|
||||
Nehany tudnivalo a szotarrol:
|
||||
1. A szotar a szavak mellett kifejezeseket es peldamondatokat is tartalmaz.
|
||||
Az igek illetve az igekent hasznalt kifejezesek angol formaja a "to"
|
||||
prepozicioval szerepelnek a szotarban. Ennek oka hosszu tortenettel
|
||||
magyarazhato, igy inkabb hagyjuk. Rendhagyo igek eseteben az ige masodik
|
||||
es harmadik alakja is megtalalhato a szotarban az elsotol vesszovel
|
||||
elvalasztva.
|
||||
2. Nehany fonevnel, ahol azt az erthetoseg megengedte, elhagytam a nevelot.
|
||||
3. Nagybetuk nem szerepelnek a szotarban. Ugyancsak a benne szereplo keves
|
||||
- az angolban gyakran hasznalt - francia kifejezes eseteben kenytelen
|
||||
voltam a francia karaktereket magyar betukkel helyettesiteni.
|
||||
4. A szotar adatbazisat cwi.com segitsegevel eloallitott magyar karakter-
|
||||
keszlettel toltogetem. Mivel ennek terjesztese szerzoi jogokat sertene,
|
||||
vagy be kell szerezned ezt a file-t, vagy az adatbazist atalakitani a
|
||||
sajat igenyeid szerint. Ehhez kerd a legkozelebbi szamitogepes szakember
|
||||
segitseget.
|
||||
|
||||
Dear user,
|
||||
If you are reading this file that means that you have successfully downloaded
|
||||
and unzipped the dictionary. Congratulations.
|
||||
It is very important that after starting the dict.exe file you should chose
|
||||
the "maintenance" point from the appearing menu box. Then the program will
|
||||
generate the index files, without them the dictionary can not be used.
|
||||
Some info about the dictionary:
|
||||
1. Beside simple words, the dictionary also contains expressions and sample
|
||||
sentences, too. The English version of the verbs and the expressions that
|
||||
can be used as verbs are typed in with the "to" preposition. The cause of
|
||||
it can be explained only with a fairly long story so let us skip it. In
|
||||
case of irregular verbs, the second and third forms of the verb are also
|
||||
included, separated from the first form of the verb by commas.
|
||||
2. In case of some nouns I have omitted the pronoun where the
|
||||
comprehensibility have allowed this trick.
|
||||
3. There are no capital letters in the dictionary. Also, in case of the few
|
||||
French expressions that are used in English language quite frequently,
|
||||
I had to substitute the French characters with Hungarian letters.
|
||||
4. I am filling the dbf file of the dictionary with a Hungarian character set
|
||||
that is generated by the help of cwi.com. Since the distribution of this
|
||||
file would hurt copyright laws, either you have to get this file legally,
|
||||
or modify the dbf file according to your own needs. For doing this,
|
||||
please ask for the help of some nearby computer expert.
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,77 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?xml-model href="freedict-P5.rng" type="application/xml" schematypens="http://relaxng.org/ns/structure/1.0"?>
|
||||
<TEI xmlns="http://www.tei-c.org/ns/1.0">
|
||||
<teiHeader xml:lang="en">
|
||||
<fileDesc>
|
||||
<titleStmt>
|
||||
<title>Hungarian-English FreeDict Dictionary</title>
|
||||
<respStmt>
|
||||
<resp>Author</resp>
|
||||
<name>Vony Attila <vonyoa@almos.vein.hu></name>
|
||||
</respStmt>
|
||||
</titleStmt>
|
||||
<editionStmt>
|
||||
<edition>0.3.1</edition>
|
||||
</editionStmt>
|
||||
<extent>139 935 headwords</extent>
|
||||
<publicationStmt>
|
||||
<publisher>FreeDict</publisher>
|
||||
<availability status="free">
|
||||
<p>Copyright (C) 1999 Vony Attila and Bui Pol</p>
|
||||
<p>GNU GENERAL PUBLIC LICENSE</p>
|
||||
</availability>
|
||||
<date when="2014-09-14">14 September 2014</date>
|
||||
<pubPlace>http://freedict.org/</pubPlace>
|
||||
<idno type="svn">$Id$</idno>
|
||||
</publicationStmt>
|
||||
<notesStmt>
|
||||
<note type="status">stable</note>
|
||||
</notesStmt>
|
||||
<sourceDesc>
|
||||
<p>The original version of this file is from 13/Nov/1999,
|
||||
made by Vony Attila and Bui Pol.
|
||||
Home: <ptr target="http://almos.vein.hu/~vonyoa"/>
|
||||
(mindenkori legteljesebb v#ltozat)</p>
|
||||
</sourceDesc>
|
||||
</fileDesc>
|
||||
<encodingDesc>
|
||||
<projectDesc>
|
||||
<p>This dictionary comes to you through nice people making it
|
||||
available for free and for good. It is part of the FreeDict project,
|
||||
http://www.freedict.org / http://freedict.de. This
|
||||
project aims to make available many translating dictionaries
|
||||
for free. Your contributions are welcome!</p>
|
||||
</projectDesc>
|
||||
</encodingDesc>
|
||||
<revisionDesc>
|
||||
<change when="2014-09-14">
|
||||
<name>Michael Bunk</name>
|
||||
Attempt to fix Debian #759952: FTBFS: hun-eng.tei:69: parser error : Premature end of data in tag body line 67
|
||||
Debian sbuild runs a parallel make, which seems to cause the "fails to build". hun-eng.tei.header is 71 lines long, similar to the parser error in line 69. Previously, the Makefile target for hun-eng.tei created the destination file in several steps, using the target name from the beginning. Now two temporary files are created and hun-eng.tei is used only for the final step. Hopefully this will sbuild/parallel make use hun-eng.tei for building hun-eng.c5 only after hun-eng.tei is ready.
|
||||
See also https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759952
|
||||
</change>
|
||||
<change when="2014-02-16">
|
||||
<name>Michael Bunk</name>
|
||||
Converted converter from P4 to P5
|
||||
</change>
|
||||
<change when="2005-03-07">
|
||||
<name>Michael Bunk</name>
|
||||
Reimport from source. There are now almost 3000 entries
|
||||
more, don't know why. Fixes Bug #920855 (Index and dict file
|
||||
for Hungarian-English dictionary is bad), which included an
|
||||
encoding problem and missing spaces, besides an incorrectly
|
||||
sorted .index file for dictd.
|
||||
</change>
|
||||
<change when="2004-12-29">
|
||||
<name>Michael Bunk</name>
|
||||
Converted TEI file from P3 to P4
|
||||
</change>
|
||||
<change when="2000-11-06">
|
||||
<name>Horst Eyermann</name>
|
||||
Import from source
|
||||
</change>
|
||||
</revisionDesc>
|
||||
</teiHeader>
|
||||
<text>
|
||||
<body>
|
||||
|
||||
@@ -0,0 +1,207 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
use warnings;
|
||||
use strict;
|
||||
use Getopt::Long;
|
||||
use Pod::Usage;
|
||||
|
||||
my $revision='$Revision$';
|
||||
my $verbose = 0;
|
||||
my $reverse = 0;
|
||||
my $help;
|
||||
GetOptions(
|
||||
"verbose+" => \$verbose,
|
||||
"help|?" => \$help,
|
||||
"reverse" => \$reverse) or exit 1;
|
||||
|
||||
pod2usage(-exitval => 1, -verbose => 2) if $help;
|
||||
|
||||
if ($verbose)
|
||||
{
|
||||
print STDERR "Revision: $revision\n",
|
||||
"Some info about the dbase file:\n",
|
||||
`dbview -ieo SZOTAR.DBF` or die $!,
|
||||
"Mode: ", $reverse ? 'eng-hun' : 'hun-eng', "\n"
|
||||
}
|
||||
|
||||
my $cmd = 'dbview SZOTAR.DBF | iconv -f cp437 -t utf8';
|
||||
open(DB, "$cmd|") or die "Can't do '$cmd': $!";
|
||||
|
||||
# the first two entries look like
|
||||
# (i found out the encoding after fetching the exmaple only):
|
||||
#Angol : to be taken aback
|
||||
#Magyar : meg van lepve
|
||||
#
|
||||
#Angol : to abase
|
||||
#Magyar : megal z
|
||||
#
|
||||
|
||||
$| = 1;# no STDOUT buffering
|
||||
my $n = 0;
|
||||
my $eng = '';
|
||||
my $hun = '';
|
||||
my $state = 0;
|
||||
my %dict = ();
|
||||
my $entry;
|
||||
|
||||
while(<DB>)
|
||||
{
|
||||
if($state==0)
|
||||
{
|
||||
if(/^Angol : (.*)$/)
|
||||
{ $eng = $1; $state = 1; next }
|
||||
die "$.: Couldn't recognize English headword in '$_'"
|
||||
}
|
||||
|
||||
if($state==1)
|
||||
{
|
||||
if(/^Magyar : (.*)$/)
|
||||
{ $hun = $1; $state = 2; next }
|
||||
die "$.: Couldn't recognize Hungarian translation in '$_'"
|
||||
}
|
||||
|
||||
if($state==2)
|
||||
{
|
||||
if(/^$/)
|
||||
{
|
||||
$n++;
|
||||
print STDERR "\rLine $., $n records" if $n % 1000 == 0;
|
||||
|
||||
# trim trailing spaces
|
||||
$eng =~ s/\s*$//;
|
||||
$hun =~ s/\s*$//;
|
||||
|
||||
# XXX escape default entities: currently not required,
|
||||
# `make validation' succeeds anyway
|
||||
|
||||
# save record in a hash, grouping headwords together
|
||||
if($reverse)
|
||||
{
|
||||
if(exists $dict{$eng}) { $entry = $dict{$eng} }
|
||||
else
|
||||
{
|
||||
# use hashes to save the Hungarian translations,
|
||||
# so we can easily check for double records
|
||||
$entry = {}
|
||||
}
|
||||
|
||||
if($entry->{$hun})
|
||||
{ print STDERR "\rDouble definition: hun='$hun' eng='$eng'\n" }
|
||||
else
|
||||
{
|
||||
# save translation
|
||||
$entry->{$hun} = 1;
|
||||
$dict{$eng} = $entry
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(exists $dict{$hun}) { $entry = $dict{$hun} }
|
||||
else
|
||||
{
|
||||
# use hashes to save the English translations,
|
||||
# so we can easily check for double records
|
||||
$entry = {}
|
||||
}
|
||||
|
||||
if($entry->{$eng})
|
||||
{ print STDERR "\rDouble definition: hun='$hun' eng='$eng'\n" }
|
||||
else
|
||||
{
|
||||
# save translation
|
||||
$entry->{$eng} = 1;
|
||||
$dict{$hun} = $entry
|
||||
}
|
||||
}
|
||||
|
||||
# get ready for next entry
|
||||
$state = 0; $eng = ''; $hun = ''; next
|
||||
}
|
||||
die "$.: Couldn't recognize empty line between entries in '$_'";
|
||||
}
|
||||
|
||||
die "Unknown state: $state"
|
||||
} # while
|
||||
|
||||
print STDERR "\nWriting entries to TEI file...\n" if $verbose;
|
||||
my $entries = 0;
|
||||
foreach(sort keys %dict)
|
||||
{
|
||||
$entries++;
|
||||
print STDERR "\r$entries entries" if $entries % 1000 == 0 and $verbose;
|
||||
|
||||
# output entry to TEI file
|
||||
print "<entry>\n";
|
||||
# XXX if eng headword starts with 'to ' -> markup as verb
|
||||
print " <form><orth>$_</orth></form>\n";
|
||||
|
||||
$entry = $dict{$_};
|
||||
#print scalar %$entry , " ";
|
||||
foreach my $t (keys %$entry)
|
||||
{
|
||||
# We put all translation equivalents of all eventual homographs into
|
||||
# separate senses of a single entry. This compromise we have to do,
|
||||
# because we do not have information on part of speech (to separate
|
||||
# homographs) or translation equivalents (to join senses). Luckily, only
|
||||
# 1590 + 30 entries are affected for hun-eng:
|
||||
#
|
||||
# # of headwords | # of definitions found
|
||||
# ---------------------------------------
|
||||
# 0 | 0
|
||||
# 138323 | 1
|
||||
# 1590 | 2
|
||||
# 30 | 3
|
||||
|
||||
print " <sense><cit type=\"trans\"><quote>$t</quote></cit></sense>\n";
|
||||
}
|
||||
|
||||
print "</entry>\n";
|
||||
}
|
||||
|
||||
print "</body></text></TEI>\n";
|
||||
|
||||
print STDERR "\nFinished.\nLines: $. Records: $n Entries: $entries\n\n"
|
||||
if $verbose;
|
||||
|
||||
__END__
|
||||
|
||||
=head1 NAME
|
||||
|
||||
szotar-dbf2tei.pl - Convert the "Szotar" Hungarian-English dictionary to TEI P5
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
szotar-dbf2tei.pl [options]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Converts the Szotar database in SZOTAR.DBF into TEI XML format on STDOUT.
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
=over 8
|
||||
|
||||
=item B<--help>
|
||||
|
||||
Print this manual page and exit.
|
||||
|
||||
=item B<--reverse>
|
||||
|
||||
Output as eng-hun dictionary. Without this option, the database is printed as
|
||||
hun-eng dictionary.
|
||||
|
||||
=item B<--verbose>
|
||||
|
||||
Tell what I'm doing and print warnings. Can be given twice for more verbosity.
|
||||
Messages are printed to STDERR.
|
||||
|
||||
=back
|
||||
|
||||
=head1 AUTHOR AND LICENCE
|
||||
|
||||
Author: Michael Bunk, 2006, 2014
|
||||
|
||||
This is free software, licensed under the GPL.
|
||||
|
||||
=cut
|
||||
|
||||
Reference in new issue
Block a user