# US 2017/0286376 A1 · Checking Grammar Using an Encoder and Decoder

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

- Number: US 2017/0286376 A1
- Document ID: US20170286376A1
- Status: Published application
- Kind: A1
- Application number: 15/086,056
- Filed: 2016-03-31
- Published: 2017-10-05
- Earliest claimed: 2016-03-31
- Inventors: Jonathan Mugan
- Web page: https://patentgrep.com/patent/US20170286376A1

## CPC

- G06F 40/194: Calculation of difference between files
- G06F 40/253: Grammatical analysis; Style critique
- G06F 40/51: Translation evaluation
- G06N 3/044: Recurrent networks, e.g. Hopfield networks
- G06N 3/0442: characterised by memory or gating, e.g. long short-term memory [LSTM] or gated recurrent units [GRU]
- G06N 3/045: Combinations of networks
- G06N 3/0455: Auto-encoder networks; Encoder-decoder networks
- G06N 3/084: Backpropagation, e.g. using gradient descent
- G06N 3/0895: Weakly supervised learning, e.g. semi-supervised or self-supervised learning
- G06N 3/09: Supervised learning
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

The present invention is a method and apparatus, including computer programs encoded on computer storage media, for checking grammar in text. An edit generator and edit scorer are provided. The edit generator creates edited versions of the text that are scored by the edit scorer. The edit scorer provides an encoder and a decoder. The encoder converts the text into an abstract representation that is used by the decoder to score edited versions of the text. The invention can also be used as a thesaurus and idiom finder, generating alternatives to words and phrases, and scoring their viability. The invention can also correct text in queries for items.

## Claims

### Claim 1

An apparatus for checking grammar in text, comprising a processor or processors, a memory, and an application code, and further comprising:
an edit generator for generating edited versions of the text;
an edit scorer for scoring said edited versions for correctness, further comprising
an encoder comprising one or more parametric functions that converts the text into an abstract representation;
a decoder comprising one or more parametric functions that takes said abstract representation and computes the translation cost of translating the abstract representation into each of the edited versions of the text.

### Claim 2 (depends on 1)

The apparatus of claim 1 wherein the edit scorer combines translation cost with text similarity.

### Claim 3 (depends on 1)

The apparatus of claim 1 wherein the decoder uses a document context abstract representation.

### Claim 4 (depends on 1)

The apparatus of claim 1 wherein the encoder converts phrases to symbols.

### Claim 5 (depends on 1)

The apparatus of claim 1 wherein the encoder and the decoder are trained using data in which words have been replaced by similar words.

### Claim 6 (depends on 1)

The apparatus of claim 1 wherein the encoder and decoder are trained using data in which common words are inserted.

### Claim 7 (depends on 1)

The apparatus of claim 1 wherein the edit scorer uses a parser.

### Claim 8 (depends on 1)

The apparatus of claim 1 wherein the edit scorer uses a language model.

### Claim 9 (depends on 1)

The apparatus of claim 1 further comprising a mechanism for showing edited versions to the user that receives a parameter from the user that influences which edited versions to show.

### Claim 10 (depends on 1)

The apparatus of claim 1 wherein the edit generator employs special pre-specified corrections.

### Claim 11 (depends on 1)

The apparatus of claim 1 wherein the text is queries for items and the edit generator creates alternative queries, means for better queries.

### Claim 12

A method for generating word replacements in a text, the method comprising:
encoding said text into an abstract representation;
decoding said abstract representation into words that could replace each word.

### Claim 13 (depends on 12)

The method of claim 12, wherein
the set of symbols in a vocabulary includes multi-word idioms.

### Claim 14

A method for checking grammar in a text, the method comprising:
generating a plurality of edited versions of the text;
scoring said edited versions by
encoding the text into an abstract representation; and
computing a translation cost for each of said edited versions by decoding said abstract representation into each of said edited versions.

### Claim 15 (depends on 14)

The method of claim 14 wherein the scoring of edited versions combines translation cost with sentence similarity.

### Claim 16 (depends on 14)

The method of claim 14 wherein the scoring of edited versions uses a document context abstract representation.

### Claim 17 (depends on 14)

The method of claim 14 wherein the scoring of edited versions uses a parser.

### Claim 18 (depends on 14)

The method of claim 14 wherein the scoring of edited versions uses a language model.

### Claim 19 (depends on 14)

The method of claim 14 wherein the edited versions are generated using special pre-specified corrections.

### Claim 20 (depends on 14)

The method of claim 14 wherein the transaction cost is computed by decoding some or all edited versions to themselves.
