CN111443979A - Document processing method and device, computer equipment and storage medium - Google Patents
Document processing method and device, computer equipment and storage medium Download PDFInfo
- Publication number
- CN111443979A CN111443979A CN202010312904.3A CN202010312904A CN111443979A CN 111443979 A CN111443979 A CN 111443979A CN 202010312904 A CN202010312904 A CN 202010312904A CN 111443979 A CN111443979 A CN 111443979A
- Authority
- CN
- China
- Prior art keywords
- dart
- language
- document
- target document
- function
- 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.)
- Granted
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/451—Execution arrangements for user interfaces
- G06F9/454—Multi-language systems; Localisation; Internationalisation
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Machine Translation (AREA)
- Document Processing Apparatus (AREA)
- Stored Programmes (AREA)
Abstract
The application discloses a document processing method, a document processing device, computer equipment and a storage medium. The method comprises the following steps: acquiring a target document, wherein the target document comprises texts in multiple languages; converting the text in the target document into a function calling statement of a Dart language; translating text contents in the function calling statement according to a preset language type; storing the translated function call statement to a Dart file corresponding to a preset language type; the multilingual home agent is used to read the corresponding Dart file according to the selected language type. Compared with the conventional manual Dart language conversion, the scheme provided by the application can generate the function call statement of the Dart language by the electronic equipment according to the document under the control. The generated function calling statement is stored in the corresponding Dart document, the multiple Dart documents are used for storing Dart languages of different language types respectively, manual translation is not needed, the electronic equipment can rapidly generate and use the Dart files, the internationalization speed of the flutter document is increased, and the document editing efficiency is improved.
Description
Technical Field
The embodiment of the application relates to the technology of computer equipment, in particular to a document processing method and device, computer equipment and a storage medium.
Background
Flutter is an open source mobile application development framework by google, and developers can develop application programs (APP) through Dart language. When the flutter is accessed in the application, the flutter end needs to be internationalized.
However, the international adaptation scheme provided by the flutter authority is suitable for local multi-language codes, and when the document used by the flutter is internationalized, the Dart document needs to be edited manually, so that the document editing efficiency is low.
Disclosure of Invention
The application provides a document processing method, a document processing device, computer equipment and a storage medium, so that the internationalization speed of a flutter document is increased, and the document editing efficiency is improved.
In a first aspect, an embodiment of the present application provides a document processing method, including:
acquiring a target document, wherein the target document comprises texts in multiple languages;
converting the text in the target document into a function calling statement of a Dart language;
translating text contents in the function calling statement according to a preset language type;
storing the translated function call statement to a Dart file corresponding to a preset language type;
the multilingual home agent is used to read the corresponding Dart file according to the selected language type.
In a second aspect, an embodiment of the present application further provides a document processing apparatus, including:
the acquisition module is used for acquiring a target document, and the target document comprises texts in multiple languages;
the conversion module is used for converting the text in the target document into a function calling statement of a Dart language;
the translation module is used for translating the text content in the function calling statement according to the preset language type;
the storage module is used for storing the translated function calling statement to a Dart file corresponding to a preset language type;
and the reading module is used for reading the corresponding Dart file according to the selected language type by using the multilingual local agent.
In a third aspect, an embodiment of the present application further provides a computer device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, and when the processor executes the computer program, the document processing method provided in the embodiment of the present application is implemented.
In a fourth aspect, embodiments of the present application further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform a document processing method as provided by embodiments of the present application.
The document processing scheme provided by the embodiment of the application can acquire the target document, convert the text in the target document into the function call statement of the Dart language, translate the text content in the function call statement according to the preset language type, and store the translated function call statement into the corresponding Dart file, so that the Dart language of the preset language type is stored in the Dart file. When the Dart file is used, the function in the Dart file is executed by reading the Dart file of the preset language type by using the multilingual home agent. Compared with the current problems that the manual conversion speed is slow, and the writing error is easy to occur during manual input when the Dart language is manually converted, the document processing scheme provided by the embodiment can generate the function call statement of the Dart language according to the target document by the electronic device. The generated function calling statement is stored in the corresponding Dart document, the multiple Dart documents are used for storing Dart languages of different language types respectively, manual translation is not needed, the electronic equipment can rapidly generate and use the Dart files, the internationalization speed of the flutter document is increased, and the document editing efficiency is improved.
Drawings
FIG. 1 is a flowchart illustrating a document processing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a document processing method according to a second embodiment of the present application;
FIG. 3 is a flowchart illustrating a document processing method according to a third embodiment of the present application;
FIG. 4 is a flowchart illustrating a document processing method according to a fourth embodiment of the present application;
FIG. 5 is a schematic structural diagram of a document processing apparatus according to a fifth embodiment of the present application;
fig. 6 is a schematic structural diagram of a computer device in the sixth embodiment of the present application.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the application and are not limiting of the application. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a document processing method according to an embodiment of the present application, where the present embodiment is applicable to a case of internationally adapting a document in a flute, and the method may be executed by a terminal or a server, and the method includes the following steps:
step 110, a target document is obtained, wherein the target document comprises texts in multiple languages.
Flutter is a mobile UI framework offered by google, inc for implementing a high-quality native user interface that is fast iOS and Android (Android) top-framed. Dart is a computer programming language developed by Google, Inc., and Dart is an object-oriented, class-defined, single-inheritance language.
The target document is described with text for rendering Flutter. The text may contain text content in different languages. The target document may be stored locally at the terminal or in the network device.
Optionally, an online document is downloaded, and the online document is used as a target document. And downloading the online document from the network equipment to the local through the network, wherein the online document is used as a target document in the subsequent step. Optionally, the online document is verified during or after downloading to the local. If the verification is successful, go to step 120.
Step 120, converting the text in the target document into a function call statement in the Dart language.
The Dart language has sentence composition, and for the content of the display text in the target document, the output function of the Dart language can be used for calling the sentence to complete equivalent realization. For data processing statements, function call statements in the Dart language may be used to complete an equivalent implementation. And carrying out clause division according to the symbols in the target document, and converting the clause into a Dart language function calling statement.
And step 130, translating the text content in the function calling statement according to the preset language type.
The preset language type may be one or more. The preset language type comprises Chinese, English or Japanese and the like. The text content in the function call statement may include text content to be output in the Dart language output. In the flutter internationalization process, the same content needs to be converted into different language types for output, so that the reader can understand the content conveniently. The preset language may be a language type set by the operating system or may be selected by the user. In order to facilitate switching among multiple languages, after the target document is acquired, the target document can be translated into a function call statement applicable to the Dart language of different language types. The target document may contain characters of multiple language types, and at this time, the contents of different language types need to be uniformly translated into preset language types.
And step 140, storing the translated function call statement to a Dart file corresponding to the preset language type.
And establishing a plurality of Dart files, wherein each Dart file is used for storing a Dart language of a preset language type. A Dart file is a file with the suffix of ". Dart". The generated Dart function call statement is merged into the Dart file of the corresponding language.
Step 150, the multilingual home agent reads the corresponding Dart file according to the selected language type.
And establishing a multilingual home agent by establishing a transflationsDelegate class example. Multi-language conversion is achieved by invoking the instance.
Exemplary, multilingual home agent; acquiring the selected language type; the Dart file associated with the selected language type is invoked by the multilingual home agent.
The multilingual home agent may be a transformations delete class instance. The selected language type is determined by the language type currently set by the operating system. A Dart file for a plurality of language types has been generated prior to step 150. At this time, the Dart file associated with the selected language type is determined according to the selected language type, and the Dart file associated with the selected language type is called by the multilingual home agent. In one implementation, an agent is generated that manages the multilingual localization delete uniformly. And setting a self-generated agent at the program starting position, and setting the display direction of the text according to the type of the multiple languages to realize the effect of the multiple language adaptation.
The document processing method provided by the embodiment of the application can acquire the target document, convert the text in the target document into the function call statement of the Dart language, translate the text content in the function call statement according to the preset language type, and store the translated function call statement into the corresponding Dart file, so that the Dart language of the preset language type is stored in the Dart file. When the Dart file is used, the function in the Dart file is executed by reading the Dart file of the preset language type by using the multilingual home agent. Compared with the current problems that the manual conversion speed is slow, and the writing error is easy to occur during manual input when the Dart language is manually converted, the document processing scheme provided by the embodiment can generate the function call statement of the Dart language according to the target document by the electronic device. The generated function calling statement is stored in the corresponding Dart document, the multiple Dart documents are used for storing Dart languages of different language types respectively, manual translation is not needed, the electronic equipment can rapidly generate and use the Dart files, the internationalization speed of the flutter document is increased, and the document editing efficiency is improved. Further, the Dart language in the Dart file is an editable object-oriented language. When the program changes, such as version updating or bug fixing, a programmer can edit the Dart file, and the editing efficiency is improved. Meanwhile, the method can be realized through the script, when the multi-language configuration scheme is changed, only the corresponding script needs to be modified, and the Dart files of each language do not need to be coded respectively, so that the coding efficiency is improved.
Example two
Fig. 2 is a flowchart illustrating a document processing method according to an embodiment of the present application, where in the embodiment of the present application, step 120 is to convert a text in a target document into a function call statement in Dart language, which may be implemented to parse a keyword in the target document; and converting the keywords into function calling sentences of the Dart language according to the semantics of the keywords. As a further illustration of the above example, the above process may be carried out by the following steps:
step 210, a target document is obtained, wherein the target document comprises texts in multiple languages.
Step 220, analyzing the keywords in the target document.
The target document may include a plurality of natural words. A spreadsheet may be used to record the correspondence of natural language vocabulary to vocabulary in different language types and the function of Dart language.
The spreadsheet may contain a plurality of natural language vocabulary columns for recording different language classes of vocabulary (e.g., chinese, english, german, etc.). The spreadsheet also includes a keyword column for indicating a function of the Dart language corresponding to the respective vocabulary. The natural language vocabulary column represents the semantics of the dart language. The natural language vocabularies in different columns in the same row represent the same semantic meaning. For example, a spreadsheet may include three columns, a first column for describing simplified Chinese words, a second column for describing English words, and a third column for describing functions in the Dart language.
The target document is subjected to word segmentation processing to obtain a plurality of keywords, the keywords are matched with natural language words in the electronic form, then rows where the keywords are located are found in the electronic form, and then a function of a Dart language corresponding to the keywords is obtained.
Step 230, converting the keyword into a function call statement of the Dart language according to the semantics of the keyword.
And when a certain row in the electronic form is matched with a table unit consistent with the keyword, determining a function call statement of a Dart language according to the row where the keyword is located. For example, if the keyword is "display" in the first column (simplified chinese vocabulary) in the above example, a function in Dart language (e.g., calling a display function in Dart language) in the same row as "display" is used as a function call statement in the converted Dart language.
And 240, translating the text content in the function calling statement according to the preset language type.
And searching the vocabulary in the same row with the keywords in the corresponding column in the electronic form according to the preset language type, and taking the vocabulary as the translation result of the keywords.
And step 250, storing the translated function call statement to a Dart file corresponding to the preset language type.
And writing the selected translation result of the preset language type and the function call statement of the Dart language into the Dart file.
According to the document processing method provided by the embodiment of the application, the keywords can be determined through analysis, and the translation results of multiple languages provided by the spreadsheet and the function call statements of the Dart language are combined, so that the keywords can be searched and the function call statements of the Dart language corresponding to the keywords can be inquired, the vocabulary in the target document can be converted into the Dart language, and the accuracy of the Dart language conversion can be improved.
EXAMPLE III
Fig. 3 is a flowchart illustrating a document processing method according to an embodiment of the present application, where in the embodiment of the present application, step 120 is to convert a text in a target document into a function call statement in Dart language, which may be implemented to parse wildcards in the target document; and converting the wildcards into function call statements of the Dart language of the function parameter call mode. As a further illustration of the above example, the above process may be carried out by the following steps:
step 310, downloading a target document, wherein the target document comprises texts in a plurality of languages.
And step 320, analyzing the wildcards in the target document.
Wildcards are special characters in the target document. The special character is combined with the preceding and following characters to form a wildcard character for expressing a special meaning. The definition of the wildcard character is known, and the wildcard character can be analyzed from the target document according to the known meaning of the wildcard character and the character characteristics of the front character and the rear character of the wildcard character.
Step 330, converting the wildcards into function call statements of the Dart language of the function parameter call mode.
And converting the analyzed wildcard in the form of function parameters according to the known meaning of the wildcard. Exemplarily, assume question mark "? And if the question mark exists in the analyzed target document, calling a query function, and taking the terms after the question mark as the input parameters of the query function. The generated function will be stored to the Dart file. And further, words related to the wildcards are used as the incoming parameters in the function call statement according to the wildcards. For example, assume that the plus sign "+" identifies adding a word connected before it to a word connected after it. If the called function is the function in which the operation sign and the operation object are both used as input parameters, the plus sign "+", the preceding word and the following word are used as parameters to call the function calculation function. The method realizes that the wildcard and the place of the wildcard association are used as parameters and the function is called.
And 340, translating the text content in the function calling sentence according to the preset language type.
And 350, storing the translated function call statement to a Dart file corresponding to the preset language type.
The document processing method provided by the embodiment of the application can identify wildcards in the target document, and convert the wildcards or texts associated with the wildcards into Dart language function calling statements of a function parameter calling mode according to preset wildcard semantics. Which vocabulary needs to be translated in the target document can be accurately known by identifying the wildcard characters, and then the translation of specific vocabulary is carried out according to the preset language type, so that more accurate language conversion is realized. For example, the sentence "hello, happy and John meet", John needs to translate to english, while the other words are simplified chinese. At this time, John may be marked as english by wildcards, or may be marked as simplified chinese, and "John" in the translated document is translated as "John" at this time.
Example four
Fig. 4 is a flowchart illustrating a document processing method according to an embodiment of the present application, where in the embodiment of the present application, step 120, converting the text in the target document into a function call statement in Dart language, which may be implemented to parse preset specific characters in the target document, where the preset specific characters include double quotation marks; and using the text content of the preset specific character index as data to be translated. Step 130, translating the text content in the function call statement according to the preset language type, which can be implemented as: as a further description of the above embodiment, the method may be implemented by following steps:
step 410, a target document is obtained, wherein the target document comprises texts in a plurality of languages.
And step 420, analyzing preset specific characters in the target document.
The preset specific character may be used to identify the text content to which the output is made. Illustratively, the preset specific symbols include double quotation marks or single quotation marks, etc. By traversing the target document, a preset specific character in the target document can be determined.
And step 430, using the text content of the preset specific character index as the data to be translated.
And 440, translating the data to be translated in the function call statement according to the preset language type.
And step 450, storing the translated function call statement to a Dart file corresponding to the preset language type.
Step 460 reads the corresponding Dart file according to the selected language type using the multilingual home agent.
The document processing method provided by the embodiment of the application can be used for translating the text content indexed by the preset specific character, and the translation accuracy is improved.
EXAMPLE five
Fig. 5 is a schematic structural diagram of a document processing apparatus according to an embodiment of the present application, where the apparatus is located in a terminal or a server, and includes: an acquisition module 510, a conversion module 520, a translation module 530, a storage module 540, and a reading module 550. Wherein:
an obtaining module 510, configured to obtain a target document, where the target document includes texts in multiple languages;
a conversion module 520, configured to convert the text in the target document into a function call statement in the Dart language;
the translation module 530 is configured to translate text content in the function call statement according to a preset language type;
the storage module 540 is configured to store the translated function call statement to a Dart file corresponding to a preset language type;
a reading module 550, configured to read the corresponding Dart file according to the selected language type using the multilingual home agent.
Further, the conversion module 520 is configured to:
analyzing the key words in the target document;
and converting the keywords into function calling sentences of the Dart language according to the semantics of the keywords.
Further, the conversion module 520 is configured to:
analyzing wildcards in the target document;
and converting the wildcards into function call statements of the Dart language of the function parameter call mode.
Further, the conversion module 520 is configured to: analyzing preset specific characters in a target document, wherein the preset specific characters comprise double quotation marks;
using text content indexed by preset specific characters as data to be translated;
accordingly, translation module 530 is configured to: and translating the data to be translated in the function call statement according to the preset language type.
Further, the reading module 550 is configured to; a multilingual home agent;
acquiring the selected language type;
the Dart file associated with the selected language type is invoked by the multilingual home agent.
Further, the obtaining module 510 is configured to download an online document, and use the online document as a target document, where the target document includes texts in multiple languages.
In the document processing apparatus provided in the embodiment of the application, the obtaining module 510 obtains a target document, the converting module 520 converts a text in the target document into a function call statement in a Dart language, the translating module 530 translates a text content in the function call statement according to a preset language type, and the storing module 540 stores the translated function call statement in a corresponding Dart file, so that the Dart file stores the Dart language in the preset language type. When the Dart file is used, the reading module 550 reads the Dart file of the preset language type using the multilingual home agent to execute the function in the Dart file. Compared with the current problems that the manual conversion speed is slow, and the writing error is easy to occur during manual input when the Dart language is manually converted, the document processing scheme provided by the embodiment can generate the function call statement of the Dart language according to the document under the electronic equipment. The generated function calling statement is stored in the corresponding Dart document, the multiple Dart documents are used for storing Dart languages of different language types respectively, manual translation is not needed, the electronic equipment can rapidly generate and use the Dart files, the internationalization speed of the flutter document is increased, and the document editing efficiency is improved.
The document processing device provided by the embodiment of the application can execute the document processing method provided by any embodiment of the application, and has corresponding functional modules and beneficial effects of the execution method.
EXAMPLE six
Fig. 6 is a schematic structural diagram of a computer apparatus according to a sixth embodiment of the present application, as shown in fig. 6, the computer apparatus includes a processor 60, a memory 61, an input device 62, and an output device 63; the number of processors 60 in the computer device may be one or more, and one processor 60 is taken as an example in fig. 6; the processor 60, the memory 61, the input device 62 and the output device 63 in the computer apparatus may be connected by a bus or other means, and the connection by the bus is exemplified in fig. 6.
The memory 61, as a computer-readable storage medium, may be used for storing software programs, computer-executable programs, and modules, such as program instructions/modules (e.g., the obtaining module 510, the converting module 520, the translating module 530, the storing module 540, and the reading module 550) corresponding to the document processing method in the embodiment of the present application. The processor 60 executes various functional applications of the computer device and data processing by executing software programs, instructions, and modules stored in the memory 61, that is, implements the above-described document processing method.
The memory 61 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal, and the like. Further, the memory 61 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid state storage device. In some examples, the memory 61 may further include memory located remotely from the processor 60, which may be connected to a computer device over a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input device 62 may be used to receive input numeric or character information and to generate key signal inputs relating to user settings and function controls of the computer apparatus. The output device 63 may include a display device such as a display screen.
EXAMPLE seven
A seventh embodiment of the present application further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a document processing method, the method including:
acquiring a target document, wherein the target document comprises texts in multiple languages;
converting the text in the target document into a function calling statement of a Dart language;
translating text contents in the function calling statement according to a preset language type;
storing the translated function call statement to a Dart file corresponding to a preset language type;
the multilingual home agent is used to read the corresponding Dart file according to the selected language type.
Further, converting the text in the target document into a function call statement in the Dart language, including:
analyzing the key words in the target document;
and converting the keywords into function calling sentences of the Dart language according to the semantics of the keywords.
Further, converting the text in the target document into a function call statement in the Dart language, including:
analyzing wildcards in the target document;
and converting the wildcards into function call statements of the Dart language of the function parameter call mode.
Further, converting the text in the target document into a function call statement in the Dart language, including:
analyzing preset specific characters in a target document, wherein the preset specific characters comprise double quotation marks;
using text content indexed by preset specific characters as data to be translated;
correspondingly, translating the text content in the function call statement according to the preset language type, including:
and translating the data to be translated in the function call statement according to the preset language type.
Further, using the multilingual home agent to read the corresponding Dart file according to the selected language type includes:
a multilingual home agent;
acquiring the selected language type;
the Dart file associated with the selected language type is invoked by the multilingual home agent.
Further, obtaining a target document, where the target document contains texts in multiple languages, including:
downloading an online document, and taking the online document as a target document, wherein the target document comprises texts in multiple languages.
Of course, the storage medium provided in the embodiments of the present application contains computer-executable instructions, and the computer-executable instructions are not limited to the above method operations, and may also perform related operations in the document processing provided in any embodiments of the present application.
Based on the understanding that the technical solutions of the present application can be embodied in the form of software products, which can be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a flash Memory (F L ASH), a hard disk or an optical disk of a computer, and the like, and include instructions for enabling a computer device (which may be a personal computer, a server, or a network device) to execute the methods described in the embodiments of the present application.
It should be noted that, in the embodiment of the above search apparatus, each included unit and module are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only used for distinguishing one functional unit from another, and are not used for limiting the protection scope of the application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present application and the technical principles employed. It will be understood by those skilled in the art that the present application is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the application. Therefore, although the present application has been described in more detail with reference to the above embodiments, the present application is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present application, and the scope of the present application is determined by the scope of the appended claims.
Claims (10)
1. A method of document processing, comprising:
acquiring a target document, wherein the target document comprises texts in multiple languages;
converting the text in the target document into a function calling statement of a Dart language;
translating the text content in the function calling statement according to a preset language type;
storing the translated function call statement to a Dart file corresponding to the preset language type;
the multilingual home agent is used to read the corresponding Dart file according to the selected language type.
2. The method of claim 1, wherein the converting the text in the target document into a function call statement in a Dart language comprises:
analyzing the keywords in the target document;
and converting the keywords into function calling sentences of Dart language according to the semantics of the keywords.
3. The method of claim 1, wherein the converting the text in the target document into a function call statement in a Dart language comprises:
analyzing wildcards in the target document;
and converting the wildcards into function calling statements of the Dart language of a function parameter calling mode.
4. The method of claim 1, wherein the converting the text in the target document into a function call statement in a Dart language comprises:
analyzing preset specific characters in the target document, wherein the preset specific characters comprise double quotation marks;
taking the text content indexed by the preset specific characters as data to be translated;
correspondingly, the translating the text content in the function call statement according to the preset language type includes:
and translating the data to be translated in the function call statement according to a preset language type.
5. The method of claim 1, wherein said reading a respective Dart file according to the selected language type using a multilingual home agent comprises:
a multilingual home agent;
acquiring the selected language type;
invoking, by the multilingual home agent, the Dart file associated with the selected language type.
6. The document processing method of claim 1, wherein obtaining a target document, the target document containing text in multiple languages, comprises:
downloading an online document, and taking the online document as a target document, wherein the target document comprises texts in multiple languages.
7. A document processing apparatus, comprising:
the acquisition module is used for acquiring a target document, and the target document comprises texts in multiple languages;
the conversion module is used for converting the text in the target document into a function calling statement of a Dart language;
the translation module is used for translating the text content in the function calling statement according to a preset language type;
the storage module is used for storing the translated function calling statement to a Dart file corresponding to the preset language type;
and the reading module is used for reading the corresponding Dart file according to the selected language type by using the multilingual local agent.
8. The document processing apparatus of claim 7, wherein the conversion module is configured to:
analyzing the keywords in the target document;
and converting the keywords into function calling sentences of Dart language according to the semantics of the keywords.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the document processing method of any one of claims 1 to 6 when executing the program.
10. A storage medium containing computer-executable instructions for performing the document processing method of any one of claims 1-6 when executed by a computer processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010312904.3A CN111443979B (en) | 2020-04-20 | 2020-04-20 | Document processing method, device, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010312904.3A CN111443979B (en) | 2020-04-20 | 2020-04-20 | Document processing method, device, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111443979A true CN111443979A (en) | 2020-07-24 |
CN111443979B CN111443979B (en) | 2023-09-05 |
Family
ID=71654323
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010312904.3A Active CN111443979B (en) | 2020-04-20 | 2020-04-20 | Document processing method, device, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111443979B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024131521A1 (en) * | 2022-12-23 | 2024-06-27 | 博泰车联网科技(上海)股份有限公司 | Method and system for forming flutter page on the basis of flutter framework components, and electronic device |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150134320A1 (en) * | 2013-11-14 | 2015-05-14 | At&T Intellectual Property I, L.P. | System and method for translating real-time speech using segmentation based on conjunction locations |
CN109284145A (en) * | 2018-08-28 | 2019-01-29 | 北京城市网邻信息技术有限公司 | The generation of multilingual configuration file and methods of exhibiting and device, equipment and medium |
CN109635251A (en) * | 2018-10-16 | 2019-04-16 | 平安普惠企业管理有限公司 | Text conversion method, device, equipment and the storage medium of application |
CN110659028A (en) * | 2019-09-30 | 2020-01-07 | 北京达佳互联信息技术有限公司 | Data processing system, method, device, electronic equipment and storage medium |
-
2020
- 2020-04-20 CN CN202010312904.3A patent/CN111443979B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20150134320A1 (en) * | 2013-11-14 | 2015-05-14 | At&T Intellectual Property I, L.P. | System and method for translating real-time speech using segmentation based on conjunction locations |
CN109284145A (en) * | 2018-08-28 | 2019-01-29 | 北京城市网邻信息技术有限公司 | The generation of multilingual configuration file and methods of exhibiting and device, equipment and medium |
CN109635251A (en) * | 2018-10-16 | 2019-04-16 | 平安普惠企业管理有限公司 | Text conversion method, device, equipment and the storage medium of application |
CN110659028A (en) * | 2019-09-30 | 2020-01-07 | 北京达佳互联信息技术有限公司 | Data processing system, method, device, electronic equipment and storage medium |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024131521A1 (en) * | 2022-12-23 | 2024-06-27 | 博泰车联网科技(上海)股份有限公司 | Method and system for forming flutter page on the basis of flutter framework components, and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN111443979B (en) | 2023-09-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111176650B (en) | Parser generation method, search method, server, and storage medium | |
CN111831384B (en) | Language switching method, device, equipment and storage medium | |
CN112416788B (en) | Hierarchical standard Web application UI automatic test method | |
CN111488155A (en) | Coloring language translation method | |
CN115509514B (en) | Front-end data simulation method, device, equipment and medium | |
CN113076167A (en) | Code processing method and related equipment | |
CN113419721B (en) | Web-based expression editing method, device, equipment and storage medium | |
CN116227505A (en) | Internationalization file translation method, device, equipment and medium | |
CN111240790B (en) | Multi-language adaptation method, device, client and storage medium for application | |
CN111443979B (en) | Document processing method, device, computer equipment and storage medium | |
CN110275712B (en) | Text replacement method, device and equipment | |
CN113127776A (en) | Breadcrumb path generation method and device and terminal equipment | |
Pinnis et al. | Tilde MT platform for developing client specific MT solutions | |
CN113961300A (en) | iOS APP character string resource file translation method and system | |
CN115618887B (en) | Dynamic long text internationalization method, device, equipment and storage medium | |
KR20140147438A (en) | An apparatus, method and recording medium for Markup parsing | |
CN110618809B (en) | Front-end webpage input constraint extraction method and device | |
CN112181389B (en) | Method, system and computer equipment for generating API (application program interface) marks of course fragments | |
CN114168189A (en) | Vue project code translation method, device and medium | |
KR100204068B1 (en) | Language translation modified method | |
CN113761171A (en) | Auxiliary programming method and device, electronic equipment and storage medium | |
CN113778594A (en) | Multi-language application package generation method and system | |
CN116384346A (en) | Text replacement method, device, terminal and medium based on HTML format | |
CN113792557A (en) | Language file generation method and device | |
CN118426810A (en) | Data writing method, device, equipment and computer readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |