DISYNO German Synonym-Dictionary, Thesaurus




In general:



DISYNO is the program that manages the binary synonym dictionary DSnn.BIN,
in which individual words are allocated to the corresponding synonyms (= other
words with similar meaning).

There is a data record in the synonym dictionary for each word (base entry).
The base entry appears at the beginning of the sentence, followed by a colon:
then the explanations, and appropriate synonyms (references), which are
separated by an underline character "_" .
Every data record is null-terminated.

German example of a data record:

Wortbildung: Wortschöpfung_Neubildung_Neuschöpfung_Nachbildung_
Kompositum_Zusammensetzung_Affix_Affixoid_Redewendung_Wort_Wortbedeutung_
nach dem Vorbild einer fremden Sprache=Lehnbildung_Lehnformung_
Lehnprägung_Lehnschöpfung_Lehnübersetzung_Lehnübertragung.



Character coding:

If DSCRnn file is available, user's keyboard code (ANSII, ISO, MAC, EBCDIC,
etc.) will be automatically adapted to the internal code of the synonym dic-
tionary.



Required files (nn = language no.)
DSnn.BIN    binary synonym dictionary. The 4-digit version no. is in
            start address + 12     (e.g.:   2.01)

DHCOnn      Action code table

DSCRnn      code adapter file (nn=  NN  or language-no. e.g.:  01)

These files must be stored in the path defined in global array dhpath[ ]" !



A) Use as C-source-code

for use with a text publishing program:


Calling the program

rc = DSYNO (ln, sbeg);


Explanation of parameters:
rc          -1 = search word in "sbeg" was not found.
ln          language no. 01 to 50.
sbeg        memory space for synonym search word input.

Attention:
The required terms are defined via the following statements:
#include    "dhext.h"
extern char  sbeg[];   /* space for search word                            */
extern int   ln;       /* language no.                                     */

ptr                    /* char pointer to data record found                */
afc                    /* int  index to search word in data record         */
rc                     /* int  return code                                 */

( *ptr, afc, rc )  are defined via  "dhext.h"  !


Before calling the DSYNO program the global variable afc must be defined as follows:
               Explanation:
afc = 0;       sbeg[ ]  contains search word  (0-terminated).

               or:

afc > 0;       sbeg[ ]  is undefined, but index  "afc"  points to a
                        search word in data record addressed by *ptr.

Programming example:
   :
   :
NEUSB:
   READSB(sbeg);             /* Read search word into array  "sbeg[]"      */
   afc = 0;                  /* set  afc = 0;  meaning:                    */
                             /* search word is in  "sbeg[]"                */
DSN:
   rc = DSYNO (ln, sbeg);    /* call subroutine   DSYNO.                   */
   if (rc == -1) goto NEUSB; /* If no synonym is found for this search word*/
                             /* read new search word into array  "sbeg[]"  */

   printf("%s", ptr);        /* display data record found.                 */
                             /* extern char *ptr  =pointer to data record. */

   SETAFC();                 /* User sets index afc to start of search word*/
   if (afc > 0)  goto DSN;   /* in data record.                            */
   else          goto NEUSB; /* Else new search word is read into "sbeg[]" */
   :
   :
Function READSB is only a sample name and does not exist in the program, but
instead must be developed depending on the requirements of the publishing system.
Function SETAFC is a DOS-sample controlling Cursor- and TAB-keys and must be
reprogrammed for other systems.

In test program DSTEST, function SETAFC, the user may set the cursor and thus the
index "afc" to the beginning of the next search word, e.g. by tab-key jumping to
next '_'respective word (a word preceded by _). The word thus selected (enter key)
then displays the appropriate data record etc.


Program integration:
DSTEST          main test program
DHKEY           DOS special keyboard codes
DMESSAGE        error messages

DSYNO           DISYNO subroutines:
DSDEMOD         dummy of demo version
DSCREP
DSLREAD
DMSCOD
DTSTIC
DTSTIC4
DHDEF           ( access to the values via:    #include "dhext.h" )
DHRCOF          ( reads action code table of language nn:  DHCOnn )
DHCFUNCT        ( C-functions and macros )

The first three programs (DSTEST, DHKEY, DMESSAGE) are to be used only for the
test program. Only the remaining nine programs, beginning with DSYNO, are needed
for a text publishing system.



B) Use as programm DSTEST.EXE



DSTEST.EXE is an executable program that demonstrates the use of the synonym
dictionary.

DSTEST is started from the command line from path \DISYNO\, in which all the
required files must be stored.
Therefore, first, please switch to the path by:
cd \disyno

Start of program:
DSTEST   nn   [l]
(nn =language-no., e.g. 01 =German)

The program now works as follows:
1.   You are requested to enter a search word.
     If the enter key is pressed first:                     end of program !

2.1  If the search word is not in the dictionary:           continue from 1.
2.2  If the search word is in the dictionary, the data
     record will be displayed on the screen.

3.   User now may place the cursor at the beginning of
     the search word within the data displayed ( e.g. by
     pressing the TAB-key the cursor jumps to the next
     _search word ).
     After pressing the enter key:                          continue from 2.
     If the escape key is pressed instead:                  continue from 1.

4.   With optional parameter "l" in the start line the
     synonyms will be displayed in lines (ending with _)
     rather than in a block. Using this mode no other
     choice is available to the user.  With enter key:      continue at 1.


Character coding:
If a DSCRnn file is available, the user's keyboard code (ANSII, MAC, EBCDIC,
etc.) will be automatically adapted to the internal code of the synonym dictionary.


Attention:
Demo version DSTESTD only accepts substantives as search words !




General information

Contact