HOWTO: write greek dictionary for SO 5.2

Panos Katsaloulis teras at writeme.com
Wed May 3 22:46:11 EEST 2000


Epeidh ypopsiazomai pws aytoi poy mporoyn na grapsoyn to addin snomparoyn to SO
kai aytoi poy den to snomparoyn adynatoyn na grapsoyn mia shared-library - opws
egw :( -  kanw copy & paste ti leei to help.
(kai as me sygxwrhsei o listman)

Makari na mporoysa na grapsw kati tetoio alla apo programmatismo shared
libraries exw plhrh mesanykta :( Symeiwteon pws anaferetai se DLL gia windows
an kai symfwna me to support database den yparxei diafora.)

Epishs sto support database anaferetai gia ena paradeigma plugin ston katalogo
Office5x/addin/source
Proypo9etei SO 5.0/5.1
Dystyxws h dikia moy egkatastash SO 5.1 exei ginei apo RPM ths SuSE kai den exei
ayta ta arxeia.. 

**********************

You are able to include an AddIn in StarOffice for linguistic, that is, an
external program module whose linguistic functions are used during your work
under StarOffice. If you would like to program such an AddIn yourself then this
section which functions need to be exported by the Shared Library of an
external linguistic so that theAddIn can be successfully included. 

StarOffice looks in your personal dictionary path (which has been set under
Tools - Options - General... - Paths - Dictionaries) for a subdirectory called
"AddIn" and searches this for an appropriate Shared Library. This Shared
Library can contain functions such as spellchecking, thesaurus and hyphenation
which are supported by StarOffice. 

The following contains a list of the functions which can be called up in an
external liguistic . This information enables you to program your own
linguistic AddIn for StarOffice. 


The functions of the user-defined linguistic DLL must adhere to the
Calling Convention _cdecl. 	


Options 
*********
Get_Version 	Provides the version number of the interface used with
StarOffice.
short int Get_Version() 
Return value is always 1, as long as the functions work according to the interface definition used here. 	

Available 	Returns a return value indicating which functionality is
supported (spellchecker, thesaurus, hyphenation) and if there is an options
dialog for special settings.
char Available() 
Return values: 
1 = Spellchecker 
2 = Thesaurus 
4 = Hyphenation 
8 = Options dialog available 
In combinations of multiple functions, the correct return value is formed in an OR link of the individual values, i.e. 7 if all functions are supported and 15 if there is also an options dialog. 	

OptionDlg 	Opens a dialog in which you can select settings relevant to the
external linguistic.
char OptionDlg(void* pParent) 
If present, the WindowHandler of the application is passed on under Windows. However, a zero pointer can be passed on; on other platforms this is always the case. 
Return values: 
0 = End of dialog by ESC 
1 = End of dialog by OK 	

SetLanguage 	Using this, you can set the desired language. Lookup is only
completed in the same language dictionaries and in the dictionaries designed
for all languages.
char SetLanguage(short int)
The desired language is passed on.
e.g.  0x0407 for German, 
0x0409 for English (US) 
0x0809 for English (UK) 
Return values: 
0 = Language not available 
1 = Language not set up 	
FreeAlloc 	Frees up memory allocated to e.g. SpellWord, LookUp, and Synonym. 	


Spellchecker 
**************
SpellQuick 	Is passed on using a string and returns TRUE if the word is
known, otherwise returns FALSE. 
char SpellQuick(char*) 
The word to be checked is passed on. 
Return values: 
0 = Unknown or incorrect word 
1 = Word is spelled correctly 	

SpellWord 	Like SpellQuick; for unknown words, it fills an additional list
with suggestions of words which could be meant.
char SpellWord(char*, char**) 
The word to be checked first is passed on. 
The second pointer points to a memory area. In this area, a char pointer is entered as a result which is pointing to a list of strings (suggestions) in the case of a misspelled word. (The Shared Library allocates the memory needed for this string and may not deallocate it until the next time the function is called. To deallocate, you can also call FreeAlloc explicitly.) A string with a length of 0 serves as an end marker. 
E.g.: "Haus\0Hans\0Hals\0Hais\0\0" as suggestions for "Haxs" 
Return values: 
0 = Unknown or incorrect word 
1 = Word is spelled correctly 	

AddWord 	Adds a word to the active personal dictionary. 
char AddWord(char*) 
The word is passed on which is to be added to the currently active dictionary. 
Return values: 
0 = Word could not be added 
1 = Word was added 	


Thesaurus 
***********

klp klp.
As doyme ti mporei na ginei mexri ekei kai blepoyme gia ta ypoloipa :)

-- 
Panos Katsaloulis <teras at writeme.com>
* Microsoft brought artificial intelligence to our desktop:
    Windows know exactly when is the worst time to crash -- and crash.

--
linux-greek-users mailing list -- http://lists.hellug.gr




More information about the Linux-greek-users mailing list