1 Description of the Structure of the Data needed by MyThes
2 --------------------------------------------------------
4 MyThes is very simple. Almost all of the "smarts" are really
5 in the thesaurus data file itself.
7 The format for this file is at follows:
11 - line ending is a newline '\n' and not carriage return/linefeeds
13 - Line 1 is a character string that describes the encoding
14 used for the file. It is up to the calling program to convert
15 to and from this encoding if necessary.
17 ISO8859-1 is used by the th_en_US_new.dat file.
19 Strings currently recognized by OpenOffice.org are:
38 - All of the remaning lines of the file follow this structure
41 pos|syn1_mean|syn2|...
45 pos|mean_syn1|syn2|...
50 entry - all lowercase version of the word or phrase being described
51 num_mean - number of meanings for this entry
53 There is one meaning per line and each meaning is comprised of
55 pos - part of speech or other meaning specific description
56 syn1_mean - synonym 1 also used to describe the meaning itself
57 syn2 - synonym 2 for that meaning etc.
60 To make this even more clearer, here is actual data for the
64 (adj)|simple |elemental|ultimate|oversimplified|simplistic|simplex|simplified|unanalyzable|
65 undecomposable|uncomplicated|unsophisticated|easy|plain|unsubdivided
66 (adj)|elementary|uncomplicated|unproblematic|easy
68 (adj)|childlike|wide-eyed|dewy-eyed|naive |naif
69 (adj)|dim-witted|half-witted|simple-minded|retarded
70 (adj)|simple |unsubdivided|unlobed|smooth
72 (noun)|herb|herbaceous plant
73 (noun)|simpleton|person|individual|someone|somebody|mortal|human|soul
76 It says that "simple" has 9 different meanings and each
77 meaning will have its part of speech and at least 1 synonym
78 with other if presetn following on the same line.
82 Once you ahve created your own structured text file you can use
83 the perl program "th_gen_idx.pl" which can be found in this
84 directory to create an index file that is used to seek into
85 your data file by the MyThes code.
87 The correct way to run the perl program is as follows:
89 cat th_en_US_new.dat | ./th_gen_idx.pl > th_en_US_new.idx
93 Then if you head the resulting index file you should see the
115 Line 1 is the same encoding string taken from the
116 structured thesaurus data file.
118 Line 2 is a count of the total number of entries
121 All of the remaining lines are of the form
123 entry|byte_offset_into_data_file_where_entry_is_found
126 That's all there is too it.
130 kevin.hendricks@sympatico.ca