Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the devices, modules or units to be determined as different devices, modules or units, and are not used for limiting the sequence or interdependence relationship of the functions executed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
To make the objects, technical solutions and advantages of the present disclosure more apparent, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.
The present disclosure provides a text information processing method, apparatus, electronic device and computer-readable storage medium, which aim to solve the above technical problems in the prior art.
The following describes the technical solutions of the present disclosure and how to solve the above technical problems in specific embodiments. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
In one embodiment, a method of processing text information is provided, as shown in fig. 1, the method comprising:
step S101, receiving text information input by a user;
in the embodiment of the present disclosure, the user may input the text information in any input form in any terminal, for example, the user inputs the text information in a PC (personal computer) through a keyboard, or the user inputs the text information in a mobile phone through voice, and the like.
Step S102, aiming at the modification instruction of the text information;
after the text information is input, the user can modify the text information through a third-party application program in the terminal and the like. For example, the user opens the third-party application program first, then imports the text information, and when the user clicks a button for modification processing in the application program, the text information can be modified.
Of course, the user may also directly input the text information in the third-party application program, and then continue to modify the text information in the third-party application program.
And step S103, modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information.
In practical application, one modification instruction may correspond to one modification rule, and the user initiates which modification instruction, and then modifies the text information using the corresponding modification rule, or one modification instruction may include all modification rules, and the user initiates the modification instruction, and then modifies the text information using all modification rules. The specific situation can be set according to actual needs, and the embodiment of the disclosure does not limit this.
In the embodiment of the disclosure, the terminal receives text information input by a user and a modification instruction for the text information, and then modifies the text information based on a modification rule corresponding to the modification instruction to obtain modified text information. Therefore, after the user completes creation of the text information, formal editing can be completed by one key, excessive formal editing of the text information is not needed, and even editing is not needed completely, so that the user can concentrate on creation of the text information, work of typesetting, style editing and the like of the text information without investing efforts is reduced or even needed, time cost and labor cost are saved, processing efficiency of the text information is improved, and user experience is improved.
In another embodiment, a method for processing text information as shown in fig. 1 is described in detail.
Step S101, receiving text information input by a user;
in the embodiment of the present disclosure, the user may input the text information in any input form in any terminal, for example, the user inputs the text information in a PC (personal computer) through a keyboard, or the user inputs the text information in a mobile phone through voice, and the like.
The terminal may have the following features:
(1) on a hardware architecture, a device has a central processing unit, a memory, an input unit and an output unit, that is, the device is often a microcomputer device having a communication function. In addition, various input modes such as a keyboard, a mouse, a touch screen, a microphone, a camera and the like can be provided, and input can be adjusted as required. Meanwhile, the equipment often has a plurality of output modes, such as a telephone receiver, a display screen and the like, and can be adjusted according to needs;
(2) on a software system, the device must have an operating system, such as Windows Mobile, Symbian, Palm, Android, iOS, and the like. Meanwhile, the operating systems are more and more open, and personalized application programs developed based on the open operating system platforms are infinite, such as a communication book, a schedule, a notebook, a calculator, various games and the like, so that the requirements of personalized users are met to a great extent;
(3) in terms of communication capacity, the device has flexible access mode and high-bandwidth communication performance, and can automatically adjust the selected communication mode according to the selected service and the environment, thereby being convenient for users to use. The device can support GSM (Global System for Mobile Communication), WCDMA (Wideband Code Division Multiple Access), CDMA2000(Code Division Multiple Access), TDSCDMA (Time Division-Synchronous Code Division Multiple Access), Wi-Fi (Wireless-Fidelity), WiMAX (world Interoperability for Microwave Access) and the like, thereby being suitable for various types of networks, and not only supporting voice services, but also supporting various Wireless data services;
(4) in the aspect of function use, the equipment focuses more on humanization, individuation and multi-functionalization. With the development of computer technology, devices enter a human-centered mode from a device-centered mode, and the embedded computing, control technology, artificial intelligence technology, biometric authentication technology and the like are integrated, so that the human-oriented purpose is fully embodied. Due to the development of software technology, the equipment can be adjusted and set according to individual requirements, and is more personalized. Meanwhile, the device integrates a plurality of software and hardware, and the function is more and more powerful.
Step S102, aiming at the modification instruction of the text information;
after the text information is input, the user can modify the text information through a third-party application program in the terminal and the like. For example, the user opens the third-party application program first, then imports the text information, and when the user clicks a button for modification processing in the application program, the text information can be modified.
Of course, the user may also directly input the text information in the third-party application program, and then continue to modify the text information in the third-party application program.
And step S103, modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information.
In practical application, one modification instruction may correspond to one modification rule, and the user initiates which modification instruction, and then modifies the text information using the corresponding modification rule, or one modification instruction may include all modification rules, and the user initiates the modification instruction, and then modifies the text information using all modification rules. The specific situation can be set according to actual needs, and the embodiment of the disclosure does not limit this.
For convenience of description, the implementation of the present disclosure is described in detail with respect to one modification instruction corresponding to one modification rule.
In a preferred embodiment of the present disclosure, the modification process includes at least one of: adding multimedia information, replacing text information, and marking text information.
Modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information, wherein the modifying step comprises the following steps:
receiving at least one first multimedia information input by a user;
determining a first region to be added corresponding to each first multimedia information in the text information through a preset first model;
and adding each first multimedia information to the corresponding first area to be added respectively to obtain the modified text information.
The first multimedia information may be a picture, an audio, a video, a URL (uniform resource locator), and the like. Specifically, after the user inputs the text information, the user continues to input at least one piece of first multimedia information, and when the user initiates an instruction to add multimedia information, the terminal may input the text information and each piece of first multimedia information into a preset first model, such as a pointer network model (pointer network), where the first model determines a most appropriate area to be added in the text information for each piece of first multimedia information, and then adds each piece of first multimedia information to the corresponding area to be added, so as to obtain modified text information.
In a preferred embodiment of the present disclosure, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain the modified text information includes:
receiving at least one second area to be added selected by a user;
acquiring context information of each second area to be added through a preset second model, and determining second multimedia information corresponding to each second area to be added based on the context information of each second area to be added;
and respectively adding each second multimedia information to the corresponding second region to be added to obtain the modified text information.
The second multimedia information may also be a picture, audio, video, URL, etc. Specifically, after the user inputs the text information, at least one area to be added is selected from the text information, and then an instruction for adding multimedia information is initiated, at this time, the terminal may obtain context information of each area to be added by using a preset second model, such as a context prediction model, and determine a tag corresponding to each area to be added based on the context information of each area to be added, where the number of the tags may be one or multiple, that is, one area to be added may correspond to one tag or multiple tags, and then search for second multimedia information related to the tags based on the tags of each area to be added. Each region to be added can be added with one piece of second multimedia information, or can be added with a plurality of pieces of second multimedia information. After the second multimedia information corresponding to each region to be added is obtained through searching, each second multimedia information can be added to the corresponding region to be added, and therefore modified text information is obtained.
It should be noted that the number of the tags and the number of the added multimedia information in each area to be added may be set according to actual requirements, which is not limited in the embodiment of the present disclosure.
Moreover, when searching for multimedia information, the second model may perform a search locally at the terminal, for example, a multimedia information database is locally provided at the terminal, or a search may be performed in the internet, or a search may be performed in other manners, which is not limited in this disclosure.
In a preferred embodiment of the present disclosure, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain the modified text information includes:
determining at least one third area to be added in the text information and third multimedia information corresponding to each third area to be added through a preset third model;
and respectively adding each third multimedia information to the corresponding third area to be added to obtain the modified text information.
The third multimedia information may be multimedia information of symbol classes such as emoticons, character symbols, special symbols, and the like. Specifically, after the user initiates a modification instruction for adding multimedia information, the terminal may input the text information into a preset third model, such as a seq2seq model, and the third model analyzes the text information, determines an area to be added to which the third multimedia information may be added in the text information, and searches for the third multimedia information corresponding to each area to be added. And after each piece of third multimedia information is obtained through searching, each piece of third multimedia information is added to the corresponding area to be added.
For example, the text information includes "noon tea", "coffee pudding", "coffee ice cream", "coffee cheese cake", and "milk coffee ice shaving", the third model determines that the emoticons are added to the backs of the "noon tea", "coffee pudding", "coffee ice cream", "coffee cheese cake", and "milk coffee ice shaving", and searches for the emoticons corresponding to the "tea", "pudding", "ice cream", "cake", and "ice shaving", respectively, and then adds the "tea", "pudding", "ice cream", "cake", and "ice shaving" to the backs of the "afternoon tea", "coffee pudding", "coffee ice cream", "coffee cheese cake", and "milk coffee ice shaving", as shown in fig. 2A.
For another example, the text message includes three words, such as "plausible mountain", "Tian Shi Fu", and "Shang Qing Gong", and the third model detects the three words, and each word is an independent paragraph, so that it can be determined that the three words can be preceded by an emoticon, and then the emoticons of "check mark" can be added to the three words, as shown in fig. 2B.
It should be noted that, when searching for multimedia information, the third model may perform a search locally at the terminal, for example, a multimedia information database is locally provided at the terminal, and may also perform a search in the internet, or perform a search in other manners, which is not limited in this disclosure.
In a preferred embodiment of the present disclosure, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain the modified text information includes:
when the text information is detected to contain preset appointed text information, acquiring information to be replaced corresponding to the appointed text information;
and replacing the information to be replaced with the specified text information to obtain the modified text information.
Specifically, a replacement list may be configured in advance in the terminal, and the replacement list may include a plurality of pieces of specified text information and information to be replaced corresponding to each piece of specified text information. For example, the text information is designated as "plus" or "+", and the corresponding information to be replaced is "+".
When a user initiates a modification instruction of text information replacement, whether specified text information exists in the text information is detected, if yes, the specified text information is replaced by corresponding information to be replaced based on a preset replacement list, and accordingly modified text information is obtained.
For example, the designated text information included in the text information is "1", "2", "3", and "+", and after the designated text information is detected, each designated text information is replaced with the corresponding information to be replaced, so as to obtain the modified text information, as shown in fig. 2C.
It should be noted that, in the embodiment of the present disclosure, in addition to configuring the replacement list in advance, the corresponding information to be replaced may also be obtained by searching from the internet after the specified text information is detected, and an obtaining manner of the information to be replaced may be set according to an actual requirement, which is not limited in the embodiment of the present disclosure.
In a preferred embodiment of the present disclosure, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain the modified text information includes:
segmenting the text information to obtain a plurality of text sentences;
scoring each text statement through a preset fourth model, and determining at least one target text statement with the score exceeding a preset scoring threshold;
and marking each target text sentence to obtain modified text information.
Specifically, the text information may be segmented into a plurality of text sentences based on a natural language processing technique, then each text sentence is scored by using a preset fourth model, such as a correlation and importance model, after the score of each text sentence is obtained, at least one target text sentence with a score exceeding a score threshold is selected, and each target text sentence is labeled, such as highlighting, changing a font, changing a color, and the like, so as to obtain the modified text information.
In practical application, the historical text information marked by the user can be used as sample data to train the fourth model, so that the marking habit of the fourth model is closer to the marking habit of the user.
In the embodiment of the present disclosure, when it is received that the user performs modification processing on the modified text information, the corresponding model may be trained by using the modification processing performed by the user. For example, if the user marks a sentence in the modified text information or cancels a marked sentence in the modified text information, the fourth model may be trained by using the modification process performed by the user to obtain the trained fourth model. Therefore, each model can be subjected to iterative training based on the behavior habit of the user, so that the similarity between the modification processing of the trained model and the modification processing of the user is higher, the modification behavior of the user is more consistent, the accuracy of the modification processing is improved, and the user experience is improved.
In the embodiment of the disclosure, the terminal receives text information input by a user and a modification instruction for the text information, and then modifies the text information based on a modification rule corresponding to the modification instruction to obtain modified text information. Therefore, after the user completes creation of the text information, formal editing can be completed by one key, excessive formal editing of the text information is not needed, and even editing is not needed completely, so that the user can concentrate on creation of the text information, work of typesetting, style editing and the like of the text information without investing efforts is reduced or even needed, time cost and labor cost are saved, processing efficiency of the text information is improved, and user experience is improved.
Further, when the terminal receives the modification processing of the modified text information by the user, the corresponding model in the terminal can be trained by adopting the modification processing executed by the user. Therefore, each model can be subjected to iterative training based on the behavior habit of the user, so that the similarity between the modification treatment of the trained model and the modification treatment of the user is higher, the modification habit of the user is better met, the accuracy of the modification treatment is improved, and the user experience is further improved.
Fig. 3 is a schematic structural diagram of a text information processing apparatus according to another embodiment of the present disclosure, and as shown in fig. 3, the apparatus of this embodiment may include:
areceiving module 301, configured to receive text information input by a user;
the receiving module is further used for receiving a modification instruction aiming at the text information;
and the modifyingmodule 302 is configured to modify the text information based on a modifying rule corresponding to the modifying instruction to obtain modified text information.
In a preferred embodiment of the present disclosure, the modification process includes at least one of: adding multimedia information, text information replacement, and marking text information.
In a preferred embodiment of the present disclosure, the receiving module is further configured to receive at least one first multimedia message input by a user;
a modification module comprising:
the first determining submodule is used for determining a first region to be added corresponding to each first multimedia information in the text information through a preset first model;
and the first processing submodule is used for respectively adding each first multimedia information to the corresponding first area to be added to obtain the modified text information.
In a preferred embodiment of the present disclosure, the receiving module is further configured to receive at least one second area to be added selected by the user;
a modification module comprising:
the second determining submodule is used for acquiring the context information of each second area to be added through a preset second model and determining second multimedia information corresponding to each second area to be added based on the context information of each second area to be added;
and the second processing submodule is used for respectively adding each second multimedia information to the corresponding second region to be added to obtain the modified text information.
In a preferred embodiment of the present disclosure, the modification module includes:
the third determining submodule is used for determining at least one third area to be added in the text information and third multimedia information corresponding to each third area to be added through a preset third model;
and the third processing submodule is used for respectively adding each third multimedia information to the corresponding third area to be added to obtain the modified text information.
In a preferred embodiment of the present disclosure, the modification module includes:
the detection submodule is used for detecting that the text information contains preset specified text information;
the acquisition submodule is used for acquiring information to be replaced corresponding to the specified text information;
and the replacing submodule is used for replacing the information to be replaced with the specified text information to obtain the modified text information.
In a preferred embodiment of the present disclosure, the modification module includes:
the segmentation submodule is used for segmenting the text information to obtain a plurality of text sentences;
the fourth determining submodule is used for scoring each text statement through a preset fourth model and determining at least one target text statement with the score exceeding a preset scoring threshold;
and the marking submodule is used for marking each target text statement to obtain the modified text information.
The processing apparatus for text information of this embodiment can execute the processing method for text information shown in the first embodiment of this disclosure, and the implementation principles thereof are similar, and are not described herein again.
In the embodiment of the disclosure, the terminal receives text information input by a user and a modification instruction for the text information, and then modifies the text information based on a modification rule corresponding to the modification instruction to obtain modified text information. Therefore, after the user completes creation of the text information, formal editing can be completed by one key, excessive formal editing of the text information is not needed, and even editing is not needed completely, so that the user can concentrate on creation of the text information, work of typesetting, style editing and the like of the text information without investing efforts is reduced or even needed, time cost and labor cost are saved, processing efficiency of the text information is improved, and user experience is improved.
Further, when the terminal receives the modification processing of the modified text information by the user, the corresponding model in the terminal can be trained by adopting the modification processing executed by the user. Therefore, each model can be subjected to iterative training based on the behavior habit of the user, so that the similarity between the modification treatment of the trained model and the modification treatment of the user is higher, the modification habit of the user is better met, the accuracy of the modification treatment is improved, and the user experience is further improved.
Referring now to FIG. 4, a block diagram of anelectronic device 400 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., car navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
The electronic device includes: a memory and a processor, wherein the processor may be referred to as aprocessing device 401 described below, and the memory may include at least one of a Read Only Memory (ROM)402, a Random Access Memory (RAM)403, and astorage device 408, which are described below: as shown in fig. 4,electronic device 400 may include a processing device (e.g., central processing unit, graphics processor, etc.) 401 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)402 or a program loaded from astorage device 408 into a Random Access Memory (RAM) 403. In theRAM 403, various programs and data necessary for the operation of theelectronic apparatus 400 are also stored. Theprocessing device 401, theROM 402, and theRAM 403 are connected to each other via abus 404. An input/output (I/O)interface 405 is also connected tobus 404.
Generally, the following devices may be connected to the I/O interface 405:input devices 406 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; anoutput device 407 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like;storage 408 including, for example, tape, hard disk, etc.; and acommunication device 409. The communication means 409 may allow theelectronic device 400 to communicate wirelessly or by wire with other devices to exchange data. While fig. 4 illustrates anelectronic device 400 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via thecommunication device 409, or from thestorage device 408, or from theROM 402. The computer program performs the above-described functions defined in the methods of the embodiments of the present disclosure when executed by theprocessing device 401.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network Protocol, such as HTTP (HyperText Transfer Protocol), and may interconnect with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving text information input by a user; receiving a modification instruction aiming at the text information; and modifying the text information based on a modification rule corresponding to the modification instruction to obtain modified text information.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules or units described in the embodiments of the present disclosure may be implemented by software or hardware. Wherein the designation of a module or unit does not in some cases constitute a limitation of the unit itself.
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, [ example one ] there is provided a text information processing method, including:
receiving text information input by a user;
receiving a modification instruction aiming at the text information;
and modifying the text information based on a modification rule corresponding to the modification instruction to obtain modified text information.
Preferably, the modification process comprises at least one of: adding multimedia information, text information replacement, and marking text information.
Preferably, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information includes:
receiving at least one first multimedia information input by a user;
determining a first region to be added corresponding to each first multimedia information in the text information through a preset first model;
and adding each first multimedia information to the corresponding first area to be added respectively to obtain the modified text information.
Preferably, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information includes:
receiving at least one second area to be added selected by a user;
acquiring context information of each second area to be added through a preset second model, and determining second multimedia information corresponding to each second area to be added based on the context information of each second area to be added;
and respectively adding each second multimedia information to the corresponding second region to be added to obtain the modified text information.
Preferably, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information includes:
determining at least one third area to be added in the text information and third multimedia information corresponding to each third area to be added through a preset third model;
and respectively adding each third multimedia information to the corresponding third area to be added to obtain the modified text information.
Preferably, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information includes:
when the text information is detected to contain preset specified text information, acquiring information to be replaced corresponding to the specified text information;
and replacing the specified text information with the information to be replaced to obtain modified text information.
Preferably, the step of modifying the text information based on the modification rule corresponding to the modification instruction to obtain modified text information includes:
segmenting the text information to obtain a plurality of text sentences;
scoring each text statement through a preset fourth model, and determining at least one target text statement with the score exceeding a preset scoring threshold;
and marking each target text sentence to obtain modified text information.
According to one or more embodiments of the present disclosure, [ example two ] there is provided the apparatus of example one, further comprising:
the receiving module is used for receiving text information input by a user;
the receiving module is further used for modifying the text information;
and the modification module is used for modifying the text information based on the modification rule corresponding to the modification instruction to obtain the modified text information.
Preferably, the modification process comprises at least one of: adding multimedia information, text information replacement, and marking text information.
Preferably, the receiving module is further configured to receive at least one first multimedia message input by a user;
the modification module includes:
the first determining submodule is used for determining a first region to be added corresponding to each first multimedia information in the text information through a preset first model;
and the first processing submodule is used for respectively adding each first multimedia information to the corresponding first area to be added to obtain the modified text information.
Preferably, the receiving module is further configured to receive at least one second area to be added selected by the user;
the modification module includes:
the second determining submodule is used for acquiring the context information of each second area to be added through a preset second model and determining second multimedia information corresponding to each second area to be added based on the context information of each second area to be added;
and the second processing submodule is used for respectively adding each second multimedia information to the corresponding second region to be added to obtain the modified text information.
Preferably, the modification module includes:
the third determining submodule is used for determining at least one third area to be added in the text information and third multimedia information corresponding to each third area to be added through a preset third model;
and the third processing submodule is used for respectively adding each third multimedia information to the corresponding third area to be added to obtain the modified text information.
Preferably, the modification module includes:
the detection submodule is used for detecting that the text information contains preset specified text information;
the obtaining submodule is used for obtaining information to be replaced corresponding to the specified text information;
and the replacing submodule is used for replacing the information to be replaced with the specified text information to obtain modified text information.
Preferably, the modification module includes:
the segmentation submodule is used for segmenting the text information to obtain a plurality of text sentences;
the fourth determining submodule is used for scoring each text statement through a preset fourth model and determining at least one target text statement with the score exceeding a preset scoring threshold;
and the marking submodule is used for marking each target text statement to obtain the modified text information.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.