CN109829167B - Word segmentation processing method and mobile terminal - Google Patents

Word segmentation processing method and mobile terminal Download PDF

Info

Publication number
CN109829167B
CN109829167B CN201910133448.3A CN201910133448A CN109829167B CN 109829167 B CN109829167 B CN 109829167B CN 201910133448 A CN201910133448 A CN 201910133448A CN 109829167 B CN109829167 B CN 109829167B
Authority
CN
China
Prior art keywords
word segmentation
rule
word
result
segmentation result
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.)
Active
Application number
CN201910133448.3A
Other languages
Chinese (zh)
Other versions
CN109829167A (en
Inventor
赵俊杰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910133448.3A priority Critical patent/CN109829167B/en
Publication of CN109829167A publication Critical patent/CN109829167A/en
Application granted granted Critical
Publication of CN109829167B publication Critical patent/CN109829167B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE 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/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Machine Translation (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a word segmentation processing method and a mobile terminal, wherein the method comprises the following steps: under the condition that the target word segmentation rule for carrying out word segmentation processing on the text to be processed comprises at least two word segmentation rules, carrying out word segmentation processing on the text to be processed by utilizing an ith word segmentation rule to obtain an ith word segmentation result, and processing the ith word segmentation result by utilizing an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result; and outputting the N-th word segmentation result as the word segmentation result of the text to be processed. According to the invention, the user can select the word segmentation rule which is required to be preferentially used according to the self requirement, and the word segmentation result closest to the user requirement is output, so that the user experience is improved.

Description

Word segmentation processing method and mobile terminal
Technical Field
The present invention relates to the field of text processing, and in particular, to a word segmentation processing method and a mobile terminal.
Background
Before the intelligent screen character recognition function appears, the mobile terminal cannot automatically recognize and extract characters displayed on the screen, and when a user needs to acquire key information of content displayed on the screen, the user needs to manually reenter the screen, so that the user operation is inconvenient, and the user experience effect is poor.
Along with the development of technology, in order to facilitate user operation, the mobile terminal can identify and extract the characters on the current screen so as to allow the user to select the key information required by the user, but in the prior art, the characters on the current screen are segmented by utilizing a single segmentation strategy, so that the user experience effect is poor.
Disclosure of Invention
The embodiment of the invention provides a word segmentation processing method and a mobile terminal, which are used for solving the problem that in the prior art, a single word segmentation strategy is utilized to segment characters on a current screen, so that poor user experience effect is caused.
In order to solve the technical problems, the invention is realized as follows:
in a first aspect, a word segmentation processing method is provided, including:
under the condition that the target word segmentation rule for carrying out word segmentation processing on the text to be processed comprises at least two word segmentation rules, carrying out word segmentation processing on the text to be processed by utilizing an ith word segmentation rule to obtain an ith word segmentation result, and processing the ith word segmentation result by utilizing an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result;
outputting an N-th word segmentation result as a word segmentation result of the text to be processed;
the use priority of the ith word segmentation rule is higher than that of the (i+1) th word segmentation rule, i=1, … N-1, and N is a positive integer greater than or equal to 2.
In a second aspect, there is provided a mobile terminal comprising:
the word segmentation module is used for carrying out word segmentation on the text to be processed by utilizing an ith word segmentation rule to obtain an ith word segmentation result, and processing the ith word segmentation result by utilizing an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result under the condition that the target word segmentation rule comprises N word segmentation rules; the use priority of the ith word segmentation rule is higher than that of the (i+1) th word segmentation rule, i=1, … N-1, and N is a positive integer greater than or equal to 2;
and the output module is used for outputting the N-th word segmentation result as the word segmentation result of the text to be processed.
In a third aspect, there is provided a mobile terminal comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program implementing the steps of the method according to the first aspect when executed by the processor.
In the embodiment of the invention, various word segmentation rules can be provided, word segmentation processing is carried out on the text to be processed according to the use priorities corresponding to the various word segmentation rules, and word segmentation results after the word segmentation processing are output, so that a user can select the word segmentation rules which are required to be preferentially used according to the needs of the user, and the word segmentation results closest to the needs of the user are output, and the user experience is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and do not constitute a limitation on the invention. In the drawings:
FIG. 1 is a flow chart of a word segmentation processing method according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of a display interface according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a display interface according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a mobile terminal implementing various embodiments of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Fig. 1 is a flowchart of a word segmentation processing method according to an embodiment of the present invention. The word segmentation processing method as shown in fig. 1 may include:
102, under the condition that a target word segmentation rule for carrying out word segmentation processing on a text to be processed is determined to comprise at least two word segmentation rules, carrying out word segmentation processing on the text to be processed by utilizing an ith word segmentation rule to obtain an ith word segmentation result, and processing the ith word segmentation result by utilizing an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result; the use priority of the ith word segmentation rule is higher than that of the (i+1) th word segmentation rule, i=1, … N-1, and N is a positive integer greater than or equal to 2.
Specifically, when word segmentation is performed on a text to be processed according to the use priorities corresponding to at least two word segmentation rules, word segmentation is performed on the text to be processed by using the word segmentation rule with the highest use priority level to obtain a first-stage word segmentation result to be processed, and then word segmentation is performed on a last-stage word segmentation result by using the word segmentation rule with the next-stage use priority level.
Illustratively, the target word segmentation rule includes: the method comprises the steps of firstly, performing word segmentation on a text to be processed according to the use priorities corresponding to at least two word segmentation rules to obtain a first-level word segmentation result, then performing word segmentation on the first-level word segmentation result by using the second word segmentation rule to obtain a second-level word segmentation result, and finally performing word segmentation on the second-level word segmentation result by using the third word segmentation rule to obtain a third-level word segmentation result.
And 104, outputting an N-th word segmentation result as a word segmentation result of the text to be processed.
Specifically, the word segmentation result of the text to be processed can be displayed on a screen.
According to the embodiment of the invention, various word segmentation rules can be provided, word segmentation processing is carried out on the text to be processed according to the use priorities corresponding to the various word segmentation rules, and word segmentation results after the word segmentation processing are output, so that a user can select the word segmentation rules which are required to be preferentially used according to the needs of the user, and the word segmentation results closest to the needs of the user are output, and the user experience is improved.
In an embodiment of the present invention, the at least two word segmentation rules include a first word segmentation rule, and further include at least one of a second word segmentation rule and a third word segmentation rule; in other words, the at least two word segmentation rules include a first word segmentation rule and a second word segmentation rule, or the at least two word segmentation rules include a first word segmentation rule and a third word segmentation rule, or the at least two word segmentation rules include a first word segmentation rule, a second word segmentation rule, and a third word segmentation rule.
The second word segmentation rule is a rule for word segmentation according to word numbers, the third word segmentation rule is a rule for word segmentation according to word types, and the use priority of the second word segmentation rule and the third word segmentation rule is higher than that of the first word segmentation rule.
Specifically, the word number of the word is the word number included in the word, and the word type is the type to which the word belongs. Illustratively, the number of words is 4, and the word type is country or name.
Specifically, the first word segmentation rule is a rule for segmenting words according to common words.
According to the embodiment, the text to be processed can be subjected to word segmentation according to the word number priority, or the text to be processed is subjected to word segmentation according to the word type priority, or the text to be processed is subjected to word segmentation according to the word number priority and the word type priority, so that the output word segmentation result meets the requirements of users on the word number, the word type or the word number and the word type.
In an embodiment of the present invention, step 104 may include:
and displaying the word segmentation result after word segmentation processing according to the target display rule.
The target display rule is to display a first sub-word segmentation result corresponding to the word segmentation rule with the highest priority in the word segmentation results after word segmentation processing in a distinguishing way with a second sub-word segmentation result, wherein the second sub-word segmentation result is a sub-word segmentation result except the first sub-word segmentation result in the word segmentation results.
Specifically, the first sub word segmentation result is arranged in front of the second sub word segmentation result so as to display the first sub word segmentation result and the second sub word segmentation result in a distinguishing way; or, highlighting the first sub word segmentation result and the second sub word segmentation result to display the first sub word segmentation result and the second sub word segmentation result in a distinguishing way; or the first sub word segmentation result is displayed in a different font and/or color from that of the second sub word segmentation result, so that the first sub word segmentation result and the second sub word segmentation result are displayed in a different manner.
In this embodiment, the first sub word segmentation result corresponding to the word segmentation rule with the highest priority in the word segmentation result after word segmentation processing is displayed differently from the rest word segmentation results, so that the user can intuitively see the words meeting the requirement of the user.
In an embodiment of the present invention, the at least two word segmentation rules include a first word segmentation rule and a third word segmentation rule, where the third word segmentation rule is a rule for performing word segmentation according to a word type, and a usage priority of the third word segmentation rule is higher than a usage priority of the first word segmentation rule.
Specifically, the word type is the type to which the word belongs. Illustratively, the term type is country or name.
Specifically, the first word segmentation rule is a rule for segmenting words according to common words.
In step 102, performing word segmentation on a text to be processed by using an ith word segmentation rule to obtain an ith word segmentation result, and processing the ith word segmentation result by using an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result (wherein the use priority of the ith word segmentation rule is higher than the use priority of the (i+1) th word segmentation rule, i=1, … N-1, N is a positive integer greater than or equal to 2), and the method may include:
under the condition that keywords for determining word types corresponding to the third word segmentation rules are obtained, word segmentation processing is carried out on the text to be processed according to the third word segmentation rules to obtain first-level word segmentation results, word segmentation processing is carried out on the first-level word segmentation results according to the first word segmentation rules to obtain second-level word segmentation results, and the second-level word segmentation results are used as word segmentation results of the text to be processed.
The obtained keywords are country and name, the word types corresponding to the third word segmentation rule comprise country and name, word segmentation processing is carried out on the text to be processed according to the country and the name to obtain a first-level word segmentation result, word segmentation processing is carried out on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result, and the second-level word segmentation result is used as the word segmentation result of the text to be processed.
The word type is national, word segmentation is carried out on the text ' Chinese people's group friends ' to be processed according to a third word segmentation rule, and the obtained word segmentation result comprises ' Chinese people '.
Further, in step 102, performing word segmentation on the text to be processed by using an ith word segmentation rule to obtain an ith word segmentation result, and processing the ith word segmentation result by using an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result (wherein, the use priority of the ith word segmentation rule is higher than the use priority of the (i+1) th word segmentation rule, i=1, … N-1, N is a positive integer greater than or equal to 2), and the method may further include:
under the condition that keywords for determining word types corresponding to the third word segmentation rules are not obtained, word segmentation processing is carried out on the text to be processed according to the first word segmentation rules, at least one recommended keyword is obtained, and at least one recommended keyword is pushed;
obtaining a target keyword selected by a user from at least one recommended keyword, determining a word type corresponding to a third word segmentation rule according to the target keyword, performing word segmentation on the text to be processed according to the word type corresponding to the third word segmentation rule to obtain a first-level word segmentation result, and performing word segmentation on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result serving as the word segmentation result of the text to be processed.
In an exemplary case that a keyword for determining a word type corresponding to the third word segmentation rule is not obtained, word segmentation is performed on a text to be processed according to common words to obtain two recommended keywords of a country and a name, the two recommended keywords of the country and the name are pushed, then a target keyword selected by a user from the two recommended keywords of the country and the name, for example, the name is obtained, the word type corresponding to the third word segmentation rule is determined to be the name according to the name, word segmentation is performed on the text to be processed according to the name to obtain a first-stage word segmentation result, word segmentation is performed on the first-stage word segmentation result according to the common words to obtain a second-stage word segmentation result, and the second-stage word segmentation result is used as a word segmentation result of the text to be processed.
Fig. 2 is a schematic diagram of a display interface according to an embodiment of the present invention. For example, the intelligent screen recognition application shown in fig. 2 uses the word segmentation processing method of the present invention, and in the case that no keyword for determining the word type corresponding to the third word segmentation rule is obtained, that is, when the user does not input a keyword in the "input keyword" column, the user may perform word segmentation processing on the text to be processed according to the first word segmentation rule, so as to obtain, for example, the illustrated recommended keyword: country, name.
According to the method and the device, when the user wants to divide words preferentially by using word types, but no keyword for determining the word types is set, the intelligent recommendation keyword is selected by the user, word division processing is preferentially performed according to the word types determined by the keyword selected by the user, and user experience can be improved.
In another embodiment of the present invention, the step 102 may further include:
under the condition that keywords for determining word types corresponding to the third word segmentation rules are not obtained, word segmentation is carried out on the text to be processed according to the first word segmentation rules, word segmentation results after word segmentation are output, and at least one recommended keyword is obtained;
pushing at least one recommended keyword;
obtaining a target keyword selected by a user from at least one recommended keyword, determining a word type corresponding to a third word segmentation rule according to the target keyword, performing word segmentation on the text to be processed according to the word type corresponding to the third word segmentation rule to obtain a first-level word segmentation result, and performing word segmentation on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result serving as a word segmentation result of the text to be processed.
For example, as shown in fig. 2, in the case that a keyword for determining a word type corresponding to the third word segmentation rule is not acquired, the recommended keyword is pushed: country, name, and outputting the word segmentation result as shown in fig. 2.
According to the method and the device, when the user wants to divide words preferentially by using word types, but no keyword for determining the word types is set, the intelligent recommendation keyword is selected by the user, word division processing is preferentially performed according to the word types determined by the keyword selected by the user, and user experience can be improved.
In one embodiment of the present invention, the at least two word segmentation rules include a first word segmentation rule and a second word segmentation rule, wherein the second word segmentation rule is a rule for performing word segmentation according to word numbers, and the use priority of the second word segmentation rule is higher than that of the first word segmentation rule; in the step 102, the word segmentation is performed on the text to be processed by using the ith word segmentation rule to obtain an ith word segmentation result, and the i+1 word segmentation result is processed by using the (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result, which may include:
performing word segmentation on the text to be processed according to the second word segmentation rule to obtain a first-level word segmentation result, and performing word segmentation on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result.
Further, the step of performing word segmentation on the text to be processed according to the second word segmentation rule to obtain a first-level word segmentation result may include:
and carrying out word segmentation on the text to be processed according to the using sub-priority of the word numbers.
The text to be processed is exemplified by "healthy life and happy work", when the using sub-priority of the word number of 4 is higher than the using sub-priority of the word number of 2, word segmentation is carried out on the text to be processed, the words in the word segmentation result comprise two words of healthy life and happy work, when the using sub-priority of the word number of 2 is higher than the using sub-priority of the word number of 4, word segmentation is carried out on the text to be processed, and the words in the word segmentation result comprise four words of healthy life, happy and work.
Specifically, when the text to be processed is word-segmented by using the word number of the sub-priority level, and the text to be processed cannot be word-segmented by using the word number of the sub-priority level, the text to be processed is word-segmented by using the word number of the sub-priority level. For example, the use sub-priority of 4 word words is higher than the use sub-priority of 2 word words, and when the word segmentation processing is performed on the text to be processed by using the word words of 4 word words, the word segmentation processing is performed on the text to be processed by using the word words of 2 word words.
Fig. 3 is a schematic diagram of a display interface according to another embodiment of the present invention. For example, the intelligent screen recognition application shown in fig. 2 uses the word segmentation processing method of the present invention, as shown in fig. 3, in which "4, 2, 3, 1, 5" indicates the usage sub-priorities of different word numbers according to the order, that is, the usage sub-priority of the word number of 4 is higher than the usage sub-priority of the word number of 2, and the sub-usage priorities of the remaining word numbers are sequentially reduced.
In practical application, the use sub-priority of the word number set by the user can be obtained, and then word segmentation processing is performed on the text to be processed according to the use sub-priority of the word number.
In an embodiment of the present invention, the method may further include:
under the condition that the target word segmentation rule comprises a word segmentation rule, word segmentation processing is carried out on the text to be processed according to the target word segmentation rule, and word segmentation results after word segmentation processing are output.
The target word segmentation rule comprises a first word segmentation rule, wherein the first word segmentation rule is a rule for segmenting words according to common words.
In this embodiment, under the condition that the user does not want to preferentially use the word segmentation rule, the text to be processed is segmented according to the word segmentation rule defined by the system.
In an embodiment of the present invention, before step 102, the method may further include:
determining a target word segmentation rule for word segmentation processing of the text to be processed according to the acquired word segmentation mode;
and under the condition that the target word segmentation rule comprises at least two word segmentation rules, determining the corresponding use priority of the at least two word segmentation rules.
Exemplary, word segmentation modes include: at least two of a word count priority mode, a word type priority mode, and a regular mode; the second word segmentation rule is a rule for segmenting words according to word numbers, the third word segmentation rule is a rule for segmenting words according to word types, and the first word segmentation rule is a rule for segmenting words according to common words; when the word segmentation mode is a word number priority mode, determining that the target word segmentation rule comprises a first word segmentation rule and a second word segmentation rule, and determining that the use priority of the second word segmentation rule is higher than that of the first word segmentation rule; when the word segmentation mode is a word type priority mode, determining that the target word segmentation rule comprises a first word segmentation rule and a third word segmentation rule, and determining that the use priority of the third word segmentation rule is higher than that of the first word segmentation rule; when the word segmentation mode is a normal mode, determining that the target word segmentation rule comprises a first word segmentation rule.
Specifically, the word segmentation mode may be obtained according to the received indication message of the switching button. For example, the obtained word segmentation mode may be a word number priority mode or a regular mode after the user clicks the switch button in fig. 2, and the obtained word segmentation mode may be a word type priority mode or a regular mode after the user clicks the switch button in fig. 3.
In this embodiment, by letting the user select the word segmentation mode, the word segmentation rule that the user wants to use preferentially is determined.
In an embodiment of the present invention, before determining the target word segmentation rule for performing word segmentation on the text to be processed according to the obtained word segmentation mode, the method may further include:
and determining a word segmentation mode according to the corresponding relation between the preset touch screen hand index and the word segmentation mode.
When two touch screen fingers are acquired, determining that the word segmentation mode is a word number priority mode; when three touch screen fingers are acquired, determining that the word segmentation mode is a word type priority mode.
According to the embodiment, the user can switch the word segmentation mode through the number of the touch screen fingers, and the user can conveniently select the word segmentation mode.
Fig. 4 is a schematic structural diagram of a mobile terminal according to an embodiment of the present invention. The mobile terminal as shown in fig. 4 may include:
the word segmentation module 41 is configured to perform word segmentation on a text to be processed by using an ith word segmentation rule to obtain an ith word segmentation result, and process the ith word segmentation result by using an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result, where the target word segmentation rule includes N word segmentation rules;
the output module 42 is used for taking the nth word segmentation result as the word segmentation result of the text to be processed;
the use priority of the ith word segmentation rule is higher than that of the (i+1) th word segmentation rule; wherein i=1, … N-1, N is a positive integer greater than or equal to 2.
In an embodiment of the present invention, the at least two word segmentation rules include a first word segmentation rule, and further include at least one of a second word segmentation rule and a third word segmentation rule;
the second word segmentation rule is a rule for word segmentation according to word numbers, the third word segmentation rule is a rule for word segmentation according to word types, and the use priority of the second word segmentation rule and the third word segmentation rule is higher than that of the first word segmentation rule.
In one embodiment of the present invention, the output module 42 is specifically configured to:
and displaying the word segmentation result according to a target display rule, wherein the target display rule is used for displaying a first sub-word segmentation result corresponding to the word segmentation rule with the highest priority in the word segmentation result and a second sub-word segmentation result in a distinguishing mode, and the second sub-word segmentation result is a sub-word segmentation result except the first sub-word segmentation result in the word segmentation result.
In an embodiment of the present invention, the at least two word segmentation rules include a first word segmentation rule and a third word segmentation rule, where the third word segmentation rule is a rule for performing word segmentation according to a word type, and a usage priority of the third word segmentation rule is higher than a usage priority of the first word segmentation rule;
the word segmentation module 41 is specifically configured to:
and under the condition that keywords for determining the word types corresponding to the third word segmentation rules are obtained, word segmentation processing is carried out on the text to be processed according to the third word segmentation rules, a first word segmentation result to be processed is obtained, and word segmentation processing is carried out on the first word segmentation result to be processed according to the first word segmentation rules.
Fig. 5 is a schematic structural diagram of a mobile terminal according to another embodiment of the present invention. As shown in fig. 5, the mobile terminal may further include:
the pushing module 43 is configured to perform word segmentation processing on the text to be processed according to the first word segmentation rule to obtain at least one recommended keyword, and push the at least one recommended keyword, where the keyword is used for determining a word type corresponding to the third word segmentation rule is not obtained;
the word segmentation module 41 is further configured to obtain a target keyword selected by the user from the at least one recommended keyword, determine a word type corresponding to the third word segmentation rule according to the target keyword, perform word segmentation on the text to be processed according to the word type corresponding to the third word segmentation rule, obtain a first-stage word segmentation result, and perform word segmentation on the second word segmentation result to be processed according to the first word segmentation rule.
The mobile terminal provided by the embodiment of the present invention can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to 3, and in order to avoid repetition, a description is omitted here. The mobile terminal provided by the embodiment of the invention can provide various word segmentation rules, carries out word segmentation on the text to be processed according to the use priorities corresponding to the various word segmentation rules, and outputs the word segmentation result after the word segmentation processing, so that a user can select the word segmentation rule which is required to be preferentially used according to the self requirement, and outputs the word segmentation result closest to the user requirement, thereby improving the user experience.
Fig. 6 is a schematic diagram of a hardware architecture of a mobile terminal 600 implementing various embodiments of the present invention, including but not limited to: radio frequency unit 601, network module 602, audio output unit 603, input unit 604, sensor 605, display unit 606, user input unit 607, interface unit 608, memory 609, processor 610, and power supply 611. Those skilled in the art will appreciate that the mobile terminal structure shown in fig. 6 is not limiting of the mobile terminal and that the mobile terminal may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. In the embodiment of the invention, the mobile terminal comprises, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer and the like.
A processor 610 for:
under the condition that the target word segmentation rule comprises at least two word segmentation rules, performing word segmentation on a text to be processed by utilizing an ith word segmentation rule to obtain an ith word segmentation result, and processing the ith word segmentation result by utilizing an (i+1) th word segmentation rule to obtain an (i+1) th word segmentation result;
outputting an N-th word segmentation result as a word segmentation result of the text to be processed;
the use priority of the ith word segmentation rule is higher than that of the (i+1) th word segmentation rule, i=1, … N-1, and N is a positive integer greater than or equal to 2.
The mobile terminal provided by the embodiment of the invention can provide various word segmentation rules, carries out word segmentation on the text to be processed according to the use priorities corresponding to the various word segmentation rules, and outputs the word segmentation result after the word segmentation processing, so that a user can select the word segmentation rule which is required to be preferentially used according to the self requirement, and outputs the word segmentation result closest to the user requirement, thereby improving the user experience.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 601 may be used to receive and send information or signals during a call, specifically, receive downlink data from a base station, and then process the downlink data with the processor 610; and, the uplink data is transmitted to the base station. Typically, the radio frequency unit 601 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 601 may also communicate with networks and other devices through a wireless communication system.
The mobile terminal 600 provides wireless broadband internet access to the user, such as helping the user to send and receive e-mail, browse web pages, access streaming media, etc., through the network module 602.
The audio output unit 603 may convert audio data received by the radio frequency unit 601 or the network module 602 or stored in the memory 609 into an audio signal and output as sound. Also, the audio output unit 603 may also provide audio output (e.g., a call signal reception sound, a message reception sound, etc.) related to a specific function performed by the mobile terminal 600. The audio output unit 603 includes a speaker, a buzzer, a receiver, and the like.
The input unit 604 is used for receiving audio or video signals. The input unit 604 may include a graphics processor (Graphics Processing Unit, GPU) 6041 and a microphone 6042, the graphics processor 6041 processing image data of still pictures or video obtained by an image capturing apparatus (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 606. The image frames processed by the graphics processor 6041 may be stored in the memory 609 (or other storage medium) or transmitted via the radio frequency unit 601 or the network module 602. Microphone 6042 may receive sound and can process such sound into audio data. The processed audio data may be converted into a format output that can be transmitted to the mobile communication base station via the radio frequency unit 601 in the case of a telephone call mode.
The mobile terminal 600 also includes at least one sensor 605, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 6061 according to the brightness of ambient light, and the proximity sensor can turn off the display panel 6061 and/or the backlight when the mobile terminal 600 moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for recognizing the gesture of the mobile terminal (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; the sensor 605 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which are not described herein.
The display unit 606 is used to display information input by a user or information provided to the user. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display (Liquid Crystal Display, LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 607 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile terminal. Specifically, the user input unit 607 includes a touch panel 6071 and other input devices 6072. Touch panel 6071, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on touch panel 6071 or thereabout using any suitable object or accessory such as a finger, stylus, or the like). The touch panel 6071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 610, and receives and executes commands sent from the processor 610. In addition, the touch panel 6071 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The user input unit 607 may include other input devices 6072 in addition to the touch panel 6071. Specifically, other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein.
Further, the touch panel 6071 may be overlaid on the display panel 6061, and when the touch panel 6071 detects a touch operation thereon or thereabout, the touch operation is transmitted to the processor 610 to determine a type of a touch event, and then the processor 610 provides a corresponding visual output on the display panel 6061 according to the type of the touch event. Although in fig. 6, the touch panel 6071 and the display panel 6061 are two independent components for implementing the input and output functions of the mobile terminal 600, in some embodiments, the touch panel 6071 and the display panel 6061 may be integrated to implement the input and output functions of the mobile terminal 600, which is not limited herein.
The interface unit 608 is an interface through which an external device is connected to the mobile terminal 600. For example, the external devices may include a wired or wireless headset port, an external power (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 608 may be used to receive input (e.g., data information, power, etc.) from an external device and transmit the received input to one or more elements within the mobile terminal 600 or may be used to transmit data between the mobile terminal 600 and an external device.
The memory 609 may be used to store software programs as well as various data. The memory 609 may mainly include a storage program area that may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and a storage data area; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, the memory 609 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 volatile solid state storage device.
The processor 610 is a control center of the mobile terminal 600, connects various parts of the entire mobile terminal 600 using various interfaces and lines, and performs various functions of the mobile terminal 600 and processes data by running or executing software programs and/or modules stored in the memory 609 and calling data stored in the memory 609, thereby performing overall monitoring of the mobile terminal 600. The processor 610 may include one or more processing units; preferably, the processor 610 may integrate an application processor that primarily handles operating systems, user interfaces, applications, etc., with a modem processor that primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 610.
The mobile terminal 600 may further include a power supply 611 (e.g., a battery) for supplying power to the respective components, and preferably, the power supply 611 may be logically connected to the processor 610 through a power management system, so as to perform functions of managing charging, discharging, and power consumption management through the power management system.
In addition, the mobile terminal 600 includes some functional modules, which are not shown, and will not be described herein.
Preferably, the embodiment of the present invention further provides a mobile terminal, including a processor 610, a memory 609, and a computer program stored in the memory 609 and capable of running on the processor 610, where the computer program when executed by the processor 610 implements each process of the above embodiment of the word segmentation processing method, and the same technical effects can be achieved, and for avoiding repetition, a detailed description is omitted herein.
The embodiment of the invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements each process of the above word segmentation processing method embodiment, and can achieve the same technical effects, so that repetition is avoided, and no further description is provided herein. Wherein the computer readable storage medium is selected from Read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
From the above description of the embodiments, it will be clear to those skilled in the art that the above-described embodiment method may be implemented by means of software plus a necessary general hardware platform, but of course may also be implemented by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present invention may be embodied essentially or in a part contributing to the prior art in the form of a software product stored in a storage medium (e.g. ROM/RAM, magnetic disk, optical disk) comprising instructions for causing a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to perform the method according to the embodiments of the present invention.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (7)

1. A word segmentation method, comprising:
under the condition that the target word segmentation rule comprises at least two word segmentation rules, under the condition that keywords for determining word types corresponding to a third word segmentation rule are obtained, word segmentation is carried out on a text to be processed according to the third word segmentation rule to obtain a first-level word segmentation result, and word segmentation is carried out on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result; the at least two word segmentation rules comprise a first word segmentation rule and a third word segmentation rule, wherein the third word segmentation rule is a rule for word segmentation according to word types, and the use priority of the third word segmentation rule is higher than that of the first word segmentation rule;
under the condition that keywords for determining the word types corresponding to the third word segmentation rules are not obtained, word segmentation processing is carried out on the text to be processed according to the first word segmentation rules, at least one recommended keyword is obtained, and the at least one recommended keyword is pushed; acquiring a target keyword selected by a user from the at least one recommended keyword, determining a word type corresponding to the third word segmentation rule according to the target keyword, performing word segmentation on the text to be processed according to the word type corresponding to the third word segmentation rule to obtain a first-level word segmentation result, and performing word segmentation on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result;
outputting an N-th word segmentation result as a word segmentation result of the text to be processed;
the use priority of the ith word segmentation rule in the at least two word segmentation rules is higher than that of the (i+1) th word segmentation rule, i=1, … N-1, and N is a positive integer greater than or equal to 2.
2. The method of claim 1, wherein the at least two word segmentation rules further comprise a second word segmentation rule;
the second word segmentation rule is a rule for segmenting words according to word numbers, and the use priority of the second word segmentation rule is higher than that of the first word segmentation rule.
3. The method of claim 1, wherein the outputting the nth word segmentation result as the word segmentation result of the text to be processed comprises:
and displaying the word segmentation result according to a target display rule, wherein the target display rule is used for displaying a first sub-word segmentation result corresponding to the word segmentation rule with the highest priority in the word segmentation result and a second sub-word segmentation result in a distinguishing mode, and the second sub-word segmentation result is a sub-word segmentation result except the first sub-word segmentation result in the word segmentation result.
4. A mobile terminal, comprising:
the word segmentation module is used for carrying out word segmentation on the text to be processed according to the third word segmentation rule to obtain a first-level word segmentation result, and carrying out word segmentation on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result when the target word segmentation rule comprises N word segmentation rules and keywords for determining word types corresponding to the third word segmentation rule are obtained; the N word segmentation rules comprise a first word segmentation rule and a third word segmentation rule, wherein the third word segmentation rule is a rule for word segmentation according to word types, and the use priority of the third word segmentation rule is higher than that of the first word segmentation rule;
the pushing module is used for carrying out word segmentation processing on the text to be processed according to the first word segmentation rule under the condition that the keyword used for determining the word type corresponding to the third word segmentation rule is not obtained, so as to obtain at least one recommended keyword, and pushing the at least one recommended keyword;
the word segmentation module is further configured to obtain a target keyword selected by a user from the at least one recommended keyword, determine a word type corresponding to the third word segmentation rule according to the target keyword, perform word segmentation on the text to be processed according to the word type corresponding to the third word segmentation rule to obtain a first-level word segmentation result, and perform word segmentation on the first-level word segmentation result according to the first word segmentation rule to obtain a second-level word segmentation result;
the output module is used for outputting the N-th word segmentation result as the word segmentation result of the text to be processed;
the use priority of the ith word segmentation rule in the N word segmentation rules is higher than the use priority of the (i+1) th word segmentation rule; wherein i=1, … N-1, N is a positive integer greater than or equal to 2.
5. The mobile terminal of claim 4, wherein the N word segmentation rules further comprise a second word segmentation rule;
the second word segmentation rule is a rule for segmenting words according to word numbers, and the use priority of the second word segmentation rule is higher than that of the first word segmentation rule.
6. The mobile terminal of claim 4, wherein the output module is specifically configured to:
and displaying the word segmentation result according to a target display rule, wherein the target display rule is used for displaying a first sub-word segmentation result corresponding to the word segmentation rule with the highest priority in the word segmentation result and a second sub-word segmentation result in a distinguishing mode, and the second sub-word segmentation result is a sub-word segmentation result except the first sub-word segmentation result in the word segmentation result.
7. A mobile terminal, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, which when executed by the processor performs the steps of the method according to any one of claims 1 to 3.
CN201910133448.3A 2019-02-22 2019-02-22 Word segmentation processing method and mobile terminal Active CN109829167B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910133448.3A CN109829167B (en) 2019-02-22 2019-02-22 Word segmentation processing method and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910133448.3A CN109829167B (en) 2019-02-22 2019-02-22 Word segmentation processing method and mobile terminal

Publications (2)

Publication Number Publication Date
CN109829167A CN109829167A (en) 2019-05-31
CN109829167B true CN109829167B (en) 2023-11-21

Family

ID=66864144

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910133448.3A Active CN109829167B (en) 2019-02-22 2019-02-22 Word segmentation processing method and mobile terminal

Country Status (1)

Country Link
CN (1) CN109829167B (en)

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6879951B1 (en) * 1999-07-29 2005-04-12 Matsushita Electric Industrial Co., Ltd. Chinese word segmentation apparatus
CN102087642A (en) * 2009-11-04 2011-06-08 蒋贤春 Wkr word segmentation method
CN106528536A (en) * 2016-11-14 2017-03-22 北京赛思信安技术股份有限公司 Multilingual word segmentation method based on dictionaries and grammar analysis
CN107680585A (en) * 2017-08-23 2018-02-09 海信集团有限公司 A kind of Chinese word cutting method, Chinese word segmentation device and terminal
CN107832301A (en) * 2017-11-22 2018-03-23 北京百度网讯科技有限公司 Participle processing method, device, mobile terminal and computer-readable recording medium
CN107918604A (en) * 2017-11-13 2018-04-17 彩讯科技股份有限公司 A kind of Chinese segmenting method and device
CN107992475A (en) * 2017-11-27 2018-05-04 武汉中海庭数据技术有限公司 A kind of multilingual segmenting method and device based on automatic navigator full-text search
CN108090040A (en) * 2016-11-23 2018-05-29 北京国双科技有限公司 A kind of text message sorting technique and system
CN108959248A (en) * 2018-06-21 2018-12-07 北京明略软件系统有限公司 A kind of entity mask method and device, computer readable storage medium
CN109033085A (en) * 2018-08-02 2018-12-18 北京神州泰岳软件股份有限公司 The segmenting method of Chinese automatic word-cut and Chinese text

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6879951B1 (en) * 1999-07-29 2005-04-12 Matsushita Electric Industrial Co., Ltd. Chinese word segmentation apparatus
CN102087642A (en) * 2009-11-04 2011-06-08 蒋贤春 Wkr word segmentation method
CN106528536A (en) * 2016-11-14 2017-03-22 北京赛思信安技术股份有限公司 Multilingual word segmentation method based on dictionaries and grammar analysis
CN108090040A (en) * 2016-11-23 2018-05-29 北京国双科技有限公司 A kind of text message sorting technique and system
CN107680585A (en) * 2017-08-23 2018-02-09 海信集团有限公司 A kind of Chinese word cutting method, Chinese word segmentation device and terminal
CN107918604A (en) * 2017-11-13 2018-04-17 彩讯科技股份有限公司 A kind of Chinese segmenting method and device
CN107832301A (en) * 2017-11-22 2018-03-23 北京百度网讯科技有限公司 Participle processing method, device, mobile terminal and computer-readable recording medium
CN107992475A (en) * 2017-11-27 2018-05-04 武汉中海庭数据技术有限公司 A kind of multilingual segmenting method and device based on automatic navigator full-text search
CN108959248A (en) * 2018-06-21 2018-12-07 北京明略软件系统有限公司 A kind of entity mask method and device, computer readable storage medium
CN109033085A (en) * 2018-08-02 2018-12-18 北京神州泰岳软件股份有限公司 The segmenting method of Chinese automatic word-cut and Chinese text

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
一种基于规则优先级的词性标注方法;王广正等;《安徽工业大学学报(自然科学版)》;20081015(第04期);全文 *
融合多策略的中文分词算法研究;王一成等;《西北民族大学学报(自然科学版)》;20180615(第02期);全文 *

Also Published As

Publication number Publication date
CN109829167A (en) 2019-05-31

Similar Documents

Publication Publication Date Title
CN108491123B (en) Method for adjusting application program icon and mobile terminal
CN108494665B (en) Group message display method and mobile terminal
CN109379484B (en) Information processing method and terminal
CN108616448B (en) Information sharing path recommendation method and mobile terminal
CN108391008B (en) Message reminding method and mobile terminal
CN108984066B (en) Application icon display method and mobile terminal
CN108334196B (en) File processing method and mobile terminal
CN109634438B (en) Input method control method and terminal equipment
CN108376096B (en) Message display method and mobile terminal
CN109388456B (en) Head portrait selection method and mobile terminal
CN108600089B (en) Expression image display method and terminal equipment
CN110971510A (en) Message processing method and electronic equipment
CN108920040B (en) Application icon sorting method and mobile terminal
CN112689201A (en) Barrage information identification method, barrage information display method, server and electronic equipment
CN110780751B (en) Information processing method and electronic equipment
CN109982273B (en) Information reply method and mobile terminal
CN109286726B (en) Content display method and terminal equipment
CN108628534B (en) Character display method and mobile terminal
CN107967086B (en) Icon arrangement method and device for mobile terminal and mobile terminal
CN112217713B (en) Method and device for displaying message
CN110069774B (en) Text processing method, device and terminal
CN107957789B (en) Text input method and mobile terminal
CN110880330A (en) Audio conversion method and terminal equipment
CN110888572A (en) Message display method and terminal equipment
CN111131540A (en) Name setting method and electronic equipment

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