Event clustering and classification with document embedding
AssigneeInternational Business Machines Corporation
InventorsFeng Cao, Boliang Chen, Zheng Yu
Life of this patent
Estimating the term…
Abstract
Embedding representation for a document is generated based on clustering words in the document. Representative clusters are selected and a weighted sum of the embeddings of the words in the selected clusters is determined as a document embedding. Documents are labeled based on document embeddings. A machine learning algorithm is trained using the documents. The machine learning algorithm predicts a label of a given document based on the given document's document embedding.
Claims20
A method of training a machine to learn to predict a label for data, the method performed by at least one hardware processor, comprising:
- receiving a document;
- creating clusters of words in the document based on cosine similarity of word embeddings of words in the document;
- responsive to determining that the document has a title, determining a cosine similarity between word embeddings of words in a cluster and word embeddings of words in the title and based on the determined cosine similarity, ranking the clusters;
- responsive to determining that the document has no title, ranking the clusters based on compactness of a cluster indicating how closely related the words in the cluster are and a semantic distance of the cluster from other clusters;
- selecting a top-k number of the ranked clusters;
- determining a document embedding as a weighted sum of word embeddings of words in the top-k number of ranked clusters,
- wherein the receiving, the creating, the ranking, the selecting, and the determining of the document embedding are performed for multiple documents;
- labeling each of the multiple documents;
- and
- training a machine learning algorithm based on the multiple documents that are labeled, wherein the training comprises separating the multiple documents as a training set and a test set, and generating a machine learning model that predicts a label for a given document based on the training set and the test set.
A computer readable storage medium storing a program of instructions executable by a machine to perform a method of training a machine to learn to predict a label for data, the method performed by at least one hardware processor, the method comprising:
- receiving a document;
- creating clusters of words in the document based on cosine similarity of word embeddings of words in the document;
- responsive to determining that the document has a title, determining a cosine similarity between word embeddings of words in a cluster and word embeddings of words in the title and based on the determined cosine similarity, ranking the clusters;
- responsive to determining that the document has no title, ranking the clusters based on compactness of a cluster indicating how closely related the words in the cluster are and a semantic distance of the cluster from other clusters;
- selecting a top-k number of the ranked clusters;
- determining a document embedding as a weighted sum of word embeddings of words in the top-k number of ranked clusters,
- wherein the receiving, the creating, the ranking, the selecting, and the determining of the document embedding are performed for multiple documents;
- labeling each of the multiple documents;
- and
- training a machine learning algorithm based on the multiple documents that are labeled, wherein the training comprises separating the multiple documents as a training set and a test set, and generating a machine learning model that predicts a label for a given document based on the training set and the test set.
A system of training a machine to learn to predict a label for data, comprising:
- a storage device;
- and
- a hardware processor coupled to the storage device,
- the hardware processor operable to receive a document;
- the hardware processor further operable to create clusters of words in the document based on cosine similarity of word embeddings of words in the document;
- the hardware processor further operable to, responsive to determining that the document has a title, determine a cosine similarity between word embeddings of words in a cluster and word embeddings of words in the title and based on the determined cosine similarity, rank the clusters;
- the hardware processor further operable to, responsive to determining that the document has no title, rank the clusters based on compactness of a cluster indicating how closely related the words in the cluster are and a semantic distance of the cluster from other clusters;
- the hardware processor further operable to select a top-k number of the ranked clusters;
- the hardware processor further operable to determine a document embedding as a weighted sum of word embeddings of words in the top-k number of ranked clusters, wherein the hardware processor determines document embeddings for multiple documents and stores the multiple documents with document embeddings in the storage device;
- the hardware processor further operable to label each of the multiple documents;
- and
- the hardware processor further operable to generate a machine learning model that predicts a label for a given document by training the machine learning model based on the multiple documents separated into the training set and the test set.
Dependencies are inferred from the claim text.