# US 2021/0286954 A1 · Apparatus and Method for Applying Image Encoding Recognition in Natural Language Processing

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

- Number: US 2021/0286954 A1
- Document ID: US20210286954A1
- Status: Published application
- Kind: A1
- Application number: 16/820,667
- Filed: 2020-03-16
- Published: 2021-09-16
- Earliest claimed: 2020-03-16
- Assignees: Hong Kong Applied Science and Technology Research Institute Company Limited
- Applicants: Hong Kong Applied Science and Technology Research Institute Company Limited
- Inventors: Yu Keung NG; Yang LIU; Zhi Bin LEI
- Web page: https://patentgrep.com/patent/US20210286954A1

## CPC

- G06F 40/56: Natural language generation
- G06F 40/30: Semantic analysis
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/0464: Convolutional networks [CNN, ConvNet]
- G06N 3/08: Learning methods
- G06N 3/09: Supervised learning
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/045: Combinations of networks
- G06N 3/048: Activation functions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A method for applying image encoding recognition in the execution of natural language processing (NLP) tasks, comprising the processing steps as follows. A sentence from a textual source is extracted by an NLP-based feature extractor. A word vector is generated in response to the sentence by the NLP-based feature extractor. The word vector is converted into a feature vector {right arrow over (b)} by the NLP-based feature extractor, in which the feature vector {right arrow over (b)} satisfies {right arrow over (b)}∈m and the parameter m is a positive integer. The feature vector is transformed into an image set having a plurality of two-dimensional images by a transformer. The image set is fed to a neural network to execute image recognition by a processor, so as to analyze the sentence.

## Claims

### Claim 1

A method for applying image encoding recognition to natural language processing (NLP), comprising:
extracting a sentence from a textual source by an NLP-based feature extractor;
generating a word vector in response to the sentence by the NLP-based feature extractor;
converting the word vector into a feature vector {right arrow over (b)} by the NLP-based feature extractor, wherein the feature vector {right arrow over (b)} satisfies {right arrow over (b)}∈m and the parameter m is a positive integer;
transforming the feature vector {right arrow over (b)} into an image set having a plurality of two-dimensional images by a transformer; and
inputting the image set into a neural network to perform image recognition on the image set by a processor to generate an analytical result of the sentence.

### Claim 2 (depends on 1)

The method of claim 1, wherein the transformation of the feature vector {right arrow over (b)} into the image set comprises:
generating a set of transform vectors {{right arrow over (d)}i}i=1q, wherein {right arrow over (d)}i∈n, wherein the parameter i is a positive integer, the parameter n is a positive integer, and the parameter q represents the number of channels for the images; and
computing I=[{right arrow over (b)}{right arrow over (d)}1T, {right arrow over (b)}{right arrow over (d)}2T, . . . , {right arrow over (b)}{right arrow over (d)}qT] to obtain the image set I, wherein I∈q×m×n.

### Claim 3 (depends on 2)

The method of claim 2, wherein any two of the transform vectors are orthogonal to each other.

### Claim 4 (depends on 2)

The method of claim 2, wherein the parameter q is dependent of a selected language and is set the same as the number of parts of speech of the selected language.

### Claim 5 (depends on 2)

The method of claim 2, further comprising:
modifying resolutions of the images by a modifier by varying at least one of the parameters m and n, wherein the inputting of the image set into the neural network to execute the image recognition is performed after the modifying the resolution of the images.

### Claim 6 (depends on 5)

The method of claim 5, wherein the modifying the resolution of the images comprises:
up-sampling each of the images by the modifier, such that the image set I becomes an up-sampled image set I′ that satisfies I′∈q×m×t, wherein the parameter t is a positive integer equal to or greater than the parameter n.

### Claim 7 (depends on 6)

The method of claim 6, wherein the modifying the resolution of the images comprises:
after the up-sampling, performing feature enhancement to the images by the modifier, such that the up-sampled image set I′ becomes a feature-enhanced image set I″ that satisfies I″∈q×r×s, wherein the parameter r is a positive integer different from the parameter m, and the parameter s is a positive integer different from the parameters n and t.

### Claim 8 (depends on 1)

The method of claim 1, wherein the sentence is analyzed such that polarity of the sentence is classified to be either positive or negative.

### Claim 9 (depends on 8)

The method of claim 8, further comprising:
displaying a classified result by a displayer to show the polarity of the sentence is positive or negative.

### Claim 10 (depends on 8)

The method of claim 8, further comprising:
linking to the textual source storing a plurality of different comments by a director, so as to input the comments into the NLP-based feature extractor.

### Claim 11

An apparatus for applying image encoding recognition to natural language processing (NLP), comprising:
an NLP-based feature extractor configured to extract a sentence from a textual source, configured to generate a word vector in response to the sentence, and configured to convert the word vector into a feature vector {right arrow over (b)}, wherein the feature vector {right arrow over (b)} satisfies {right arrow over (b)}∈m and the parameter m is a positive integer;
a transformer configured to transform the feature vector {right arrow over (b)} into an image set having a plurality of two-dimensional images; and
a processor configured to input the image set into a neural network to perform image recognition on the image set to generate an analytical result of the sentence.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein the transformer is further configured to generate a set of transform vectors {{right arrow over (d)}i}i=1q, wherein {right arrow over (d)}i∈n, the parameter i is a positive integer, the parameter n is a positive integer, and the parameter q represents the number of channels for the images, wherein the transformer is further configured to compute I=[{right arrow over (b)}{right arrow over (d)}1T, {right arrow over (b)}{right arrow over (d)}2T, . . . , {right arrow over (b)}{right arrow over (d)}qT] to obtain the image set I, wherein I∈q×m×n.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein any two of the transform vectors are orthogonal to each other.

### Claim 14 (depends on 12)

The apparatus of claim 12, wherein the parameter q is dependent of a selected language and is set the same as the number of parts of speech of the selected language.

### Claim 15 (depends on 12)

The apparatus of claim 12, further comprising:
a modifier configured to modify resolution of the images by varying at least one of the parameters m and n.

### Claim 16 (depends on 15)

The apparatus of claim 15, wherein the modifier is further configured to up-sample each of the images such that the image set I becomes an up-sampled image set I′ that satisfies I′∈q×m×t, and the parameter t is a positive integer equal to or greater than the parameter n.

### Claim 17 (depends on 16)

The apparatus of claim 16, wherein the modifier is further configured to perform a feature enhancement to the images, such that the up-sampled image set I′ becomes a feature-enhanced image set I″ that satisfies I″∈q×r×s, the parameter r is a positive integer different from the parameter m, and the parameter s is a positive integer different from the parameters n and t.

### Claim 18 (depends on 11)

The apparatus of claim 11, wherein the processor is further configured to analyze the sentence such that polarity of the sentence is classified to be either positive or negative.

### Claim 19 (depends on 18)

The apparatus of claim 18, further comprising:
a displayer configured to display a classified result to show the polarity of the sentence is positive or negative.

### Claim 20 (depends on 18)

The apparatus of claim 18, further comprising:
a director configured to link to the textual source storing a plurality of different comments, so as to input the comments into the NLP-based feature extractor.
