OK
AJAX error!

Les forumsThésaurusStructure du thésaurus

Structure du thésaurus

Bonjour à tous,

Je cherche à réaliser un dictionnaire en créole guadeloupéen et également le thésaurus. Le problème c'est que je me lance dans l'aventure sans trop m'y connaitre. Je suis sous Linux et je sais qu'il faut 2 fichiers, idx et dat. Le problème c'est que je ne trouve pas de documentation sur ces fichiers et leur structure.
Je cherche, sur ce forum, des orientations sur des liens ou des ouvrages pour m'aider à comprendre d'abord pour ensuite être capable de créer ce dictionnaire de synonyme.

Je vous remercie d'avance pour l'aide que vous pourriez m'apporter.

Jérôme.
le 31 mai 2011 à 08:54
Bonjour,

La structure du thésaurus est décrite dans le fichier data_layout.txt de l’archive MyThes.
sourceforge.net…

Comme c’est une question fréquente, je recopie ici ledit fichier :

Description of the Structure of the Data needed by MyThes


--------------------------------------------------------

MyThes is very simple. Almost all of the "smarts" are really
in the thesaurus data file itself.

The format for this file is at follows:

- no binary data

- line ending is a newline '\n' and not carriage return/linefeeds

- Line 1 is a character string that describes the encoding
used for the file. It is up to the calling program to convert
to and from this encoding if necessary.

ISO8859-1 is used by the th_en_US_new.dat file.

Strings currently recognized by OpenOffice.org are:

UTF-8
ISO8859-1
ISO8859-2
ISO8859-3
ISO8859-4
ISO8859-5
ISO8859-6
ISO8859-7
ISO8859-8
ISO8859-9
ISO8859-10
KOI8-R
CP-1251
ISO8859-14
ISCII-DEVANAGARI


- All of the remaning lines of the file follow this structure

entry|num_mean
pos|syn1_mean|syn2|...
.
.
.
pos|mean_syn1|syn2|...


where:

entry - all lowercase version of the word or phrase being described
num_mean - number of meanings for this entry

There is one meaning per line and each meaning is comprised of

pos - part of speech or other meaning specific description
syn1_mean - synonym 1 also used to describe the meaning itself
syn2 - synonym 2 for that meaning etc.


To make this even more clearer, here is actual data for the
entry "simple".

simple|9
(adj)|simple |elemental|ultimate|oversimplified|simplistic|simplex|simplified|unanalyzable|
undecomposable|uncomplicated|unsophisticated|easy|plain|unsubdivided
(adj)|elementary|uncomplicated|unproblematic|easy
(adj)|bare|mere|plain
(adj)|childlike|wide-eyed|dewy-eyed|naive |naif
(adj)|dim-witted|half-witted|simple-minded|retarded
(adj)|simple |unsubdivided|unlobed|smooth
(adj)|plain
(noun)|herb|herbaceous plant
(noun)|simpleton|person|individual|someone|somebody|mortal|human|soul


It says that "simple" has 9 different meanings and each
meaning will have its part of speech and at least 1 synonym
with other if presetn following on the same line.



Once you ahve created your own structured text file you can use
the perl program "th_gen_idx.pl" which can be found in this
directory to create an index file that is used to seek into
your data file by the MyThes code.

The correct way to run the perl program is as follows:

cat th_en_US_new.dat | ./th_gen_idx.pl > th_en_US_new.idx



Then if you head the resulting index file you should see the
following:

ISO8859-1
142689
'hood|10
's gravenhage|88
'tween|173
'tween decks|196
.22|231
.22 caliber|319
.22 calibre|365
.38 caliber|411
.38 calibre|457
.45 caliber|503
.45 calibre|549
0|595
1|666
1 chronicles|6283
1 esdras|6336


Line 1 is the same encoding string taken from the
structured thesaurus data file.

Line 2 is a count of the total number of entries
in your thesaurus.

All of the remaining lines are of the form

entry|byte_offset_into_data_file_where_entry_is_found


That's all there is too it.


Kevin
kevin.hendricks@sympatico.ca
le 31 mai 2011 à 09:12
Bonjour Admin,

Je tiens à vous remercie pour vos indication mais également votre réponse rapide.

Jérôme.
le 31 mai 2011 à 21:18

Notification par e-mail    0