WO2020244065A1 - 基于人工智能的字向量定义方法、装置、设备及存储介质 - Google Patents

基于人工智能的字向量定义方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2020244065A1
WO2020244065A1 PCT/CN2019/102462 CN2019102462W WO2020244065A1 WO 2020244065 A1 WO2020244065 A1 WO 2020244065A1 CN 2019102462 W CN2019102462 W CN 2019102462W WO 2020244065 A1 WO2020244065 A1 WO 2020244065A1
Authority
WO
WIPO (PCT)
Prior art keywords
vector
word
target
word vector
target word
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.)
Ceased
Application number
PCT/CN2019/102462
Other languages
English (en)
French (fr)
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.)
Ping An Technology Shenzhen Co Ltd
Original Assignee
Ping An Technology Shenzhen 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 Ping An Technology Shenzhen Co Ltd filed Critical Ping An Technology Shenzhen Co Ltd
Publication of WO2020244065A1 publication Critical patent/WO2020244065A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking
    • G06F40/295Named entity recognition
    • 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

Definitions

  • This application relates to the field of word segmentation models, and in particular to an artificial intelligence-based character vector definition method, device, equipment and storage medium.
  • NLP natural language processing
  • word vector technology transforms words into dense vectors, and for similar words, their corresponding word vectors are also similar.
  • word vectors and word vectors are input as features of deep learning models. Therefore, the effect of the final model largely depends on the effect of word vectors and word vectors.
  • word vectors and word vectors are relatively independent.
  • entity recognition most of them use word vectors.
  • word vectors When doing text classification and topic extraction, most of them use word vectors for recognition. .
  • the disadvantage of word vectors is that they are large in number and in entity extraction, small words are prone to be wrong and big words are wrong.
  • the disadvantage of the word vector is that a single word may have completely irrelevant meanings, such as "old” in “old man” and “old” in "Laozi". His word vector can only represent one meaning and we understand Does not meet.
  • the inventor realizes that in the existing solution, for the same word, when applied to a word, the meaning of a single word may be completely irrelevant to the meaning of the word, and the word vector has a single meaning.
  • This application provides an artificial intelligence-based character vector definition method, device, equipment and storage medium, which are used to take a single character as the smallest structure, consider the combination of character vector and word vector, and assign each character to a different word Multiple different meanings increase the accuracy of the meaning of the word vector in the sentence.
  • the first aspect of the embodiments of the present application provides an artificial intelligence-based character vector definition method, including: acquiring a target text, the target text including a Chinese sentence that needs to be segmented; and segmenting the target text to obtain multiple words; Generate multiple corresponding target word vectors according to the multiple words; generate a target word vector according to the multiple target word vectors and a preset weighting strategy, each of the multiple words corresponding to the multiple target word vectors Both contain the words corresponding to the target word vector; each target word vector is input as a model parameter into the long and short-term memory network LSTM and the conditional random field CRF model, and entity recognition of the Chinese sentence is performed to generate predicted word segmentation.
  • the generating multiple target word vectors corresponding to the multiple words includes: inputting the multiple words into a preset algorithm In the model; each word is mapped into a K-dimensional word vector, where K is an integer greater than 0; the distance between each word vector is calculated; each word vector is determined according to the distance between each word vector According to the semantic similarity between each word vector, the vector with the highest semantic similarity with the target word among the multiple words is determined as the target word vector; the multiple target word vectors are determined, each Each target word vector corresponds to a word.
  • the method before the inputting the multiple words into the preset algorithm model, the method further includes: randomly generating a word vector Matrix, each row corresponds to a word vector; determine a target word in the word vector matrix, and extract the word vectors of surrounding words from the word vector matrix; calculate the mean vector of the word vectors of the surrounding words; The mean vector is input into a preset logistic regression model for training; a preset algorithm model is generated, and the probability vector output by the preset algorithm model matches the one-hot encoding vector of the target word.
  • the calculating the distance between each word vector includes: determining the first vector and the second vector in the word vector; calculating The cosine value between the first vector and the second vector satisfies the formula: Among them, D 1 and D 2 represent the first vector and the second vector, respectively, W 1k represents the weight of the first vector, W 2k represents the weight of the second vector, both the first vector and the second vector include N eigenvalues, 1 ⁇ k ⁇ N; the cosine value is determined as the distance between the first vector and the second vector.
  • the target word vector is generated according to the multiple target word vectors and a preset weight strategy, and the multiple target word vectors correspond to Each of the multiple words includes the word corresponding to the target word vector, including: obtaining a preset weight strategy, the preset weight strategy including the weight value of each word vector; determining the multiple target word vectors The target weight value of each word vector in the; generating a target word vector according to the multiple target word vectors and each target weight value of the multiple target word vectors.
  • the target word vector is generated according to the multiple target word vectors and a preset weight strategy, and the multiple target word vectors correspond to After each of the multiple words contains the word corresponding to the target word vector, the method further includes: inputting each target word vector as a model parameter into the long and short-term memory network LSTM and the conditional random field CRF model, The Chinese sentence performs entity recognition to generate predicted word segmentation.
  • each target word vector is input as a model parameter into the long and short-term memory network LSTM and the conditional random field CRF model
  • the Chinese Sentence entity recognition to generate predictive word segmentation includes: inputting each target word vector as a model parameter into the LSTM and CRF models; determining the position of each target word vector in the word space; according to each target word vector in the word space Perform entity recognition on the Chinese sentence at the position in to generate predicted word segmentation.
  • the second aspect of the embodiments of the present application provides an artificial intelligence-based character vector definition device, including: an acquisition unit for acquiring a target text, the target text including a Chinese sentence that needs to be segmented; a word segmentation unit for comparing The target text is segmented to obtain multiple words; the first generating unit is used to generate multiple corresponding target word vectors according to the multiple words; the second generating unit is used to generate multiple target word vectors according to the multiple target word vectors and the prediction
  • the weighting strategy for setting generates a target word vector, and each word in the plurality of words corresponding to the plurality of target word vectors contains a word corresponding to the target word vector.
  • the first generating unit includes: a first input module, configured to input the multiple words into a preset algorithm model; and a mapping module , Used to map each word into a K-dimensional word vector, where K is an integer greater than 0; the first calculation module is used to calculate the distance between each word vector; the first determination module is used to The distance between each word vector is used to determine the semantic similarity between each word vector; the second determining module is used to determine the semantic similarity between each word vector and the target among the multiple words The vector with the highest semantic similarity of words is the target word vector; the third determining module is used to determine multiple target word vectors, and each target word vector corresponds to a word.
  • the first generating unit further includes: a first generating module, configured to randomly generate a word vector matrix, and each row corresponds to a word vector; An extraction module, used to determine a target word in the word vector matrix, and extract the word vectors of surrounding words from the word vector matrix; a second calculation module, used to calculate the mean vector of the word vectors of the surrounding words;
  • the training module is used to input the mean vector into a preset logistic regression model for training;
  • the second generation module is used to generate a preset algorithm model, the probability vector output by the preset algorithm model is the same as the Match the one-hot encoding vector of the target word.
  • the first calculation module is specifically configured to: determine the first vector and the second vector in the word vector; calculate the first vector and The cosine value between the second vectors satisfies the formula: Among them, D 1 and D 2 represent the first vector and the second vector, respectively, W 1k represents the weight of the first vector, W 2k represents the weight of the second vector, both the first vector and the second vector include N eigenvalues, 1 ⁇ k ⁇ N; the cosine value is determined as the distance between the first vector and the second vector.
  • the second generating unit is specifically configured to: obtain a preset weight strategy, where the preset weight strategy includes the weight value of each word vector Determine the target weight value of each word vector in the multiple target word vectors; generate a target word vector according to the multiple target word vectors and each target weight value in the multiple target word vectors.
  • the artificial intelligence-based word vector definition device further includes: a third generating unit, configured to input each target word vector as a model parameter into the length In the temporal memory network LSTM and the conditional random field CRF model, entity recognition of the Chinese sentence is performed to generate predicted word segmentation.
  • a third generating unit configured to input each target word vector as a model parameter into the length In the temporal memory network LSTM and the conditional random field CRF model, entity recognition of the Chinese sentence is performed to generate predicted word segmentation.
  • the third generation unit includes: a second input module, configured to input each target word vector as a model parameter into the LSTM and CRF models;
  • the fourth determining module is used to determine the position of each target word vector in the word space;
  • the recognition generation module is used to perform entity recognition on the Chinese sentence according to the position of each target word vector in the word space to generate Predict word segmentation.
  • the third aspect of the embodiments of the present application provides an artificial intelligence-based word vector definition device, including a memory, a processor, and a computer program stored in the memory and capable of running on the processor.
  • the processor When the computer program is executed, the artificial intelligence-based word vector definition method described in any of the above embodiments is implemented.
  • the fourth aspect of the embodiments of the present application provides a non-volatile computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the artificial intelligence-based The steps of the word vector definition method.
  • the target text is obtained, and the target text includes Chinese sentences that need to be segmented; the target text is segmented to obtain multiple words; multiple corresponding target word vectors are generated according to the multiple words; The target word vector and the preset weighting strategy generate a target word vector, and each of the multiple words corresponding to the multiple target word vectors contains a word corresponding to the target word vector.
  • a single word is taken as the minimum structure, and the combination of word vector and word vector is considered, and each word is given multiple different meanings in different words, which increases the accuracy of the meaning of the word vector in the sentence, and then Improve the efficiency of Chinese word segmentation.
  • FIG. 1 is a schematic diagram of an embodiment of a method for defining a word vector based on artificial intelligence in an embodiment of the application;
  • FIG. 2 is a schematic diagram of another embodiment of a method for defining a word vector based on artificial intelligence in an embodiment of the application;
  • FIG. 3 is a schematic diagram of an embodiment of an artificial intelligence-based word vector definition device in an embodiment of the application
  • FIG. 4 is a schematic diagram of another embodiment of an artificial intelligence-based word vector definition device in an embodiment of this application.
  • Fig. 5 is a schematic diagram of an embodiment of an artificial intelligence-based word vector definition device in an embodiment of the application.
  • This application provides an artificial intelligence-based character vector definition method, device, equipment and storage medium, which are used to take a single character as the smallest structure, consider the combination of character vector and word vector, and assign each character to a different word Multiple different meanings increase the accuracy of the meaning of each word in the sentence and improve the efficiency of Chinese word segmentation.
  • the flowchart of the artificial intelligence-based word vector definition method specifically includes:
  • target text where the target text includes Chinese sentences that need to be segmented.
  • the server obtains the target text, and the target text includes Chinese sentences that need to be segmented.
  • the Chinese sentence may be "I like Apple”, or “Engineer Fu hits the computer”, etc.
  • the embodiment of the application uses “Engineer Fu hits the computer” as the Chinese sentence for description.
  • the execution subject of this application may be a word vector definition device based on artificial intelligence, or a terminal or a server, which is not specifically limited here.
  • This application takes the server as the execution subject as an example for description.
  • the server uses preset word segmentation tools, such as the Chinese word segmentation tool, HanLP, etc., to segment the target text to obtain multiple words. For example, if the target text is “I am an algorithm engineer”, then five words such as “I”, “Yes”, “one”, “algorithm”, and “engineer” can be obtained respectively.
  • preset word segmentation tools such as the Chinese word segmentation tool, HanLP, etc.
  • the target text "Engineer Fu hits the computer” is segmented, using 3-Gram or 2-Gram segmentation, and it is found that the text has “engineer” and “Chengshi” in front of the text, followed by " ⁇ ” and “ ⁇ ”.
  • the server defines multiple target word vectors corresponding to multiple words. Specifically, the server inputs multiple words into a preset algorithm model; the server maps each word into a K-dimensional word vector, where K is an integer greater than 0; the server calculates the distance between each word vector; The server determines the semantic similarity between each word vector according to the distance between each word vector; the server determines the vector with the highest semantic similarity to the target word among multiple words according to the semantic similarity between each word vector Target word vector: The server determines multiple target word vectors, and each target word vector corresponds to a word.
  • the server inputs the four words identified above into the preset model through the preset model, and matches the two words “engineer” and “master” in the preset model, and determines the word vector "engineer” “And the word vector "Master”.
  • the generated preset model needs to ensure the validity of each word vector. If there are only “engineering” and “master” in the word vector, when we encounter a sentence "engineering is a good job", the result predicted by the preset model can only match the existing word vector, if Continuing to do entity recognition, you will get that "engineer (B) division (E) is” split the whole “engineer”, although the results can be obtained, but the information gap is split.
  • target text generally refers to various machine-readable records.
  • the text is represented by D (Document), and the feature item is represented by T (Term).
  • T refers to the basic language unit that is present in document D and can represent the content of the document. It is mainly composed of words or phrases.
  • the text can be represented by a feature set Is D(T1, T2,..., Tn), where Tk is the characteristic item, and 1 ⁇ k ⁇ N.
  • Tk is the characteristic item
  • 104 Generate a target word vector according to a plurality of target word vectors and a preset weighting strategy, and each of the plurality of words corresponding to the plurality of target word vectors includes a word corresponding to the target word vector.
  • the server generates a target word vector according to a plurality of corresponding word vectors and a preset weighting strategy, where each word in the plurality of words corresponding to the plurality of word vectors includes a word corresponding to the word vector. For example, to define the word vector for the word " ⁇ ", the current word vector of " ⁇ " is (teacher's word vector + master's word vector + engineer's word vector)/3, and the target word vector of " ⁇ " is obtained.
  • the target text is obtained, and the target text includes Chinese sentences that need to be segmented; the target text is segmented to obtain multiple words; multiple corresponding target word vectors are generated according to the multiple words; according to multiple target word vectors and predictions
  • the weighting strategy of setting generates the target word vector, and each word in the multiple words corresponding to the multiple target word vectors contains the word corresponding to the target word vector. Taking a single word as the minimum structure, considering the combination of word vector and word vector, assigning multiple different meanings to each word in different words, increasing the accuracy of the meaning of the word vector in the sentence.
  • FIG. 2 another flowchart of the artificial intelligence-based word vector definition method provided by the embodiment of the present application, which specifically includes:
  • the server obtains the target text, and the target text includes Chinese sentences that need to be segmented.
  • the Chinese sentence may be "I like Apple”, or “Engineer Fu hits the computer”, etc.
  • the embodiment of the application uses “Engineer Fu hits the computer” as the Chinese sentence for description.
  • the execution subject of this application may be a word vector definition device based on artificial intelligence, or a terminal or a server, which is not specifically limited here.
  • This application takes the server as the execution subject as an example for description.
  • the server uses a preset word segmentation tool, such as a Chinese word segmentation tool, HanLP, etc., to segment the target text to obtain multiple words. For example, if the target text is “I am an algorithm engineer”, then five words such as “I”, “Yes”, “one”, “algorithm”, and “engineer” can be obtained respectively.
  • a preset word segmentation tool such as a Chinese word segmentation tool, HanLP, etc.
  • the target text "Engineer Fu hits the computer” is segmented, using 3-Gram or 2-Gram segmentation, and it is found that the text has “engineer” and “Chengshi” in front of the text, followed by " ⁇ ” and “ ⁇ ”.
  • the server defines multiple target word vectors corresponding to multiple words. Specifically, the server inputs multiple words into a preset algorithm model; the server maps each word into a K-dimensional word vector, where K is an integer greater than 0; the server calculates the distance between each word vector; The server determines the semantic similarity between each word vector according to the distance between each word vector; the server determines the vector with the highest semantic similarity to the target word among multiple words according to the semantic similarity between each word vector Target word vector: The server determines multiple target word vectors, and each target word vector corresponds to a word.
  • the server inputs the four words identified above into the preset model through the preset model, and matches the two words “engineer” and “master” in the preset model, and determines the word vector "engineer” “And the word vector "Master”.
  • the generated preset model needs to ensure the validity of each word vector. If there are only “engineering” and “master” in the word vector, when we encounter a sentence "engineering is a good job", the result predicted by the preset model can only match the existing word vector, if Continuing to do entity recognition, you will get that "engineer (B) division (E) is” split the whole “engineer”, although the results can be obtained, but the information gap is split.
  • target text generally refers to various machine-readable records.
  • the text is represented by D (Document), and the feature item is represented by T (Term).
  • T refers to the basic language unit that is present in the document D and can represent the content of the document. It is mainly composed of words or phrases.
  • the text can be represented by a feature set Is D(T1, T2,..., Tn), where Tk is the feature item. For example, there are four feature items of a, b, c, d in a document, then the document can be expressed as D(a, b, c, d). For a text containing n feature items, each feature item is usually given a certain weight to indicate its importance.
  • Wk is the weight of Tk, 1 ⁇ k ⁇ N.
  • the vector of the text can be expressed as D(30, 20, 20, 10).
  • the content correlation between two texts D1 and D2 Sim(D1, D2) is usually expressed by the cosine value of the angle between the vectors.
  • the feature items of text D1 are a, b, c, d, and the weights are 30, 20, 20, 10, respectively, and the feature items of text C1 are a, c, d, e, and the weights are 40, 30, respectively.
  • the vector of D1 is represented as D1(30,20,20,10,0)
  • the vector of C1 is represented as C1(40,0,30,20,10)
  • the calculated text D1 and text C1 The similarity is 0.86.
  • each of the multiple words corresponding to the multiple target word vectors includes a word corresponding to the target word vector.
  • the server generates a target word vector according to a plurality of corresponding word vectors and a preset weighting strategy, where each word in the plurality of words corresponding to the plurality of word vectors includes a word corresponding to the word vector.
  • the current word vector of " ⁇ " is (teacher's word vector + master's word vector + engineer's word vector)/3, and the target word vector of " ⁇ " is obtained.
  • each target word vector as a model parameter into the long and short-term memory network LSTM and the conditional random field CRF model, and perform entity recognition on the Chinese sentence to generate predicted word segmentation.
  • the server inputs each target word vector as a model parameter into the long and short-term memory network LSTM and the conditional random field CRF model, and performs entity recognition on the Chinese sentence to generate predictive word segmentation.
  • the server inputs each target word vector as a model parameter into the LSTM and CRF models; the server determines the position of each target word vector in the word space; the server performs an analysis of the Chinese character according to the position of each target word vector in the word space Sentences perform entity recognition and generate predictive word segmentation.
  • entity recognition is performed on the Chinese sentence according to the position of each target word vector in the character space, and the process of generating predicted word segmentation specifically includes:
  • the preset formula is: Among them, P is the score matrix mapped from the output of the bidirectional LSTM after the fully connected layer, P i,j represents the score of the jth label corresponding to the i-th word in the Chinese sentence, and its dimension is n ⁇ k, and k is the label
  • A represents the transition matrix of the word segmentation label
  • a i, j represents the transition score between label i and label j, 1 ⁇ i ⁇ k, 1 ⁇ j ⁇ k; determine the probability p of the word segmentation label sequence, which satisfies the formula:
  • Calculate the loss function of probability p Among them, Y X represents all the label sequences of Chinese sentence X; the label with the highest score is determined according to the loss function as the predicted word segmentation
  • the target text is obtained, and the target text includes Chinese sentences that need to be segmented; the target text is segmented to obtain multiple words; multiple corresponding target word vectors are generated according to the multiple words; according to multiple target word vectors and predictions
  • the weighting strategy of setting generates the target word vector, and each word in the multiple words corresponding to the multiple target word vectors contains the word corresponding to the target word vector.
  • An embodiment of the vector definition device includes:
  • the obtaining unit 301 is configured to obtain a target text, the target text including a Chinese sentence that needs to be segmented;
  • the word segmentation unit 302 is configured to segment the target text to obtain multiple words
  • the first generating unit 303 is configured to generate multiple corresponding target word vectors according to the multiple words
  • the second generating unit 304 is configured to generate a target word vector according to the multiple target word vectors and a preset weighting strategy, each of the multiple words corresponding to the multiple target word vectors contains the target word vector The corresponding word.
  • the target text is obtained, and the target text includes Chinese sentences that need to be segmented; the target text is segmented to obtain multiple words; multiple corresponding target word vectors are generated according to the multiple words; according to multiple target word vectors and predictions
  • the weighting strategy of setting generates the target word vector, and each word in the multiple words corresponding to the multiple target word vectors contains the word corresponding to the target word vector. Taking a single word as the minimum structure, considering the combination of word vector and word vector, assigning multiple different meanings to each word in different words, increasing the accuracy of the meaning of the word vector in the sentence.
  • another embodiment of the device for defining a word vector based on artificial intelligence in the embodiment of the present application includes:
  • the obtaining unit 301 is configured to obtain a target text, the target text including a Chinese sentence that needs to be segmented;
  • the word segmentation unit 302 is configured to segment the target text to obtain multiple words
  • the first generating unit 303 is configured to generate multiple corresponding target word vectors according to the multiple words
  • the second generating unit 304 is configured to generate a target word vector according to the multiple target word vectors and a preset weighting strategy, each of the multiple words corresponding to the multiple target word vectors contains the target word vector The corresponding word.
  • the first generating unit 303 includes:
  • the first input module 30301 is configured to input the multiple words into a preset algorithm model
  • the mapping module 30302 is used to map each word into a K-dimensional word vector, where K is an integer greater than 0;
  • the first calculation module 30303 is used to calculate the distance between each word vector; the first determination module is used to determine the semantic similarity between each word vector according to the distance between each word vector;
  • the second determining module 30304 is configured to determine, according to the semantic similarity between each word vector, the vector with the highest semantic similarity to the target word among the multiple words as the target word vector;
  • the third determining module 30305 is configured to determine multiple target word vectors, and each target word vector corresponds to a word.
  • the first generating unit 303 further includes:
  • the first generating module 30306 is used to randomly generate a word vector matrix, and each row corresponds to a word vector;
  • the extraction module 30307 is configured to determine a target word in the word vector matrix, and extract the word vectors of surrounding words from the word vector matrix;
  • the second calculation module 30308 is configured to calculate the mean vector of the word vectors of the surrounding words
  • the training module 30309 is configured to input the mean vector into a preset logistic regression model for training
  • the second generation module 30310 is configured to generate a preset algorithm model, and the probability vector output by the preset algorithm model matches the one-hot encoding vector of the target word.
  • the first calculation module 30303 is specifically configured to:
  • D 1 and D 2 represent the first vector and the second vector, respectively, W 1k represents the weight of the first vector, W 2k represents the weight of the second vector, both the first vector and the second vector include N eigenvalues, 1 ⁇ k ⁇ N; the cosine value is determined as the distance between the first vector and the second vector.
  • the second generating unit 304 is specifically configured to:
  • the preset weight strategy includes the weight value of each word vector; determine the target weight value of each word vector in the plurality of target word vectors; according to the plurality of target word vectors and Each target weight value in the multiple target word vectors generates a target word vector.
  • the word vector definition device based on artificial intelligence further includes:
  • the third generating unit 305 is configured to input each target word vector as a model parameter into the long and short-term memory network LSTM and the conditional random field CRF model, and perform entity recognition on the Chinese sentence to generate predicted word segmentation.
  • the third generating unit 305 specifically includes:
  • the second input module 3051 is used to input each target word vector as a model parameter into the LSTM and CRF models;
  • the fourth determining module 3052 is used to determine the position of each target word vector in the word space
  • the recognition generating module 3053 is configured to perform entity recognition on the Chinese sentence according to the position of each target word vector in the character space to generate predicted word segmentation.
  • the target text is obtained, and the target text includes Chinese sentences that need to be segmented; the target text is segmented to obtain multiple words; multiple corresponding target word vectors are generated according to the multiple words; according to multiple target word vectors and predictions
  • the weighting strategy of setting generates the target word vector, and each word in the multiple words corresponding to the multiple target word vectors contains the word corresponding to the target word vector.
  • FIG. 5 is a schematic structural diagram of an artificial intelligence-based word vector definition device provided by an embodiment of the present application.
  • the artificial intelligence-based word vector definition device 500 may have relatively large differences due to different configurations or performance, and may include one or One or more processors (central processing units, CPU) 501 (for example, one or more processors) and a memory 509, one or more storage media 508 for storing application programs 507 or data 506 (for example, one or one storage device with a large amount of ).
  • the memory 509 and the storage medium 508 may be short-term storage or persistent storage.
  • the program stored in the storage medium 508 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the artificial intelligence-based word vector definition device.
  • the processor 501 may be configured to communicate with the storage medium 508, and execute a series of instruction operations in the storage medium 508 on the artificial intelligence-based word vector definition device 500.
  • the artificial intelligence-based word vector definition device 500 may also include one or more power sources 502, one or more wired or wireless network interfaces 503, one or more input and output interfaces 504, and/or, one or more operating systems 505 , Such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD and so on.
  • operating systems 505 Such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD and so on.
  • the processor 501 can perform the functions of the acquiring unit 301, the word segmentation unit 302, the first generating unit 303, the second generating unit 304, and the third generating unit 305 in the foregoing embodiment.
  • the processor 501 is the control center of the artificial intelligence-based word vector definition device, and can perform processing according to the set artificial intelligence-based word vector definition method.
  • the processor 501 uses various interfaces and lines to connect the various parts of the entire artificial intelligence-based word vector definition device, and by running or executing software programs and/or modules stored in the memory 509, and calling data stored in the memory 509, Execute various functions and processing data of the device based on artificial intelligence word vector definition, and convert unreadable labels in the message domain into readable labels, thereby realizing rapid identification of application scenarios in the message.
  • the storage medium 508 and the memory 509 are both carriers for storing data. In the embodiment of the present application, the storage medium 508 may refer to an internal memory with a small storage capacity but high speed, and the storage 509 may have a large storage capacity but a slow storage speed. External memory.
  • the memory 509 can be used to store software programs and modules, and the processor 501 executes various functional applications and data processing of the word vector definition device 500 based on artificial intelligence by running the software programs and modules stored in the memory 509.
  • the memory 509 may mainly include a storage program area and a storage data area.
  • the storage program area may store an operating system and an application program required by at least one function (for example, a target word vector is generated according to multiple target word vectors and a preset weight strategy)
  • the storage data area can store data (such as multiple target word vectors) created according to the use of artificial intelligence-based word vector definition equipment.
  • the memory 509 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • a non-volatile memory such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the artificial intelligence-based word vector definition method program and the received data stream provided in the embodiment of the present application are stored in the memory, and the processor 501 is called from the memory 509 when needed.
  • the present application also provides a non-volatile computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the following steps of the artificial intelligence-based word vector definition method:
  • Target text includes Chinese sentences that require word segmentation
  • a target word vector is generated according to the multiple target word vectors and a preset weighting strategy, and each of the multiple words corresponding to the multiple target word vectors includes a word corresponding to the target word vector.
  • the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
  • the computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium.
  • the computer instructions may be transmitted from a website, computer, server, or data center. Transmission to another website site, computer, server or data center via wired (such as coaxial cable, optical fiber, twisted pair) or wireless (such as infrared, wireless, microwave, etc.).
  • the computer-readable storage medium may be any available medium that can be stored by a computer or a data storage device such as a server or data center integrated with one or more available media.
  • the usable medium may be a magnetic medium (for example, a floppy disk, a hard disk, and a magnetic tape), an optical medium (for example, an optical disc), or a semiconductor medium (for example, a solid state disk (SSD)).
  • the disclosed system, device, and method may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Machine Translation (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请涉及人工智能技术领域,尤其涉及分词模型领域,公开了一种基于人工智能的字向量定义方法、装置、设备及存储介质,用于将单个字作为最小结构,给每个字在不同的词语中赋予多个不同的含义,增加了字向量在句子中含义的准确性。本申请方法包括:获取目标文本,目标文本包括需要进行分词的中文语句;对目标文本进行分词得到多个词语;根据多个词语生成对应的多个目标词向量;根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。

Description

基于人工智能的字向量定义方法、装置、设备及存储介质
本申请要求于2019年6月4日提交中国专利局、申请号为201910483399.6、发明名称为“基于人工智能的字向量定义方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在申请中。
技术领域
本申请涉及分词模型领域,尤其涉及一种基于人工智能的字向量定义方法、装置、设备及存储介质。
背景技术
随着人工智能技术的快速发展,深度学习技术的突飞猛进,为自然语言处理(natural language processing,NLP)提供了强大的工具。其中,深度学习为自然语言处理带来的最令人兴奋的突破是词向量技术和字向量技术。词向量技术是将词转化成为稠密向量,并且对于相似的词,其对应的词向量也相近。在自然语言处理应用中,词向量和字向量作为深度学习模型的特征进行输入。因此,最终模型的效果很大程度上取决于词向量和字向量的效果。
目前在具体实践中,字向量与词向量的定义是相对于独立的,在做实体识别的时候大部分采用字向量,在做文本分类,主题提取的时候大部分采用词向量的方式来进行识别。词向量的缺点是数量庞大而且在实体抽取中,容易出现小词不对而导致大词不对的问题。字向量的缺点在于,单个的词可能会有多完全不相关的意思,比如“老人”中的‘老’和“老子”中的‘老’,他的字向量只能表示一个意思和我们理解的不符合。
发明人意识到现有方案中,对于同一个字,当应用到词中时,单个的词中的字义可能会与词义完全不相关,字向量表意单一。
发明内容
本申请提供了一种基于人工智能的字向量定义方法、装置、设备及存储介质,用于将单个字作为最小结构,考虑字向量和词向量的结合,给每个字在不同的词语中赋予多个不同的含义,增加了字向量在句子中含义的准确性。
本申请实施例的第一方面提供一种基于人工智能的字向量定义方法,包括:获取目标文本,所述目标文本包括需要进行分词的中文语句;对所述目标文本进行分词得到多个词语;根据所述多个词语生成对应的多个目标词向量;根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标 字向量对应的字;将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词。
可选的,在本申请实施例第一方面的第一种实现方式中,所述根据所述多个词语生成对应的多个目标词向量包括:将所述多个词语输入到预置的算法模型中;将每个词语映射成K维词语向量,其中,K为大于0的整数;计算得到每个词语向量之间的距离;根据所述每个词语向量之间的距离确定每个词语向量之间的语义相似度;根据所述每个词语向量之间的语义相似度确定与所述多个词语中目标词语的语义相似度最高的向量为目标词向量;确定多个目标词向量,每个目标词向量对应一个词语。
可选的,在本申请实施例第一方面的第二种实现方式中,在所述将所述多个词语输入到预置的算法模型中之前,所述方法还包括:随机生成一个词向量矩阵,每一个行对应一个单词的向量;在所述词向量矩阵确定一个目标单词,并从所述词向量矩阵中提取周边单词的词向量;计算所述周边单词的词向量的均值向量;将所述均值向量输入到预置的逻辑回归模型中进行训练;生成预置的算法模型,所述预置的算法模型输出的概率向量与所述目标单词的one-hot编码向量相匹配。
可选的,在本申请实施例第一方面的第三种实现方式中,所述计算得到每个词语向量之间的距离包括:在所述词语向量中确定第一向量和第二向量;计算所述第一向量和所述第二向量之间的余弦值,满足公式:
Figure PCTCN2019102462-appb-000001
其中,D 1、D 2分别表示第一向量和第二向量,W 1k表示第一向量的权重,W 2k表示第二向量的权重,第一向量和第二向量都包括N个特征值,1≤k≤N;将所述余弦值确定为所述第一向量和所述第二向量的距离。
可选的,在本申请实施例第一方面的第四种实现方式中,所述根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字包括:获取预置的权重策略,所述预置的权重策略包含每个词向量的权重值;确定所述多个目标词向量中每个词向量的目标权重值;根据所述多个目标词向量和所述多个目标词向量中各个目标权重值生成目标字向量。
可选的,在本申请实施例第一方面的第五种实现方式中,所述根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字之后,所述方法还包括:将每个目标字向量作为模型参数输 入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词。
可选的,在本申请实施例第一方面的第六种实现方式中,所述将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词包括:将每个目标字向量作为模型参数输入到LSTM和CRF模型中;确定每个目标字向量在字空间中的位置;根据所述每个目标字向量在字空间中的位置对所述中文语句进行实体识别,生成预测分词。
本申请实施例的第二方面提供了一种基于人工智能的字向量定义装置,包括:获取单元,用于获取目标文本,所述目标文本包括需要进行分词的中文语句;分词单元,用于对所述目标文本进行分词得到多个词语;第一生成单元,用于根据所述多个词语生成对应的多个目标词向量;第二生成单元,用于根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
可选的,在本申请实施例第二方面的第一种实现方式中,第一生成单元包括:第一输入模块,用于将所述多个词语输入到预置的算法模型中;映射模块,用于将每个词语映射成K维词语向量,其中,K为大于0的整数;第一计算模块,用于计算得到每个词语向量之间的距离;第一确定模块,用于根据所述每个词语向量之间的距离确定每个词语向量之间的语义相似度;第二确定模块,用于根据所述每个词语向量之间的语义相似度确定与所述多个词语中目标词语的语义相似度最高的向量为目标词向量;第三确定模块,用于确定多个目标词向量,每个目标词向量对应一个词语。
可选的,在本申请实施例第二方面的第二种实现方式中,第一生成单元还包括:第一生成模块,用于随机生成一个词向量矩阵,每一个行对应一个单词的向量;提取模块,用于在所述词向量矩阵确定一个目标单词,并从所述词向量矩阵中提取周边单词的词向量;第二计算模块,用于计算所述周边单词的词向量的均值向量;训练模块,用于将所述均值向量输入到预置的逻辑回归模型中进行训练;第二生成模块,用于生成预置的算法模型,所述预置的算法模型输出的概率向量与所述目标单词的one-hot编码向量相匹配。
可选的,在本申请实施例第二方面的第三种实现方式中,第一计算模块具体用于:在所述词语向量中确定第一向量和第二向量;计算所述第一向量和所述第二向量之间的余弦 值,满足公式:
Figure PCTCN2019102462-appb-000002
其中,D 1、D 2分别表示第一向量和第二向量,W 1k表示第一向量的权重,W 2k表示第二向量的权重,第一向量和第二向量都包括N个特征值,1≤k≤N;将所述余弦值确定为所述第一向量和所述第二向量的距离。
可选的,在本申请实施例第二方面的第四种实现方式中,第二生成单元具体用于:获取预置的权重策略,所述预置的权重策略包含每个词向量的权重值;确定所述多个目标词向量中每个词向量的目标权重值;根据所述多个目标词向量和所述多个目标词向量中各个目标权重值生成目标字向量。
可选的,在本申请实施例第二方面的第五种实现方式中,基于人工智能的字向量定义装置还包括:第三生成单元,用于将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词。
可选的,在本申请实施例第二方面的第六种实现方式中,第三生成单元包括:第二输入模块,用于将每个目标字向量作为模型参数输入到LSTM和CRF模型中;第四确定模块,用于确定每个目标字向量在字空间中的位置;识别生成模块,用于根据所述每个目标字向量在字空间中的位置对所述中文语句进行实体识别,生成预测分词。
本申请实施例的第三方面提供了一种基于人工智能的字向量定义设备,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任一实施方式所述的基于人工智能的字向量定义方法。
本申请实施例的第四方面提供了一种非易失性计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行上述任一实施方式所述的基于人工智能的字向量定义方法的步骤。
本申请实施例提供的技术方案中,获取目标文本,目标文本包括需要进行分词的中文语句;对目标文本进行分词得到多个词语;根据多个词语生成对应的多个目标词向量;根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。本申请实施例,将单个字作为最小结构,考虑字向量和词向量的结合,给每个字在不同的词语中赋予多个不同的含义,增加了字向量在句子中含义的准确性,进而提高了中文分词的效率。
附图说明
图1为本申请实施例中基于人工智能的字向量定义方法的一个实施例示意图;
图2为本申请实施例中基于人工智能的字向量定义方法的另一个实施例示意图;
图3为本申请实施例中基于人工智能的字向量定义装置的一个实施例示意图;
图4为本申请实施例中基于人工智能的字向量定义装置的另一个实施例示意图;
图5为本申请实施例中基于人工智能的字向量定义设备的一个实施例示意图。
具体实施方式
本申请提供了一种基于人工智能的字向量定义方法、装置、设备及存储介质,用于将单个字作为最小结构,考虑字向量和词向量的结合,给每个字在不同的词语中赋予多个不同的含义,增加了每个字在句子中含义的准确性,提高了中文分词的效率。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例进行描述。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”、“第三”、“第四”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”或“具有”及其任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
请参阅图1,本申请实施例提供的基于人工智能的字向量定义方法的流程图,具体包括:
101、获取目标文本,目标文本包括需要进行分词的中文语句。
服务器获取目标文本,该目标文本包括需要进行分词的中文语句。例如,中文语句可以为“我喜欢苹果”,或者是“工程师傅打电脑”等,本申请实施例以“工程师傅打电脑”作为中文语句进行说明。
可以理解的是,本申请的执行主体可以为基于人工智能的字向量定义装置,还可以是终端或者服务器,具体此处不做限定。本申请以服务器为执行主体为例进行说明。
102、对目标文本进行分词得到多个词语。
服务器利用预置的分词工具,例如,结巴中文分词工具、HanLP等工具,对目标文本 进行分词得到多个词语。例如,目标文本是“我是一名算法工程师”,那么,可以分别得到“我”、“是”、“一名”、“算法”、“工程师”等五个词语。
例如,对目标文本“工程师傅打电脑”进行分词,采用3-Gram或2-Gram分词,发现文本前面有“工程师”、“程师”,后面有“师傅”、“师傅打”,总共有“工程师”、“程师”、“师傅”、“师傅打”。
103、根据多个词语生成对应的多个目标词向量。
服务器根据多个词语定义对应的多个目标词向量。具体的,服务器将多个词语输入到预置的算法模型中;服务器将每个词语映射成K维词语向量,其中,K为大于0的整数;服务器计算得到每个词语向量之间的距离;服务器根据每个词语向量之间的距离确定每个词语向量之间的语义相似度;服务器根据每个词语向量之间的语义相似度确定与多个词语中目标词语的语义相似度最高的向量为目标词向量;服务器确定多个目标词向量,每个目标词向量对应一个词语。
例如,服务器通过预置的模型,将上面识别到的四个词输入到预置的模型中,在预置的模型中匹配到了“工程师”,“师傅”这两个词,确定词向量“工程师”和词向量“师傅”。
需要说明的是,生成的预置的模型,需要确保每个词向量的有效性。如果在词向量中只有“工程”,“师傅”,当我们遇到一个句子为“工程师是一个好职业”时,预置的模型预测出的结果只能和已有的词向量相匹配,如果继续做实体识别,就会得到“工程(B)师(E)是”割裂了“工程师”这个整体,虽然也可以得到结果,但是信息缺被割裂了。
在向量空间模型中,目标文本泛指各种机器可读的记录。文本用D(Document)表示,特征项用T(Term)表示,T是指出现在文档D中且能够代表该文档内容的基本语言单位,主要是由词或者短语构成,文本可以用特征项集表示为D(T1,T2,…,Tn),其中Tk是特征项,1≤k≤N。例如一篇文档中有a、b、c、d四个特征项,那么这篇文档就可以表示为D(a,b,c,d)。对含有n个特征项的文本而言,通常会给每个特征项赋予一定的权重表示其重要程度。即D=D(T1,W1;T2,W2;…,Tn,Wn),简记为D=D(W1,W2,…,Wn),我们把它叫做文本D的向量表示。
104、根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。
服务器根据对应的多个词向量和预置的权重策略生成目标字向量,其中,多个词向量对应的多个词语中每个词语都包含该字向量对应的字。例如,对“师”字进行定义字向量, 则现在“师”的字向量为(师的字向量+师傅的词向量+工程师的词向量)/3,得到“师”的目标字向量。
需要说明的是,为了反映字对于周围环境影响而导致字向量的变化情况,除了上述例子中取平均值的方法,丰富了字向量的属性,还可以考虑用注意力机制attention为每一个字都自己计算一个适合权重然后加权平均,可参考现有技术,具体此处不再赘述。
本申请实施例,获取目标文本,目标文本包括需要进行分词的中文语句;对目标文本进行分词得到多个词语;根据多个词语生成对应的多个目标词向量;根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。将单个字作为最小结构,考虑字向量和词向量的结合,给每个字在不同的词语中赋予多个不同的含义,增加了字向量在句子中含义的准确性。
请参阅图2,本申请实施例提供的基于人工智能的字向量定义方法的另一个流程图,具体包括:
201、获取目标文本,目标文本包括需要进行分词的中文语句。
服务器获取目标文本,该目标文本包括需要进行分词的中文语句。例如,中文语句可以为“我喜欢苹果”,或者是“工程师傅打电脑”等,本申请实施例以“工程师傅打电脑”作为中文语句进行说明。
可以理解的是,本申请的执行主体可以为基于人工智能的字向量定义装置,还可以是终端或者服务器,具体此处不做限定。本申请以服务器为执行主体为例进行说明。
202、对目标文本进行分词得到多个词语。
服务器利用预置的分词工具,例如,结巴中文分词工具、HanLP等工具,对目标文本进行分词得到多个词语。例如,目标文本是“我是一名算法工程师”,那么,可以分别得到“我”、“是”、“一名”、“算法”、“工程师”等五个词语。
例如,对目标文本“工程师傅打电脑”进行分词,采用3-Gram或2-Gram分词,发现文本前面有“工程师”、“程师”,后面有“师傅”、“师傅打”,总共有“工程师”、“程师”、“师傅”、“师傅打”。
203、根据多个词语生成对应的多个目标词向量。
服务器根据多个词语定义对应的多个目标词向量。具体的,服务器将多个词语输入到预置的算法模型中;服务器将每个词语映射成K维词语向量,其中,K为大于0的整数;服务器计算得到每个词语向量之间的距离;服务器根据每个词语向量之间的距离确定每个 词语向量之间的语义相似度;服务器根据每个词语向量之间的语义相似度确定与多个词语中目标词语的语义相似度最高的向量为目标词向量;服务器确定多个目标词向量,每个目标词向量对应一个词语。
例如,服务器通过预置的模型,将上面识别到的四个词输入到预置的模型中,在预置的模型中匹配到了“工程师”,“师傅”这两个词,确定词向量“工程师”和词向量“师傅”。
需要说明的是,生成的预置的模型,需要确保每个词向量的有效性。如果在词向量中只有“工程”,“师傅”,当我们遇到一个句子为“工程师是一个好职业”时,预置的模型预测出的结果只能和已有的词向量相匹配,如果继续做实体识别,就会得到“工程(B)师(E)是”割裂了“工程师”这个整体,虽然也可以得到结果,但是信息缺被割裂了。
在向量空间模型中,目标文本泛指各种机器可读的记录。文本用D(Document)表示,特征项用T(Term)表示,T是指出现在文档D中且能够代表该文档内容的基本语言单位,主要是由词或者短语构成,文本可以用特征项集表示为D(T1,T2,…,Tn),其中Tk是特征项,。例如一篇文档中有a、b、c、d四个特征项,那么这篇文档就可以表示为D(a,b,c,d)。对含有n个特征项的文本而言,通常会给每个特征项赋予一定的权重表示其重要程度。即D=D(T1,W1;T2,W2;…,Tn,Wn),简记为D=D(W1,W2,…,Wn),我们把它叫做文本D的向量表示。其中Wk是Tk的权重,1≤k≤N。在上述例子中,假设a、b、c、d的权重分别为30,20,20,10,那么该文本的向量可以表示为D(30,20,20,10)。在向量空间模型中,两个文本D1和D2之间的内容相关度Sim(D1,D2)常用向量之间夹角的余弦值表示。
例如,文本D1的特征项为a,b,c,d,权值分别为30,20,20,10,文本C1的特征项为a,c,d,e,权值分别为40,30,20,10,则D1的向量表示为D1(30,20,20,10,0),C1的向量表示为C1(40,0,30,20,10),则计算出来的文本D1与文本C1相似度是0.86。
204、根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。
服务器根据对应的多个词向量和预置的权重策略生成目标字向量,其中,多个词向量对应的多个词语中每个词语都包含该字向量对应的字。例如,对“师”字进行定义字向量,则现在“师”的字向量为(师的字向量+师傅的词向量+工程师的词向量)/3,得到“师”的目标字向量。
需要说明的是,为了反映字对于周围环境影响而导致字向量的变化情况,除了上述例 子中取平均值的方法,丰富了字向量的属性,还可以考虑用注意力机制attention为每一个字都自己计算一个适合权重然后加权平均,可参考现有技术,具体此处不再赘述。
205、将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对中文语句进行实体识别生成预测分词。
服务器将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对中文语句进行实体识别生成预测分词。具体的,服务器将每个目标字向量作为模型参数输入到LSTM和CRF模型中;服务器确定每个目标字向量在字空间中的位置;服务器根据每个目标字向量在字空间中的位置对中文语句进行实体识别,生成预测分词。
可选的,根据每个目标字向量在字空间中的位置对中文语句进行实体识别,生成预测分词的过程具体包括:
将中文语句表示为X=(x1,x2,...,xn),根据预置的公式生成标签序列y=(y1,y2,...,yn),y1和yn分别表示中文语句的开始标签和结束标签,预置的公式为:
Figure PCTCN2019102462-appb-000003
其中,P为双向LSTM的输出经过全连接层后映射的分数矩阵,P i,j表示中文语句中第i个字对应的第j个标签的分数,其维度为n×k,k为标签的个数,A表示分词标签的转移矩阵,A i,j表示标签i与标签j之间的过渡分数,1≤i≤k,1≤j≤k;确定分词标签序列的概率p,满足公式:
Figure PCTCN2019102462-appb-000004
计算概率p的损失函数:
Figure PCTCN2019102462-appb-000005
其中,Y X表示中文语句X所有的标签序列;根据损失函数确定分数最高的标签作为预测分词,预测分词满足:
Figure PCTCN2019102462-appb-000006
本申请实施例,获取目标文本,目标文本包括需要进行分词的中文语句;对目标文本进行分词得到多个词语;根据多个词语生成对应的多个目标词向量;根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。将单个字作为最小结构,考虑字向量和词向量的结合,给每个字在不 同的词语中赋予多个不同的含义,增加了字向量在句子中含义的准确性,进而提高了中文分词的效率。
上面对本申请实施例中基于人工智能的字向量定义方法进行了描述,下面对本申请实施例中基于人工智能的字向量定义装置进行描述,请参阅图3,本申请实施例中基于人工智能的字向量定义装置的一个实施例包括:
获取单元301,用于获取目标文本,所述目标文本包括需要进行分词的中文语句;
分词单元302,用于对所述目标文本进行分词得到多个词语;
第一生成单元303,用于根据所述多个词语生成对应的多个目标词向量;
第二生成单元304,用于根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
本申请实施例,获取目标文本,目标文本包括需要进行分词的中文语句;对目标文本进行分词得到多个词语;根据多个词语生成对应的多个目标词向量;根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。将单个字作为最小结构,考虑字向量和词向量的结合,给每个字在不同的词语中赋予多个不同的含义,增加了字向量在句子中含义的准确性。
请参阅图4,本申请实施例中基于人工智能的字向量定义装置的另一个实施例包括:
获取单元301,用于获取目标文本,所述目标文本包括需要进行分词的中文语句;
分词单元302,用于对所述目标文本进行分词得到多个词语;
第一生成单元303,用于根据所述多个词语生成对应的多个目标词向量;
第二生成单元304,用于根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
可选的,第一生成单元303包括:
第一输入模块30301,用于将所述多个词语输入到预置的算法模型中;
映射模块30302,用于将每个词语映射成K维词语向量,其中,K为大于0的整数;
第一计算模块30303,用于计算得到每个词语向量之间的距离;第一确定模块,用于根据所述每个词语向量之间的距离确定每个词语向量之间的语义相似度;
第二确定模块30304,用于根据所述每个词语向量之间的语义相似度确定与所述多个词语中目标词语的语义相似度最高的向量为目标词向量;
第三确定模块30305,用于确定多个目标词向量,每个目标词向量对应一个词语。
可选的,第一生成单元303还包括:
第一生成模块30306,用于随机生成一个词向量矩阵,每一个行对应一个单词的向量;
提取模块30307,用于在所述词向量矩阵确定一个目标单词,并从所述词向量矩阵中提取周边单词的词向量;
第二计算模块30308,用于计算所述周边单词的词向量的均值向量;
训练模块30309,用于将所述均值向量输入到预置的逻辑回归模型中进行训练;
第二生成模块30310,用于生成预置的算法模型,所述预置的算法模型输出的概率向量与所述目标单词的one-hot编码向量相匹配。
可选的,第一计算模块30303具体用于:
在所述词语向量中确定第一向量和第二向量;计算所述第一向量和所述第二向量之间的余弦值,满足公式:
Figure PCTCN2019102462-appb-000007
其中,D 1、D 2分别表示第一向量和第二向量,W 1k表示第一向量的权重,W 2k表示第二向量的权重,第一向量和第二向量都包括N个特征值,1≤k≤N;将所述余弦值确定为所述第一向量和所述第二向量的距离。
可选的,第二生成单元304具体用于:
获取预置的权重策略,所述预置的权重策略包含每个词向量的权重值;确定所述多个目标词向量中每个词向量的目标权重值;根据所述多个目标词向量和所述多个目标词向量中各个目标权重值生成目标字向量。
可选的,基于人工智能的字向量定义装置还包括:
第三生成单元305,用于将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词。
可选的,第三生成单元305具体包括:
第二输入模块3051,用于将每个目标字向量作为模型参数输入到LSTM和CRF模型中;
第四确定模块3052,用于确定每个目标字向量在字空间中的位置;
识别生成模块3053,用于根据所述每个目标字向量在字空间中的位置对所述中文语句进行实体识别,生成预测分词。
本申请实施例,获取目标文本,目标文本包括需要进行分词的中文语句;对目标文本 进行分词得到多个词语;根据多个词语生成对应的多个目标词向量;根据多个目标词向量和预置的权重策略生成目标字向量,多个目标词向量对应的多个词语中每个词语都包含目标字向量对应的字。将单个字作为最小结构,考虑字向量和词向量的结合,给每个字在不同的词语中赋予多个不同的含义,增加了字向量在句子中含义的准确性,进而提高了中文分词的效率。
上面图3至图4从模块化功能实体的角度对本申请实施例中的基于人工智能的字向量定义装置进行详细描述,下面从硬件处理的角度对本申请实施例中基于人工智能的字向量定义设备进行详细描述。
图5是本申请实施例提供的一种基于人工智能的字向量定义设备的结构示意图,该基于人工智能的字向量定义设备500可因配置或性能不同而产生比较大的差异,可以包括一个或一个以上处理器(central processing units,CPU)501(例如,一个或一个以上处理器)和存储器509,一个或一个以上存储应用程序507或数据506的存储介质508(例如一个或一个以上海量存储设备)。其中,存储器509和存储介质508可以是短暂存储或持久存储。存储在存储介质508的程序可以包括一个或一个以上模块(图示没标出),每个模块可以包括对基于人工智能的字向量定义设备中的一系列指令操作。更进一步地,处理器501可以设置为与存储介质508通信,在基于人工智能的字向量定义设备500上执行存储介质508中的一系列指令操作。
基于人工智能的字向量定义设备500还可以包括一个或一个以上电源502,一个或一个以上有线或无线网络接口503,一个或一个以上输入输出接口504,和/或,一个或一个以上操作系统505,例如Windows Serve,Mac OS X,Unix,Linux,FreeBSD等等。本领域技术人员可以理解,图5中示出的基于人工智能的字向量定义设备结构并不构成对基于人工智能的字向量定义设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。处理器501可以执行上述实施例中获取单元301、分词单元302、第一生成单元303、第二生成单元304和第三生成单元305的功能。
下面结合图5对基于人工智能的字向量定义设备的各个构成部件进行具体的介绍:
处理器501是基于人工智能的字向量定义设备的控制中心,可以按照设置的基于人工智能的字向量定义方法进行处理。处理器501利用各种接口和线路连接整个基于人工智能的字向量定义设备的各个部分,通过运行或执行存储在存储器509内的软件程序和/或模块,以及调用存储在存储器509内的数据,执行基于人工智能的字向量定义设备的各种功 能和处理数据,将报文域中的不可读标签转换为可读标签,从而实现对报文中的应用场景的快速识别。存储介质508和存储器509都是存储数据的载体,本申请实施例中,存储介质508可以是指储存容量较小,但速度快的内存储器,而存储器509可以是储存容量大,但储存速度慢的外存储器。
存储器509可用于存储软件程序以及模块,处理器501通过运行存储在存储器509的软件程序以及模块,从而执行基于人工智能的字向量定义设备500的各种功能应用以及数据处理。存储器509可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如根据多个目标词向量和预置的权重策略生成目标字向量)等;存储数据区可存储根据基于人工智能的字向量定义设备的使用所创建的数据(比如多个目标词向量)等。此外,存储器509可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在本申请实施例中提供的基于人工智能的字向量定义方法程序和接收到的数据流存储在存储器中,当需要使用时,处理器501从存储器509中调用。
本申请还提供一种非易失性计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如下基于人工智能的字向量定义方法的步骤:
获取目标文本,所述目标文本包括需要进行分词的中文语句;
对所述目标文本进行分词得到多个词语;
根据所述多个词语生成对应的多个目标词向量;
根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
在计算机上加载和执行所述计算机程序指令时,全部或部分地产生按照本申请实施例所述的流程或功能。所述计算机可以是通用计算机、专用计算机、计算机网络、或者其他可编程装置。所述计算机指令可以存储在计算机可读存储介质中,或者从一个计算机可读存储介质向另一计算机可读存储介质传输,例如,所述计算机指令可以从一个网站站点、计算机、服务器或数据中心通过有线(例如同轴电缆、光纤、双绞线)或无线(例如红外、无线、微波等)方式向另一个网站站点、计算机、服务器或数据中心进行传输。所述计算机可读存储介质可以是计算机能够存储的任何可用介质或者是包含一个或多个可用介质集成的服务器、数据中心等数据存储设备。所述可用介质可以是磁性介质,(例如,软盘、硬盘、磁带)、光介质(例如,光盘)、或者半导体介质(例如固态硬盘(solid state disk, SSD))等。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。

Claims (20)

  1. 一种基于人工智能的字向量定义方法,包括:
    获取目标文本,所述目标文本包括需要进行分词的中文语句;
    对所述目标文本进行分词得到多个词语;
    根据所述多个词语生成对应的多个目标词向量;
    根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
  2. 根据权利要求1所述的基于人工智能的字向量定义方法,所述根据所述多个词语生成对应的多个目标词向量包括:
    将所述多个词语输入到预置的算法模型中;
    将每个词语映射成K维词语向量,其中,K为大于0的整数;
    计算得到每个词语向量之间的距离;
    根据所述每个词语向量之间的距离确定每个词语向量之间的语义相似度;
    根据所述每个词语向量之间的语义相似度确定与所述多个词语中目标词语的语义相似度最高的向量为目标词向量;
    确定多个目标词向量,每个目标词向量对应一个词语。
  3. 根据权利要求2所述的基于人工智能的字向量定义方法,在所述将所述多个词语输入到预置的算法模型中之前,所述方法还包括:
    随机生成一个词向量矩阵,每一个行对应一个单词的向量;
    在所述词向量矩阵确定一个目标单词,并从所述词向量矩阵中提取周边单词的词向量;
    计算所述周边单词的词向量的均值向量;
    将所述均值向量输入到预置的逻辑回归模型中进行训练;
    生成预置的算法模型,所述预置的算法模型输出的概率向量与所述目标单词的one-hot编码向量相匹配。
  4. 根据权利要求2所述的基于人工智能的字向量定义方法,所述计算得到每个词语向量之间的距离包括:
    在所述词语向量中确定第一向量和第二向量;
    计算所述第一向量和所述第二向量之间的余弦值,满足公式:
    Figure PCTCN2019102462-appb-100001
    其中,D 1、D 2分别表示第一向量和第二向量,W 1k表示第一向量的权重,W 2k表示第二向量的权重,第一向量和第二向量都包括N个特征值,1≤k≤N;
    将所述余弦值确定为所述第一向量和所述第二向量的距离。
  5. 根据权利要求1所述的基于人工智能的字向量定义方法,所述根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字包括:
    获取预置的权重策略,所述预置的权重策略包含每个词向量的权重值;
    确定所述多个目标词向量中每个词向量的目标权重值;
    根据所述多个目标词向量和所述多个目标词向量中各个目标权重值生成目标字向量。
  6. 根据权利要求1-5中任一所述的基于人工智能的字向量定义方法,所述根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字之后,所述方法还包括:
    将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词。
  7. 根据权利要求6所述的基于人工智能的字向量定义方法,所述将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词包括:
    将每个目标字向量作为模型参数输入到LSTM和CRF模型中;
    确定每个目标字向量在字空间中的位置;
    根据所述每个目标字向量在字空间中的位置对所述中文语句进行实体识别,生成预测分词。
  8. 一种基于人工智能的字向量定义装置,包括:
    获取单元,用于获取目标文本,所述目标文本包括需要进行分词的中文语句;
    分词单元,用于对所述目标文本进行分词得到多个词语;
    第一生成单元,用于根据所述多个词语生成对应的多个目标词向量;
    第二生成单元,用于根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
  9. 根据权利要求8所述的基于人工智能的字向量定义装置,第一生成单元包括:
    第一输入模块,用于将所述多个词语输入到预置的算法模型中;
    映射模块,用于将每个词语映射成K维词语向量,其中,K为大于0的整数;
    第一计算模块,用于计算得到每个词语向量之间的距离;
    第一确定模块,用于根据所述每个词语向量之间的距离确定每个词语向量之间的语义相似度;
    第二确定模块,用于根据所述每个词语向量之间的语义相似度确定与所述多个词语中目标词语的语义相似度最高的向量为目标词向量;
    第三确定模块,用于确定多个目标词向量,每个目标词向量对应一个词语。
  10. 根据权利要求9所述的基于人工智能的字向量定义装置,第一生成单元还包括:
    第一生成模块,用于随机生成一个词向量矩阵,每一个行对应一个单词的向量;
    提取模块,用于在所述词向量矩阵确定一个目标单词,并从所述词向量矩阵中提取周边单词的词向量;
    第二计算模块,用于计算所述周边单词的词向量的均值向量;
    训练模块,用于将所述均值向量输入到预置的逻辑回归模型中进行训练;
    第二生成模块,用于生成预置的算法模型,所述预置的算法模型输出的概率向量与所述目标单词的one-hot编码向量相匹配。
  11. 根据权利要求9所述的基于人工智能的字向量定义装置,第一计算模块具体用于:
    在所述词语向量中确定第一向量和第二向量;
    计算所述第一向量和所述第二向量之间的余弦值,满足公式:
    Figure PCTCN2019102462-appb-100002
    其中,D 1、D 2分别表示第一向量和第二向量,W 1k表示第一向量的权重,W 2k表示第二向量的权重,第一向量和第二向量都包括N个特征值,1≤k≤N;
    将所述余弦值确定为所述第一向量和所述第二向量的距离。
  12. 根据权利要求8所述的基于人工智能的字向量定义装置,第二生成单元具体用于:
    获取预置的权重策略,所述预置的权重策略包含每个词向量的权重值;
    确定所述多个目标词向量中每个词向量的目标权重值;
    根据所述多个目标词向量和所述多个目标词向量中各个目标权重值生成目标字向量。
  13. 根据权利要求8-12中任一所述的基于人工智能的字向量定义装置,基于人工智能的字向量定义装置还包括:
    第三生成单元,用于将每个目标字向量作为模型参数输入到长短时记忆网络LSTM和条件随机场CRF模型中,对所述中文语句进行实体识别生成预测分词。
  14. 根据权利要求13所述的基于人工智能的字向量定义装置,第三生成单元包括:
    第二输入模块,用于将每个目标字向量作为模型参数输入到LSTM和CRF模型中;
    第四确定模块,用于确定每个目标字向量在字空间中的位置;
    识别生成模块,用于根据所述每个目标字向量在字空间中的位置对所述中文语句进行实体识别,生成预测分词。
  15. 一种基于人工智能的字向量定义设备,其特征在于,包括存储器、处理器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如下步骤:
    获取目标文本,所述目标文本包括需要进行分词的中文语句;
    对所述目标文本进行分词得到多个词语;
    根据所述多个词语生成对应的多个目标词向量;
    根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
  16. 根据权利要求15所述的基于人工智能的字向量定义设备,所述处理器具体用于执行以下步骤:
    将所述多个词语输入到预置的算法模型中;
    将每个词语映射成K维词语向量,其中,K为大于0的整数;
    计算得到每个词语向量之间的距离;
    根据所述每个词语向量之间的距离确定每个词语向量之间的语义相似度;
    根据所述每个词语向量之间的语义相似度确定与所述多个词语中目标词语的语义相似度最高的向量为目标词向量;
    确定多个目标词向量,每个目标词向量对应一个词语。
  17. 根据权利要求16所述的基于人工智能的字向量定义设备,所述处理器具体用于执行以下步骤:
    随机生成一个词向量矩阵,每一个行对应一个单词的向量;
    在所述词向量矩阵确定一个目标单词,并从所述词向量矩阵中提取周边单词的词向量;
    计算所述周边单词的词向量的均值向量;
    将所述均值向量输入到预置的逻辑回归模型中进行训练;
    生成预置的算法模型,所述预置的算法模型输出的概率向量与所述目标单词的one-hot编码向量相匹配。
  18. 根据权利要求16所述的基于人工智能的字向量定义设备,所述处理器具体用于执行以下步骤:
    在所述词语向量中确定第一向量和第二向量;
    计算所述第一向量和所述第二向量之间的余弦值,满足公式:
    Figure PCTCN2019102462-appb-100003
    其中,D 1、D 2分别表示第一向量和第二向量,W 1k表示第一向量的权重,W 2k表示第二向量的权重,第一向量和第二向量都包括N个特征值,1≤k≤N;
    将所述余弦值确定为所述第一向量和所述第二向量的距离。
  19. 根据权利要求15所述的基于人工智能的字向量定义设备,所述处理器具体用于执行以下步骤:
    获取预置的权重策略,所述预置的权重策略包含每个词向量的权重值;
    确定所述多个目标词向量中每个词向量的目标权重值;
    根据所述多个目标词向量和所述多个目标词向量中各个目标权重值生成目标字向量。
  20. 一种非易失性计算机可读存储介质,包括指令,当所述指令在计算机上运行时,使得计算机执行如下步骤:
    获取目标文本,所述目标文本包括需要进行分词的中文语句;
    对所述目标文本进行分词得到多个词语;
    根据所述多个词语生成对应的多个目标词向量;
    根据所述多个目标词向量和预置的权重策略生成目标字向量,所述多个目标词向量对应的多个词语中每个词语都包含所述目标字向量对应的字。
PCT/CN2019/102462 2019-06-04 2019-08-26 基于人工智能的字向量定义方法、装置、设备及存储介质 Ceased WO2020244065A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201910483399.6A CN110298035B (zh) 2019-06-04 2019-06-04 基于人工智能的字向量定义方法、装置、设备及存储介质
CN201910483399.6 2019-06-04

Publications (1)

Publication Number Publication Date
WO2020244065A1 true WO2020244065A1 (zh) 2020-12-10

Family

ID=68027590

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/102462 Ceased WO2020244065A1 (zh) 2019-06-04 2019-08-26 基于人工智能的字向量定义方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN110298035B (zh)
WO (1) WO2020244065A1 (zh)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861531A (zh) * 2021-03-22 2021-05-28 北京小米移动软件有限公司 分词方法、装置、存储介质和电子设备
CN113268522A (zh) * 2021-04-29 2021-08-17 赵天诚 物料重码识别方法、装置、终端设备和存储介质
CN113343708A (zh) * 2021-06-11 2021-09-03 北京声智科技有限公司 一种基于语义实现语句泛化的方法和装置
CN113822038A (zh) * 2021-06-03 2021-12-21 腾讯科技(深圳)有限公司 一种摘要生成方法和相关装置
CN114048751A (zh) * 2021-11-08 2022-02-15 北京明略软件系统有限公司 拼音字母向量的确定方法、装置、电子设备和存储介质
CN114049623A (zh) * 2021-11-10 2022-02-15 厦门科拓通讯技术股份有限公司 车牌识别方法及装置、存储介质及电子设备
CN114048281A (zh) * 2021-11-05 2022-02-15 北京明略软件系统有限公司 汉语拼音字母向量计算的方法、装置以及存储介质
CN114398902A (zh) * 2022-01-13 2022-04-26 平安普惠企业管理有限公司 基于人工智能的中文语义提取方法及相关设备
CN115438666A (zh) * 2022-09-27 2022-12-06 中国平安人寿保险股份有限公司 文本相似度计算方法、装置、计算机设备及存储介质
CN118377917A (zh) * 2024-06-21 2024-07-23 华电煤业集团数智技术有限公司 一种基于知识图谱的煤矿大数据分析方法

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110928936B (zh) * 2019-10-18 2023-06-16 平安科技(深圳)有限公司 基于强化学习的信息处理方法、装置、设备和存储介质
CN110797005B (zh) * 2019-11-05 2022-06-10 百度在线网络技术(北京)有限公司 韵律预测方法、装置、设备和介质
CN111079442B (zh) * 2019-12-20 2021-05-18 北京百度网讯科技有限公司 文档的向量化表示方法、装置和计算机设备
CN113051918B (zh) * 2019-12-26 2024-05-14 北京中科闻歌科技股份有限公司 基于集成学习的命名实体识别方法、装置、设备和介质
CN111414452B (zh) * 2020-02-29 2024-07-02 平安国际智慧城市科技股份有限公司 搜索词匹配方法、装置、电子设备及可读存储介质
CN112016313B (zh) * 2020-09-08 2024-02-13 迪爱斯信息技术股份有限公司 口语化要素识别方法及装置、警情分析系统
CN112183111B (zh) * 2020-09-28 2024-08-23 亚信科技(中国)有限公司 长文本语义相似度匹配方法、装置、电子设备及存储介质
CN113282749B (zh) * 2021-05-20 2025-02-28 北京明略软件系统有限公司 一种会话情感分类方法、系统、电子设备及存储介质
CN113343669B (zh) * 2021-05-20 2024-06-21 北京明略软件系统有限公司 一种学习字向量方法、系统、电子设备及存储介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170091318A1 (en) * 2015-09-29 2017-03-30 Kabushiki Kaisha Toshiba Apparatus and method for extracting keywords from a single document
CN107273355A (zh) * 2017-06-12 2017-10-20 大连理工大学 一种基于字词联合训练的中文词向量生成方法
CN107688604A (zh) * 2017-07-26 2018-02-13 阿里巴巴集团控股有限公司 数据应答处理方法、装置及服务器
CN109063035A (zh) * 2018-07-16 2018-12-21 哈尔滨工业大学 一种面向出行领域的人机多轮对话方法

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106569998A (zh) * 2016-10-27 2017-04-19 浙江大学 一种基于Bi‑LSTM、CNN和CRF的文本命名实体识别方法
CN108509408B (zh) * 2017-02-27 2019-11-22 芋头科技(杭州)有限公司 一种句子相似度判断方法
CN107168952B (zh) * 2017-05-15 2021-06-04 北京百度网讯科技有限公司 基于人工智能的信息生成方法和装置
CN108132931B (zh) * 2018-01-12 2021-06-25 鼎富智能科技有限公司 一种文本语义匹配的方法及装置
CN108717409A (zh) * 2018-05-16 2018-10-30 联动优势科技有限公司 一种序列标注方法及装置
CN109271637B (zh) * 2018-09-30 2023-12-01 科大讯飞股份有限公司 一种语义理解方法及装置

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170091318A1 (en) * 2015-09-29 2017-03-30 Kabushiki Kaisha Toshiba Apparatus and method for extracting keywords from a single document
CN107273355A (zh) * 2017-06-12 2017-10-20 大连理工大学 一种基于字词联合训练的中文词向量生成方法
CN107688604A (zh) * 2017-07-26 2018-02-13 阿里巴巴集团控股有限公司 数据应答处理方法、装置及服务器
CN109063035A (zh) * 2018-07-16 2018-12-21 哈尔滨工业大学 一种面向出行领域的人机多轮对话方法

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
LI, WEIKANG ET AL.: "Combination Methods of Chinese Character and Word Embeddings in Deep Learning", JOURNAL OF CHINESE INFORMATION PROCESSING, vol. 31, no. 6, 30 November 2017 (2017-11-30), pages 140 - 146, XP055765583 *

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112861531A (zh) * 2021-03-22 2021-05-28 北京小米移动软件有限公司 分词方法、装置、存储介质和电子设备
CN112861531B (zh) * 2021-03-22 2023-11-14 北京小米移动软件有限公司 分词方法、装置、存储介质和电子设备
CN113268522A (zh) * 2021-04-29 2021-08-17 赵天诚 物料重码识别方法、装置、终端设备和存储介质
CN113822038A (zh) * 2021-06-03 2021-12-21 腾讯科技(深圳)有限公司 一种摘要生成方法和相关装置
CN113343708A (zh) * 2021-06-11 2021-09-03 北京声智科技有限公司 一种基于语义实现语句泛化的方法和装置
CN114048281A (zh) * 2021-11-05 2022-02-15 北京明略软件系统有限公司 汉语拼音字母向量计算的方法、装置以及存储介质
CN114048751A (zh) * 2021-11-08 2022-02-15 北京明略软件系统有限公司 拼音字母向量的确定方法、装置、电子设备和存储介质
CN114049623A (zh) * 2021-11-10 2022-02-15 厦门科拓通讯技术股份有限公司 车牌识别方法及装置、存储介质及电子设备
CN114398902A (zh) * 2022-01-13 2022-04-26 平安普惠企业管理有限公司 基于人工智能的中文语义提取方法及相关设备
CN115438666A (zh) * 2022-09-27 2022-12-06 中国平安人寿保险股份有限公司 文本相似度计算方法、装置、计算机设备及存储介质
CN118377917A (zh) * 2024-06-21 2024-07-23 华电煤业集团数智技术有限公司 一种基于知识图谱的煤矿大数据分析方法

Also Published As

Publication number Publication date
CN110298035B (zh) 2023-12-01
CN110298035A (zh) 2019-10-01

Similar Documents

Publication Publication Date Title
WO2020244065A1 (zh) 基于人工智能的字向量定义方法、装置、设备及存储介质
US11610384B2 (en) Zero-shot object detection
CN112860919B (zh) 基于生成模型的数据标注方法、装置、设备及存储介质
US20220318275A1 (en) Search method, electronic device and storage medium
JP2021152963A (ja) 語義特徴の生成方法、モデルトレーニング方法、装置、機器、媒体及びプログラム
CN111368130B (zh) 客服录音的质检方法、装置、设备及存储介质
CN114780727A (zh) 基于强化学习的文本分类方法、装置、计算机设备及介质
CN111797214A (zh) 基于faq数据库的问题筛选方法、装置、计算机设备及介质
JP6848091B2 (ja) 情報処理装置、情報処理方法、及びプログラム
CN113806582B (zh) 图像检索方法、装置、电子设备和存储介质
CN112883193A (zh) 一种文本分类模型的训练方法、装置、设备以及可读介质
CN107491547A (zh) 基于人工智能的搜索方法和装置
CN107526725A (zh) 基于人工智能的用于生成文本的方法和装置
CN112818091A (zh) 基于关键词提取的对象查询方法、装置、介质与设备
CN113988157A (zh) 语义检索网络训练方法、装置、电子设备及存储介质
CN114995903B (zh) 一种基于预训练语言模型的类别标签识别方法及装置
WO2022141872A1 (zh) 文献摘要生成方法、装置、计算机设备及存储介质
WO2014073206A1 (ja) 情報処理装置、及び、情報処理方法
WO2022228127A1 (zh) 要素文本处理方法、装置、电子设备和存储介质
CN118709195A (zh) 应用大语言模型方法和装置
CN111062209A (zh) 自然语言处理模型训练方法和自然语言处理模型
CN113362809A (zh) 语音识别方法、装置和电子设备
CN116402045A (zh) 实体识别模型的训练方法、实体识别的方法及相关设备
WO2023061107A1 (zh) 基于层预测的语言翻译的方法、设备、装置和介质
CN119358544B (zh) 模型训练方法、分类及要素抽取方法、装置、设备和介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 19932088

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 19932088

Country of ref document: EP

Kind code of ref document: A1