WO2006079892A2 - System and method for optimizing run-time memory usage for a lexicon - Google Patents

System and method for optimizing run-time memory usage for a lexicon Download PDF

Info

Publication number
WO2006079892A2
WO2006079892A2 PCT/IB2006/000104 IB2006000104W WO2006079892A2 WO 2006079892 A2 WO2006079892 A2 WO 2006079892A2 IB 2006000104 W IB2006000104 W IB 2006000104W WO 2006079892 A2 WO2006079892 A2 WO 2006079892A2
Authority
WO
WIPO (PCT)
Prior art keywords
word
lexicon
words
searched
computer
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.)
Ceased
Application number
PCT/IB2006/000104
Other languages
French (fr)
Inventor
Jilei Tain
Jani Nurminen
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.)
Nokia Inc
Original Assignee
Nokia Inc
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 Nokia Inc filed Critical Nokia Inc
Publication of WO2006079892A2 publication Critical patent/WO2006079892A2/en
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/451Execution arrangements for user interfaces
    • G06F9/454Multi-language systems; Localisation; Internationalisation
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/237Lexical tools
    • G06F40/242Dictionaries
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/12Use of codes for handling textual entities
    • G06F40/126Character encoding
    • G06F40/129Handling non-Latin characters, e.g. kana-to-kanji conversion

Definitions

  • the location array can be defined as:

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

SYSTEM AND METHOD FOR OPTIMIZING RUN-TIME MEMORY USAGE FOR A LEXICON
FIELD OF THE INVENTION
[0001] The present invention relates generally to speech and language processing techniques. More particularly, the present invention relates to systems that require lexicon minimization and fast search capabilities when the language at issue has a relatively large character set, such as the Chinese language.
BACKGROUND OF THE INVENTION
[0002] Speech and language processing techniques, such as automatic speech recognition (ASR) and text-to-speech (TTS) synthesis, are constantly becoming increasingly important in multimedia systems. Many of these multimedia systems require a lexicon or dictionary for particular languages. A lexicon typically contains a great deal of information, including words, pronunciations, part-of-speech (POS), and other syntactic and semantic information. POS is a primitive form of linguistic theory that posits a restricted inventory of word-type categories such as nouns, verbs, etc. Such lexicons therefore normally require a large amount of memory. [0003] Because of these memory issues, when a system processes text by using lexicon data, the lexicon data requires a very high run-time memory footprint and a time-consuming search. This particularly applies to the Chinese language and other languages with a large character set. For the Chinese language, for example, this is due to the fact that there are at least 20,901 Chinese characters (in a closed set) and more than 100,000 Chinese words (in an open set). A Chinese character is a basic written unit and is denoted by two bytes in Unicode. Unicode provides a unique number for every character, regardless of the platform, the program, and the language. The whole set of Chinese characters contains 20,901 characters, including the simplified and the traditional character sets. In the Unicode chart, Chinese characters are represented using the range from 4E00 to 9FA5. A Chinese character has ambiguous meanings and may have multiple pronunciations. Pronunciation of Chinese character is presented by monosyllable pinyin. A Chinese word is a sequence of Chinese characters without separators. For example, for a given word consisting of N characters, can denoted as an array word[N]. In this particular arrangement, word[0] stands for the Unicode value of the first character in the word. [0004] Until now, conventional systems having lexicon data from a similarly complex language typically have been realized on other platforms than embedded systems, where the memory and processing power were not major implementation bottlenecks. For this reason, memory and speed optimization issues for handling lexicon data have not been seriously addressed in the past.
[0005] When processing Chinese lexicon data, the system normally downloads the whole data into a memory unit and assigns the data to predefined data structures. Alternatively, the whole data can be split into N parts and loaded one small part at a time. Although run-time memory can be reduced to some extent when more data partitions are enabled, the system still needs to load the whole lexicon data (by distributing or balancing the load over time), and either repeatedly scan the given text with each partition of the data, or load the partitioned data repeatedly. This leads to the very frequent data transfer from file to memory and increases the text processing time.
SUMMARY OF THE INVENTION
[0006] The present invention addresses the issues identified above by introducing an intermediate location variable. The intermediate location variable serves as a bridge between the lexicon database and a given text. Only location data is extracted and loaded from the lexicon data and stored in the run-time memory. Therefore, the amount of data in run-time memory is significantly reduced. Furthermore, given a word, the corresponding location value can be obtained directly without a time- consuming search. This results in a significant reduction in search time as well. [0007] The present invention can be applied to virtually any system that requires a Chinese lexicon or a lexicon for other languages with large character sets such as Japanese. In particular, the present invention can be an integral part of Chinese ASR and TTS systems, and the present invention enables a system to achieve a very low run-time memory, fast search and reduced lexicon data size without any loss of text processing accuracy. For example and in one reference implementation, in a Chinese TTS system, the run-time memory footprint for a lexicon was reduced from 4.5MB to 63kB with the present invention, i.e. the size was reduced to 1/76 of the original size. The present invention can be implemented in conjunction with a wide variety of voice user interface software programs.
[0008] These and other objects, advantages and features of the invention, together with the organization and manner of operation thereof, will become apparent from the following detailed description when taken in conjunction with the accompanying drawings, wherein like elements have like numerals throughout the several drawings described below.
BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a flow chart showing a process for the implementation of one embodiment of the present invention;
[0010] Figure 2 is a perspective view of a mobile telephone that can be used in the implementation of the present invention; and
[0011] Figure 3 is a schematic representation of the telephone circuitry of the mobile telephone of Figure 2.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0012] The present invention involves the introduction of an intermediate location variable. The intermediate location variable serves as a bridge between the lexicon database and a given text. Only location data is extracted and loaded from the lexicon database and stored in the run-time memory. Therefore, the amount of data in run-time memory is significantly reduced. Furthermore, given a word, the corresponding location value can be obtained directly without a time-consuming search. This results in a significant reduction in search time as well. [001.3] Figure 1 is a flow chart showing the implementation of one embodiment of the present invention. In the case of the Chinese language, the Chinese lexicon data is arranged in ascending order by Unicode values for the words. It should be noted that* although the examples provided herein discusses the use of Unicode values, the present invention can use virtually any set of uniquely defined code values and is not limited to Unicode values. This is represented at step 100. For example, the data can be stored in the stream of:
Basic Jnfo →item[0] -> →item[Word_Number-l]
[0014] Basic Jnfo contains information such as the version, the number of words, the number of POS, etc. Additional pieces of information can also be included in various embodiments of the present invention. Each item is presented in. the stream of: word[Characterjyumber]→pronunciation→pos→multiple_pronunciations—>multipl e_pos\
[0015] Ascending order means that for any / between 0 and a number of words, there is zYem[/}worc/[θ] > item[i - l}word[θ]
[0016] where item [ij. word is the Unicode sequence and wordfij is the Unicode value of the i+I-th character in the word.
[0017] When processing the lexicon data, instead of loading the whole lexicon data into the run-time memory, a location array location[Character_Number] is established at step 110. Location variable locationfi] indicates the length from the beginning of the lexicon data file to the first item whose first character has a Unicode value derived from /. Known Chinese characters are defined in the range of 4E00 and
9FA5 in the Unicode chart. Since the size of lexicon data is usually about 1MB, 3
Bytes (0-4MB) are more than enough to represent one entry in the location array.
[0018] The location array can be defined as:
#define CHARACTERJfUMBER 20,901
#defme LOCATION JSIZE 3
#define UNICODE '_START '4EOO location = malloc(CHARACTER_NUMBER *LOC ATION _SΪZE);
Location values can be extracted from lexicon data. The reference algorithm for extracting location information is shown below:
For i=0 For i = Oto CHARACTERJtUMBER -l{ location]}] = -1
}
Unicode _value = /tem[θ].word[θ] location[unicode _ value - UNICODE_START] = location of /tew[θ]
For i = Uo CHARACTER _NUMBER - \{ if /Yem[/J worc?[θ] an then{ unicode_value
Figure imgf000006_0001
location\unicode _ value - UNICODE_START] = location of item[i ] }
.}. " "
[0019] Searching any given word from the lexicon file can be accomplished very quickly. The first step, which is represented at step 120, is to locate the lexicon entries that contain a matching initial character:
Unicode jyalue = wordfOJ; start = location[unicode_value-UNICODE_START]; length = location[next_unicode_value-UNICODE_START] -location[unicode_value-
UNICODE_START];
[0020] In the above pseudo code, next_unicode_value is the next Unicode jyalue for which location[nextjμnicode_yalue] is not -1.
[0021] The next step, represented at step 130, is to load the length size data from start in the lexicon data file, and save it into the run-time memory. Loaded data is usually very small (on the order of less than 1KB) and a binary search, represented at step 140, can be applied to find matching item to given wor d within a very small range. Alternatively, the search can be performed during the loading process. With this technique, it is possible to limit the size of the memory block needed for the loaded data to the maximum size of a single lexicon entry. [0022] The location data can be extracted on-line during the initialization phase. However, the location data is preferably extracted during the off-line processing of lexicon data, and then stored as part of the lexicon data. This process does not necessarily increase the lexicon data size. If the location data is stored in the lexicon data, the first character of every word is already known, so the first character becomes redundant and can be omitted. For example, in the case of given textf], the code value of the first character in the text string (textfj) is Unicode _value=text [0] . The start and length can then be used as mentioned above. The first character of all words between start and starts-length in the lexicon data has the same Unicode value of
Unicode _value; there is therefore no need to store that information.
■ V [0023] In order to better understand the outcome of the memory optimization system and method of the present invention, the following analysis is shown being carried out on the Chinese lexicon used in one high quality text-to-speech system as a reference.
[0024] The lexicon data of this example contains 20,901 Chinese characters (full Unicode set), 92,901 words and 68 POS. The size of the lexicon data in the file is 1,119,707 bytes. After loading the lexicon data into data structures in the run-time memory, the size is 4,771,860 bytes. The maximum memory used in this particular system is 8,859,922 bytes. This indicates that the run-time memory usage must be reduced for embedded platforms.
[0025] Because the size of the lexicon data is about 1MB, 3 Bytes (0-4MB) are sufficient to represent the location information. The number of different characters is 20,901, so the size of the location array is 20,901 X 3 = 62,703 Bytes = 61.2 KB, which represents about 5% of the total lexicon data.
[0026] Since the loaded lexicon data in the run-time memory takes 4,771 ,860 bytes and the number of characters is 20,901, the average size of each character in run-time memory is 228 bytes. In total, the average run-time memory required by the system and method of the present invention is 62,703 + 228 = 62,931 = 61.5 KB. The gain on memory usage between a conventional system and a system incorporating the present invention is 4,771,860/62,931 = a factor of 76. The search complexity is also reduced because each search is only conducted on a small amount of data, rather than on the whole database as was required in a conventional system. [0027] Regarding the lexicon data, the location information takes a 61.2KB overhead, but all of the first characters can be removed with size of 92,901 (number of words) X 2 (two bytes of each character) = 185,802 Bytes. In this case, the lexicon data savings is 185,802-62,931 = 122,871 Bytes = 120 KB. Thus, in addition to other advantages, about 10% a size reduction of the lexicon data file is also obtained with the present invention.
[0028] Figures 2 and 3 show one representative mobile telephone 12 within which the present invention may be implemented. It should be understood, however, that the present invention is not intended to be limited to one particular type of mobile telephone 12 or other electronic device. For example, the present invention can be incorporated into personal digital assistants (PDAs), integrated messaging devices (IMDs), notebook computers, handheld computers, and other devices. The mobile telephone 12 of Figures 2 and 3 includes a housing 30, a display 32 in the form of a liquid crystal display, a keypad 34, a microphone 36, an ear-piece 38, a battery 40, an infrared port 42, an antenna 44, a smart card 46 in the form of a UICC according to one embodiment of the invention, a card reader 48, radio interface circuitry 52, codec circuitry 54, a controller 56 and a memory 58. Individual circuits and elements are all of a type well known in the art, for example in the Nokia range of mobile telephones. [0029] The present invention is described in the general context of method steps, which may be implemented in one embodiment by a program product including computer-executable instructions, such as program code, executed by computers in networked environments.
[0030] Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. Computer-executable instructions, associated data structures, and program modules represent examples of program code for executing steps of the methods disclosed herein. The particular sequence of such executable instructions or associated data structures represents examples of corresponding acts for implementing the functions described in such steps.
[0031] Software and web implementations of the present invention could be accomplished with standard programming techniques with rule based logic and other logic to accomplish the various database searching steps, correlation steps, comparison steps and decision steps. It should also be noted that the words "component" and "module" as used herein, and in the claims, is intended to encompass implementations using one or more lines of software code, and/or hardware implementations, and/or equipment for receiving manual inputs. [0032] The foregoing description of embodiments of the present invention have been presented for purposes of illustration and description. It is not intended to be exhaustive or to limit the present invention to the precise form disclosed, and modifications and variations are possible in light of the above teachings or may be acquired from practice of the present invention. The embodiments were chosen and described in order to explain the principles of the present invention and its practical application to enable one skilled in the art to utilize the present invention in various embodiments and with various modifications as are suited to the particular use contemplated.

Claims

WHAT IS CLAIMED IS:
1. A method of extracting information from a lexicon and using the information with a computer software program, comprising the steps of: arranging lexicon data for a language using uniquely defined code values for characters of words included in the lexicon; creating a location array for the lexicon data arranged by uniquely defined code value; upon a request to search for a word, identifying words having a matching initial character as the searched-for word using the location array; and searching through the identified words for an identified word that matches the searched-for word.
2. The method of claim 1, further comprising the step of, before or during searching through the identified words for an identified word that matches the searched-for word, loading one or more words having the same initial character as the searched-for-word.
3. The method of claim 1 , wherein the lexicon data is arranged in ascending order by uniquely defined code value.
4. The method of claim 1 , wherein the language is Chinese.
5. The method of claim 1, wherein the language is Japanese.
6. The method of claim 1 , wherein the computer software program comprises a speech recognition program.
7. The method of claim 1 , wherein the computer software program comprises a text-to-speech synthesis program.
8. A computer program product for extracting information from a lexicon and using the information with a computer software program, comprising: computer code for arranging lexicon data for the language using uniquely defined code values for characters of words included in the lexicon; computer code for creating a location array for the lexicon data arranged by uniquely defined code value; computer code for, upon a request to search for a word, identifying words having a matching initial character as the searched-for word; and computer code for searching through the identified words for an identified word that matches the searched-for word.
9. The computer program product of claim 8, further comprising computer code for, before or during searching through the identified words for an identified word that matches the searched-for word, loading one or more words having the same initial character as the searched-for-word.
10. The computer program product of claim 8, wherein the lexicon data is arranged in ascending order by uniquely defined code value.
11. The computer program product of claim 8, wherein the language is Chinese.
12. The computer program product of claim 8, wherein the language is Japanese.
13. The computer program product of claim 8, wherein the computer software program comprises a speech recognition program.
,
14. The computer program product of claim 8, wherein the computer software program comprises a text-to-speech synthesis program.
15. An electronic device, comprising: a processor and a memory unit operatively connected to the processor, wherein the memory unit and the processor cooperate to extract information from a lexicon and use the information with a computer software program, the extraction and use comprising the steps of: arranging lexicon data for the language using uniquely defined code values for characters of words included in the lexicon; creating a location array for the lexicon data arranged by uniquely defined code value; upon a request to search for a word, identifying words having a matching initial character as the searched-for word; and searching through the identified words for an identified word that matches the searched-for word.
16. The electronic device of claim 15, wherein the extraction and use further comprises for the step of, before or during searching through the identified words for an identified word that matches the searched-for word, loading one or more words having the same initial character as the searched-for-word.
17. The electronic device of claim 15, wherein the lexicon data is arranged in ascending order by uniquely defined code value.
18. The electronic device of claim 15, wherein the language is selected from the group consisting of Chinese and Japanese.
19. The electronic device of claim 15, wherein the computer software program comprises a speech recognition program.
20. The electronic device of claim 15, wherein the computer software program comprises a text-to-speech synthesis program.
PCT/IB2006/000104 2005-01-25 2006-01-23 System and method for optimizing run-time memory usage for a lexicon Ceased WO2006079892A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US11/042,445 2005-01-25
US11/042,445 US20060167680A1 (en) 2005-01-25 2005-01-25 System and method for optimizing run-time memory usage for a lexicon

Publications (1)

Publication Number Publication Date
WO2006079892A2 true WO2006079892A2 (en) 2006-08-03

Family

ID=36698022

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/IB2006/000104 Ceased WO2006079892A2 (en) 2005-01-25 2006-01-23 System and method for optimizing run-time memory usage for a lexicon

Country Status (3)

Country Link
US (1) US20060167680A1 (en)
CN (1) CN101137982A (en)
WO (1) WO2006079892A2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109800408B (en) * 2017-11-16 2023-05-26 腾讯科技(深圳)有限公司 Dictionary data storage method and device, and dictionary-based word segmentation method and device
CN113591440B (en) * 2021-07-29 2023-08-01 百度在线网络技术(北京)有限公司 Text processing method and device and electronic equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001043221A (en) * 1999-07-29 2001-02-16 Matsushita Electric Ind Co Ltd Chinese word segmenter
US7451075B2 (en) * 2000-12-29 2008-11-11 Microsoft Corporation Compressed speech lexicon and method and apparatus for creating and accessing the speech lexicon

Also Published As

Publication number Publication date
US20060167680A1 (en) 2006-07-27
CN101137982A (en) 2008-03-05

Similar Documents

Publication Publication Date Title
CN109408526B (en) SQL sentence generation method, device, computer equipment and storage medium
US5890103A (en) Method and apparatus for improved tokenization of natural language text
JP5099953B2 (en) Generation of unified task-dependent language model by information retrieval method
JP3272288B2 (en) Machine translation device and machine translation method
US8626786B2 (en) Dynamic language checking
US20020099543A1 (en) Segmentation technique increasing the active vocabulary of speech recognizers
CN109710929A (en) A kind of bearing calibration, device, computer equipment and the storage medium of speech recognition text
WO2001029697A9 (en) A method and system for reducing lexical ambiguity
US7475005B2 (en) Translation system, dictionary updating server, translation method, and program and recording medium for use therein
US20080208566A1 (en) Automated word-form transformation and part of speech tag assignment
US20090192991A1 (en) Network information searching method by speech recognition and system for the same
US7742922B2 (en) Speech interface for search engines
CN109800346A (en) Text matching technique, device, computer equipment and storage medium
CA3012200A1 (en) Integrated language model, related systems and methods
US20060229864A1 (en) Method, device, and computer program product for multi-lingual speech recognition
WO2004107202A1 (en) Automatic segmentation of texts comprising chunsks without separators
Yazdani et al. Unfold: A memory-efficient speech recognizer using on-the-fly wfst composition
CN115495541B (en) Corpus database, corpus database maintenance method, apparatus, device and medium
WO2006079892A2 (en) System and method for optimizing run-time memory usage for a lexicon
Liu et al. Context dependent language model adaptation.
EP0980063A2 (en) Memory management in search phase of a speech recognizer
HK1114215A (en) System and method for optimizing run-time memory usage for a lexicon
JP2001101184A (en) Structured document generation method and apparatus, and storage medium storing structured document generation program
WO2009082115A1 (en) Korean morpheme analysis system and method using pre-analysis data
EP0982712A2 (en) Segmentation technique increasing the active vocabulary of speech recognizers

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application
WWE Wipo information: entry into national phase

Ref document number: 200680007282.1

Country of ref document: CN

122 Ep: pct application non-entry in european phase

Ref document number: 06710251

Country of ref document: EP

Kind code of ref document: A2

WWW Wipo information: withdrawn in national office

Ref document number: 6710251

Country of ref document: EP