A method, device, equipment and medium for generating a word library
By obtaining input texts of different domain types, determining common domain texts and generating customized thesaurus, the problem of low accuracy of the vocabulary content in the existing technology is solved, and higher vocabulary generation accuracy is achieved.
Patent Information
- Application Number
- CN202411908812.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-24
- Publication Date
- 2025-03-14
- Estimated Expiration
- 2044-12-24
AI Technical Summary
The lexicon content in existing large language models is obtained through data training or manual compilation, and has a low accuracy rate.
By obtaining input texts of different domain types, identifying common domain texts, and generating a customized thesaurus based on input texts and general domain texts of each domain type.
Improve the accuracy of the lexicon generation and generate detailed customized lexicons for different field types.
Smart Images

Figure CN119358551B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a vocabulary generation method, device, equipment and medium. Background Art
[0002] With the rapid development of science and technology, the development of large language models has gradually grown and is applied in all aspects of people's lives. Large language models can preset the content of the vocabulary and perform knowledge question and answer operations by using the vocabulary in the vocabulary.
[0003] Currently, the content of the vocabulary in the large language model is obtained through data training or manual compilation, but the accuracy of this method is low. Summary of the invention
[0004] The present invention provides a word library generation method, device, equipment and medium to improve the accuracy of word library generation.
[0005] In a first aspect, an embodiment of the present invention provides a method for generating a vocabulary, the method comprising:
[0006] Acquire at least one domain type and input text corresponding to each domain type; the input text corresponding to the domain type is text received by the working device during the working process of the user using the working device corresponding to the domain type;
[0007] Determine the general domain text according to the input text corresponding to each domain type;
[0008] According to the input text of each field type and the general field text, a customized word library of each field type is determined.
[0009] In a second aspect, an embodiment of the present invention further provides a vocabulary generation device, the device comprising:
[0010] A data acquisition module, used to acquire at least one field type and input text corresponding to each field type; the input text corresponding to the field type is the text received by the working device during the working process of the user using the working device corresponding to the field type;
[0011] A text determination module, used to determine the general domain text according to the input text corresponding to each domain type;
[0012] The word library determination module is used to determine the customized word library of each field type according to the input text of each field type and the general field text.
[0013] In a third aspect, an embodiment of the present invention further provides a vocabulary generation device, the vocabulary generation device comprising:
[0014] at least one processor; and
[0015] a memory communicatively connected to at least one processor; wherein,
[0016] The memory stores a computer program that can be executed by at least one processor. The computer program is executed by at least one processor so that the at least one processor can execute the vocabulary generation method of any embodiment of the present invention.
[0017] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the vocabulary generation method of any embodiment of the present invention when executed.
[0018] The technical solution of the embodiment of the present invention is to obtain at least one domain type and input text corresponding to each domain type; the input text corresponding to the domain type is the text received by the working device when the user uses the working device corresponding to the domain type; based on the input text corresponding to each domain type, the general domain text is determined; based on the input text of each domain type and the general domain text, a customized vocabulary for each domain type is determined, different customized vocabulary is generated for different domain types, the vocabulary generation operation is refined, and the accuracy of vocabulary generation is improved.
[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 is a flowchart of a vocabulary generation method provided according to the first embodiment of the present invention;
[0022] Figure 2 is a flow chart of a vocabulary generation method provided according to Embodiment 2 of the present invention;
[0023] Figure 3 is a structural diagram of a vocabulary generation device provided according to an embodiment of the present invention;
[0024] Figure 4 It is a structural schematic diagram of a vocabulary generation device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0027] In the technical solution of the embodiment of the present invention, the acquisition, storage and application of the input text etc. involved all comply with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0028] Embodiment 1
[0029] Figure 1 This is a flow chart of a word library generation method provided in Embodiment 1 of the present invention. The embodiment of the present invention is applicable to the situation of word library generation, and the method can be executed by a word library generation device, and the word library generation device can be implemented in the form of hardware and / or software.
[0030] See also Figure 1 The word library generation method shown includes:
[0031] S101. Obtain at least one domain type and input text corresponding to each domain type; the input text corresponding to the domain type is the text received by the working device during the working process of the user using the working device corresponding to the domain type.
[0032] The field type may be a type of a specific scope or region. It may refer to a scope, category or department of a specialized activity or undertaking, or may refer to the scope of academic thought or social activities. The input text may be the input text received by the working device corresponding to the field type.
[0033] Specifically, at least one domain type is obtained, each domain type corresponds to at least one working device, and each working device corresponds to an entry storage file. For example, the entry storage file may be a BIN file of a pinyin input method, etc. The input text, the number of inputs of the input text, the identifier of the terminal corresponding to the input text, the identifier of the input method, and the input date of the input text, etc. may be obtained through the entry storage file. The text file may store at least one input text received by the working device during the working process, and an input text may be a word input by a user to the working device.
[0034] In one example, the domain type may be an IT domain type or a human domain type, etc.
[0035] S102: Determine the general domain text according to the input text corresponding to each domain type.
[0036] The general domain text may be a common input text corresponding to each domain type.
[0037] Specifically, when collecting input texts corresponding to different field types, the input texts of different field types may contain the same input text or different input texts, and the input texts common to at least two field types are determined as common field texts. The intersection of each input text corresponding to one field type and each input text corresponding to the remaining field types can be calculated to obtain a common field text corresponding to at least one field type.
[0038] In one example, the input texts corresponding to the IT domain type are IT, manpower, code, and algorithm. The input texts corresponding to the human resources domain type are manpower, resources, and cost. The general domain text is manpower.
[0039] S103: Determine a customized vocabulary of each field type according to the input text of each field type and the general field text.
[0040] Among them, the customized vocabulary can be an exclusive vocabulary corresponding to the field type. The customized vocabulary corresponding to the field type only contains the exclusive words corresponding to the field, and the customized vocabulary corresponding to one field type does not contain the words in the customized vocabulary corresponding to other field types. Each general field text can be compared with each input text corresponding to the field type, and the input text that is the same as the general field text can be deleted to obtain at least one input text corresponding to the field type, and the customized vocabulary of the field type is determined according to the remaining at least one input text corresponding to the field type.
[0041] The technical solution of the embodiment of the present invention is to obtain at least one domain type and input text corresponding to each domain type; the input text corresponding to the domain type is the text received by the working device when the user uses the working device corresponding to the domain type; based on the input text corresponding to each domain type, the general domain text is determined; based on the input text of each domain type and the general domain text, a customized vocabulary for each domain type is determined, different customized vocabulary is generated for different domain types, the vocabulary generation operation is refined, and the accuracy of vocabulary generation is improved.
[0042] Embodiment 2
[0043] Figure 2 This is a flow chart of a word library generation method provided in the second embodiment of the present invention. Based on the above embodiments, the embodiment of the present invention optimizes and improves the word library generation operation.
[0044] Furthermore, "determine the general domain text based on the input text corresponding to each domain type" is refined into "before determining the general domain text based on the input text corresponding to each domain type, compare the input text corresponding to each domain type with the input text corresponding to other domain types for the input text corresponding to the domain type to obtain abnormal text of the domain type; delete the abnormal text corresponding to the domain type from the input text corresponding to the domain type" to improve the operation of vocabulary generation.
[0045] It should be noted that for the parts not described in detail in the embodiments of the present invention, reference may be made to the descriptions of other embodiments.
[0046] See also Figure 2 The word library generation method shown includes:
[0047] S201. Obtain at least one domain type and input text corresponding to each domain type; the input text corresponding to the domain type is the text received by the working device during the working process of the user using the working device corresponding to the domain type.
[0048] S202 . For input text corresponding to each field type, compare the input text corresponding to the field type with input text corresponding to other field types to obtain abnormal text of the field type.
[0049] The abnormal text may be abnormal input text.
[0050] Specifically, in the working process, input errors are inevitable, resulting in the collected input text not being the words corresponding to the field type. Therefore, it is necessary to query in each input text corresponding to the field type to obtain at least one abnormal text corresponding to the field type.
[0051] S203. Delete abnormal text corresponding to the domain type from the input text corresponding to the domain type.
[0052] Specifically, the domain type corresponds to at least one input text. If there is at least one abnormal text in each input text, each abnormal text in each input text corresponding to the domain type is deleted, and the remaining input texts are retained to generate a custom word library corresponding to the domain type.
[0053] S204: Determine the general domain text according to the input text corresponding to each domain type.
[0054] S205: Determine a customized vocabulary of each field type according to the input text of each field type and the general field text.
[0055] The embodiment of the present invention compares the input text corresponding to each field type with the input text corresponding to other field types to obtain abnormal text of the field type; and deletes the abnormal text corresponding to the field type from the input text corresponding to the field type.
[0056] Optionally, for the input text corresponding to each field type, the input text corresponding to the field type is compared with the input texts corresponding to other field types to obtain abnormal text of the field type, including: for the input text corresponding to each field type, when the input text corresponding to the field type does not exist in the input texts corresponding to other field types, obtaining the number of occurrences of the input text corresponding to the field type and the pinyin string of the input text; judging whether the input text is abnormal text based on the number of occurrences of the input text corresponding to the field type and the pinyin string of the input text.
[0057] The number of occurrences may be the number of times the input text is input, and the pinyin character string may be a character string composed of the pinyin letters of the input text.
[0058] Specifically, at least one domain type is obtained. Each domain type corresponds to at least one working device. One working device corresponds to one text file. One text file includes at least one input text, and each input of the same input text is recorded. The input texts in at least one text file corresponding to the same domain type are summarized to obtain the input texts corresponding to the same domain type, the number of occurrences of each input text, and the pinyin string corresponding to each input text. According to the number of occurrences of the input text corresponding to the domain type and the pinyin string of the input text, it is determined whether the input text is an abnormal text.
[0059] By targeting the input text corresponding to each field type, when the input text corresponding to the field type does not exist in the input texts corresponding to other field types, the number of occurrences of the input text corresponding to the field type and the pinyin string of the input text are obtained; based on the number of occurrences of the input text corresponding to the field type and the pinyin string of the input text, it is determined whether the input text is abnormal text. By determining the input text through multi-dimensional data, the judgment result is more accurate, thereby improving the accuracy of the vocabulary generation.
[0060] Optionally, a customized vocabulary for each field type is determined based on the input text of each field type and the general field text, including: for the input text of each field type, searching for the general field text in the input text corresponding to the field type to obtain an intersection search result; if the intersection search result is that the general field text is found, deleting the general field text from the input text corresponding to the field type to obtain a customized vocabulary corresponding to the field type.
[0061] The intersection search result may be a result of searching for common domain text in the input text corresponding to the domain type.
[0062] Specifically, for the input text of each field type, the common field text is searched in the input text corresponding to the field type to obtain an intersection search result; if the intersection search result is that the common field text is found, it indicates that the input texts corresponding to the field type include at least one common input text, then at least one common field text is deleted from the input texts corresponding to the field type to obtain a customized vocabulary corresponding to the field type, and the customized vocabulary corresponding to the field type only includes at least one proprietary word corresponding to the field type, and does not include words shared with other fields.
[0063] By searching for common domain text in the input text corresponding to the domain type for the input text of each domain type, an intersection search result is obtained; if the intersection search result is that the common domain text is found, the common domain text is deleted from the input text corresponding to the domain type to obtain a customized vocabulary library corresponding to the domain type, thereby reducing the data volume of the customized vocabulary library and saving storage space of the vocabulary library.
[0064] Optionally, obtaining at least one domain type and the input text corresponding to each domain type includes: obtaining at least one domain type, the domain types include: at least one department type and at least one type to be integrated; for each domain type, obtaining at least one department input text corresponding to each department type of the domain type; obtaining at least one input text to be integrated corresponding to each type to be integrated corresponding to the domain type; obtaining the input text corresponding to the domain type according to each department input text corresponding to each department type and each input text to be integrated corresponding to each type to be integrated.
[0065] The department type may be the identification of the department. The type to be merged may be the identification of the department to be merged. The department input text may be the input text received by the working device within the department. The input text to be merged may be the input text corresponding to other department types to be merged with the department input text.
[0066] Specifically, a company can be divided into a domain type. A company can include multiple departments, and a custom word library exclusive to the company can be customized for the company, that is, the input text of at least one department is merged to generate a custom word library corresponding to the company. At least one department type and at least one department type to be merged can be selected. At least one input text corresponding to each department type is obtained. The input text corresponding to the domain type is obtained.
[0067] By obtaining at least one domain type, the domain types include: at least one department type and at least one type to be integrated; for each domain type, obtaining at least one department input text corresponding to each department type of the domain type; obtaining at least one input text to be integrated corresponding to each type to be integrated corresponding to the domain type; according to the input texts of each department corresponding to each department type and the input texts to be integrated corresponding to each type to be integrated, the input text corresponding to the domain type is obtained, the input text corresponding to the domain type can be determined for different domain types, the generated vocabulary can be more accurate, and at the same time the security of the vocabulary corresponding to each domain type is guaranteed, preventing other domain types from obtaining the input text of the vocabulary corresponding to the domain type, the input text of the required domain type can be quickly integrated, and the customized vocabulary content is more flexible.
[0068] Optionally, obtaining at least one field type and input text corresponding to each field type includes: obtaining text collected by terminal devices of at least one department in the same working environment during the work process, and determining it as input text of the field type corresponding to each department.
[0069] Specifically, a company may include multiple departments. Each department may be classified into a domain type. For example, the human resources department may be classified into the human resources domain type. The IT department may be classified into the IT domain type. A department may correspond to at least one terminal device, and the terminal devices corresponding to the department may be determined by the department identifier. The terminal devices under the same local area network may also be determined to belong to the same department. The terminal devices in the same geographical location may also be determined to belong to the same department. The terminal devices in the same department are in the same working environment. The texts collected by the terminal devices corresponding to the same department during the work process are determined as the input texts of the domain type corresponding to the department. For example, according to the attributes of the user terminal, such as the terminal user position and the department where they are located, the professional vocabulary of different fields can be formed. For example, the set of input texts of the human resources department within 10 days is A, and the set of input texts of the IT department is B, then their set intersection is C=A∩B, the set C can be regarded as the general domain text, D=AC can be regarded as the domain vocabulary of the human resources department, and E=BC can be regarded as the domain vocabulary of the IT department. Multiple departments can be combined to construct domain vocabulary. The intersection of vocabularies from different departments can be considered as company-level proprietary vocabularies, and the lexicon can be updated daily.
[0070] By obtaining the text collected by the terminal devices of at least one department in the same working environment during the work process and determining it as the input text of the field type corresponding to each department, different field types can be divided according to the working environment to obtain the input text corresponding to different field types.
[0071] Optionally, judging whether the input text is abnormal text based on the number of occurrences of the input text corresponding to the domain type and the pinyin string of the input text, includes: obtaining a number threshold; comparing the number of occurrences of the input text corresponding to the domain type with the number threshold to obtain a threshold comparison result; obtaining a common vocabulary library corresponding to the domain type, the common vocabulary library including at least one common text and a common pinyin string corresponding to each common text; for each common text, calculating a similarity value between the common pinyin string corresponding to the common text and the pinyin string of the input text corresponding to the domain type; judging whether the input text is abnormal text based on the threshold comparison result and the similarity value corresponding to each common text.
[0072] The number threshold may be a preset threshold of the number of occurrences of the input text. The threshold comparison result may be the result of comparing the number of occurrences of the input text corresponding to the field type with the number threshold. The common word library may be the input text with a large number of occurrences corresponding to the field type. The common pinyin character string may be the pinyin character string corresponding to the common text.
[0073] Specifically, obtain a number threshold, which can be preset manually or calculated based on the number of occurrences of the input text input in historical time. Compare the number of occurrences of the input text corresponding to the field type with the number threshold to obtain a threshold comparison result. The threshold comparison result can be that the number of occurrences is less than or equal to the number threshold, or that the number of occurrences is greater than the number threshold. Obtain a common vocabulary corresponding to the field type. The common vocabulary can be obtained in the following way: obtain a text file corresponding to at least one terminal device corresponding to the field type, analyze each text file, obtain at least one input text and the number of occurrences corresponding to each input text, sort each number of occurrences from large to small, obtain a preset number, select the input text corresponding to the first preset number of occurrences, and generate a common vocabulary based on the selected input texts and the pinyin strings corresponding to each input text. For each commonly used text, calculate the similarity value between the commonly used Pinyin string corresponding to the commonly used text and the Pinyin string of the input text corresponding to the domain type. For example: there is similarity between the front nasal and the back nasal, and there is similarity between the retroflex consonant and the curled tongue. The similarity value between the commonly used Pinyin string corresponding to the commonly used text and the Pinyin string of the input text corresponding to the domain type can be calculated by the cosine similarity algorithm, and a preset similarity threshold is obtained. The similarity value between the commonly used Pinyin string corresponding to the commonly used text and the Pinyin string of the input text corresponding to the domain type is compared with the preset similarity threshold to obtain a similarity result; if the threshold comparison result is less than or equal to the number threshold and the similarity result corresponding to the input text and each commonly used text, determine whether the input text is an abnormal text.
[0074] By obtaining a frequency threshold; comparing the number of occurrences of the input text corresponding to the field type with the frequency threshold to obtain a threshold comparison result; obtaining a common vocabulary corresponding to the field type, the common vocabulary includes at least one common text and a common pinyin string corresponding to each common text; for each common text, calculating a similarity value between the common pinyin string corresponding to the common text and the pinyin string of the input text corresponding to the field type; judging whether the input text is an abnormal text based on the threshold comparison result and the similarity value corresponding to each common text, whether the input text is an abnormal text can be determined through multidimensional data, thereby improving the accuracy of vocabulary generation.
[0075] Embodiment 3
[0076] Figure 3 The schematic diagram of the structure of a vocabulary generation device provided in the third embodiment of the present invention is shown in FIG. The embodiment of the present invention is applicable to the situation of vocabulary generation, the device can execute the vocabulary generation method, and the device can be implemented in the form of hardware and / or software.
[0077] See also Figure 3 The lexicon generation device shown includes: a data acquisition module 301, a text determination module 302 and a lexicon determination module 303, wherein:
[0078] The data acquisition module 301 is used to acquire at least one field type and input text corresponding to each field type; the input text corresponding to the field type is the text received by the working device during the working process of the user using the working device corresponding to the field type;
[0079] A text determination module 302, for determining a general domain text according to the input text corresponding to each domain type;
[0080] The word library determination module 303 is used to determine the customized word library of each field type according to the input text of each field type and the general field text.
[0081] The technical solution of the embodiment of the present invention is to obtain at least one domain type and input text corresponding to each domain type; the input text corresponding to the domain type is the text received by the working device when the user uses the working device corresponding to the domain type; based on the input text corresponding to each domain type, the general domain text is determined; based on the input text of each domain type and the general domain text, a customized vocabulary for each domain type is determined, different customized vocabulary is generated for different domain types, the vocabulary generation operation is refined, and the accuracy of vocabulary generation is improved.
[0082] Optionally, the word library generating device further includes:
[0083] A text comparison module is used to compare the input text corresponding to each field type with the input text corresponding to other field types before determining the common field text according to the input text corresponding to each field type, so as to obtain abnormal text of the field type;
[0084] The text deletion module is used to delete abnormal text corresponding to the domain type in the input text corresponding to the domain type.
[0085] Optional, text comparison module, including:
[0086] A character string acquisition unit, for acquiring the number of occurrences of the input text corresponding to each field type and the pinyin character string of the input text when the input text corresponding to the field type does not exist in the input texts corresponding to other field types;
[0087] The abnormality judgment unit is used to judge whether the input text is abnormal text according to the number of occurrences of the input text corresponding to the field type and the pinyin character string of the input text.
[0088] Optionally, the vocabulary determination module 303 is specifically used to:
[0089] For the input text of each field type, search for the common field text in the input text corresponding to the field type to obtain the intersection search result;
[0090] If the intersection search result is that the general domain text is found, the general domain text is deleted from the input text corresponding to the domain type to obtain the customized vocabulary corresponding to the domain type.
[0091] Optionally, the data acquisition module 301 is specifically used for:
[0092] Obtain at least one domain type, where the domain type includes: at least one department type and at least one type to be merged;
[0093] For each field type, obtaining at least one department input text corresponding to each department type of the field type;
[0094] Obtain at least one input text to be fused corresponding to each type to be fused corresponding to the domain type;
[0095] According to the input texts of each department corresponding to each department type and the input texts to be merged corresponding to each type to be merged, the input text corresponding to the field type is obtained.
[0096] Optionally, the data acquisition module 301 is specifically used for:
[0097] The text collected by the terminal device of at least one department in the same working environment during the working process is obtained, and is determined as the input text of the field type corresponding to each department.
[0098] Optional, abnormality judgment unit, specifically used for:
[0099] Get the number of thresholds;
[0100] Compare the number of occurrences of the input text corresponding to the field type with the number threshold to obtain a threshold comparison result;
[0101] Obtain a common word library corresponding to the field type, the common word library including at least one common text and a common pinyin string corresponding to each common text;
[0102] For each common text, calculate the similarity value between the common pinyin string corresponding to the common text and the pinyin string of the input text corresponding to the domain type;
[0103] According to the threshold comparison result and the similarity value corresponding to each common text, it is determined whether the input text is an abnormal text.
[0104] The vocabulary generation device provided in the embodiment of the present invention can execute the vocabulary generation method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of executing the vocabulary generation method.
[0105] Embodiment 4
[0106] Figure 4 A schematic diagram of the structure of a vocabulary generation device 400 that can be used to implement an embodiment of the present invention is shown.
[0107] like Figure 4 As shown, the word library generating device 400 includes at least one processor 401, and a memory connected to the at least one processor 401, such as a read-only memory (ROM) 402, a random access memory (RAM) 403, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 401 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 402 or the computer program loaded from the storage unit 408 to the random access memory (RAM) 403. In RAM403, various programs and data required for the operation of the word library generating device 400 can also be stored. The processor 401, ROM402 and RAM403 are connected to each other through a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0108] Multiple components in the word library generation device 400 are connected to the I / O interface 405, including: an input unit 406, such as a keyboard, a mouse, etc.; an output unit 407, such as various types of displays, speakers, etc.; a storage unit 408, such as a disk, an optical disk, etc.; and a communication unit 409, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 409 allows the word library generation device 400 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0109] Processor 401 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of processor 401 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. Processor 401 executes the various methods and processes described above, such as a vocabulary generation method.
[0110] In some embodiments, the word library generation method can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 408. In some embodiments, part or all of the computer program can be loaded and / or installed on the word library generation device 400 via ROM402 and / or communication unit 409. When the computer program is loaded into RAM403 and executed by processor 401, one or more steps of the word library generation method described above can be performed. Alternatively, in other embodiments, processor 401 can be configured to execute the word library generation method in any other appropriate manner (for example, by means of firmware).
[0111] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0112] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0113] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0114] In order to provide interaction with a user, the systems and techniques described herein can be implemented on a vocabulary generation device, which has: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball), through which the user can provide input to the vocabulary generation device. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0115] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0116] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS (Virtual Private Server) services.
[0117] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0118] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for generating a vocabulary, characterized in that: The method comprises: Acquire at least one domain type and input text corresponding to each of the domain types; the input text corresponding to the domain type is text received by the working device during the working process of the user using the working device corresponding to the domain type; Determining a general domain text according to the input text corresponding to each of the domain types; Determining a customized vocabulary for each of the field types according to the input text for each of the field types and the general field text; Before determining the universal domain text according to the input text corresponding to each of the domain types, the method further includes: For the input text corresponding to each of the field types, compare the input text corresponding to the field type with the input text corresponding to other field types to obtain abnormal text of the field type; Deleting abnormal text corresponding to the field type from the input text corresponding to the field type; For the input text corresponding to each of the field types, the input text corresponding to the field type is compared with the input text corresponding to other field types to obtain abnormal text of the field type, including: For the input text corresponding to each of the field types, when the input text corresponding to the field type does not exist in the input texts corresponding to other field types, obtaining the number of occurrences of the input text corresponding to the field type and the pinyin character string of the input text; Whether the input text is abnormal text is determined according to the number of occurrences of the input text corresponding to the field type and the pinyin character string of the input text.
2. The method according to claim 1, characterized in that: Determining the customized vocabulary of each field type according to the input text of each field type and the general field text includes: For each of the input texts of the field type, searching for the general field text in the input text corresponding to the field type to obtain an intersection search result; If the intersection search result is that the general domain text is found, the general domain text is deleted from the input text corresponding to the domain type to obtain a customized vocabulary corresponding to the domain type.
3. The method according to claim 1, characterized in that The obtaining of at least one field type and the input text corresponding to each field type includes: Acquire at least one domain type, where the domain type includes: at least one department type and at least one type to be merged; For each of the field types, obtaining at least one department input text corresponding to each of the department types of the field type; Acquire at least one input text to be merged corresponding to each of the types to be merged corresponding to the field type; The input text corresponding to the field type is obtained according to the department input text corresponding to each department type and the input text to be merged corresponding to each type to be merged.
4. The method according to claim 1, characterized in that: The obtaining of at least one field type and the input text corresponding to each field type includes: The text collected by the terminal device of at least one department in the same working environment during the working process is obtained, and is determined as the input text of the field type corresponding to each of the departments.
5. The method according to claim 1, characterized in that The step of judging whether the input text is abnormal text according to the number of occurrences of the input text corresponding to the field type and the pinyin character string of the input text comprises: Get the number of thresholds; Compare the number of occurrences of the input text corresponding to the field type with the number threshold to obtain a threshold comparison result; Acquire a common word library corresponding to the field type, wherein the common word library includes at least one common text and a common pinyin character string corresponding to each common text; For each of the commonly used texts, calculating a similarity value between a commonly used pinyin character string corresponding to the commonly used text and a pinyin character string of an input text corresponding to the field type; According to the threshold comparison result and the similarity value corresponding to each of the common texts, it is determined whether the input text is an abnormal text.
6. A vocabulary generation device, characterized in that: The device comprises: A data acquisition module, used to acquire at least one field type and input text corresponding to each field type; the input text corresponding to the field type is the text received by the working device during the working process of the user using the working device corresponding to the field type; A text determination module, used to determine the general domain text according to the input text corresponding to each of the domain types; A word library determination module, used for determining a customized word library of each field type according to the input text of each field type and the general field text; A text comparison module, for comparing the input text corresponding to each of the field types with the input text corresponding to the field type before determining the common field text according to the input text corresponding to each of the field types, to obtain abnormal text of the field type; A text deletion module, used for deleting abnormal text corresponding to the field type from the input text corresponding to the field type; Wherein, the text comparison module includes: A character string acquisition unit, for acquiring the number of occurrences of the input text corresponding to each of the field types and the pinyin character string of the input text when the input text corresponding to the field type does not exist in the input texts corresponding to other field types; The abnormality judgment unit is used to judge whether the input text is abnormal text according to the number of occurrences of the input text corresponding to the field type and the pinyin character string of the input text.
7. A vocabulary generation device, characterized in that: The word library generating device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the thesaurus generation method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the vocabulary library generation method according to any one of claims 1 to 5 when executed.
Citation Information
Patent Citations
Proprietary word mining method and device, electronic equipment and storage medium
CN112668331A
Generation method of target industry lexicon, processor and device
CN113779200A