CN101303644A - Brahma-sutra Tibetan input method based on Windows OS and Linux OS - Google Patents

Brahma-sutra Tibetan input method based on Windows OS and Linux OS Download PDF

Info

Publication number
CN101303644A
CN101303644A CNA2007100977825A CN200710097782A CN101303644A CN 101303644 A CN101303644 A CN 101303644A CN A2007100977825 A CNA2007100977825 A CN A2007100977825A CN 200710097782 A CN200710097782 A CN 200710097782A CN 101303644 A CN101303644 A CN 101303644A
Authority
CN
China
Prior art keywords
linux
windows
tibetan
input method
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CNA2007100977825A
Other languages
Chinese (zh)
Inventor
于洪志
马宁
戴玉刚
曹晖
赵颖
何向真
窦嵘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Northwest Minzu University
Original Assignee
Northwest Minzu University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Northwest Minzu University filed Critical Northwest Minzu University
Priority to CNA2007100977825A priority Critical patent/CN101303644A/en
Publication of CN101303644A publication Critical patent/CN101303644A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a Sanskrit sound Tibetan input method based on Windows OS and Linux OS, which belongs to the field of Chinese information. The codes of the existing Tibetan input method cover the basic set and the expanded set A of the Tibetan code characters which include 1730 characters. The method realizes input Sanskrit sound Tibetan by spanning Windows and Linux operation system platforms and defines a cross platform concept and an input method interface module concept. Under the Windows OS, the document of the input method is a DDL procedure; under the Linux OS and X-Window systems, the difference between the Windows OS and the Linux OS is analyzed on an input server by following an XIM protocol; the unified interface module of the cross platform Sanskrit sound Tibetan input method is realized by adopting software transplanting, a third party VMware tools Wine and the OSAL. The method supports the information processing of ancient books in Tibetan.

Description

Brahma-sutra Tibetan input method based on Windows OS and Linux OS
(1) technical field
Brahma-sutra Tibetan input method based on Windows OS and Linux OS belongs to Chinese message area.
(2) background technology
The research work of domestic Tibetan language information processing is started in the last century beginning of the eighties, and the history of two more than ten years is arranged.Tibetan input method has obtained significant progress during this, obtained many achievements.The same with the input method of other literal, Tibetan language word input computing machine there is multiple mode.Generally be divided into keyboard input and non-keyboard input two big classes.
The keyboard input utilizes keyboard exactly, comes a kind of method of input characters according to certain coding rule.Concerning English input, because English alphabet has only 26,26 letters on their corresponding respectively keyboards, so, for English, be not have what input method.Chinese character is imported, Chinese character is a pictograph, with keyboard without any corresponding relation, but in order in computing machine, to import Chinese character, we must split into Chinese character littler parts, and button on these parts and the keyboard is produced certain get in touch, could pass through keyboard certain rule input Chinese character on time, encode Chinese characters for computer that Here it is.Though the Tibetan language word belongs to alphabetic writing, it is similar with Chinese characters when input in computing machine, at first also will encode by certain rule to the Tibetan language word, produces with keyboard and gets in touch, and then be input in the computing machine.At present common coded system is also of a great variety unlike the Chinese character input, mainly contains position input, spelling input, latin transliteration, phoneme input method of ancient India etc.
With regard to the Tibetan language keyboard and input method, the Tibetan input method of a maturation should equally with very ripe Hanzi keyboard input experience individual character input, phrase input, phrase association input three phases.Tibetan language input is in subordinate phase, can realize the phrase input but also is not very perfect, reaches input method as Tibetan language class intelligence.The time of phrase association input can the reduction significantly Tibetan language input computing machine, but also do not have Tibetan input method support association at present.
From operating system and the application software that Tibetan input method is supported, Tibetan input method can not only be supported a certain operating system, and it should be that support is multi-platform.Tibetan input method has experienced support DOS, Windows, Linux and Windows three phases.
Input, demonstration, composing and the printing etc. of Tibetan language under DOS have been realized in the DOS epoch.Representative works have Founder Tibetan language system and blue extra large Tibetan language system (supporting WPS) etc.But along with the release of the Windows of Microsoft company windows system, the vast user DOS system of having faded out gradually, the Tibetan language information worker adapts to the development of this situation, has realized input, demonstration, composing and the printing etc. of Tibetan language under windows platform.With first Tibetan language Word, it supports the visual application software of all windows platforms basically.Input, demonstration, composing and the printing etc. of Tibetan language under Linux have been realized subsequently again.As 863 Program " native language version (SuSE) Linux OS and office suite research and development ".Input, demonstration, the composing of the Tibetan language of in this project, realizing under Linux.
The non-keyboard input is not pass through keyboard by mode method for inputting characters with great such as hand-written, dictation, read-writes.For user's its feature is simple, but all needs specific installation.The non-keyboard input is divided into following several types: handwriting recognition, speech recognition, OCR scan reader.
Tibetan input method mainly is at modern Tibetan at present, when ancient Tibetan books document digitized processing, need obtain the support of Brahma-sutra Tibetan.The Brahma-sutra Tibetan input method of domestic development is less, mainly realizes under windows platform.
(3) summary of the invention
Windows OS and Linux OS be two kinds similar but have the operating system of different system characteristic, Application development environ-ment and system running environment.Different hardware platforms and the different operating system difference at aspects such as core mechanism, implementation, user interfaces has caused the internal mechanism of particular platform application system to exist than big-difference.And for the application based on different translation and compiling environment designs, its programming language, Fundamentals of Compiling are also different.Angle analysis from system platform, application software, realize the cross-platform operation of input method in these two kinds of operating systems, it is exactly the isomerism between the cross-platform transplanting Database Systems of heterogeneous database, be presented as the difference of data base management system (DBMS) on the one hand, then be the grammer that may exist in the heterogeneous database model, conflict semantically on the other hand, comprise name, form and structure etc.
The present invention is made up of following components: cross-platform isomerism is used, cross-platform Tibetan language phonetic input method interface module of ancient India realizes, use virtual machine instrument Wine to realize the cross-platform scheme of Tibetan language phonetic input method of ancient India, the encoding scheme of Tibetan language phonetic input method of ancient India is chosen, the outer sign indicating number design of Tibetan language phonetic input method of ancient India.
1. cross-platform isomerism is used
1.1Windows the OS and the Linux OS platform similarities and differences are analyzed
Windows OS and Linux OS be two kinds similar but have the operating system of different system characteristic, Application development environ-ment and system running environment.Different hardware platforms and the different operating system difference at aspects such as core mechanism, implementation, user interfaces has caused the internal mechanism of particular platform application system to exist than big-difference.And for the application based on different translation and compiling environment designs, its programming language, Fundamentals of Compiling are also different.From the angle analysis of system platform, application software, realize the cross-platform operation of input method in these two kinds of operating systems, just at first reach the similarities and differences between two type operating systems between anacom hardware.
1.1.1 hardware architecture
Difference between the hardware architecture for example is embodied in aspects such as word length, byte align order, instruction set, and the SPARC of WINTEL and Sun, UltraSPARC architecture order when preserving the high low byte of integer number is just completely contradicted.For directly having used the relevant program's source code of hardware operation, transplanting work just must be studied hardware platform difference.
1.1.2 operating system service interface
As the support platform of application program, operating system provides system call and the function link storehouse calling interface as program usually.The interface internal mechanism there are differences during operations such as advancing in the different platform kernel/thread scheduling, resource management, figure support.Why use can not direct compilation operation on the other side's system platform each other for Win32 and Linux, exactly because it supports the other side's application programming interfaces hardly, and the application runnable interface that provides of operating system especially.
1.1.3 compiler and compilation tool collection
Compiler is the system software of equal importance with operating system, and it translates into executable code with program code, is the final step that operating system generates into executable code.Different compilers have defined different linguistic norms and compiling mechanism.For the C/C++ compiler, utilize existing Win32 program when the Linux platform transplantation, groundwork just must be made amendment to aspects such as filename, data type, key word, Makefile file, program structures.For example, the VC++ environment also has self specific mechanism when taking into account the C/C++ standard, as: _ asm, _ key word such as int16 and data type, WIN32 advance/threading mechanism etc.; And the Gcc of Linux platform, compilers such as G++ have then adopted _ key word and POSIX thread standards such as asm_, have different linguistic norms and compiling feature.
1.1.4 graphic user interface (GUI)
The gui environment of Linux is based upon on the basis of X-Window, has the diverse framed structure of GUI system with Win32.In the Win32 system, graphical interfaces directly calls bottom GUI interface (GDI32.DLL) by application program and realizes, is a kind of vertical call relation; And the GUI system of Linux has adopted Client, and application program sends the processing that request realizes graphical interfaces by Socket to the X-Window server.Having only the X-Window server can write screen in whole process, is a kind of parallel call relation.
The GUI implementation of Linux platform Client is fine guaranteed the stability of system because the GUI system failure/during collapse, for the Linux platform, just influence a client process, but Win32 inside will cause the collapse of system.At present, though the system overhead of X-Window is bigger, the development of hardware and stable performance thereof can remedy this deficiency.
1.1.5 the database of isomery
The another one problem that migration process may relate to is exactly the isomerism between the cross-platform transplanting Database Systems of heterogeneous database, be presented as the difference of data base management system (DBMS) on the one hand, then be the grammer that may exist in the heterogeneous database model, conflict semantically on the other hand, comprise name, form and structure etc.
As the above analysis, heterogeneous structure of platform has determined the isomerism of using, and then has caused using the difficulty of cross-platform operation.For C/C++ uses, the content of several aspects such as the main research platform runtime environment of Cross Platform Technology, translation and compiling environment, database.
2. cross-platform Tibetan language phonetic input method interface module of ancient India realizes
Utilize the virtual function mechanism of C++, realize operating system abstract layer, use this technology partly to keep apart platform dependent portion and platform independence, make the complete and platform independence of application of exploitation, thereby the application that makes exploitation is easy to support new operating system, and can reuse code on a large scale.
Operating system abstract layer is divided into two-layer: one deck provides accordant interface (abstract class) for the application on upper strata, and this one deck all is identical concerning all operating system; Another layer is relevant with specific operating system, and it is the specific implementations of these interfaces (abstract class) on specific operation system.Operating system abstract layer provides accordant interface (realizing by Virtual Function) to the application on upper strata, to the next system call that has encapsulated specific operation system.Operating system abstract layer is by changing the specific implementation of abstract class, and keeps that their interface is constant to encapsulate concrete operating system, thereby makes the application of exploitation support multi-platform easily.
Operating system abstract layer is made up of a series of interface (abstract class), and these interfaces provide the needed various operating system services of using, such as: (1) task service; (2) synchronous; (3) message queue; (4) the mutual exclusion service that the critical section is visited; (5) communication service; (6) Time Service; (7) file service etc.Operating system abstract layer OSAL is by these services that provides are provided the specific operating system entity.
For these services are provided, OSAL has defined corresponding abstract class, as be used for message queue abstract class OSMessageQueue, the socket class OSSocket that is used for TCP communication that various tasks or thread communicate, be used to execute the task with the thread class OSThread of system call, be used for event synchronization event flag class OSEventFlag, be used for the critical section mutex amount class OSMutex, be used to provide Time Service time class OSTimer, be used for the file abstract class OSFile of file operation etc.
These abstraction interfaces (class) need a specific implementation, and these specific implementations are set of some classes like this, and these classes are public base class with abstract class defined above (interface), are implemented in the operation that defines in the abstract class.By changing the realization of associated class among the OSAL, and the interface that does not change them encapsulates specific operating system, thereby makes OSAL satisfy the needs of different operating system.
The operating system associated class is to return to specific subclass object of having realized a certain interface (abstract class) abstract operation of application by abstract factory class to finish with using the bridge that interrelates.This factory class is just as an agency, in case application need is finished corresponding system service with regard to the object of constructing a respective class.
Abstract factory is made up of an OSFactory class, and its abstract good comprises OSMessageQueue, OSSocket, OSEventFlag, OSthread, OSMutex, OSTimer, OSFile etc.Abstract factory defines in a file, such as defines in os.h.Each specific operating system has its own specific factory and product, and as concerning (SuSE) Linux OS, its corresponding specific plant is LinuxOSFactory just.The factory of each specific operation system inherits from the OSFactory abstract class.
The abstract OSFactory of factory has defined the various services of using the necessary operations system, and the specific plant of each specific operating system correspondence all must be inherited from OSFactory, and is implemented in the abstract operation that defines among the OSFactory.Specific plant to each specific operating system, correspondingly define the specific plant that a static global pointer variable X XOSF represents this specific operating system, as concerning (SuSE) Linux OS, its factory is LinuxOSFactory, and we just define a static global pointer variables L inuxOSF and represent LinuxOSFactory.Take this mode, can guarantee to have only the example of a specific plant to exist.The present invention has defined an overall situation function theOSFactory, and its statement is as follows:
extern?OSFactory*theOSFactory();
In this function, realize initialization to XXOSF.For example concerning (SuSE) Linux OS, it is achieved as follows:
static?LinuxOSFactory*LinuxOsF=NULL;
OSFactory*theOSFactory()
{
if(LinuxOsF==NULL)
LinuxOsF=new?LinuxOSFactory;
return?LinuxOsF;
}
By such realization, can guarantee to have only the example of a LinuxOSFactory to exist.In order to create an operating system entity, can return the pointer that comes by theOSFactory () and be invoked at any method that defines in the corresponding factory.For example, if create a mutex amount, the statement below using gets final product:
theOSFactory->createOSMutex()
The OSMutex abstract class is used for the exclusive reference of critical section, and OSMutex is defined as follows:
class?OSMutex
{
public:
Virtual~OSMutex () { }; // analyse the structure device;
virtual?void?lock()=0;
Whether/* locks according to semaphore is carried out corresponding operation: if semaphore is unlocked, it is locked, task can enter its critical section; If semaphore is locked, then task is put into waiting list; */
virtual?void?free()=0;
/ * is to the semaphore release, might cause operating system reschedule task */
};
The LinuxOSFactory class is inherited from OSFactory.It is embodied in the abstract operation of OSFactory definition under the Linux environment, we are defined as follows LinuxOSFactory:
class?LinuxOSFactory:public?OSFactory
{
/ * OSFactory hidden operating system realize task, synchronous etc. realization mechanism */
public:
Virtual OSMutex*createOSMutex () // one of establishment is used for the protection task and faces
The mutex amount of // battery limit (BL);
{return(OSMutex*)new?LinuxMutex();}
// the operation of other specific product of establishment under the Linux environment
};
LinuxMutex is from the public succession of OSMutex class, is used for realizing under the Linux environment mutually exclusive operation to the critical section.We realize that with the mutex amount (SuSE) Linux OS provides the system call of relevant mutex amount to the mutually exclusive operation of critical section.
Shown in LinuxMutex is defined as follows:
class?LinuxMutex:public?OSMutex
{
private:
Pthread_mutex_t hMutex; The object of // sensing expression mutex amount
public:
LinuxMutex (); // constructor is used to create a mutex amount object
~LinuxMutex();
void?lock();
void?free();
void*getHandle(){return(void*)&hMutex;}
};
Its realization is as follows:
(1) constructor
LinuxMutex::LinuxMutex()
{
pthread_mutexattr_t?attr;
attr._mutexkind=PTHREAD_MUTEX_RECURSIVE_NP;
pthread_mutex_init(&hMutex,&attr);
}
(2) analyse the structure device
LinuxMutex::~LinuxMutex()
{
pthread_mutex_destroy(&hMutex);
}
(3)lock()
void?LinuxMutex::lock()
{
pthread_mutex_lock(&hMutex);
}
(4)free()
void?LinuxMutex::free()
{
pthread_mutex_unlock(&hMutex);
}
3. use virtual machine instrument Wine to realize that Tibetan language phonetic input method of ancient India is cross-platform
Use Wine to realize Tibetan language phonetic input method of ancient India at linux, Wine is actual to be a two-in-one project.A Winelib development kit is provided, has been used for application program is transplanted to Linux (and Unix) from Windows; They also provide a program loader, and the Windows binary file can be moved in Unix and class Unix system.
1) .Windows executable file: Wine supports the scale-of-two of Windows executable file (.exe and DLL) to load fully.
2) .DLL:Wine has the inside of a hundreds of Windows DLL to realize, but wherein few of be to realize completely.For example, the userd32.dll that includes the user interface related function has realized 92% in the Wine of open source code.
3) .COM: this is a kind of almost by the employed Windows technology of all large-scale window applications, and it is supported such as an Excel spreadsheet is embedded into the Word document functional medium.This technology has obtained the good support of Wine.
4). registration table: Wine has realized about 90% windows registry Administration API.
5). Core Feature: although distinct between Linux and the Windows, also have a lot of similar parts on the basic level, therefore the core system API relevant with process, thread, file and message queue obtained being close to perfectly and supported.6. Voice ﹠ Video: Wine supports the operation (can also use the windows media player) of Windows Voice ﹠ Video file.
7). print: can print from a window application that among Wine, moves.
8) .ODBC:Wine supports that those need be by the window application of ODBC accessing database.
9). debugging: Wine has a very healthy and strong and powerful built-in debugger, and except the debug function of supporting standard, it also customizes for the Windows binary program of commissioning test on Linux.It is one of most important instrument of providing for its developer of Wine.Wine also has one to design the complete tracking and the module of log, can help debugging.Why we emphasize this point, and reason is, although framework is healthy and strong,, a lot of uncertain factors are arranged when installation and operation window application in Wine, when using the Wine of open source code, can stop sooner or later and debug.
When writing cross-platform Tibetan language phonetic input method interface module of ancient India, the service condition compiling makes and carries out different compilings that under different platform it can keep the Windows code, also allows the difference of its compatible (SuSE) Linux OS, note following some:
1). try not to change the order of original dynamic base header file.Usually in the C/C++ language, the order of header file has suitable relation.Though the C/C++ language is case sensitive in addition, when comprising header file, what Linux must be with header file is not case sensitive, because the ext2 file system is a case sensitive to filename, otherwise can not correctly compile, and below Windows, the header file capital and small letter can correctly compile.
2). the header file that different system is exclusive.In the Windows system, can comprise the windows.h header file usually, if call the communication functions of bottom, then can comprise the winsock.h header file.Therefore when being transplanted to linux system, comment out the constant definition explanation of the exclusive header file of these Windows systems and some windows systems, increase all header files etc. of the support of bottom communication of Linux.
3). data type.VC++ has many exclusive data types, as _ int16, _ int32, TRUE, SOCKET etc., the gcc compiler is not supported them.Usually way is the statement that among windows.h and the basetypes.h these data is defined need be copied in the header file, comprises this header file again in Linux.For example the type with socket is that SOCKET changes int into.
4). key word.Have the key word that does not have employing in many standard C among the VC++, as BOOL, BYTE, DWORD, _ asm etc. are usually in order to transplant conveniently, do not use them, be that LINUX and WINDOWS write two versions if can't avoid adopting #ifdef and #endif really as far as possible.
5). the modification of function prototype.If adopt the dynamic base of the C/C++ language compilation of standard usually, basically need not write function more again, but for the system call function, because the difference of two kinds of systems, need to change function calls mode etc., as in the network service dynamic base of Linux establishment, replace the closesocket () function under the windows operating system to close socket with close () function.Under Linux, there is not file handle in addition, open file available open and fopen function, but the concrete usage list of references [2] of these two functions.
6) .makefile's writes.Below windows, be responsible for debugging by the VC++ compiler usually, but gcc need do it yourself to write the makefile file, also can be with reference to the makefile file of VC++ generation.Transplant for dynamic base, need adding-shared option during the compiling dynamic base.For adopting mathematical function,, be to need adding-lm calling dynamic base as the program of power series.
7). the programming organization analysis, for transplanting the dynamic base program that its people writes, the program structure analysis step that is absolutely necessary in the dynamic base program, can not comprise operations such as interface, so more usually.
8). in Linux, to the authority of file or catalogue be divided into owner, group, other.So when accessing file, note file is read or write operation, if file is carried out write operation, note the authority of revised file or catalogue, otherwise can't write to file.
9). the use of pointer, define a pointer only distributes four bytes to it internal memory, if to pointer variable assignments pointed, must be with the malloc function for its storage allocation or it is not defined as pointer and is defined as variable and gets final product, this point is stricter than the windows compiling below linux.With spline structure can not be in function the biography value, if in function, carry out structure biography value, must be the organization definition in the function structured fingers.
10). path identifier is "/" under Linux, is “ under Windows ", note different to the dynamic base searching route of windows and Linux.
11). for some different characteristics on Linux are sought the function that is equal to.Service condition compiles and limits some Windows information specific.For example, can in source file, limit the specific code of some platforms like this:
#if?Windows
lniFile.loadFromFile(‘c:\tibet.txt’);
#elseif?Linux
lniFile.LoadFromFile(‘/home/name/tibet.txt’);
#endif
12). in all item files, seek the quoting of pathname, and suitably revise according to following situation.
1. the pathname among the Linux use left oblique line/as delimiter (as/usr/lib), and different files may be arranged in the different paths of linux system.Use PathDelim (being arranged in SysUtils) constant to determine the path delimiter that adapts with current system, and be that any file among the Linux is determined correct path.
2. revise the quoting of driver (as C:) letter, can judge in path string whether the 2nd character is that colon is sought drive letter.Use the driver that DriveDelim constant (being arranged in Sysutils) is determined and current system adapts to represent term.
3. in the place of having used a plurality of paths, with path separators by branch (; ) become colon (:).Use PathSep constant be arranged in SysUtils) next definite path separators that adapts with current system.
4. owing to filename in Linux is that capital and small letter is relevant, therefore to guarantee that application program does not change the capital and small letter of filename.
4. the encoding scheme of Tibetan language phonetic input method of ancient India is chosen
The Brahma-sutra Tibetan input method coding is contained Tibetan code baseset character and Tibetan code expansion sets A, totally 1729 characters.
Figure A20071009778200091
Because it is oversize that this table shows in text, illustrated as accompanying drawing 9.
5. the outer sign indicating number design of Tibetan language phonetic input method of ancient India
Tibetan language phonetic input method layout of ancient India based on the Tibetan language rules for writing, is considered the custom commonly used of keyboard, in Tibetan language keyboard alphabet layout table, appropriate design the position of upper word adding, down word adding, anti-word, basic word and conventional characters.The Tibetan language numeral
Figure A20071009778200092
Arrive
Figure A20071009778200093
The numerical key of corresponding 0-9; Arabic numeral are placed on the upper blocking key of 0-9, three upper word addings
Figure A20071009778200094
Be arranged in p, [,] on the key; Down word adding
Figure A20071009778200095
On r, R, t, T, five key positions of y; Five anti-words
Figure A20071009778200096
Be arranged in respectively
Figure A20071009778200097
Upper blocking key on; Four vowels
Figure A20071009778200098
Be arranged in respectively on e, u, i, the o key position; An inverse element sound letter
Figure A20071009778200099
Be arranged on the I key position; Divide word symbol
Figure A200710097782000910
With the subordinate sentence symbol
Figure A200710097782000911
Be arranged on j and the J key position.
(4) description of drawings
Fig. 1 Brahma-sutra Tibetan letter
Fig. 2 Brahma-sutra Tibetan input method keyboard layout
Fig. 3 IME manager
Fig. 4 input method server frame diagram
Key processing flow chart under Fig. 5 XIM agreement
The relation of Fig. 6 application and operating system
Fig. 7 adds the application of OSAL and the relation of operating system
Fig. 8 portability problem
Fig. 9 modern Tibetan and Brahma-sutra Tibetan character, coding and the keypad code table of comparisons
As shown in Figure 1: Tibetan language belongs to alphabetic writing, and Brahma-sutra Tibetan is by 30 consonants, and 5 traditional Chinese characters and 6 reduplicated word and vowel sign and numeral, punctuation mark are formed.
Shown in Figure 2: Tibetan language phonetic input method layout of ancient India, based on the Tibetan language rules for writing, consider the custom commonly used of keyboard, in Tibetan language keyboard alphabet layout table, appropriate design the position of upper word adding, down word adding, anti-word, basic word and conventional characters.The Tibetan language numeral
Figure A20071009778200101
Arrive
Figure A20071009778200102
The numerical key of corresponding 0-9; Arabic numeral are placed on the upper blocking key of 0-9, three upper word addings Be arranged in p, [,] on the key; Down word adding
Figure A20071009778200104
On r, R, t, T, five key positions of y; Five anti-words
Figure A20071009778200105
Be arranged in respectively
Figure A20071009778200106
Upper blocking key on; Four vowels Be arranged in respectively on e, u, i, the o key position; An inverse element sound letter
Figure A20071009778200108
Be arranged on the I key position; Divide word symbol
Figure A20071009778200109
With the subordinate sentence symbol
Figure A200710097782001010
Be arranged on j and the J key position.
Shown in Figure 3: the Tibetan input method major function is finished in kernel program, and the Tibetan input method kernel program is embedded in input method manager IMM kernel, and Tibetan input method information programme and input method installation procedure are the peripheral function program.
Shown in Figure 4: the keyboard input process under the Linux X-Windows relates to three relevant portions: X server, Xlib (library file), XIMserver.Simple function distribution situation is: X-server obtains the original Tibetan code Keycode that keyboard is imported by console device, delivers to X-client by event; X client is responsible for finishing the mapping of Keycode to Keysymbol.
Shown in Figure 5: in the XIM agreement, knock in button from the user, the outer sign indicating number of input Tibetan language after handling via XIM Server, occurs us at last and wishes the Tibetan language character imported in XIMClient.Connected mode between XIM Server and the Client is divided into static and dynamic dual mode.If use static mode, then all KeyEvents are sent to the CLIENT PROGRAM end after all can being sent to XIM input method server earlier again, work has nonsensical no matter this KeyEvent is to the group word.For dynamic connection, begin not have online between input method procedure and application program, have only after certain special triggering key is pressed, just can activate online between the two, begin to import.By the time after input finishes, online by once triggering the key cancellation again, recover original state.
Shown in Figure 6: as to provide accordant interface (realizing) by operating system abstract layer to the application on upper strata, to the next system call that has encapsulated specific operation system by Virtual Function.Operating system is separated with the application of program, keep that their interface is constant to encapsulate different operating system, thereby make the application of exploitation support multi-platform easily.
Shown in Figure 7: operating system abstract layer is made up of a series of interface (abstract class), and these interfaces provide the needed various operating system services of using, such as: (1) task service; (2) synchronous; (3) message queue; (4) the mutual exclusion service that the critical section is visited; (5) communication service; (6) Time Service; (7) file service etc.Operating system abstract layer OSAL is by these services that provides are provided the specific operating system entity.For these services are provided, OSAL has defined corresponding abstract class, as be used for message queue abstract class OSMessageQueue, the socket class OSSocket that is used for TCP communication that various tasks or thread communicate, be used to execute the task with the thread class OSThread of system call, be used for event synchronization event flag class OSEventFlag, be used for the critical section mutex amount class OSMutex, be used to provide Time Service time class OSTimer, be used for the file abstract class OSFile of file operation etc.
Shown in Figure 8: Cross Platform Technology is meant that mainly the operating system abstraction application layer keeps that their interface is constant to encapsulate concrete operating system in several aspects such as source code environment, translation and compiling environment, database again, reaches the transplantability of application software.
Shown in Figure 9: the contrast of Tibetan language baseset, expansion sets A and Tibetan language keypad code, and the Brahma-sutra Tibetan character shown in providing.
(5) embodiment
1. Wine is installed and with its configuration.
2. the Tibetan language font is installed.
3. installation Tibetan input method
By said procedure, can use Tibetan input method of the present invention.

Claims (1)

1. the total essential features of the present invention and immediate prior art
Tibetan input method and Linux OS Tibetan input method that Windows OS is arranged both at home and abroad.But Tibetan input method can not be installed on these two kinds of dissimilar operating systems and move.
Brahma-sutra Tibetan input method feature based on Windows OS and Linux OS is: cross-platform Brahma-sutra Tibetan input method, promptly support the Brahma-sutra Tibetan input method of Linux and two kinds of operating system platforms of Windows.
The present invention supports under Windows OS environment or the Linux OS environment that the ancient Tibetan books documentation ﹠ info is handled.Stride that these two kinds of operating systems must be sought an input method interface module so that this input method system can be installed and move on these two kinds of dissimilar operating platforms.
1.1 the definition of input method interface module
Windows and Linux belong to system software, and what they adopted the support of input method is two kinds of different input mechanisms, and the input method interface module builds on two kinds of different input mechanisms, and it can not remove to revise original input mechanism of a certain operating system.After a keyboard (or other non-keyboard input) incident took place, whether what it can intelligence handled this incident, comprises the operating system environment of discerning current running software, import and adopt which kind of input mechanism to realize the input of Tibetan language word.
1.2 cross-platform Tibetan language phonetic input method interface module of ancient India realizes
When writing cross-platform Tibetan language phonetic input method interface module of ancient India, the service condition compiling makes and carries out different compilings that under different platform it can keep the Windows code, also allows the difference of its compatible (SuSE) Linux OS.
1). try not to change the order of original dynamic base header file.Usually in the C/C++ language, the order of header file has suitable relation.Though the C/C++ language is case sensitive in addition, when comprising header file, what Linux must be with header file is not case sensitive, because the ext2 file system is a case sensitive to filename, otherwise can not correctly compile, and below Windows, the header file capital and small letter can correctly compile.
2). the header file that different system is exclusive.In the Windows system, can comprise the windows.h header file usually, if call the communication functions of bottom, then can comprise the winsock.h header file.Therefore when being transplanted to linux system, comment out the constant definition explanation of the exclusive header file of these Windows systems and some windows systems, increase all header files etc. of the support of bottom communication of Linux.
3). data type.VC++ has many exclusive data types, as _ int16, _ int32, TRUE, SOCKET etc., the gcc compiler is not supported them.Usually way is the statement that among windows.h and the basetypes.h these data is defined need be copied in the header file, comprises this header file again in Linux.For example the type with socket is that SOCKET changes int into.
4). key word.Have the key word that does not have employing in many standard C among the VC++, as BOOL, BYTE, DWORD, _ asm etc. are usually in order to transplant conveniently, do not use them, be that LINUX and WINDOWS write two versions if can't avoid adopting #ifdef and #endif really as far as possible.
5). the modification of function prototype.If adopt the dynamic base of the C/C++ language compilation of standard usually, basically need not write function more again, but for the system call function, because the difference of two kinds of systems, need to change function calls mode etc., as in the network service dynamic base of Linux establishment, replace the closesocket () function under the windows operating system to close socket with close () function.Under Linux, there is not file handle in addition, open file available open and fopen function, but the concrete usage list of references [2] of these two functions.
6) .makefile's writes.Below windows, be responsible for debugging by the VC++ compiler usually, but gcc need do it yourself to write the makefile file, also can be with reference to the makefile file of VC++ generation.Transplant for dynamic base, need adding-shared option during the compiling dynamic base.For adopting mathematical function,, be to need adding-1m calling dynamic base as the program of power series.
7). the programming organization analysis, for transplanting the dynamic base program that its people writes, the program structure analysis step that is absolutely necessary in the dynamic base program, can not comprise operations such as interface, so more usually.
8). in Linux, to the authority of file or catalogue be divided into owner, group, other.So when accessing file, note file is read or write operation, if file is carried out write operation, note the authority of revised file or catalogue, otherwise can't write to file.
9). the use of pointer, define a pointer only distributes four bytes to it internal memory, if to pointer variable assignments pointed, must be with the malloc function for its storage allocation or it is not defined as pointer and is defined as variable and gets final product, this point is stricter than the windows compiling below linux.With spline structure can not be in function the biography value, if in function, carry out structure biography value, must be the organization definition in the function structured fingers.
10). path identifier is "/" under Linux, is “ under Windows ", note different to the dynamic base searching route of windows and Linux.
11). for some different characteristics on Linux are sought the function that is equal to.Service condition compiles and limits some Windows information specific.
For example, can in source file, limit the specific code of some platforms like this:
#if?Windows
lniFile.loadFromFile(‘c:\tibet.txt’);
#elseif?Linux
lniFile.LoadFromFile(‘/home/name/tibet.txt’);
#endif
12). in all item files, seek the quoting of pathname, and suitably revise according to following situation.
1. the pathname among the Linux use left oblique line/as delimiter (as/usr/lib), and different files may be arranged in the different paths of linux system.Use PathDelinm (being arranged in SysUtils) constant to determine the path delimiter that adapts with current system, and be that any file among the Linux is determined correct path.
2. revise the quoting of driver (as C:) letter, can judge in path string whether the 2nd character is that colon is sought drive letter.Use the driver that DriveDelim constant (being arranged in Sysutils) is determined and current system adapts to represent term.
3. in the place of having used a plurality of paths, with path separators by branch (; ) become colon (:).Use PathSep constant be arranged in SysUtils) next definite path separators that adapts with current system.
4. owing to filename in Linux is that capital and small letter is relevant, therefore to guarantee that application program does not change the capital and small letter of filename.
1.3 Brahma-sutra Tibetan input method keyboard layout
According to the keyboard layout principle, successively from keyboard arranging downwards by the frequency height Tibetan language character, row arranges, arranges to the two sides from the middle key position.
Tibetan language phonetic input method layout of ancient India based on the Tibetan language rules for writing, is considered the custom commonly used of keyboard, in Tibetan language keyboard alphabet layout table, appropriate design the position of upper word adding, down word adding, anti-word, basic word and conventional characters.The Tibetan language numeral
Figure A2007100977820003C1
Arrive
Figure A2007100977820003C2
The numerical key of corresponding 0-9; Arabic numeral are placed on the upper blocking key of 0-9, three upper word addings
Figure A2007100977820003C3
Be arranged in p, [,] on the key; Down word adding
Figure A2007100977820003C4
On r, R, t, T, five key positions of y; Five anti-words
Figure A2007100977820003C5
Be arranged in respectively
Figure A2007100977820003C6
Upper blocking key on; Four vowels
Figure A2007100977820003C7
Be arranged in respectively on e, u, i, the o key position; An inverse element sound letter
Figure A2007100977820003C8
Be arranged on the I key position; Divide word symbol
Figure A2007100977820003C9
With the subordinate sentence symbol
Figure A2007100977820003C10
Be arranged on j and the J key position.
1.4 Brahma-sutra Tibetan character input
After Tibetan language letter and digital block keyboard layout are determined, press the Brahma-sutra Tibetan sequential write and determine the input code table.
1.5 the coding of Brahma-sutra Tibetan input method
The Brahma-sutra Tibetan input method coding is contained Tibetan code baseset character and Tibetan code expansion sets A, totally 1729 characters.
Figure A2007100977820003C11
Because it is oversize that this table shows in text, illustrated as accompanying drawing 9.
CNA2007100977825A 2007-05-08 2007-05-08 Brahma-sutra Tibetan input method based on Windows OS and Linux OS Pending CN101303644A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNA2007100977825A CN101303644A (en) 2007-05-08 2007-05-08 Brahma-sutra Tibetan input method based on Windows OS and Linux OS

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNA2007100977825A CN101303644A (en) 2007-05-08 2007-05-08 Brahma-sutra Tibetan input method based on Windows OS and Linux OS

Publications (1)

Publication Number Publication Date
CN101303644A true CN101303644A (en) 2008-11-12

Family

ID=40113561

Family Applications (1)

Application Number Title Priority Date Filing Date
CNA2007100977825A Pending CN101303644A (en) 2007-05-08 2007-05-08 Brahma-sutra Tibetan input method based on Windows OS and Linux OS

Country Status (1)

Country Link
CN (1) CN101303644A (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102331927A (en) * 2011-06-24 2012-01-25 浙大网新科技股份有限公司 Method for integrating soft keyboard input of Wine and Android mobile phone
CN102360436A (en) * 2011-10-24 2012-02-22 中国科学院软件研究所 Identification method for on-line handwritten Tibetan characters based on components
CN102364433A (en) * 2011-06-24 2012-02-29 浙大网新科技股份有限公司 Method for realizing Wine construction tool transplanting on ARM (Advanced RISC Machines) processor
CN103024541A (en) * 2012-12-19 2013-04-03 四川长虹电器股份有限公司 Data storage and visualization method of intelligent television
CN103064528A (en) * 2012-10-19 2013-04-24 凃人顺 Functional name input method of traditional Chinese medicine words
CN104615269A (en) * 2015-02-04 2015-05-13 史晓东 Tibetan and Latin complete-short-form binary-syllabification encoding scheme and intelligent input system thereof
CN107171892A (en) * 2017-06-08 2017-09-15 中国电子信息产业集团有限公司第六研究所 A kind of cross-platform data communication means and system based on QT
CN109445845A (en) * 2018-09-10 2019-03-08 深圳市智美达科技股份有限公司 Interface call method, device, computer equipment and storage medium
CN110737468A (en) * 2018-07-19 2020-01-31 北京路上创客技术服务有限责任公司 executable program cross-platform implementing method
CN116881223A (en) * 2023-07-10 2023-10-13 粤港澳大湾区(广东)国创中心 Implantable embedded database system and embedded database system transplanting method
CN117270961A (en) * 2023-11-21 2023-12-22 武汉蜂鸟龙腾软件有限公司 Method for analyzing and loading MFC character resources in Linux environment

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102364433A (en) * 2011-06-24 2012-02-29 浙大网新科技股份有限公司 Method for realizing Wine construction tool transplanting on ARM (Advanced RISC Machines) processor
CN102364433B (en) * 2011-06-24 2014-01-01 浙大网新科技股份有限公司 Method for realizing Wine construction tool transplanting on ARM (Advanced RISC Machines) processor
CN102331927B (en) * 2011-06-24 2014-06-25 浙大网新科技股份有限公司 Method for integrating soft keyboard input of Wine and Android mobile phone
CN102331927A (en) * 2011-06-24 2012-01-25 浙大网新科技股份有限公司 Method for integrating soft keyboard input of Wine and Android mobile phone
CN102360436A (en) * 2011-10-24 2012-02-22 中国科学院软件研究所 Identification method for on-line handwritten Tibetan characters based on components
CN102360436B (en) * 2011-10-24 2012-11-07 中国科学院软件研究所 Identification method for on-line handwritten Tibetan characters based on components
CN103064528A (en) * 2012-10-19 2013-04-24 凃人顺 Functional name input method of traditional Chinese medicine words
CN103064528B (en) * 2012-10-19 2015-12-09 凃人顺 A kind of functional name input method of traditional Chinese medical science vocabulary
CN103024541B (en) * 2012-12-19 2016-03-30 四川长虹电器股份有限公司 A kind of intelligent television machine data stores and visualization method
CN103024541A (en) * 2012-12-19 2013-04-03 四川长虹电器股份有限公司 Data storage and visualization method of intelligent television
CN104615269A (en) * 2015-02-04 2015-05-13 史晓东 Tibetan and Latin complete-short-form binary-syllabification encoding scheme and intelligent input system thereof
CN107171892A (en) * 2017-06-08 2017-09-15 中国电子信息产业集团有限公司第六研究所 A kind of cross-platform data communication means and system based on QT
CN107171892B (en) * 2017-06-08 2020-05-22 中国电子信息产业集团有限公司第六研究所 Cross-platform data communication method and system based on QT
CN110737468A (en) * 2018-07-19 2020-01-31 北京路上创客技术服务有限责任公司 executable program cross-platform implementing method
CN109445845A (en) * 2018-09-10 2019-03-08 深圳市智美达科技股份有限公司 Interface call method, device, computer equipment and storage medium
CN109445845B (en) * 2018-09-10 2022-09-30 深圳市智美达科技股份有限公司 Interface calling method and device, computer equipment and storage medium
CN116881223A (en) * 2023-07-10 2023-10-13 粤港澳大湾区(广东)国创中心 Implantable embedded database system and embedded database system transplanting method
CN117270961A (en) * 2023-11-21 2023-12-22 武汉蜂鸟龙腾软件有限公司 Method for analyzing and loading MFC character resources in Linux environment
CN117270961B (en) * 2023-11-21 2024-04-12 武汉蜂鸟龙腾软件有限公司 Method for analyzing and loading MFC character resources in Linux environment

Similar Documents

Publication Publication Date Title
CN101303644A (en) Brahma-sutra Tibetan input method based on Windows OS and Linux OS
AU2019210601B2 (en) Automatic generation of microservices based on technical description of legacy code
Padró et al. Freeling 3.0: Towards wider multilinguality
Carlsson et al. SICStus Prolog—the first 25 years
Cunningham GATE, a general architecture for text engineering
US20030145281A1 (en) Hypertext page generator for a computer memory resident rapid comprehension document for original source information, and method
Darwin Java cookbook
Paumier et al. Unitex 3.3 User Manual
Fiuczynski et al. Patch (1) Considered Harmful.
Bauer A reusable parts center [technical forum]
Gross Internationalization and localization of software
Deitel et al. Java SE 8 for programmers
Mühlbacher et al. Oberon-2 programming with Windows
Abrams NET Framework Standard Library Annotated Reference: Base class library and extended numerics library
JACOB Schweber, Bill," Standards Guide Product Designs," Comp. Des., 73–80
Ossher A case study in structure specification: A Grid description of scribe
Bhave Programming with Java
Hutchinson et al. The Emerald Programming Language1
Graham Languages and interactive software development
Gill Building Web Applications with C# and. NET: A Complete Reference
Kew Fonts for every language: SIL’s font projects and the Open Font License
Erraguntla et al. A reverse engineering toolkit for design recovery
Maeda Experience of Quick Parser Development from Free and Open Source Compilers
Pedersen IDL--a statistical programming environment
Paul et al. CLAWS, Ada and software components

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20081112