# Patent

## Title
Method, system, and apparatus for converting currency values based upon semantically labeled strings

## Abstract

A method, system, and apparatus are provided for converting currency values between types of currency. When a string of text is entered into an application program, the string is analyzed to determine whether the string of text includes a currency value. If the string of text includes a currency value, the value is semantically labeled with schema information that identifies the type of currency associated with the value. When a selection is received of the currency value, a list of actions may be provided identifying conversion options available for the value. One of the conversion options may then be selected resulting in the conversion of the selected currency value to the destination type of currency identified by the selected action. The converted currency value may then be inserted into the string of text to replace the selected currency value along with a currency notation corresponding to the destination currency value.

## Background
TECHNICAL FIELD
Embodiments of the present invention relate to the field of currency conversion. More particularly, embodiments of the invention relate to the field of converting currency values based upon semantically labeled strings.
BACKGROUND OF THE INVENTION
On Jan. 2, 2002, the new European currency, the Euro, became the official currency of twelve European countries. The countries that adopted the Euro as their official currency are Austria, Belgium, Finland, France, Germany, Greece, Ireland, Italy, Luxembourg, The Netherlands, Portugal, and Spain. After Feb. 28, 2002, the national currencies of these countries were no longer accepted for transactions. With the adoption of the Euro as the official currency of most European nations, a unified economic marketplace of over 300 million people has been created. Denmark, Great Britain, and Sweden may also adopt the Euro as their official currencies sometime in the future, thereby creating an even larger unified economic marketplace.
Although the conversion from national currencies to the Euro officially occurred in 2002, many electronic documents created prior to the conversion still contain references to the former national currencies of the member countries. Therefore, when these types of documents are utilized, it may be necessary to convert referenced currency values from the expressed national currency to the Euro. For instance, a user may need to easily and quickly convert a currency value referenced in a word processing document from French Francs to Euro. A user may also need to convert a Euro currency value to one of the former national currencies. However, converting currency values between national currencies and the Euro, and vice versa, has heretofore been difficult for a user to accomplish easily and quickly.
Previously, if a user wanted to convert a currency value referenced in an electronic document, such as a word processing document, between a national European currency and Euro, or vice versa, the user would first have to copy the currency value to be converted to a clipboard. The user would then paste the value into an external program or Web site capable of converting the currency value to Euro. Once the external program or Web site had completed the conversion, the user would copy the converted currency value to the clipboard and then paste the converted value back into the electronic document. The user might also have to locate the currency symbol for the converted type of currency and insert the symbol into the document.
Although systems such as these do allow a user to convert currency values between national European currencies and Euro, these systems can be difficult to use because of the large number of steps required to complete the conversion. Moreover, these previous solutions require the user to perform the conversion using the user interface language of the conversion program or Web site. This can be extremely frustrating for an international user that does not understand the language of the conversion program or Web site.
Therefore, in light of the above, there is a need for a method, system, and apparatus for easily converting currency values between Euro and the national currencies of the member European countries that do not require the user to utilize an external application or Web site to convert currency values. Moreover, there is a need for a method, system, and apparatus for converting currency values between Euro and the national currencies of the member European countries that can present conversion options to the user in a user-selected user interface language.
SUMMARY OF THE INVENTION
Embodiments of the present invention solve the above-described problems by providing a method, system, and apparatus for easily converting currency values between different currency types that do not require the use of an external application or Web site to convert the currency values. Moreover, embodiments of the present invention provide a method, system, and apparatus for converting currency values between different currency types that can present conversion options to the user in a user-selected interface language.
According to one actual embodiment of the present invention, a method is provided for converting currency values that is utilized in a system for creating and editing an electronic document. According to this embodiment of the invention, software modules are executed in conjunction with a software application for creating and editing an electronic document that allow the convenient conversion of currency values to different currency types. When a user types a string of text, such as a paragraph into the software application, the string is analyzed to determine whether the string of text includes a currency value. For instance, a user may type the value “10 F”, which represents ten French Francs. If the string of text includes a currency value, the value is semantically labeled with schema information that identifies the type of currency. For instance, if a string of text includes the currency value “10 F”, schema information will be associated with the currency value indicating that the currency value is expressed in Francs.
Once a currency value has been identified within a string of text, such as a paragraph, the application may display an indication to the user that the currency value has been semantically labeled. This indication also identifies to the user that actions may be performed on the currency value. When a selection is received of the currency value or the indication, a list of actions may be provided to the user identifying conversion options available for the currency value. For instance, if the identified currency value includes a reference to the currency type “F”, for Francs, an action menu item may be displayed to the user for converting the currency value to Euro. Similarly, if the identified currency value is expressed in Euro, an action menu will be presented to the user for converting the value to one of the national European currencies. Other types of conversion options may also be presented to the user for converting the currency value.
According to one embodiment of the invention, a current user interface language setting for the application program is determined prior to providing the list of actions to the user. When the user selects the list of actions, the available actions are displayed to the user in a language specified by the current user interface language setting. In this manner, the user is always presented the conversion options in the current user interface language.
After the list of actions has been displayed to the user, a selection of one of the actions may be received. In response to receiving the selection of a conversion action, a converted currency value may be generated by converting the selected currency value to the destination currency type identified by the selected action. Once the conversion is completed, the converted currency value may be inserted into the string of text to replace the selected currency value. According to various embodiments of the present invention, a document object model supported by the application program may be utilized to insert the converted currency value into the string of text. Alternatively, the converted currency value may be displayed to the user.
According to another embodiment of the present invention, a system is provided for converting a currency value between currency types. The system provided according to this embodiment of the invention, includes a recognizer plug-in capable of receiving a portion of an electronic document as a string of text from an application program. For instance, the recognizer plug-in may receive a paragraph of text from an application program as it is typed by the user. Once the recognizer plug-in has received the string of text, the recognizer plug-in analyzes the string of text to determine whether the string of text includes a currency value. If the string, of text includes a currency value, the recognizer plug-in semantically labels the currency value with schema information identifying the type of currency used to express the currency value. This information is then passed by the recognizer plug-in back to the application program.
The system provided herein according to the various embodiments of the invention may also include an application program for creating, editing, or viewing an electronic document. For instance, the application program may comprise a word processor, a spreadsheet application program, an e-mail application which includes editing functions, a web browser application, or other types of application programs for creating, editing, and viewing electronic documents. According to this embodiment of the invention, the application program is capable of displaying the string of text along with an indication that the currency value has been semantically labeled by the recognizer plug-in. This indication may comprise a user interface object for indicating to a user that the currency value has been semantically labeled and that conversion actions may be performed on the currency value.
The application program may also be operative to receive a selection of the currency value or the indication and to provide a list of actions that may be performed on the currency value to convert the currency value to another currency type. The application may then receive the selection of one of the list of actions and provide the identity of the selection and the currency value to an action plug-in.
The system may also include an action plug-in that is capable of generating a converted currency value by converting the selected currency value to a destination currency type identified by action selected from the list of actions. The action plug-in is also operative to replace the selected currency value with the converted currency value in the destination type of currency. According to one actual embodiment of the invention, the action plug-in may replace the currency value with the converted currency value in the string of text by accessing a document object model provided by the application program. Alternatively, the converted currency value may be displayed to the user in a dialog box or window.
According to various embodiments of the present invention, the system provided herein may also include an action plug-in that is operative to register with the application program prior to performing any conversion functions. As a part of the registration procedure, the action plug-in may provide the list of actions that may be performed on the currency value to convert the currency value to another currency type. Moreover, when creating the list of actions, the action plug-in may determine a current user interface language setting for the application program and generate the action menu items in a language specified by the current user interface language setting.
Other embodiments of the present invention provide a computer-controlled apparatus and a computer-readable medium for converting currency values between currency types. These and other details regarding the various embodiments of the invention will become more apparent from the detailed description that follows.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1A is a block diagram showing the architecture of a personal computer that provides an illustrative operating environment for embodiments of the present invention;
FIG. 1B is a block diagram showing the format and contents of a currency formats file utilized in various embodiments of the present invention to assist in the recognition of currency values expressed in many formats;
FIG. 1C is a block diagram showing the format and contents of a currency notations file utilized in various embodiments of the present invention to assist in the recognition of currency values expressed using many different notations;
FIG. 2 is a block diagram that shows a software architecture for recognizing, labeling, and performing actions on recognized strings of text according to various embodiments of the present invention;
FIGS. 3A-3F are screen diagrams showing screen displays including an action menu for converting currency values between currency types provided by various embodiments of the present invention;
FIG. 4 is a flow diagram showing an illustrative routine for registering an action plug-in with an application program according to one actual embodiment of the present invention;
FIG. 5 is a flow diagram showing an illustrative routine for processing a string input provided at an application program according to one actual embodiment of the present invention;
FIG. 6 is a flow diagram illustrating the operation of a recognizer plug-in software module provided according to one actual embodiment of the present invention;
FIG. 7 is a flow diagram illustrating a routine for processing the selection of a semantically categorized currency value according to one actual embodiment of the present invention; and
FIG. 8 is a flow diagram showing a routine for executing an action plug-in for converting currency values between currency types according to one actual embodiment of the present invention.



DETAILED DESCRIPTION OF AN ILLUSTRATIVE EMBODIMENT
As described briefly above, embodiments of the present invention provide a method, system, apparatus, and computer-readable medium for converting currency values between currency types. In the following detailed description, references are made to the accompanying drawings that form a part hereof, and in which are shown by way of illustration specific embodiments or examples. These embodiments may be combined, other embodiments may be utilized, and structural changes may be made without departing from the spirit and scope of the present invention. The following detailed description is, therefore, not be taken in a limiting sense, and the scope of the present invention is defined by the appended claims and their equivalents.
Referring now to the drawings, in which like numerals represent like elements through the several figures, aspects of the present invention and the illustrative operating environment will be described. FIG. 1A and the following discussion are intended to provide a brief, general description of a suitable computing environment in which the invention may be implemented. While the invention will be described in the general context of program modules that execute in conjunction with an application program that runs on an operating system on a personal computer, those skilled in the art will recognize that the invention may also be implemented in combination with other program modules. Additional aspects of an illustrative operating environment and software architecture for implementing the various embodiments of the present invention are described in U.S. patent application Ser. No. 09/588,411, entitled “Method and System for Semantically Labeling Strings and Providing Actions Based on Semantically Labeled Strings”, which is expressly incorporated herein by reference.
Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types. Moreover, those skilled in the art will appreciate that the invention may be practiced with other computer system configurations, including handheld devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like. The invention may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
Turning now to FIG. 1A, an illustrative computer architecture for a personal computer 2 for practicing the various embodiments of the invention will be described. The computer architecture shown in FIG. 1A illustrates a conventional personal computer, including a central processing unit 4 (“CPU”), a system memory 6, including a random access memory 8 (“RAM”) and a read-only memory (“ROM”) 10, and a system bus 12 that couples the memory to the CPU 4. A basic input/output system containing the basic routines that help to transfer information between elements within the computer, such as during startup, is stored in the ROM 10. The personal computer 2 further includes a mass storage device 14 for storing an operating system 16, application programs, such as the application program 205, and data.
The mass storage device 14 is connected to the CPU 4 through a mass storage controller (not shown) connected to the bus 12. The mass storage device 14 and its associated computer-readable media provide non-volatile storage for the personal computer 2. Although the description of computer-readable media contained herein refers to a mass storage device, such as a hard disk or CD-ROM drive, it should be appreciated by those skilled in the art that computer-readable media can be any available media that can be accessed by the personal computer 2.
By way of example, and not limitation, computer-readable media may comprise computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. Computer storage media includes, but is not limited to, RAM, ROM, EPROM, EEPROM, flash memory or other solid state memory technology, CD-ROM, DVD, or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by the computer.
According to various embodiments of the invention, the personal computer 2 may operate in a networked environment using logical connections to remote computers through a TCP/IP network 18, such as the Internet. The personal computer 2 may connect to the TCP/IP network 18 through a network interface unit 20 connected to the bus 12. It should be appreciated that the network interface unit 20 may also be utilized to connect to other types of networks and remote computer systems. The personal computer 2 may also include an input/output controller 22 for receiving and processing input from a number of devices, including a keyboard or mouse (not shown). Similarly, an input/output controller 22 may provide output to a display screen, a printer, or other type of output device.
As mentioned briefly above, a number of program modules and data files may be stored in the mass storage device 14 and RAM 8 of the personal computer 2, including an operating system 16 suitable for controlling the operation of a networked personal computer, such as the WINDOWS XP operating system from MICROSOFT CORPORATION of Redmond, Wash. The mass storage device 14 and RAM 8 may also store one or more application programs. In particular, the mass storage device 14 and RAM 8 may store an application program 205 for creating, editing, or viewing an electronic document 24. For instance, the application program 205 may comprise a word processing application program and the electronic document 24 may comprise a word processing document. The application program 205 may also comprise a spreadsheet application program and the electronic document 24 comprise a spreadsheet. Similarly, the application program 205 may comprise an electronic mail application program and the electronic document 24 may comprise an electronic mail message. Likewise, the application program 205 may comprise a web browser application program and the electronic document 24 may comprise a web page stored locally on the personal computer 2 or remotely on the network 18. Application programs for creating, editing, or viewing other types of electronic documents may also be used with the various embodiments of the present invention.
Embodiments of the present invention provide program modules for use in conjunction with the application program 205 that convert currency values contained within the electronic document 24 between currency types. In particular, embodiments of the invention provide a recognizer plug-in 220 and an action plug-in 225. As will be described in greater detail below, the recognizer plug-in 220 recognizes currency values contained within a portion of the electronic document 24 and labels the currency values with semantic information identifying their type of currency. The recognizer plug-in 220 then passes this information to the application program 205 for use by the action plug-in 225. The action plug-in 225 performs actions on the recognized currency values for converting to other types of currencies.
According to one embodiment of the invention, the action plug-in 225 converts currencies between the Euro and the national currencies of the European Union (“EU”) member countries. The fixed conversion ratios for converting between Euros and national currencies, rounding rules, and rules regarding the calculation precision utilized in the conversion process are stored in the Euro conversion rules file 28. These rules are defined by the European Community regulation No. 1103/97 and are well known to those skilled in the art. As known to those skilled in the art, EC Regulation Nos. Z866/98 and 1478/2000 define the conversion rates.
According to various embodiments of the present invention, the action plug-in 225 may also generate a list of conversion actions that may be performed on a given currency value. As a part of this process, the action plug-in 225 may query language settings of the application program 205 or operating system 16 to identify the current language settings for the user interface language. The list of actions may then be created in the current user interface language.
According to one embodiment of the invention wherein the application program 205 comprises a spreadsheet application program, the action plug-in 225 maintains a per cell undo stack 29. The per cell undo stack 29 comprises one or more data structures that maintain a list of recently performed currency conversions. Through the use of the per cell undo stack 29, the action plug-in 225 allows a user to “undo” currency conversions on a per cell basis, thereby returning the contents of the cell to its state prior to the conversion. As will be described in greater detail below, the action plug-in may present a menu item to the user for performing a per cell undo operation.
According to the various embodiments of the present invention, the RAM 8 and the mass storage device 14 may also store a currency formats file 26 and a currency notations file 27. The currency formats file 26 and the currency notations file 27 store the format and notations for representing currencies in a variety of different manners. The currency formats file 26 and the currency notations file 27 are utilized by the recognizer plug-in 220 to recognize a wide variety of currency types and formats. Additional details regarding the contents of the currency formats file 26 and the currency notations file 27 will be described in below with reference to FIGS. 1B and 1C, respectively.
Referring now to FIG. 1B, various aspects of the currency formats file 26 will be described. As discussed briefly above, the currency formats file 26 is utilized by the recognizer plug-in 220. In particular, the recognizer plug-in 220 utilizes the currency formats file 26 to recognize currencies expressed utilizing different decimal and thousands separator symbols. This is necessitated by the fact that many different countries utilize contradicting separator symbols. For example, in the United States, a comma is utilized as a grouping separator and a period is utilized as a decimal separator. However, in some European countries, a period is utilized as a grouping separator and a comma is used as a decimal separator. Therefore, if the number “1,000” is entered, the number would be interpreted as one-thousand in the United States and as one in Europe. In order to avoid this confusion, the currency formats file 26 describes each of the possible currency formats, or combinations of decimal and separator symbols, recognized by the recognizer plug-in 220.
Turning now to FIG. 1C, various aspects of the currency notations file 27 will be described. As discussed briefly above, the currency notations file 27 is utilized by the recognizer plug-in 220. In particular, the recognizer plug-in 220 utilizes the currency notations file 27 to identify currencies expressed using a variety of different notations. For instance, the currency value for ten Finnish Markka may be expressed using the following notations: 10 mk, FIM 10, 10 markkaa, or 10 FIM. In order to account for the variations in currency notation, the currency notations file 27 contains a sequence of possible notations and the countries to which the notations correspond. The recognizer plug-in 220 uses the sequence of notations to identify currency values expressed using the notations in strings of text, or within a spreadsheet cell. It should be appreciated that the currency formats identified in the currency formats file 26 and the notations identified in the currency notations file 27 are merely illustrative and that other formats and notations may be utilized.
Referring now to FIG. 2, an illustrative software architecture for use in conjunction with the various embodiments of the present invention will be described. The architecture shown in FIG. 2 includes an application program 205, such as a word processor application program, a spreadsheet application program, web browser, or other type of application program for creating, editing, or viewing electronic documents. The application program 205 is able to communicate with a recognizer dynamically linked library (“DLL”) 210 and an action DLL 215. As will be described in greater detail below, the recognizer DLL 210 controls one or more recognizer plug-ins 220A-220N and the action DLL 215 controls one or more action plug-ins 225A-225N.
According to one embodiment of the invention, the recognizer plug-ins 220A-220N and the action plug-ins 225A-225N are automation servers. Automation servers are well-known software components that are assembled into programs or add functionality to existing programs running on the WINDOWS XP operating system from MICROSOFT CORPORATION of Redmond, Wash. Automation servers may be written in a variety of computing languages and can be plugged and unplugged at runtime without having to recompile the host program.
The recognizer DLL 210 handles the distribution of text strings from an electronic document being edited by the application program 205 to the individual recognizer plug-ins 220A-220N. The recognizer plug-ins 220A-220N recognize particular strings in an electronic document, such as a word processing document or a spreadsheet document. The recognizer plug-ins 220A-220N may be packaged with the application program module 205 or they may be written by third parties to recognize particular strings of interest. Typically, the recognizer DLL 210 passes strings to the recognizer plug-ins 220A-220N in single paragraphs or cell value increments. However, strings may be passed to the recognizer plug-ins 220A-220N in other sizes and formats.
As part of recognizing certain strings as including semantic information, the recognizer plug-ins 220A-220N determine which strings are to be labeled and how they are to be labeled. After receiving these results from the various recognizer plug-ins 220, the recognizer DLL 210 sends semantic categories to the application program module 205. According to one actual embodiment of the invention, a recognizer plug-in 220 is provided for recognizing strings as containing currency values. According to this embodiment of the invention, the semantic category comprises schema information that identifies the currency type for the currency value. The schema information may also include information identifying the language in which the string of text is expressed. This information is returned to the recognizer DLL 210 by the recognizer plug-in 220 along with other information that may be utilized by a corresponding action plug-in 225, such as a copy of the currency value and the source currency type. Additionally, the recognizer plug-in 220 may return information identifying the location of the currency value within the text string, including the length of the text string and the character location of the first letter of the currency value.
It should be appreciated that each of the recognizer plug-ins 220A-220N are executed separately. The recognizer DLL 210 is responsible for handling the asynchronicity that results from different recognizer plug-ins 220A-220N returning results at different times. In this manner, various types of data may be recognized within a text string and different actions provided for each semantically labeled string. It should also be appreciated that more than one application program 205 may utilize the services of the recognizer DLL 210 and the action DLL 215 concurrently. Additional details regarding the operation of the recognizer plug-in 220 for recognizing currency values will be described below with reference to FIGS. 4-8.
After a string is labeled by a recognizer plug-in 220A-220N, schema information is sent to the application program module 205. A user of the application program module 205 may then execute actions that are associated with the schema information on the recognized string. The action DLL 215 manages the action plug-ins 225A-225N that are executed in order to perform the actions. As with the recognizer plug-ins 220A-22N, the action plug-ins 225A-225N may be packaged with the application program module 205 or written by third parties to perform particular actions that are of interest. The action plug-ins 225A-225N provide possible actions to be presented to the user based upon the schema information, or type label, associated with the string. As will be described in greater detail below, the list of actions provided to the user is dynamically generated for each schema type. This information is then provided to the application program 205 which displays the list of actions to the user when the string is selected.
After an action has been chosen from the list of actions, the action DLL 215 manages the appropriate action plug-in 225A-225N and passes the necessary information between the action plug-in and the application program module 205 so that the action plug-in may execute the desired action. Typically, the application program module 205 sends the action DLL 215 an automation request to invoke the action the user has selected. As will be described in greater detail below, according to one embodiment of the invention, an action plug-in 225 is provided that converts recognized currency values to other currency types. Additional details regarding the operation of the action plug-in 225 will be described in greater detail below with reference to FIGS. 3-8.
Referring now to FIGS. 3A-3D, an illustrative user interface provided by the various embodiments of the present invention will be described. FIGS. 3A and 3B illustrate a user interface provided by embodiments of the invention wherein the application program 205 comprises a word processing application program, such as WORD, from MICROSOFT CORPORATION of Redmond, Wash. As shown in FIG. 3A, a currency value 32 may be typed by a user into an application program 205, as a part of a string of text. Once the user has provided the string of text, the string of text is provided to a recognizer plug-in 220 that recognizes currency values contained within the string of text, such as the currency value 32. The currency value 32 identified by the recognizer plug-in 220 is identified to the application program module as a type of semantic information upon which actions may be performed. Therefore, the application program module 205 provides an indication to the user that actions may be performed on the currency value 32. This indication may be provided to the user by highlighting the currency value 32 or providing a user interface indication 34 in proximity to the currency value 32.
When the currency value 32 or the indication 34 is selected by a user, a list of actions is displayed that may be performed on the currency value to convert the currency value to another type of currency. This list of actions may comprise a dropdown menu 36 having one or more menu items corresponding to the list of actions that may be performed on the currency value 32. According to one embodiment of the invention, the contents of the dropdown menu 36 may be displayed in one of many different languages. The language in which the dropdown menu 36 is displayed is based on a current user interface language for the application program module 205 or the operating system 16. In this manner, international users throughout the world will be displayed a dropdown menu 36 in their currently installed and active user interface language. The list of actions 38, therefore, shown in FIGS. 3A-3F is displayed English. It should be appreciated, however, that the dropdown menu 36 would appear in another language if a language other than English was selected as the current user interface language on the personal computer 2.
As shown in FIG. 3A, the dropdown menu 36 includes an indication of the currency value 32 to be converted. The dropdown menu 36 also includes a list of actions 38 that may be performed to convert the currency value 32 to another type of currency. According to one embodiment of the invention, the list of actions 38 displayed in the dropdown menu 36 includes actions for converting the currency value 32 to Euro when the currency value is expressed in any other currency other than Euro. For instance, as shown in FIG. 3A, the selection of the recognized currency value 32 of “195.58 DEM” results in the display of a dropdown menu 36 including an action for converting Deutsche Mark to Euro. According to this embodiment of the invention, if the currency value 32 is expressed in Euro, the dropdown menu 36 includes actions for converting the currency value from Euro to other types of currencies. Therefore, as shown in FIG. 3B, if a user types the currency value 32 of “100 EUR”, the dropdown menu 36 will include actions for converting from Euro to other currency types, such as Australian Schilling, Belgian Franc, Deutsche Mark, and others.
Once the selected conversion has been performed, the currency value 32 may be replaced in the string of text using a document object model provided by the application program 205. This process is described in greater detail below. Additionally, as will be discussed in greater detail below, the application program 205 receives most of the text shown in the dropdown menu 36 from the action plug-in 225. This process occurs when the application program 205 is initially executed and the action plug-in 225 registers itself with the application program 205. Additional details regarding this registration process will be described below with reference to FIG. 4.
As also shown in FIG. 3A, the application program module 205 also adds menu items 44A and 44B to the dropdown menu 36. The selection of item 44A removes the semantic information from a selected string of text and the selection of item 44B provides a list of user selectable preferences defining the operation and behavior of the recognizer and action plug-ins.
FIGS. 3C and 3D illustrate an embodiment of the invention wherein the application program 205 comprises a spreadsheet application program, such as EXCEL, from MICROSOFT CORPORATION of Redmond, Wash. When used in conjunction with a spreadsheet application program, the software components provided by the various embodiments of the invention operate in much the same way as with a word processing application program. However, when used in conjunction with a spreadsheet application program, numbers entered into cells are recognized as currency values. When the numbers are converted, they are inserted into a cell as numbers rather than text. Moreover, an accounting format associated with the destination type of currency may be applied to the cell.
As shown in FIG. 3C, if the entered currency value 32 is expressed in Euro, the dropdown menu 36 will include one or more actions for converting to one or more national currencies. As shown in FIG. 3D, if the entered currency value 32 is expressed in any currency other than Euro, the dropdown menu 36 includes one action for converting the currency value 32 to the Euro. Once the conversion operation has been performed, the converted currency value may be inserted into the appropriate cell, or the results of the conversion may be displayed to the user in a dialog box.
FIGS. 3E and 3F illustrate an embodiment of the invention wherein the application program 205 comprises a Web browser application program, such as INTERNET EXPLORER, from MICROSOFT CORPORATION of Redmond, Wash. As shown in FIGS. 3E and 3F, portions of a Web page displayed in the Web browser may be recognized as containing currency values. In response to the selection of one of the recognized currency values, a dropdown menu 36 may be displayed for converting the value to or from Euro. Once the user has selected an action from the list of actions 38, the conversion of the currency value 32 is performed according to the selected action. The converted currency value may then be displayed to the user in a dialog box 37 as shown in FIGS. 3E and 3F.
Referring now to FIG. 4, an illustrative routine 400 will be described for registering the currency conversion software components with the application program 205. In particular, when the action plug-in 225 and the recognizer plug-in 220 for converting currency values are first executed, they are registered with the application program 205. By registering with the application program 205, the application program 205 is made aware of the software components and enabled for use with the schema types recognized by the recognizer plug-in 220. Moreover, the action items to be displayed to the user corresponding to each schema type are also enumerated to the application program 205 so that the application program 205 can display the dropdown menu 36 when a currency value 32 or indicator 34 is selected by a user.
The routine 400 begins at block 402, where the current user interface language is identified. As discussed briefly above, the current user interface language may be stored in language settings maintained by the operating system 16 or the application program 205. Once the current user interface language has been identified, the routine 400 continues to block 404. At block 404, the action item menu for converting from Euro to national currencies is generated in the current user interface language. The routine 400 then continues from block 404 to block 406.
At block 406, separate action menus are generated for converting from each national currency to Euro. It should be appreciated that the action menu items are generated on a per source currency type basis. In this manner, many separate dropdown menus 36 may be generated, one for each source unit name. Moreover, a separate schema name is utilized for each source currency type. Additionally, these menus are also generated in the current user interface language.
From block 406, the routine 400 continues to block 408, where the action menu items for each schema are returned to the application program 205. According to one embodiment of the invention, the application program 205 displays the dropdown menu 36 in response to the selection of a currency value 32 or an indicator 34. However, it should be appreciated that the action plug-in 225 or other software component may be responsible for the display of the dropdown menu 36. The routine 400 continues from block 408 to block 410, where it ends.
Turning now to FIG. 5, an illustrative routine 500 will be described for processing the input of a new string at the application program 205. The routine 500 begins at block 502, where the application program 205 receives a new string, such as when a user enters a new paragraph into an electronic document, edits a previously entered paragraph, or enters a new value into a cell in a spreadsheet. From block 502, the routine 500 continues to block 504 where the application program 205 passes the new string to the recognizer DLL 210. As described above, the recognizer DLL 210 is responsible for communicating with the application program 205, managing the jobs that need to be performed by the recognizer plug-ins 220A-220N, receiving results from the recognizer plug-ins 220A-220N, and sending schema information to the application program module 205 for recognized currency values and source currency types. It should be understood that, in one embodiment of the invention, a paragraph is passed to the recognizer DLL 210 at block 504. However, in alternative embodiments, a sentence, the contents of a spreadsheet cell, a section of the document, the entire document, etc., may be passed to the recognizer DLL 210. In other words, it should be appreciated that the embodiments of the present invention are not limited to simply passing a paragraph to the recognizer DLL 210.
From block 504, the routine 500 continues to block 506, where the recognizer DLL 210 passes the string to the recognizer plug-ins 220A-220N. The routine 500 then continues to block 508 where the recognizer plug-ins are executed on the paragraph to recognize key words or characters within the string. In particular, the recognizer plug-in for converting currency values between currency types is executed on the string. An illustrative routine describing the operation of the recognizer plug-in for currency conversion is described below with reference to FIG. 6. At block 510, the results from the recognizer plug-in 220 are received at the recognizer DLL 210. The routine 500 then continues to block 512, where a determination is made by the recognizer DLL 210 as to whether the paragraph has been edited since the string was transmitted to the recognizer plug-ins 220A-220N. If the paragraph has been edited, the routine 500 returns to block 504, where the edited string is passed to the recognizer DLL 210. If the paragraph has not been edited, the routine 500 continues to block 514, where the recognizer DLL 210 sends the results received from the recognizer plug-in 220 to the application program 205. The routine 500 then continues to block 516, where it ends.
Referring now to FIG. 6, an illustrative routine 600 will be described that illustrates the operation of the recognizer plug-in 220 for converting currency values according to one embodiment of the present invention. The routine 600 begins at block 602, where a string of text is received at the recognizer plug-in 220 from the recognizer DLL 210. The routine 600 then continues to block 604, where a determination is made as to whether the string of text contains numeric digits.
From block 604, the routine 600 continues to block 606, where a determination is made as to whether digits were found in the string of text. If no digits were found, the routine 600 branches from block 606 to block 614, where it returns to block 510, shown in FIG. 5. If, however, at block 606, it is determined that digits were found in the string of text, the routine 600 continues to block 608.
At block 608, the format of the digits is examined to determine whether the format matches one of the specified currency formats listed in the currency formats file 26. In particular, the arrangement of the decimal and separator characters utilized in the currency value may be examined and compared to the formats listed in the currency formats file 26. The routine 600 then continues to block 610.
At block 610, a determination is made as to whether the recognized currency value is formatted according to one of the recognized formats. If the currency value is not formatted in one of the recognized formats, the routine 600 branches to block 614, where it returns to block 510, shown in FIG. 5. If the currency value is formatted in one of the recognized formats, the routine 600 continues to block 611.
At block 611, a determination is made as to whether the recognized currency value is arranged according to one of the currency notations identified in the currency notations file 27. In particular, this process may involved scanning the text located prior to and after the digits to identify the notation. Once a notation has been identified, the source type of currency may also be identified. For instance, if the string of text includes the digits “10”, followed by an “F”, the recognizer will recognize this as one of the recognized notations for representing French francs. Schema information corresponding to the source type of currency is then associated with the recognized currency value.
If, at block 612, it is determined that the recognized currency value is not in one of the recognized notations, the routine 600 branches to block 614, where it returns to block 510, shown in FIG. 5. If, however, the currency value is expressed using one of the recognized notations, the routine 600 continues to block 613. At block 613, schema information is returned to the recognizer DLL 210. In particular, a schema name associated with the source currency type is returned to the recognizer DLL 210. Additionally, a “property bag” may also be returned to the recognizer DLL 210. The property bag is an object which stores information about the recognized currency value that may be utilized by the action plug-in 225. For instance, the property bag may include data identifying the format and notation for the currency value. Additionally, an index to the recognized currency value within the string of text may also be returned to the recognizer DLL 210. All of the information returned from the recognizer plug-in 220 to the recognizer DLL 210 may be subsequently passed to the action plug-in 225 and used in the conversion process. This is described in greater detail below with respect to FIGS. 7 and 8. From block 613, the routine 600 continues to block 614, where it returns to block 510, shown in FIG. 5.
Referring now to FIG. 7, an illustrative routine 700 will be described for processing the selection of a semantically categorized currency value. As discussed above, once a currency value has been recognized within a string of text by the recognizer plug-in 220A, the currency value may be highlighted or an indication may be provided to the user indicating that the currency value has been recognized and that actions may be performed on the currency value. Accordingly, at block 702, a determination is made as to whether the currency value or indicator has been selected by a user. If the currency value has not been selected, the routine 700 continues to block 714, where it ends. If, however, the currency value or indicator has been selected, the routine 700 continues to block 704.
At block 704, the application program 205 displays the list of actions associated with the schema corresponding to the selected currency value. In this manner, the dropdown menu 36 described above with reference to FIGS. 3A-3F is presented to the user. The routine 700 then continues from block 704 to block 706, where a determination is made as to whether the user has selected one of the items from the list of actions. If the user has made the selection of a user interface item other than one of the items from the list of actions, the routine 700 branches to block 710, where the list of actions is removed. If, however, the user does select one of the items from the list of actions, the routine 700 continues to block 708.
At block 708, the application program 205 calls the action plug-in 225 corresponding to the appropriate schema type and indicates that an action item has been selected. The call from the application program 225 to the action plug-in 225 includes the schema name corresponding to the recognized currency value, the item number of the selected menu item, the name of the calling application program 205, a pointer into an object model provided by the application program 205 for accessing the document 24, the property bag described above with reference to FIG. 6, and the text of the recognized currency value. The routine 700 then continues to block 712, where the action plug-in for converting currency values is executed. An illustrative routine for executing the action plug-in 225 for currency conversion is described below with reference to FIG. 8. Once the action plug-in 225 has completed its execution, the routine 700 continues from block 712 to block 714, where it ends.
Referring now to FIG. 8, an illustrative routine 800 will be described for executing an action plug-in 225 for converting currency values. The routine 800 begins at block 802, where the action plug-in 225 receives a call from the action DLL 215 indicating that the user has selected an action menu item. From block 802, the routine 800 continues to block 804, where the action plug-in 225 determines the actual value of the recognized currency value in view of the format and notation that the currency value is expressed in. This is necessary because currency values expressed in different languages may include separator characters that have different meanings in different languages. For instance, a currency value may be expressed in French as “1,729”, while in English it would be expressed as “1729.” Therefore, the actual value of the currency value must be determined prior to performing the conversion operation.
From block 804, the routine 800 continues to block 806, where the recognized currency value is converted to the destination currency type according to the selected action menu item. In particular, the Euro conversion rules file 28 may be utilized to perform the actual conversion, including rounding and determining the appropriate number of significant digits.
From block 806, the routine 800 continues to block 808, where the converted currency value is formatted. The converted currency value may be formatted according to the regional format specified in the language settings of the application 205 or the operating system 16. Other types of formatting may also be applied to the converted currency value.
From block 808, the routine 800 continues to block 810 where the currency value in the string of text is replaced with the converted currency value. According to one embodiment of the present invention, the replacement is made by accessing a document object model provided by the application program 205. Through the document object model, the action plug-in 225 can directly access the document 24 and make changes therein. Details regarding the use of such a document object model are well known to those skilled in the art. Alternatively, the converted currency value may be displayed to the user in a dialog box or other type of user interface object. From block 810, the routine 800 continues to block 812, where it returns to block 714, described above with reference to FIG. 7.
Based on the foregoing, those skilled in the art should appreciate that various embodiments of the present invention provide a method, system, apparatus, and computer-readable medium for converting currency values based upon semantically labeled strings. The above specification, examples and data provide a complete description of the manufacture and use of the composition of the invention. Since many embodiments of the invention can be made without departing from the spirit and scope of the invention, the invention resides in the claims hereinafter appended.

## Claims

1. In a system for creating and editing an electronic document, a method for converting a currency value, the method comprising:
determining whether a string of text contained within the electronic document contains a currency value expressed in a source type of currency, wherein determining whether the string of text contained within the electronic document contains the currency value expressed in the source type of currency comprises utilizing a recognizer plug-in having a currency format file to recognize currencies expressions having different decimal and thousands separator symbols;
in response to determining that the string of text includes a currency value, semantically labeling the value with schema information identifying the source type of currency;
displaying the currency value and an indication that the currency value has been semantically labeled adjacent to the string of text;
providing a list of actions that may be performed on the currency value to convert the currency value to a destination type of currency, the list of actions identified based upon the schema information;
receiving a selection of an action from the list of actions; and
generating a converted currency value by converting the currency value from the source type of currency to the destination type of currency identified by the selected action.

2. The method of claim 1, further comprising: replacing the currency value in the electronic document with the converted currency value.

3. The method of claim 2, wherein replacing the currency value in the electronic document with the converted currency value comprises utilizing a document object model provided by an application for editing the electronic document to replace the currency value in the electronic document with the converted currency value.

4. The method of claim 3, wherein the list of actions comprises a dropdown menu having one or more menu items corresponding to the list of actions that may be performed on the currency value to convert the currency value to the destination type of currency.

5. The method of claim 4, further comprising:
determining a current user interface language setting for the application; and
generating the menu items of the dropdown menu in a language specified by the current user interface language setting.

6. The method of claim 5, wherein the list of actions is provided in response to the selection of the currency value or the indication.

7. The method of claim 6, wherein the schema information comprises data uniquely corresponding to the source type of currency.

8. The method of claim 1, further comprising:
determining a value of the currency value prior to converting the currency value based upon a currency format and a currency notation used to express the currency value.

9. The method of claim 1, further comprising:
in response to determining that another string of text includes another currency value, semantically labeling the other value with schema information identifying a source type of the other currency;
displaying the other currency value and an indication that the other currency value has been semantically labeled adjacent to the other string of text.

10. The method of claim 9, further comprising:
providing a list of actions that may be performed on the other currency value to convert the other currency value to another destination type of currency, the list of actions identified based upon the schema information;
receiving a selection of an action from the list of actions; and
generating another converted currency value by converting the other currency value from the other source type of currency to the other destination type of currency identified by the selected action.

11. In a system for creating and editing an electronic document, a method for converting a currency value expressed in a source type of currency to a destination type of currency, the method comprising:
receiving a portion of the electronic document as a string of text;
analyzing the string of text to determine whether the string of text includes a currency value, wherein analyzing the string of text to determine whether the string of text includes a currency value comprises utilizing a currency format file to recognize currencies expressions utilizing different decimal and thousands separator symbols;
in response to determining that the string of text includes a currency value, semantically labeling the currency value with schema information identifying the source type of currency used to express the currency value, wherein the semantic label is associated with a single currency value;
displaying the currency value and an indication that the currency value has been semantically labeled adjacent to the string of text;
receiving a selection of the currency value;
in response to receiving the selection of the currency value, providing a list of actions that may be performed on the currency value to convert the value to the destination type of currency;
receiving the selection of an action from the list of actions;
in response to receiving the selection of an action, determining a value for the currency value based upon a currency format used to express the currency value;
generating a converted currency value by converting the value to the destination type of currency identified by the selected action; and
replacing the currency value with the converted currency value in the electronic document.

12. The method of claim 11, wherein the list of actions comprises a dropdown menu having one or more menu items corresponding to the list of actions that may be performed on the currency value to convert the currency value to the destination type of currency.

13. The method of claim 12, further comprising:
determining a current user interface language setting for an application program associated with the electronic document; and
generating the menu items of the dropdown menu in a language specified by the current user interface language setting.

14. A system for converting a currency value from a source type of currency to a destination type of currency, the system comprising:
a recognizer plug-in capable of:
receiving a portion of an electronic document as a string of text from an application program,
analyzing the string of text to determine whether the string of text includes a currency value, wherein analyzing the string of text to determine whether the string of text includes the currency value comprises utilizing a currency format file to recognize currencies expressions utilizing different decimal and thousands separator symbols, and
in response to determining that the string of text includes a currency value, semantically labeling the currency value with schema information identifying the source type of currency, wherein the semantic label is associated with a single currency;

an application program for creating and editing the electronic document, the application program capable of displaying the string of text and an indication that the currency value has been semantically labeled, receiving a selection of the currency value, in response to receiving the selection of the currency value, providing a list of actions that may be performed on the currency value to convert the currency value to the destination type of currency, receiving the selection of an action from the list of actions, and providing the selected action and the currency value to an action plug-in; and
an action plug-in capable of generating a converted currency value by converting the currency value to the destination type of currency identified by the selected action, and replacing the currency value in the electronic document with the converted currency value.

15. The system of claim 14, wherein the list of actions comprises a dropdown menu having one or more menu items corresponding to the list of actions that may be performed on the currency value to convert the currency value to the destination type of currency, and wherein the action plug-in is further operative to:
determine a current user interface language setting for the application program; and to
generate the menu items of the dropdown menu in a language specified by the current user interface language setting.

16. The system of claim 15, wherein the source type of currency comprises the Euro and wherein the destination type of currency comprises one of a plurality of national currency types.

17. The system of claim 15, wherein the source type of currency comprises one of a plurality of national currency types and wherein the destination type of currency comprises the Euro.

18. The system of claim 15 wherein the application program comprises a spreadsheet application program, wherein the electronic document comprises a spreadsheet having one or more cells, and wherein the action plug-in is further operative to maintain a per cell undo stack, thereby permitting the replacement of converted currency values with currency values on a per cell basis.