WO2021135446A1 - 文本分类方法、装置、计算机设备及存储介质 - Google Patents

文本分类方法、装置、计算机设备及存储介质 Download PDF

Info

Publication number
WO2021135446A1
WO2021135446A1 PCT/CN2020/117597 CN2020117597W WO2021135446A1 WO 2021135446 A1 WO2021135446 A1 WO 2021135446A1 CN 2020117597 W CN2020117597 W CN 2020117597W WO 2021135446 A1 WO2021135446 A1 WO 2021135446A1
Authority
WO
WIPO (PCT)
Prior art keywords
word vector
text
model
deep learning
word
Prior art date
Application number
PCT/CN2020/117597
Other languages
English (en)
French (fr)
Inventor
郑立颖
徐亮
Original Assignee
平安科技(深圳)有限公司
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 平安科技(深圳)有限公司 filed Critical 平安科技(深圳)有限公司
Publication of WO2021135446A1 publication Critical patent/WO2021135446A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/284Lexical analysis, e.g. tokenisation or collocates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • This application relates to the field of artificial intelligence technology, in particular to text classification methods, devices, computer equipment and storage media.
  • the automatic classification of texts is mostly based on models.
  • the classification of texts through models is a very common application in natural language processing, such as: article subject classification, Weibo sentiment classification, spam recognition, and so on.
  • the traditional text classification method mainly needs to manually extract some features from the original document, and then use traditional classifiers such as SVM (Support Vector Machine), LR (Logistic Regression Classifier, Logistic Regression Classifier) to train the classification model. Finally, a text classification model that can be used directly is obtained.
  • the inventor realizes that the above traditional classifier based on artificially extracted features is simple and easy to implement, but due to the limitations of the features considered, it cannot effectively extract the dependence relationship between words in the text to form an overall judgment.
  • the above performance is generally average, and the method based on deep learning, due to the large amount of network parameters, usually requires more labeled samples as training data, otherwise it is easy to cause overfitting, high accuracy on the training set but classification on the test machine The accuracy rate is greatly reduced.
  • the embodiments of the present application provide a text classification method, device, computer equipment, and storage medium to solve the technical problem of inaccurate classification in the automatic text classification method in the prior art.
  • a text classification method includes:
  • the dimension of the spliced word vector is the sum of the dimension of the first word vector and the dimension of the second word vector;
  • the text to be classified under each subject is classified through the trained deep learning classification model.
  • a text classification device which includes:
  • the sample acquisition module is used to acquire different types of text sample corpora under each subject carrying annotated information
  • the sample training module is used to perform word vector training on the text sample corpus containing the label information through the word vector model to obtain the first word vector;
  • the sample word segmentation module is used to perform word segmentation processing on the text sample corpus containing the label information through a language representation model to obtain a second word vector;
  • the splicing module is used to splice the first word vector and the second word vector to obtain a spliced word vector.
  • the dimension of the spliced word vector is the difference between the dimension of the first word vector and the second word vector Sum of dimensions
  • the training module is used to train the pre-built deep learning classification model through the spliced word vector to obtain a trained deep learning classification model
  • the classification processing module is used to classify the text to be classified under each subject through the trained deep learning classification model.
  • a computer device includes a memory, a processor, and computer-readable instructions that are stored in the memory and can run on the processor, and the processor implements the following steps when the processor executes the computer-readable instructions:
  • the first word vector and the second word vector are spliced to obtain a spliced word vector, and the dimension of the spliced word vector is the difference between the dimension of the first word vector and the second word vector Sum of dimensions
  • the text to be classified under each subject is classified through the trained deep learning classification model.
  • One or more readable storage media storing computer readable instructions, when the computer readable instructions are executed by one or more processors, the one or more processors execute the following steps:
  • the first word vector and the second word vector are spliced to obtain a spliced word vector, and the dimension of the spliced word vector is the difference between the dimension of the first word vector and the second word vector Sum of dimensions
  • the text to be classified under each subject is classified through the trained deep learning classification model.
  • This application provides a text classification method, device, computer equipment, and storage medium to classify the text to be classified under each subject through the deep learning classification model trained in this application, so that the classification result of the text classification is more accurate.
  • FIG. 1 is a schematic diagram of an application environment of a text classification method in an embodiment of the present application
  • Fig. 2 is a flowchart of a text classification method in an embodiment of the present application
  • Fig. 3 is a flowchart of a text classification method in another embodiment of the present application.
  • Fig. 4 is an example diagram of vector splicing in an embodiment of the present application.
  • FIG. 5 is a schematic structural diagram of a text classification device in an embodiment of the present application.
  • Fig. 6 is a schematic diagram of a computer device in an embodiment of the present application.
  • the text classification method provided in this application can be applied in the application environment as shown in Fig. 1, in which the computer equipment can communicate with external equipment through the network.
  • the computer equipment includes, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices.
  • a text classification method which relates to an artificial intelligence-based text classification method.
  • the application of the method to the computer device in FIG. 1 is taken as an example for description, including The steps S101 to S106 are as follows.
  • the topic includes, but is not limited to, news, Weibo sentiment, papers and journals, and so on.
  • the types included under the news topic can be military, entertainment, technology, etc.; the types included under the Weibo sentiment topic can be positive, neutral, negative, etc.; the types included under the topic of the paper can be Physics academics, chemical academics, computer academics, etc.
  • the annotation information of the text sample corpus can be obtained through user input, or can be obtained directly from stored data.
  • the word vector model is the word vector model Word2vec
  • the word vector model Word2vec is a group of related models used to generate word vectors.
  • These models are shallow and two-layer neural networks that are used for training to reconstruct linguistic word text.
  • the network is represented by words, and the input words in adjacent positions need to be guessed. Under the assumption of the bag-of-words model in Word2vec, the order of the words is not important.
  • the Word2vec model can be used to map each word to a vector, which can be used to represent the relationship between words.
  • the language representation model is the language representation model BERT (Bidirectional Encoder Representations from Transformers)
  • the language representation model BERT is a pre-training model, which can be understood as a general NLU (Natural Language Understanding) model, which provides support for different NLP (Natural Language Processing, natural language processing) tasks.
  • NLU Natural Language Understanding
  • NLP Natural Language Processing, natural language processing
  • Pre-training That is, some initialization parameters have been given in advance. This parameter is not random, but learned from other similar data sets, and then learns with specific data sets to obtain parameters suitable for the data set. Random initialization is not easy Get the parameter result, but the parameter result that is not easy to get is because the speed of random initialization is too slow, rather than the final parameter result is different.
  • the pre-training model is a model trained with a larger data set, and these pre-training models can be used on similar data sets for model fine-tuning, such as the language representation model BERT in this embodiment.
  • the word segmenter configured for the word vector model is the same as the word segmenter configured for the language representation model.
  • the word segmenter configured in the word vector model is the same as the word segmenter configured in the language representation model, so that when the first word vector and the second word vector are spliced in the subsequent steps, they can correspond to each other.
  • Figure 4 shows the vector splicing in an embodiment of the present application. The example image of, the spliced vector is shown in Figure 4.
  • S104 Splicing the first word vector and the second word vector to obtain a spliced word vector, the dimension of the spliced word vector is the sum of the dimension of the first word vector and the dimension of the second word vector.
  • the text classification method further includes:
  • the tokenizer in the language representation model BERT is configured as the tokenizer in the word vector model Word2vec, and the word vector model Word2vec and the language representation model BERT use the same tokenizer tokenizer for the text corpus. deal with.
  • a class used for the first step of processing text which basically contains methods for preprocessing text, among which the tokenize method returns a list of processed words;
  • Word segmentation segmentation of words. For example, if the word length exceeds 200, it is marked as unk, and the greedy algorithm can be used to segment the word. The order of segmentation is to cut 1 bit at a time from back to front. For example, tokenization will be divided into [token,##ization], there may not be the word tokenization in the bert dictionary), and the text will be converted into a After word segmentation, it is used in subsequent steps.
  • the word vector model Word2vec uses the tokenizer in the language representation model BERT to process the word segmentation of the article.
  • the word vector model Word2vec training part can directly call the word (character) vector training function in the gensim library to train
  • the dimension can be set between 100-300. For example, the word vector dimension in bert is 768, and the word vector dimension self-trained by the word vector model Word2vec is 300, and the word vector dimension after splicing is 1068.
  • the deep learning classification model includes but is not limited to textCNN text classification model, LSTM (Long Short-Term Memory, long short-term memory network).
  • the basic steps of training the deep learning classification model include:
  • the algorithm formula which is the forward algorithm of the neural network.
  • existing networks such as inceptionV4, mobilenet, etc.;
  • the text classification method proposed in the embodiment firstly, different types of text sample corpora under each subject carrying tagging information are obtained, and the text sample corpus is trained through the word vector model to obtain the first word vector, and then the text sample The corpus is trained through the language representation model to obtain the second word vector, and then the first word vector and the second word vector are spliced to obtain the spliced word vector, and the pre-built deep learning classification is performed through the spliced word vector The model is trained to obtain a trained deep learning classification model.
  • the deep learning classification model trained according to this application has a higher classification than the existing model Accuracy: The deep learning classification model trained in this application classifies the text to be classified under each topic, so that the classification result of the text classification is more accurate.
  • the step of obtaining different types of text sample corpora under each subject carrying labeling information in this step includes:
  • the text sample corpus under the subject can be collected according to the subject of the text classification. For example, if it is a Weibo sentiment classification, first collect a large amount of Weibo text corpus; if it is a government official document topic classification, then crawl first A large number of public government documents.
  • the step of receiving user-input tagging information for different types of text sample corpora under each topic includes:
  • FIG. 3 is a flowchart of a text classification method in another embodiment of the present application.
  • the text classification method according to another embodiment of the present application will be described in detail below in conjunction with FIG. 3.
  • the text classification method includes the above steps. On the basis of S101 to S106, it also includes the following steps S301 and S302.
  • the embedding layer of the word vector model is the embedding layer.
  • the embedding in Word2vec is to automatically learn the relationship between input nodes from the data, such as the relationship between girl and woman, and express it with a vector.
  • the deep learning classification model includes an embedding layer, a flat layer, a hidden layer, and an output layer.
  • the embedding layer of the deep learning classification model is an embedding layer of a word vector model.
  • the text classification method further includes:
  • the deep learning classification model is stored in the blockchain node.
  • the text classification method proposed in this embodiment is aimed at a text classification method with a small number of labeled samples.
  • the BERT pre-training model is used to obtain rich pre-training word vector information and combined with the unique text training in the field.
  • the word vector information of the text is more comprehensive to characterize the words in the text, so as to achieve the effect of obtaining as much external knowledge as possible to obtain higher text classification accuracy in the case of a small number of samples.
  • it can better capture the semantic information of the text.
  • the classic deep learning method it can reduce the network parameters and reduce the impact of overfitting on the classification accuracy.
  • a text classification device is provided, and the text classification device corresponds to the text classification method in the above-mentioned embodiment one-to-one.
  • the text classification device 100 includes a sample acquisition module 11, a sample training module 12, a sample word segmentation module 13, a splicing module 14, a training module 15 and a classification processing module 16.
  • the detailed description of each functional module is as follows:
  • the sample acquisition module 11 is used to acquire different types of text sample corpora under each subject carrying annotated information.
  • the topics include, but are not limited to, news, Weibo sentiment, papers and journals, etc.
  • the types included under the news topic can be military, entertainment, technology, etc.; the types included under the Weibo sentiment topic can be positive, neutral, negative, etc.; the types included under the topic of the paper can be Physics academics, chemical academics, computer academics, etc.
  • the annotation information of the text sample corpus can be obtained through user input, or can be obtained directly from stored data.
  • the sample training module 12 is used for performing word vector training on the text sample corpus containing the label information through the word vector model to obtain the first word vector.
  • the word vector model is the word vector model Word2vec
  • the word vector model Word2vec is a group of related models used to generate word vectors.
  • These models are shallow and two-layer neural networks that are used to train to reconstruct linguistic word text.
  • the network is represented by words, and the input words in adjacent positions need to be guessed. Under the assumption of the bag-of-words model in Word2vec, the order of the words is not important.
  • the Word2vec model can be used to map each word to a vector, which can be used to represent the relationship between words.
  • the sample word segmentation module 13 is used to perform word segmentation processing on the text sample corpus containing the label information through a language representation model to obtain a second word vector.
  • the language representation model is the language representation model BERT (Bidirectional Encoder Representations from Transformers)
  • the language representation model BERT is a pre-training model, which can be understood as a general NLU (Natural Language Understanding) model, which provides support for different NLP (Natural Language Processing, natural language processing) tasks.
  • NLU Natural Language Understanding
  • NLP Natural Language Processing, natural language processing
  • Pre-training That is, some initialization parameters have been given in advance. This parameter is not random, but learned from other similar data sets, and then learns with specific data sets to obtain parameters suitable for the data set. Random initialization is not easy Get the parameter result, but the parameter result that is not easy to get is because the speed of random initialization is too slow, rather than the final parameter result is different.
  • the pre-training model is a model trained with a larger data set, and these pre-training models can be used on similar data sets for model fine-tuning, such as the language representation model BERT in this embodiment.
  • the word segmenter configured for the word vector model is the same as the word segmenter configured for the language representation model.
  • the word segmenter configured for the word vector model is the same as the word segmenter configured for the language representation model, so that the first word vector and the second word vector can correspond to each other when the first word vector and the second word vector are spliced in subsequent steps.
  • the splicing module 14 is used to splice the first word vector and the second word vector to obtain a spliced word vector.
  • the dimensions of the spliced word vector are the dimensions of the first word vector and the second word vector The sum of the dimensions.
  • the text classification device 100 further includes:
  • the configuration module is configured to configure the tokenizer in the language representation model BERT as the tokenizer in the word vector model Word2vec, and the word vector model Word2vec and the language representation model BERT use the same tokenizer pair
  • the text corpus is processed.
  • a class used for the first step of processing text which basically contains methods for preprocessing text, among which the tokenize method returns a list of processed words;
  • Word segmentation segmentation of words. For example, if the word length exceeds 200, it is marked as unk, and the greedy algorithm can be used to segment the word. The order of segmentation is to cut 1 bit at a time from back to front. For example, tokenization will be divided into [token,##ization], there may not be the word tokenization in the bert dictionary), and the text will be converted into a After word segmentation, it is used in subsequent steps.
  • the word vector model Word2vec uses the tokenizer in the language representation model BERT to process the word segmentation of the article.
  • the word vector model Word2vec training part can directly call the word (character) vector training function in the gensim library to train
  • the dimension can be set between 100-300. For example, the word vector dimension in bert is 768, and the word vector dimension self-trained by the word vector model Word2vec is 300, and the word vector dimension after splicing is 1068.
  • the training module 15 is used to train the pre-built deep learning classification model through the spliced word vector to obtain a trained deep learning classification model.
  • the deep learning classification model includes but is not limited to textCNN text classification model, LSTM (Long Short-Term Memory, long short-term memory network).
  • the classification processing module 16 is used to classify the text to be classified under each subject through the trained deep learning classification model.
  • the tokenizer configured for the word vector model is the same as the tokenizer configured for the language representation model.
  • the sample acquisition module 11 specifically includes:
  • the tag receiving unit is used to receive the tag information of different types of text sample corpora under each topic input by the user;
  • the sample acquisition unit is used to acquire different types of text sample corpora under each topic according to the topic to which the text sample corpus belongs.
  • the text sample corpus under the subject can be collected according to the subject of the text classification. For example, if it is a Weibo sentiment classification, first collect a large amount of Weibo text corpus; if it is a government official document topic classification, then crawl first A large number of public government documents.
  • the label receiving unit is specifically configured to:
  • the text classification device 100 further includes:
  • the embedding layer acquisition module is used to acquire the embedding layer of the word vector model.
  • the embedding layer of the word vector model is the embedding layer;
  • the model building module is used to construct a classification model layer on top of the embedding layer of the word vector model through the deep learning classification model framework to obtain the deep learning classification model.
  • the embedding in Word2vec is to automatically learn the relationship between input nodes from the data, such as the relationship between girl and woman, and express it with a vector.
  • the text classification device proposed in this embodiment is a text classification method for a small number of labeled samples.
  • the BERT pre-training model is used to obtain rich pre-training word vector information, and combined with the unique text training in the field.
  • the word vector information of the text is more comprehensive to characterize the words in the text, so as to achieve the effect of obtaining as much external knowledge as possible to obtain higher text classification accuracy in the case of a small number of samples.
  • it can better capture the semantic information of the text.
  • the classic deep learning method it can reduce the network parameters and reduce the impact of overfitting on the classification accuracy.
  • Each module in the above text classification device can be implemented in whole or in part by software, hardware, and a combination thereof.
  • the above-mentioned modules may be embedded in the form of hardware or independent of the processor in the computer equipment, or may be stored in the memory of the computer equipment in the form of software, so that the processor can call and execute the operations corresponding to the above-mentioned modules.
  • a computer device is provided.
  • the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 6.
  • the computer equipment includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus.
  • the processor of the computer device is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, a volatile readable storage medium, and an internal memory.
  • the non-volatile storage medium stores an operating system and computer readable instructions.
  • the internal memory provides an environment for the operation of the operating system and computer-readable instructions in the non-volatile storage medium.
  • the network interface of the computer device is used to communicate with external devices through a network connection.
  • the computer-readable instructions are executed by the processor to realize a text classification method.
  • a computer device including a memory, a processor, and computer-readable instructions stored in the memory and running on the processor.
  • the processor executes the computer-readable instructions, the text in the above-mentioned embodiment is implemented.
  • the steps of the classification method such as steps 101 to 106 shown in FIG. 2 and other extensions of the method and extensions of related steps.
  • the processor executes the computer-readable instructions, the functions of the modules/units of the text classification device in the above-mentioned embodiment are realized, for example, the functions of the modules 11 to 16 shown in FIG. 6.
  • the processor implements the following steps when executing computer-readable instructions:
  • the first word vector and the second word vector are spliced to obtain a spliced word vector, and the dimension of the spliced word vector is the difference between the dimension of the first word vector and the second word vector Sum of dimensions
  • the text to be classified under each subject is classified through the trained deep learning classification model.
  • processor further implements the following steps when executing the computer-readable instruction:
  • processor further implements the following steps when executing the computer-readable instruction:
  • the topic label information and the type label information of the text sample corpus are saved.
  • processor further implements the following steps when executing the computer-readable instruction:
  • a classification model layer is constructed on the embedding layer of the word vector model through a deep learning classification model framework to obtain the deep learning classification model.
  • processor further implements the following steps when executing the computer-readable instruction:
  • the deep learning classification model is stored in the blockchain node.
  • word segmenter configured by the word vector model is the same as the word segmenter configured by the language representation model.
  • the processor may be a central processing unit (Central Processing Unit, CPU), or other general-purpose processors, digital signal processors (Digital Signal Processors) Processor, DSP), application specific integrated circuit (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
  • the processor is the control center of the computer device, and various interfaces and lines are used to connect various parts of the entire computer device.
  • the memory may be used to store the computer-readable instructions and/or modules, and the processor may execute or execute the computer-readable instructions and/or modules stored in the memory, and call data stored in the memory, Realize various functions of the computer device.
  • the memory may mainly include a storage program area and a storage data area, where the storage program area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created based on the use of mobile phones (such as audio data, video data, etc.), etc.
  • the memory may be integrated in the processor, or may be provided separately from the processor.
  • one or more readable storage media storing computer readable instructions are provided.
  • the computer readable storage media may be non-volatile or volatile.
  • the computer readable instructions When executed by one or more processors, the one or more processors are caused to execute, for example, step 101 to step 106 shown in FIG. 2 and other extensions of the method and extensions of related steps. Or, when the computer-readable instructions are executed by the processor, the functions of the modules/units of the text classification apparatus in the above-mentioned embodiment are realized, for example, the functions of the modules 11 to 16 shown in FIG. 5. Specifically, when the computer-readable instruction is executed by one or more processors, the one or more processors execute the following steps:
  • the first word vector and the second word vector are spliced to obtain a spliced word vector, and the dimension of the spliced word vector is the difference between the dimension of the first word vector and the second word vector Sum of dimensions
  • the text to be classified under each subject is classified through the trained deep learning classification model.
  • the one or more processors further execute the following steps:
  • the one or more processors further execute the following steps:
  • the topic label information and the type label information of the text sample corpus are saved.
  • the one or more processors further execute the following steps:
  • a classification model layer is constructed on the embedding layer of the word vector model through a deep learning classification model framework to obtain the deep learning classification model.
  • the one or more processors further execute the following steps:
  • the deep learning classification model is stored in the blockchain node.
  • word segmenter configured by the word vector model is the same as the word segmenter configured by the language representation model.
  • This embodiment provides a text classification method, device, computer equipment, and storage medium.
  • different types of text sample corpora under each subject carrying tagging information are obtained, and the text sample corpus is trained through a word vector model to obtain the first A word vector, and then the text sample corpus is trained through the language representation model to obtain the second word vector, and then the first word vector and the second word vector are spliced to obtain the spliced word vector.
  • the word vector trains the pre-built deep learning classification model to obtain a trained deep learning classification model. Since the vector of the training model in this application has more representation dimensions, compared with the deep learning classification model trained according to this application The existing model has higher classification accuracy.
  • the deep learning classification model trained in this application classifies the text to be classified under each topic, so that the classification result of the text classification is more accurate.
  • Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Channel (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Artificial Intelligence (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Computational Linguistics (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Molecular Biology (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Evolutionary Biology (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Machine Translation (AREA)

Abstract

涉及人工智能技术,公开了一种文本分类方法、装置、计算机设备及存储介质,用于解决文本自动分类方法存在分类不准确的技术问题。该方法包括:获取携带有标注信息的各个主题下不同类型的文本样本语料(S101);对包含有该标注信息的该文本样本语料进行词向量训练,得到第一字向量(S102);对包含有该标注信息的该文本样本语料进行分字处理,得到第二字向量(S103);对该第一字向量和该第二字向量进行拼接,得到拼接后的字向量(S104);通过该拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型(S105);通过训练好的该深度学习分类模型对各主题下的待分类文本进行分类处理(S106)。还涉及区块链技术,该深度学习分类模型可存储于区块链节点中。

Description

文本分类方法、装置、计算机设备及存储介质
本申请要求于2020年06月19日提交中国专利局、申请号为202010567353.5,发明名称为“文本分类方法、装置、计算机设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及文本分类方法、装置、计算机设备及存储介质。
 
背景技术
目前对文本实现自动分类大多是基于模型来实现,通过模型对文本进行分类是自然语言处理中很普遍的一个应用,例如:文章主题分类、微博情感分类、垃圾邮件识别等等。传统的文本分类方法主要是需要人工从原始文档中提取一些特征,再通过传统分类器如SVM(Support Vector Machine,支持向量机)、LR(Logistic Regression Classifier,逻辑回归分类器)去训练分类模型,最终得到可以直接使用的文本分类模型。
发明人意识到以上基于人工提取特征的传统分类器,虽然简单易实现,但是由于其考虑的特征比较有局限性,无法有效提取文本中词与词之间的依赖关系形成整体判断,在准确率上通常表现一般,而基于深度学习的方法,由于网络参数量大,通常也需要更多的标注样本作为训练数据,否则很容易造成过拟合,在训练集上准确率高但是在测试机上分类的准确率大打折扣。
 
发明内容
本申请实施例提供一种文本分类方法、装置、计算机设备及存储介质,以解决现有技术中文本自动分类方法存在分类不准确的技术问题。
一种文本分类方法,该方法包括:
获取携带有标注信息的各个主题下不同类型的文本样本语料;
通过词向量模型对包含有该标注信息的该文本样本语料进行词向量训练,得到第一字向量;
通过语言表示模型对包含有该标注信息的该文本样本语料进行分字处理,得到第二字向量;
对该第一字向量和该第二字向量进行拼接,得到拼接后的字向量,该拼接后的字向量的维度为该第一字向量的维度与该第二字向量的维度之和;
通过该拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
通过训练好的该深度学习分类模型对各主题下的待分类文本进行分类处理。
一种文本分类装置,该装置包括:
样本获取模块,用于获取携带有标注信息的各个主题下不同类型的文本样本语料;
样本训练模块,用于通过词向量模型对包含有该标注信息的该文本样本语料进行词向量训练,得到第一字向量;
样本分字模块,用于通过语言表示模型对包含有该标注信息的该文本样本语料进行分字处理,得到第二字向量;
拼接模块,用于对该第一字向量和该第二字向量进行拼接,得到拼接后的字向量,该拼接后的字向量的维度为该第一字向量的维度与该第二字向量的维度之和;
训练模块,用于通过该拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
分类处理模块,用于通过训练好的该深度学习分类模型对各主题下的待分类文本进行分类处理。
一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,所述处理器执行所述计算机可读指令时实现以下步骤:
获取携带有标注信息的各个主题下不同类型的文本样本语料;
通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取携带有标注信息的各个主题下不同类型的文本样本语料;
通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
本申请提供一种文本分类方法方法、装置、计算机设备及存储介质通过本申请训练好的深度学习分类模型对各主题下的待分类文本进行分类处理,使得对文本进行分类的分类结果更加准确。
 
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对本申请实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1是本申请一实施例中文本分类方法的一应用环境示意图;
图2是本申请一实施例中文本分类方法的一流程图;
图3是本申请另一实施例中文本分类方法的一流程图;
图4是本申请一实施例中向量拼接的示例图;
图5是本申请一实施例中文本分类装置的结构示意图;
图6是本申请一实施例中计算机设备的一示意图。
 
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本申请提供的文本分类方法,可应用在如图1的应用环境中,其中,计算机设备可以通过网络与外部设备进行通信。其中,该计算机设备包括但不限于各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。
在一实施例中,如图2所示,提供一种文本分类方法,由其涉及一种基于人工智能的文本分类方法,以该方法应用在图1中的计算机设备中为例进行说明,包括如下步骤S101至S106。
S101 、获取携带有标注信息的各个主题下不同类型的文本样本语料。
在其中一个实施例中,所述主题包括但不限于新闻、微博情感、论文期刊等等。
进一步地,该新闻主题下包括的类型可以是军事类、娱乐类、科技类等;该微博情感主题下包括的类型可以是积极、中立、消极等;该论文期刊主题下包括的类型可以是物理学术、化学学术、计算机学术等等。
其中,该文本样本语料的标注信息可以通过用户输入得到,也可以从存储的数据中直接获取得到。
S102 、通过词向量模型对包含有该标注信息的该文本样本语料进行词向量训练,得到第一字向量。
其中,该词向量模型即词向量模型Word2vec,词向量模型Word2vec是一群用来产生词向量的相关模型。这些模型为浅而双层的神经网络,用来训练以重新建构语言学之词文本。网络以词表现,并且需猜测相邻位置的输入词,在Word2vec中词袋模型假设下,词的顺序是不重要的。训练完成之后,Word2vec模型可用来映射每个词到一个向量,可用来表示词对词之间的关系。
S103 、通过语言表示模型对包含有该标注信息的该文本样本语料进行分字处理,得到第二字向量。
其中,语言表示模型即语言表示模型BERT(Bidirectional Encoder Representations from Transformers),语言表示模型BERT是一种预训练模型,可以理解为这是一个通用的NLU(Natural Language Understanding)模型,为不同的NLP(Natural Language Processing,自然语言处理)任务提供支持。在实际使用时,只需要根据具体任务额外加入一个输出层进行微调即可,而不用为特定任务来修改模型结构。
预训练 即提前已经给了一些初始化的参数,这个参数不是随机的,而是通过其他类似数据集上面学得的,然后再用具体的数据集进行学习,得到适合该数据集的参数,随机初始化不容易得到参数结果,但是不容易得到的这个参数结果是因为随机初始化的速度太慢,而不是最终的参数结果不一样。简单地说,预训练模型就是用某个较大的数据集训练好的模型,可以用这些预训练模型用到类似的数据集上进行模型微调,就比如本实施例中的语言表示模型BERT。
其中,该词向量模型配置的分词器与该语言表示模型配置的分词器相同。词向量模型配置的分词器与该语言表示模型配置的分词器相同使得后续步骤中第一字向量和第二字向量进行拼接时,能够对应的上,图4是本申请一实施例中向量拼接的示例图,拼接后的向量如图4所示。
S104 、对该第一字向量和该第二字向量进行拼接,得到拼接后的字向量,该拼接后的字向量的维度为该第一字向量的维度与该第二字向量的维度之和。
为使得所述第一字向量和所述第二字向量在拼接的时候能够对应的上,所述文本分类方法进一步包括:
将所述语言表示模型BERT中的分词器tokenizer配置为所述词向量模型Word2vec中的分词器,所述词向量模型Word2vec与所述语言表示模型BERT使用相同的分词器tokenizer对所述文本语料进行处理。
tokenization 的主要思路就是相当于分词,把一个输入的文本依次按照以下步骤进行处理:
清洗:用于对文本进行第一步处理的类, 里面基本上都是预处理文本的方法,其中tokenize方法,返回的结果是经过处理的单词列表;
分词:对单词进行切分。例如如果单词长度超过200,就标记为unk,对单词切分时可以采用贪心算法进行。切分顺序是从后往前每次切1位,比如会把tokenization经过切分,变为[token,##ization],bert字典中也许并没有tokenization这个词),将text转换成了一个被分词后用于后续步骤。
在其中的一个实施例中,词向量模型Word2vec对文章进行分字处理部分使用语言表示模型BERT中的tokenizer,词向量模型Word2vec训练部分可以直接调用gensim库中的词(字)向量训练函数,训练维度可设置为100-300之间,如bert中的字向量维度为768,词向量模型Word2vec自训练的字向量维度为300,则拼接后的字向量维度为1068。
S105 、通过该拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型。
其中,该深度学习分类模型包括但不限于textCNN文本分类模型、LSTM(Long Short-Term Memory,长短期记忆网络)。
其中,对深度学习分类模型进行训练的基本步骤包括:
定义算法公式,也就是神经网络的前向算法。一般使用现成的网络,如inceptionV4,mobilenet等;
定义损失函数loss,选择优化器,来让损失函数loss最小;
通过拼接后的字向量对数据进行迭代训练,使损失函数loss到达最小;
在测试集或者验证集上对准确率进行评估。
S106 、通过训练好的该深度学习分类模型对各主题下的待分类文本进行分类处理。
将待分类文本输入至该深度学习分类模型,即可得到该待分类文本所属的主题及该主题下所属的类型。
在实施例提出的文本分类方法方法,首先获取携带有标注信息的各个主题下不同类型的文本样本语料,对该文本样本语料通过词向量模型进行训练,得到第一字向量,再对该文本样本语料通过语言表示模型进行训练,得到第二字向量,然后对该第一字向量和该第二字向量进行拼接,得到拼接后的字向量,通过拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型,由于本申请中训练模型的向量具有更多的表示维度,使得依据本申请训练好的深度学习分类模型相比现有模型,具有更高的分类精度,通过本申请训练好的深度学习分类模型对各主题下的待分类文本进行分类处理,使得对文本进行分类的分类结果更加准确。
一个实施例中,该步骤中获取携带有标注信息的各个主题下不同类型的文本样本语料的步骤包括:
接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
根据该文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
其中,可以根据文本分类所属的主题,对该主题下的文本样本语料进行收集,例如:如果是微博情感分类,则先收集大量微博文本语料;如果是政府公文主题分类,则先爬取大量公开政府公文。
在其中的一个实施例中,该接收用户输入的对各个主题下不同类型的文本样本语料的标注信息的步骤包括:
接收用户输入的对该文本样本语料的主题标注信息;
接收用户输入的对该文本样本语料的类型标注信息;
保存该文本样本语料的主题标注信息和该类型标注信息。
图3是本申请另一实施例中文本分类方法的一流程图,下面结合图3详细描述根据本申请另一实施例中文本分类方法,如图3所示,该文本分类方法在包括上述步骤S101至S106的基础上,还包括以下步骤S301和S302。
S301 、获取该词向量模型的嵌入层。
其中,该词向量模型的嵌入层即embedding层。
S302 、通过深度学习分类模型框架在该词向量模型的嵌入层之上构建分类模型层,得到该深度学习分类模型。
其中,Word2vec中的embedding就是要从数据中自动学习到输入节点之间的相互关系,例如girl与woman之间的关系,并用向量表示。该深度学习分类模型包括嵌入层、平坦层、隐藏层和输出层,本实施例中该深度学习分类模型的嵌入层选用词向量模型的嵌入层。
在其中一个实施例中,该文本分类方法还包括:
将所述深度学习分类模型存储于区块链节点中。
本实施例提出的文本分类方法针对少量标注样本的文本分类方法,在少量样本的情况下,利用BERT预训练模型,获取丰富的预训练字向量信息,同时结合该领域下特有的文本训练而成的字向量信息,更加全面的对文本中的字进行向量表征,从而达到在少量样本情况下尽可能获取外部知识获得较高的文本分类精度的效果。相比传统分类方法能够更好的捕捉文本的语义信息,相比于经典深度学习方法可以减少网络参数,降低过拟合影响分类精度。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本申请实施例的实施过程构成任何限定。
在一实施例中,提供一种文本分类装置,该文本分类装置与上述实施例中文本分类方法一一对应。如图5所示,该文本分类装置100包括样本获取模块11、样本训练模块12、样本分字模块13、拼接模块14、训练模块15和分类处理模块16。各功能模块详细说明如下:
样本获取模块11,用于获取携带有标注信息的各个主题下不同类型的文本样本语料。
其中,所述主题包括但不限于新闻、微博情感、论文期刊等等。
进一步地,该新闻主题下包括的类型可以是军事类、娱乐类、科技类等;该微博情感主题下包括的类型可以是积极、中立、消极等;该论文期刊主题下包括的类型可以是物理学术、化学学术、计算机学术等等。
其中,该文本样本语料的标注信息可以通过用户输入得到,也可以从存储的数据中直接获取得到。
样本训练模块12,用于通过词向量模型对包含有该标注信息的该文本样本语料进行词向量训练,得到第一字向量。
其中,该词向量模型即词向量模型Word2vec,词向量模型Word2vec是一群用来产生词向量的相关模型。这些模型为浅而双层的神经网络,用来训练以重新建构语言学之词文本。网络以词表现,并且需猜测相邻位置的输入词,在Word2vec中词袋模型假设下,词的顺序是不重要的。训练完成之后,Word2vec模型可用来映射每个词到一个向量,可用来表示词对词之间的关系。
样本分字模块13,用于通过语言表示模型对包含有该标注信息的该文本样本语料进行分字处理,得到第二字向量。
其中,语言表示模型即语言表示模型BERT(Bidirectional Encoder Representations from Transformers),语言表示模型BERT是一种预训练模型,可以理解为这是一个通用的NLU(Natural Language Understanding)模型,为不同的NLP(Natural Language Processing,自然语言处理)任务提供支持。在实际使用时,只需要根据具体任务额外加入一个输出层进行微调即可,而不用为特定任务来修改模型结构。
预训练 即提前已经给了一些初始化的参数,这个参数不是随机的,而是通过其他类似数据集上面学得的,然后再用具体的数据集进行学习,得到适合该数据集的参数,随机初始化不容易得到参数结果,但是不容易得到的这个参数结果是因为随机初始化的速度太慢,而不是最终的参数结果不一样。简单地说,预训练模型就是用某个较大的数据集训练好的模型,可以用这些预训练模型用到类似的数据集上进行模型微调,就比如本实施例中的语言表示模型BERT。
其中,该词向量模型配置的分词器与该语言表示模型配置的分词器相同。词向量模型配置的分词器与该语言表示模型配置的分词器相同使得后续步骤中第一字向量和第二字向量进行拼接时,能够对应的上。
拼接模块14,用于对该第一字向量和该第二字向量进行拼接,得到拼接后的字向量,该拼接后的字向量的维度为该第一字向量的维度与该第二字向量的维度之和。
为使得所述第一字向量和所述第二字向量在拼接的时候能够对应的上,所述文本分类装置100进一步包括:
配置模块,用于将所述语言表示模型BERT中的分词器tokenizer配置为所述词向量模型Word2vec中的分词器,所述词向量模型Word2vec与所述语言表示模型BERT使用相同的分词器tokenizer对所述文本语料进行处理。
tokenization 的主要思路就是相当于分词,把一个输入的文本依次按照以下步骤进行处理:
清洗:用于对文本进行第一步处理的类, 里面基本上都是预处理文本的方法,其中tokenize方法,返回的结果是经过处理的单词列表;
分词:对单词进行切分。例如如果单词长度超过200,就标记为unk,对单词切分时可以采用贪心算法进行。切分顺序是从后往前每次切1位,比如会把tokenization经过切分,变为[token,##ization],bert字典中也许并没有tokenization这个词),将text转换成了一个被分词后用于后续步骤。
在其中的一个实施例中,词向量模型Word2vec对文章进行分字处理部分使用语言表示模型BERT中的tokenizer,词向量模型Word2vec训练部分可以直接调用gensim库中的词(字)向量训练函数,训练维度可设置为100-300之间,如bert中的字向量维度为768,词向量模型Word2vec自训练的字向量维度为300,则拼接后的字向量维度为1068。
训练模块15,用于通过该拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型。
其中,该深度学习分类模型包括但不限于textCNN文本分类模型、LSTM(Long Short-Term Memory,长短期记忆网络)。
分类处理模块16,用于通过训练好的该深度学习分类模型对各主题下的待分类文本进行分类处理。
用于将待分类文本输入至该深度学习分类模型,即可得到该待分类文本所属的主题及该主题下所属的类型。
在其中的一个实施例中,该词向量模型配置的分词器与该语言表示模型配置的分词器相同。
在其中的一个实施例中,该样本获取模块11具体包括:
标注接收单元,用于接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
样本获取单元,用于根据该文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
其中,可以根据文本分类所属的主题,对该主题下的文本样本语料进行收集,例如:如果是微博情感分类,则先收集大量微博文本语料;如果是政府公文主题分类,则先爬取大量公开政府公文。
在其中的一个实施例中,该标注接收单元具体用于:
接收用户输入的对该文本样本语料的主题标注信息;
接收用户输入的对该文本样本语料的类型标注信息;
保存该文本样本语料的主题标注信息和该类型标注信息。
在其中一个实施例中,该文本分类装置100还包括:
嵌入层获取模块,用于获取该词向量模型的嵌入层。其中该词向量模型的嵌入层即embedding层;
模型搭建模块,用于通过深度学习分类模型框架在该词向量模型的嵌入层之上构建分类模型层,得到该深度学习分类模型。
其中,Word2vec中的embedding就是要从数据中自动学习到输入节点之间的相互关系,例如girl与woman之间的关系,并用向量表示。
本实施例提出的文本分类装置针对少量标注样本的文本分类方法,在少量样本的情况下,利用BERT预训练模型,获取丰富的预训练字向量信息,同时结合该领域下特有的文本训练而成的字向量信息,更加全面的对文本中的字进行向量表征,从而达到在少量样本情况下尽可能获取外部知识获得较高的文本分类精度的效果。相比传统分类方法能够更好的捕捉文本的语义信息,相比于经典深度学习方法可以减少网络参数,降低过拟合影响分类精度。
其中,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或模块的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或模块,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或模块,本申请中所出现的模块的划分,仅仅是一种逻辑上的划分,实际应用中实现时可以有另外的划分方式。
关于文本分类装置的具体限定可以参见上文中对于文本分类方法的限定,在此不再赘述。上述文本分类装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图6所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、易失性可读存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该计算机设备的网络接口用于与外部设备通过网络连接通信。该计算机可读指令被处理器执行时以实现一种文本分类方法。
在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机可读指令,处理器执行计算机可读指令时实现上述实施例中文本分类方法的步骤,例如图2所示的步骤101至步骤106及该方法的其它扩展和相关步骤的延伸。或者,处理器执行计算机可读指令时实现上述实施例中文本分类装置的各模块/单元的功能,例如图6所示模块11至模块16的功能。具体地,该处理器执行计算机可读指令时实现以下步骤:
获取携带有标注信息的各个主题下不同类型的文本样本语料;
通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
进一步地,该处理器执行所述计算机可读指令时还实现如下步骤:
接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
根据所述文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
进一步地,该处理器执行所述计算机可读指令时还实现如下步骤:
接收用户输入的对所述文本样本语料的主题标注信息;
接收用户输入的对所述文本样本语料的类型标注信息;
保存所述文本样本语料的主题标注信息和所述类型标注信息。
进一步地,该处理器执行所述计算机可读指令时还实现如下步骤:
获取所述词向量模型的嵌入层;
通过深度学习分类模型框架在所述词向量模型的嵌入层之上构建分类模型层,得到所述深度学习分类模型。
进一步地,该处理器执行所述计算机可读指令时还实现如下步骤:
将所述深度学习分类模型存储于区块链节点中。
进一步地,该词向量模型配置的分词器与所述语言表示模型配置的分词器相同。
所述处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等,所述处理器是所述计算机装置的控制中心,利用各种接口和线路连接整个计算机装置的各个部分。
所述存储器可用于存储所述计算机可读指令和/或模块,所述处理器通过运行或执行存储在所述存储器内的计算机可读指令和/或模块,以及调用存储在存储器内的数据,实现所述计算机装置的各种功能。所述存储器可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、视频数据等)等。
所述存储器可以集成在所述处理器中,也可以与所述处理器分开设置。
在一个实施例中,提供了一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读存储介质可以是非易失性,也可以是易失性,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行例如图2所示的步骤101至步骤106及该方法的其它扩展和相关步骤的延伸。或者,计算机可读指令被处理器执行时实现上述实施例中文本分类装置的各模块/单元的功能,例如图5所示模块11至模块16的功能。具体地,该计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
获取携带有标注信息的各个主题下不同类型的文本样本语料;
通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
进一步地,该计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
根据所述文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
进一步地,该计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
接收用户输入的对所述文本样本语料的主题标注信息;
接收用户输入的对所述文本样本语料的类型标注信息;
保存所述文本样本语料的主题标注信息和所述类型标注信息。
进一步地,该计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
获取所述词向量模型的嵌入层;
通过深度学习分类模型框架在所述词向量模型的嵌入层之上构建分类模型层,得到所述深度学习分类模型。
进一步地,该计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
将所述深度学习分类模型存储于区块链节点中。
进一步地,该词向量模型配置的分词器与所述语言表示模型配置的分词器相同。
本实施例提供一种文本分类方法方法、装置、计算机设备及存储介质,首先获取携带有标注信息的各个主题下不同类型的文本样本语料,对该文本样本语料通过词向量模型进行训练,得到第一字向量,再对该文本样本语料通过语言表示模型进行训练,得到第二字向量,然后对该第一字向量和该第二字向量进行拼接,得到拼接后的字向量,通过拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型,由于本申请中训练模型的向量具有更多的表示维度,使得依据本申请训练好的深度学习分类模型相比现有模型,具有更高的分类精度,通过本申请训练好的深度学习分类模型对各主题下的待分类文本进行分类处理,使得对文本进行分类的分类结果更加准确。
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成,所述的计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink) DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。
以上所述实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围,均应包含在本申请的保护范围之内

Claims (20)

  1. 一种文本分类方法,其中,所述方法包括:
    获取携带有标注信息的各个主题下不同类型的文本样本语料;
    通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
    通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
    对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
    通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
    通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
  2. 根据权利要求1所述的文本分类方法,其中,所述获取携带有标注信息的各个主题下不同类型的文本样本语料的步骤包括:
    接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
    根据所述文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
  3. 根据权利要求2所述的文本分类方法,其中,所述接收用户输入的对各个主题下不同类型的文本样本语料的标注信息的步骤包括:
    接收用户输入的对所述文本样本语料的主题标注信息;
    接收用户输入的对所述文本样本语料的类型标注信息;
    保存所述文本样本语料的主题标注信息和所述类型标注信息。
  4. 根据权利要求1所述的文本分类方法,其中,搭建所述深度学习分类模型的步骤包括:
    获取所述词向量模型的嵌入层;
    通过深度学习分类模型框架在所述词向量模型的嵌入层之上构建分类模型层,得到所述深度学习分类模型。
  5. 根据权利要求4所述的文本分类方法,其中,所述方法还包括:
    将所述深度学习分类模型存储于区块链节点中。
  6. 根据权利要求1至5任一项所述的文本分类方法,其中,所述词向量模型配置的分词器与所述语言表示模型配置的分词器相同。
  7. 一种文本分类装置,其中,所述装置包括:
    样本获取模块,用于获取携带有标注信息的各个主题下不同类型的文本样本语料;
    样本训练模块,用于通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
    样本分字模块,用于通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
    拼接模块,用于对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
    训练模块,用于通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
    分类处理模块,用于通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
  8. 根据权利要求7所述的文本分类装置,其中,所述样本获取模块具体包括:
    标注接收单元,用于接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
    样本获取单元,用于根据所述文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
  9. 一种计算机设备,包括存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机可读指令,其中,所述处理器执行所述计算机可读指令时实现如下步骤:
    获取携带有标注信息的各个主题下不同类型的文本样本语料;
    通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
    通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
    对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
    通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
    通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
  10. 根据权利要求11所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还实现如下步骤:
    接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
    根据所述文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
  11. 根据权利要求10所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还实现如下步骤:
    接收用户输入的对所述文本样本语料的主题标注信息;
    接收用户输入的对所述文本样本语料的类型标注信息;
    保存所述文本样本语料的主题标注信息和所述类型标注信息。
  12. 根据权利要求9所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还实现如下步骤:
    获取所述词向量模型的嵌入层;
    通过深度学习分类模型框架在所述词向量模型的嵌入层之上构建分类模型层,得到所述深度学习分类模型。
  13. 根据权利要求12所述的计算机设备,其中,所述处理器执行所述计算机可读指令时还实现如下步骤:
    将所述深度学习分类模型存储于区块链节点中。
  14. 根据权利要求9至13任一项所述的计算机设备,其中,所述词向量模型配置的分词器与所述语言表示模型配置的分词器相同。
  15. 一个或多个存储有计算机可读指令的可读存储介质,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器执行如下步骤:
    获取携带有标注信息的各个主题下不同类型的文本样本语料;
    通过词向量模型对包含有所述标注信息的所述文本样本语料进行词向量训练,得到第一字向量;
    通过语言表示模型对包含有所述标注信息的所述文本样本语料进行分字处理,得到第二字向量;
    对所述第一字向量和所述第二字向量进行拼接,得到拼接后的字向量,所述拼接后的字向量的维度为所述第一字向量的维度与所述第二字向量的维度之和;
    通过所述拼接后的字向量对预先搭建的深度学习分类模型进行训练,得到训练好的深度学习分类模型;
    通过训练好的所述深度学习分类模型对各主题下的待分类文本进行分类处理。
  16. 根据权利要求15所述的一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    接收用户输入的对各个主题下不同类型的文本样本语料的标注信息;
    根据所述文本样本语料所属的主题,获取各主题下不同类型的文本样本语料。
  17. 根据权利要求16所述的一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    接收用户输入的对所述文本样本语料的主题标注信息;
    接收用户输入的对所述文本样本语料的类型标注信息;
    保存所述文本样本语料的主题标注信息和所述类型标注信息。
  18. 根据权利要求15所述的一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    获取所述词向量模型的嵌入层;
    通过深度学习分类模型框架在所述词向量模型的嵌入层之上构建分类模型层,得到所述深度学习分类模型。
  19. 根据权利要求18所述的一个或多个存储有计算机可读指令的可读存储介质,其中,所述计算机可读指令被一个或多个处理器执行时,使得所述一个或多个处理器还执行如下步骤:
    将所述深度学习分类模型存储于区块链节点中。
  20. 根据权利要求15至19任一项所述的一个或多个存储有计算机可读指令的可读存储介质,其中,所述词向量模型配置的分词器与所述语言表示模型配置的分词器相同。
     
PCT/CN2020/117597 2020-06-19 2020-09-25 文本分类方法、装置、计算机设备及存储介质 WO2021135446A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010567353.5 2020-06-19
CN202010567353.5A CN111507099A (zh) 2020-06-19 2020-06-19 文本分类方法、装置、计算机设备及存储介质

Publications (1)

Publication Number Publication Date
WO2021135446A1 true WO2021135446A1 (zh) 2021-07-08

Family

ID=71865085

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/117597 WO2021135446A1 (zh) 2020-06-19 2020-09-25 文本分类方法、装置、计算机设备及存储介质

Country Status (2)

Country Link
CN (1) CN111507099A (zh)
WO (1) WO2021135446A1 (zh)

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113516196A (zh) * 2021-07-20 2021-10-19 云知声智能科技股份有限公司 命名实体识别数据增强的方法、装置、电子设备和介质
CN113591471A (zh) * 2021-08-20 2021-11-02 上海大参林医疗健康科技有限公司 一种基于字和词的语言特征提取装置及方法
CN113590822A (zh) * 2021-07-28 2021-11-02 北京百度网讯科技有限公司 文档标题的处理方法、装置、设备、存储介质及程序产品
CN113656587A (zh) * 2021-08-25 2021-11-16 北京百度网讯科技有限公司 文本分类方法、装置、电子设备及存储介质
CN113868419A (zh) * 2021-09-29 2021-12-31 中国平安财产保险股份有限公司 基于人工智能的文本分类方法、装置、设备及介质
CN114048288A (zh) * 2021-11-10 2022-02-15 北京明略软件系统有限公司 细粒度情感分析方法、系统、计算机设备和存储介质
CN114492669A (zh) * 2022-02-16 2022-05-13 平安科技(深圳)有限公司 关键词推荐模型训练方法、推荐方法和装置、设备、介质
CN114780719A (zh) * 2022-03-28 2022-07-22 京东城市(北京)数字科技有限公司 文本分类模型的训练方法、文本分类方法及装置
CN115730237A (zh) * 2022-11-28 2023-03-03 智慧眼科技股份有限公司 垃圾邮件检测方法、装置、计算机设备及存储介质
CN115934937A (zh) * 2022-11-29 2023-04-07 北京百度网讯科技有限公司 文本分类模型的训练方法、文本分类方法及装置
CN116564538A (zh) * 2023-07-05 2023-08-08 肇庆市高要区人民医院 一种基于大数据的医院就医信息实时查询方法及系统
CN116955628A (zh) * 2023-08-08 2023-10-27 武汉市万睿数字运营有限公司 一种投诉事件分类方法、装置、计算机设备及存储介质
CN117391076A (zh) * 2023-12-11 2024-01-12 东亚银行(中国)有限公司 敏感数据的识别模型的获取方法、装置、电子设备及介质
WO2024060066A1 (zh) * 2022-09-21 2024-03-28 京东方科技集团股份有限公司 一种文本识别方法、模型及电子设备

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111507099A (zh) * 2020-06-19 2020-08-07 平安科技(深圳)有限公司 文本分类方法、装置、计算机设备及存储介质
CN112084337B (zh) * 2020-09-17 2024-02-09 腾讯科技(深圳)有限公司 文本分类模型的训练方法、文本分类方法及设备
CN112528658B (zh) * 2020-12-24 2023-07-25 北京百度网讯科技有限公司 层次化分类方法、装置、电子设备和存储介质
CN112820412B (zh) * 2021-02-03 2024-03-08 东软集团股份有限公司 用户信息的处理方法、装置、存储介质和电子设备
CN112905794B (zh) * 2021-02-24 2023-01-06 珠海高凌信息科技股份有限公司 基于迁移学习的互联网垃圾信息检测方法及系统
CN113239190B (zh) * 2021-04-27 2024-02-20 天九共享网络科技集团有限公司 文档分类方法、装置、存储介质及电子设备
CN113282749A (zh) * 2021-05-20 2021-08-20 北京明略软件系统有限公司 一种会话情感分类方法、系统、电子设备及存储介质
CN113204698B (zh) * 2021-05-31 2023-12-26 平安科技(深圳)有限公司 新闻主题词生成方法、装置、设备及介质
CN115687577B (zh) * 2023-01-04 2023-04-07 交通运输部公路科学研究所 一种道路运输常态化问题诉求发现方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423284A (zh) * 2017-06-14 2017-12-01 中国科学院自动化研究所 融合中文单词内部结构信息的句子表示的构建方法及系统
CN108595416A (zh) * 2018-03-27 2018-09-28 义语智能科技(上海)有限公司 字符序列处理方法及设备
CN108829818A (zh) * 2018-06-12 2018-11-16 中国科学院计算技术研究所 一种文本分类方法
US20190095432A1 (en) * 2017-09-26 2019-03-28 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for building text classification model, and text classification method and apparatus
CN110580288A (zh) * 2019-08-23 2019-12-17 腾讯科技(深圳)有限公司 基于人工智能的文本分类方法和装置
CN111222327A (zh) * 2019-12-23 2020-06-02 东软集团股份有限公司 一种词嵌入表示方法、装置及设备
CN111507099A (zh) * 2020-06-19 2020-08-07 平安科技(深圳)有限公司 文本分类方法、装置、计算机设备及存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20180357531A1 (en) * 2015-11-27 2018-12-13 Devanathan GIRIDHARI Method for Text Classification and Feature Selection Using Class Vectors and the System Thereof
CN109697232B (zh) * 2018-12-28 2020-12-11 四川新网银行股份有限公司 一种基于深度学习的中文文本情感分析方法
CN110069632B (zh) * 2019-04-10 2022-06-07 华侨大学 一种集成浅层语义表示向量的深度学习文本分类方法
CN110334209B (zh) * 2019-05-23 2024-05-07 平安科技(深圳)有限公司 文本分类方法、装置、介质及电子设备

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107423284A (zh) * 2017-06-14 2017-12-01 中国科学院自动化研究所 融合中文单词内部结构信息的句子表示的构建方法及系统
US20190095432A1 (en) * 2017-09-26 2019-03-28 Baidu Online Network Technology (Beijing) Co., Ltd. Method and apparatus for building text classification model, and text classification method and apparatus
CN108595416A (zh) * 2018-03-27 2018-09-28 义语智能科技(上海)有限公司 字符序列处理方法及设备
CN108829818A (zh) * 2018-06-12 2018-11-16 中国科学院计算技术研究所 一种文本分类方法
CN110580288A (zh) * 2019-08-23 2019-12-17 腾讯科技(深圳)有限公司 基于人工智能的文本分类方法和装置
CN111222327A (zh) * 2019-12-23 2020-06-02 东软集团股份有限公司 一种词嵌入表示方法、装置及设备
CN111507099A (zh) * 2020-06-19 2020-08-07 平安科技(深圳)有限公司 文本分类方法、装置、计算机设备及存储介质

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113516196A (zh) * 2021-07-20 2021-10-19 云知声智能科技股份有限公司 命名实体识别数据增强的方法、装置、电子设备和介质
CN113516196B (zh) * 2021-07-20 2024-04-12 云知声智能科技股份有限公司 命名实体识别数据增强的方法、装置、电子设备和介质
CN113590822A (zh) * 2021-07-28 2021-11-02 北京百度网讯科技有限公司 文档标题的处理方法、装置、设备、存储介质及程序产品
CN113590822B (zh) * 2021-07-28 2023-08-08 北京百度网讯科技有限公司 文档标题的处理方法、装置、设备、存储介质及程序产品
CN113591471A (zh) * 2021-08-20 2021-11-02 上海大参林医疗健康科技有限公司 一种基于字和词的语言特征提取装置及方法
CN113656587B (zh) * 2021-08-25 2023-08-04 北京百度网讯科技有限公司 文本分类方法、装置、电子设备及存储介质
CN113656587A (zh) * 2021-08-25 2021-11-16 北京百度网讯科技有限公司 文本分类方法、装置、电子设备及存储介质
CN113868419A (zh) * 2021-09-29 2021-12-31 中国平安财产保险股份有限公司 基于人工智能的文本分类方法、装置、设备及介质
CN113868419B (zh) * 2021-09-29 2024-05-31 中国平安财产保险股份有限公司 基于人工智能的文本分类方法、装置、设备及介质
CN114048288A (zh) * 2021-11-10 2022-02-15 北京明略软件系统有限公司 细粒度情感分析方法、系统、计算机设备和存储介质
CN114492669A (zh) * 2022-02-16 2022-05-13 平安科技(深圳)有限公司 关键词推荐模型训练方法、推荐方法和装置、设备、介质
CN114780719A (zh) * 2022-03-28 2022-07-22 京东城市(北京)数字科技有限公司 文本分类模型的训练方法、文本分类方法及装置
WO2024060066A1 (zh) * 2022-09-21 2024-03-28 京东方科技集团股份有限公司 一种文本识别方法、模型及电子设备
CN115730237A (zh) * 2022-11-28 2023-03-03 智慧眼科技股份有限公司 垃圾邮件检测方法、装置、计算机设备及存储介质
CN115730237B (zh) * 2022-11-28 2024-04-23 智慧眼科技股份有限公司 垃圾邮件检测方法、装置、计算机设备及存储介质
CN115934937B (zh) * 2022-11-29 2024-01-23 北京百度网讯科技有限公司 文本分类模型的训练方法、文本分类方法及装置
CN115934937A (zh) * 2022-11-29 2023-04-07 北京百度网讯科技有限公司 文本分类模型的训练方法、文本分类方法及装置
CN116564538B (zh) * 2023-07-05 2023-12-19 肇庆市高要区人民医院 一种基于大数据的医院就医信息实时查询方法及系统
CN116564538A (zh) * 2023-07-05 2023-08-08 肇庆市高要区人民医院 一种基于大数据的医院就医信息实时查询方法及系统
CN116955628A (zh) * 2023-08-08 2023-10-27 武汉市万睿数字运营有限公司 一种投诉事件分类方法、装置、计算机设备及存储介质
CN116955628B (zh) * 2023-08-08 2024-05-03 武汉市万睿数字运营有限公司 一种投诉事件分类方法、装置、计算机设备及存储介质
CN117391076B (zh) * 2023-12-11 2024-02-27 东亚银行(中国)有限公司 敏感数据的识别模型的获取方法、装置、电子设备及介质
CN117391076A (zh) * 2023-12-11 2024-01-12 东亚银行(中国)有限公司 敏感数据的识别模型的获取方法、装置、电子设备及介质

Also Published As

Publication number Publication date
CN111507099A (zh) 2020-08-07

Similar Documents

Publication Publication Date Title
WO2021135446A1 (zh) 文本分类方法、装置、计算机设备及存储介质
CN110717017B (zh) 一种处理语料的方法
US11238232B2 (en) Written-modality prosody subsystem in a natural language understanding (NLU) framework
CN107153641B (zh) 评论信息确定方法、装置、服务器及存储介质
CN109255118B (zh) 一种关键词提取方法及装置
CN111274394B (zh) 一种实体关系的抽取方法、装置、设备及存储介质
CN111401077B (zh) 语言模型的处理方法、装置和计算机设备
CN104735468B (zh) 一种基于语义分析将图像合成新视频的方法及系统
WO2021000497A1 (zh) 检索方法、装置、计算机设备和存储介质
WO2021121198A1 (zh) 基于语义相似度的实体关系抽取方法、装置、设备及介质
CN108416032B (zh) 一种文本分类方法、装置及存储介质
CN111967264B (zh) 一种命名实体识别方法
DE102021000736A1 (de) Modellbasierte semantische Textsuche
CN114556328A (zh) 数据处理方法、装置、电子设备和存储介质
WO2023108991A1 (zh) 模型的训练方法、知识分类方法、装置、设备、介质
WO2021063089A1 (zh) 规则匹配方法、规则匹配装置、存储介质及电子设备
CN113688245B (zh) 基于人工智能的预训练语言模型的处理方法、装置及设备
WO2024036840A1 (zh) 基于主题增强的开放域对话回复方法及系统
WO2023005968A1 (zh) 文本类别识别方法、装置、电子设备和存储介质
WO2022073341A1 (zh) 基于语音语义的疾病实体匹配方法、装置及计算机设备
CN113919363A (zh) 基于人工智能的句向量生成模型的处理方法、装置及设备
WO2021134416A1 (zh) 文本转换方法、装置、计算机设备和计算机可读存储介质
JP7106647B2 (ja) 社会的感情および自然言語生成の量子重ね合せおよび量子もつれ
CN116821307A (zh) 内容交互方法、装置、电子设备和存储介质
CN113255368B (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: 20908475

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: 20908475

Country of ref document: EP

Kind code of ref document: A1