Generally, the present invention relates to computing environments having document editor software for creating and editing documents. Particularly, it relates to real-time translating text of open documents from first to second languages, or more. Various features include seeking language translation from sources remote to the document editor, such as by way of the internet, without the user needing to interface with a browser or other application external to the document editor. Still other features include the seeking of multiple language translations and selecting a best translation according to predetermined criteria. Establishing executable code in the document editor as a macro to-be-run is another noteworthy aspect.
“Document editors,” such as Microsoft's Word program, Corel's WordPerfect program and Sun Microsystem's OpenOffice.org Writer program, to name a few, have been known for some time for the creation, editing and viewing of documents. Also known as word processing software, the document editors are robust products with numerous text functions, such as spelling and grammar checkers, dictionary and thesaurus resources, and foreign language dictionaries, but none of the products have language translation features. For this, users are left to their own devices.
Namely, human users translate words or texts of documents on their own with or without the assistance of other services. To the extent they use services, it is not uncommon to seek language-translation assistance from a stand-alone, handheld language translator, from a dedicated piece of language-translating software on a computing device, or by way of searching the internet. For the latter, many language translation services abound on the world wide web (wbb) and typical usage consists of cutting/pasting or typing to-be-translated words or text into a page of an open browser to get the translation from the remote databases of the translation service. Upon its translation (regardless of source), users then take the text back to the document editor and continue word processing functions as normal.
A problem with all these approaches, however, lies in the cumbersomeness of needing to consult a physical device, software application or internet web site external to the word processing software in which the text (in need of translation) resides. Stated differently, users experience inconvenience in time and effort (and sometimes money for the purchase of services) for want of a document editor having language translation services that can translate text of an open document without having to perform additional roles, like seeking language translations from the internet.
Still another problem with the prior art relates to a user's incognizance of how well a translation service actually performed. For example, many users take translations at face value without awareness of the properness of the translation, especially in relation to other words or text in the document.
Accordingly, there is need in the art of document editors for language translation services. There is further need to make the services invisible or silently-operated relative to the user of the document editor to minimize inconvenience. It is also important to translate quickly and provide appropriate translations in the context of an open document of the editor. In that many users already own and/or use a document editor, it is further desirable to convert existing document editor software to the type having language translation services. Naturally, any improvements along such lines should further contemplate good engineering practices, such as relative inexpensiveness, stability, ease of implementation, low complexity, flexibility, etc.
The above-mentioned and other problems become solved by applying the principles and teachings associated with the hereinafter-described foreign language translator in a document editor. In a basic sense, users indicate text for translation directly in a document of the software and, silently or invisibly to the user, the text becomes translated. This adds robustness heretofore unavailable.
In one embodiment, a document editor is installed on a computing device. Upon configuration with appropriate executable instructions, the editor formulates requests to seek translation from a language translation service remote from the computing device upon an indication of a selection of text for translation by the user. Representatively, the document editor fashions one or more http requests to query the language translation service by way of the internet. Upon a translation received from the translation service, the document editor distills sundry code to provide a clean or useable translation form to the user. In this manner, users receive real-time translations to their text, but without any inconvenience, such as by way of opening browser applications, visiting web sites, consulting stand-alone products or software. It also appears to the user that the functionality of language translation was built directly into the document editor.
In another embodiment, the document editor solicits translations from many language translation services, and returns only a best translation to the user, based on predetermined criteria. In this manner, users get an appropriate translation, especially in the context of other text in the document. Naturally, users can also choose among different foreign languages, and translate a selection into or out of various languages, going straight from one to the other without going back to the original user-entered text.
In still another embodiment, configuring existing document editors simply requires the insertion of executable code to seek translation services as an executable macro of the document editor. This, of course, translates into ease of implementation. In an OpenOffice.org Writer version of the invention, for example, a prototype macro (written as a JavaScript macro, but could be in any language format) is easily inserted by menu commands and run from open documents. In other document editors, the code can be in macro format or compiled as a plug-in if the target application has a plug-in API capabilities, for example.
Regardless of form, the present invention allows users of document editors to real-time translate language of text in an open document from a first to a second language, or more, and back again, if desired. Simply, the document editor is configured with executable code seeking translation services from locations remote of the document editor, especially by way of http calls to the internet. During use, users simply indicate a selection for translation by highlighting text in a typing area of the document editor and the editor, returns real-time translations.
Still other embodiments contemplate computer program products available on computer-readable media or as downloads. Programming languages other than JavaScript are contemplated and include, but are not limited to, C, C++, C#, Python, BeanShell, or other.
These and other embodiments of the present invention will be set forth in the description which follows, and in part will become apparent to those of ordinary skill in the art by reference to the following description of the invention and referenced drawings or by practice of the invention. The claims, however, indicate the particularities of the invention.
The accompanying drawings incorporated in and forming a part of the specification, illustrate several aspects of the present invention, and together with the description serve to explain the principles of the invention. In the drawings:
In the following detailed description of the illustrated embodiments, reference is made to the accompanying drawings that form a part hereof, and in which is shown by way of illustration, specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention and like numerals represent like details in the various figures. Also, it is to be understood that other embodiments may be utilized and that process, mechanical, electrical, arrangement, software and/or other changes may be made without departing from the scope of the present invention. In accordance with the present invention, methods and apparatus for foreign language translation in a document editor are hereinafter described.
With reference to
In either, storage devices are contemplated and may be remote or local. While the line is not well defined, local storage generally has a relatively quick access time and is used to store frequently accessed data, while remote storage has a much longer access time and is used to store data that is accessed less frequently. The capacity of remote storage is also typically an order of magnitude larger than the capacity of local storage. Regardless, storage is representatively provided for aspects of the invention contemplative of computer executable instructions, e.g., software, as part of computer program products on readable media, e.g., disk 14 for insertion in a drive of computer 17. Computer executable instructions may also be available as a download or reside in hardware, firmware or combinations in any or all of the depicted devices 15 or 15′.
When described in the context of computer program products, it is denoted that items thereof, such as modules, routines, programs, objects, components, data structures, etc., perform particular tasks or implement particular abstract data types within various structures of the computing system which cause a certain function or group of functions. In form, the computer product can be any available media, such as RAM, ROM, EEPROM, CD-ROM, DVD, or other optical disk storage devices, magnetic disk storage devices, floppy disks, or any other medium which can be used to store the items thereof and which can be assessed in the environment.
In network, the computing device of the document editor communicates with one or more other devices 20, 20′ via wired, wireless or combined connections 12 that are either direct 12a or indirect 12b. If direct, they typify connections within physical or network proximity (e.g., intranet). If indirect, they typify connections such as those found with the internet, satellites, radio transmissions, or the like, and are given indistinctly as element 13. In this regard, other contemplated items include servers, routers, peer devices, modems, T1 lines, satellites, microwave relays or the like. The connections may also be local area networks (LAN) and/or wide area networks (WAN) that are presented by way of example and not limitation. The topology is also any of a variety, such as ring, star, bridged, cascaded, meshed, or other known or hereinafter invented arrangement.
In form, the other devices 20, 20′ represent language translation services available to the document editor for seeking translations, upon user indication of selections of text. In one embodiment, the other devices consist of web servers 22 and attendant databases 24, containing logic for translating language. Altavista's Babel Fish, for instance, is representative of the other device, but may be any of a variety of language translators, such as those found at wordreference.com, translation.langenberg.com, or other. In other embodiments, more than one other device is contemplated, and optional features are shown in dashed lines in the figure. Regardless of form, however, it is where the document editor of the invention will seek translation of text, without inconveniencing the user of the editor.
With reference to
In either, the users indicate a selection of text for translation, such as by highlighting text in an open document of the editor (step 44). Upon this occurring, the document editor issues http requests to the translation service, e.g., 20 (
Upon receipt of the request, the translation service translates the text so highlighted and returns it to the document editor, where it is received (step 48). In that translations often include code superfluous to the actual translation of text, the document editor processes the received translation (step 50) to clean it for ultimate presentation in a useable translation form to the user (step 52).
With reference to the sequential screen shots of a monitor 19 in
In
In
With reference to
In
In other embodiments, skilled artisans will appreciate that other methods for executing translations exist. For example,
Turning to the code itself, the below macro (“Code Listing”) is that actually used in the prototype configuration of the OpenOffice.org (OOo) Writer in
1. Programmatically, using published OOo API methods, obtain in String form the text that the user has currently selected in the open document (e.g., step 44,
2. Craft a set of parameters (including the user text String from the previous step, and a String indicating the desired target language, and such other info as maybe required by the remote host, e.g., 20,
3. In code, create a java.net.URL object and open a connection on it (e.g., next to last line of the Code Listing).
4. Use standard Java methods to obtain the output stream and write to it (via POST, for example) (e.g., step 48,
5. Use standard Java methods to obtain the input stream and read from it.
6. Close the connection.
7. Parse the text obtained in Step 5 to strip away any unnecessary language, leaving just the raw translated text (e.g., step 50,
8. Programmatically, using the OOo API, insert the translated text into the document at the current cursor location (e.g., step 52,
With reference to
In
In this manner, the format specified by the user in the first document resulted in a second document already having the specified format. In other words, not only did the user get a language translation of the text, they got a word processing document having the same format as the first. They then have no additional tasks to make the second document ready for use. To this end, the functionality of the document editor is uniquely situated.
As another example, consider that users of an open document in a document editor often specify (or as the result of preset defaults) page items, such as font, font size, line spacing, line numbering, page numbering, tab indent amount, etc. Upon conversion of language, however, often times the amount of actual text increases or decreases, such that fewer or greater pages exist between the first and second documents. With the instant invention, if a first document has five pages, and a translation causes the elimination of words such that only four pages exist in a second document, the document editor eliminates the last page from its format. In this manner, users printing the document results in a print length of four pages, not five pages, including a blank fifth page. Alternatively, translations sometimes require the arrangement of text from right-to-left to left-to-right or up-to-down, etc. Appreciating this, a preferred document editor will further include standard defaults for reformatting the actual document in an appropriate manner, such as from left-to-right to right-to-left, etc. Users then get (with a single indication of a desire to convert their document) a fully formatted new document, complete with translations, and page setup, that does not exist when users simply get language translations in the public domain.
Certain advantages of the invention over the prior art should now be readily apparent. For example, it is heretofore unknown to include language translation within document editors. Now, however, language translation can occur in an invisible manner, thereby avoiding inconveniencing the user to seek translation from external sources. As another example, users that already own and/or use a document editor now have methodology to convert it to a type having language translation services, without requiring a new purchase of the editor. In still another example, users can be provided with language translations that are selected as a best translation of many translations, according to various criteria, without any extra obligation on the user. Still other advantages provide formatting of documents along with language translation so that, upon translation occurring, the user has a ready-to-use document. Of course, these are only a few of the many advantages of the invention and skilled artisans will immediately recognize others.
Finally, one of ordinary skill in the art will recognize that additional embodiments are also possible without departing from the teachings of the present invention. This detailed description, and particularly the specific details of the exemplary embodiments disclosed herein, is given primarily for clarity of understanding, and no unnecessary limitations are to be implied, for modifications will become obvious to those skilled in the art upon reading this disclosure and may be made without departing from the spirit or scope of the invention. Relatively apparent modifications, of course, include combining the various features of one or more figures with the features of one or more of other figures.