# US 10,482,118 B2 · Document representation for machine-learning document classification

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,482,118 B2
- Document ID: US10482118B2
- Status: Granted
- Kind: B2
- Application number: 15/623,071
- Filed: 2017-06-14
- Published: 2018-12-20
- Granted: 2019-11-19
- Earliest claimed: 2017-06-14
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Xin Zheng
- Web page: https://patentgrep.com/patent/US10482118B2

## CPC

- G06F 16/355: Creation or modification of classes or clusters
- G06F 16/358: Browsing; Visualisation therefor
- G06F 40/216: using statistical methods
- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 40/30: Semantic analysis
- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06N 20/00: Machine learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

Methods, systems, and computer-readable storage media for providing weighted vector representations of documents, with actions including receiving text data, the text data including a plurality of documents, each document including a plurality of words, processing the text data to provide a plurality of word-vectors, each word-vector being based on a respective word of the plurality of words, determining a plurality of similarity scores based on the plurality of word-vectors, each similarity score representing a degree of similarity between word-vectors, grouping words of the plurality of words into clusters based on the plurality of similarity scores, each cluster including two or more words of the plurality of words, and providing a document representation for each document in the plurality of documents, each document representation including a feature vector, each feature corresponding to a cluster.

## Claims

### Claim 1

A computer-implemented method for providing weighted vector representations of documents, the method being executed by one or more processors and comprising:
receiving, by the one or more processors, text data, the text data comprising a plurality of documents, each document comprising a plurality of words;
processing, by the one or more processors, the text data to provide a plurality of word-vectors, each word-vector being based on a respective word of the plurality of words;
determining, by the one or more processors, a plurality of similarity scores based on the plurality of word-vectors, each similarity score representing a degree of similarity between word-vectors;
grouping, by the one or more processors, words of the plurality of words into clusters based on the plurality of similarity scores, each cluster comprising two or more words of the plurality of words; and
providing, by the one or more processors, a document representation for each document in the plurality of documents, each document representation comprising a feature vector, each feature in the feature vector comprising a cluster, each feature having a weight assigned thereto that represents a relative importance of a respective cluster to a respective document based on weights of constituent words in the cluster, each weight being determined based on a sum of frequency values of words in the respective cluster of the respective document and a sum of document frequency values of words in the respective cluster of the respective document across the plurality of documents.

### Claim 2 (depends on 1)

The method of claim 1, wherein each feature of the document representation comprises a feature value based on the weight determined for a respective cluster.

### Claim 3 (depends on 2)

The method of claim 2, wherein the weight comprises a term frequency and inverse document frequency (TF-IDF) weight.

### Claim 4 (depends on 1)

The method of claim 1, wherein words are included in a cluster in response to determining that their respective word-vectors are sufficiently similar.

### Claim 5 (depends on 1)

The method of claim 1, wherein each similarity score of the plurality of similarity scores is determined as a cosine similarity score between multiple word-vectors.

### Claim 6 (depends on 1)

The method of claim 1, wherein processing the text data to provide a plurality of word-vectors comprises processing at least a portion of the text data using Word2vec.

### Claim 7 (depends on 1)

The method of claim 1, further comprising providing the document representations to a document classification system for one or more of natural language processing (NLP) and information retrieval (IR) based on the document representations.

### Claim 8

A non-transitory computer-readable storage medium coupled to one or more processors and having instructions stored thereon which, when executed by the one or more processors, cause the one or more processors to perform operations for providing weighted vector representations of documents, the operations comprising:
receiving text data, the text data comprising a plurality of documents, each document comprising a plurality of words;
processing the text data to provide a plurality of word-vectors, each word-vector being based on a respective word of the plurality of words;
determining a plurality of similarity scores based on the plurality of word-vectors, each similarity score representing a degree of similarity between word-vectors;
grouping words of the plurality of words into clusters based on the plurality of similarity scores, each cluster comprising two or more words of the plurality of words; and
providing a document representation for each document in the plurality of documents, each feature in the feature vector comprising a cluster, each feature having a weight assigned thereto that represents a relative importance of a respective cluster to a respective document based on weights of constituent words in the cluster, each weight being determined based on a sum of frequency values of words in the respective cluster of the respective document and a sum of document frequency values of words in the respective cluster of the respective document across the plurality of documents.

### Claim 9 (depends on 8)

The computer-readable storage medium of claim 8, wherein each feature of the document representation comprises a feature value based on the weight determined for a respective cluster.

### Claim 10 (depends on 9)

The computer-readable storage medium of claim 9, wherein the weight comprises a term frequency and inverse document frequency (TF-IDF) weight.

### Claim 11 (depends on 8)

The computer-readable storage medium of claim 8, wherein words are included in a cluster in response to determining that their respective word-vectors are sufficiently similar.

### Claim 12 (depends on 8)

The computer-readable storage medium of claim 8, wherein each similarity score of the plurality of similarity scores is determined as a cosine similarity score between multiple word-vectors.

### Claim 13 (depends on 8)

The computer-readable storage medium of claim 8, wherein processing the text data to provide a plurality of word-vectors comprises processing at least a portion of the text data using Word2vec.

### Claim 14 (depends on 8)

The computer-readable storage medium of claim 8, wherein operations further comprise providing the document representations to a document classification system for one or more of natural language processing (NLP) and information retrieval (IR) based on the document representations.

### Claim 15

A system, comprising:
a computing device; and
a computer-readable storage device coupled to the computing device and having instructions stored thereon which, when executed by the computing device, cause the computing device to perform operations for unsupervised aspect extraction from raw data, the operations comprising:
a receiving text data, the text data comprising a plurality of documents, each document comprising a plurality of words;
processing the text data to provide a plurality of word-vectors, each word-vector being based on a respective word of the plurality of words;
determining a plurality of similarity scores based on the plurality of word-vectors, each similarity score representing a degree of similarity between word-vectors;
grouping words of the plurality of words into clusters based on the plurality of similarity scores, each cluster comprising two or more words of the plurality of words; and
providing a document representation for each document in the plurality of documents, each feature in the feature vector comprising a cluster, each feature having a weight assigned thereto that represents a relative importance of a respective cluster to a respective document based on weights of constituent words in the cluster, each weight being determined based on a sum of frequency values of words in the respective cluster of the respective document and a sum of document frequency values of words in the respective cluster of the respective document across the plurality of documents.

### Claim 16 (depends on 15)

The system of claim 15, wherein each feature of the document representation comprises a feature value based on the weight determined for a respective cluster.

### Claim 17 (depends on 16)

The system of claim 16, wherein the weight comprises a term frequency and inverse document frequency (TF-IDF) weight.

### Claim 18 (depends on 15)

The system of claim 15, wherein words are included in a cluster in response to determining that their respective word-vectors are sufficiently similar.

### Claim 19 (depends on 15)

The system of claim 15, wherein each similarity score of the plurality of similarity scores is determined as a cosine similarity score between multiple word-vectors.

### Claim 20 (depends on 15)

The system of claim 15, wherein processing the text data to provide a plurality of word-vectors comprises processing at least a portion of the text data using Word2vec.
