# US 2023/0267283 A1 · System and method for automatic text anomaly detection

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

- Number: US 2023/0267283 A1
- Document ID: US20230267283A1
- Status: Published application
- Kind: A1
- Application number: 18/171,684
- Filed: 2023-02-21
- Published: 2023-08-24
- Earliest claimed: 2022-02-24
- Assignees: Contilt Ltd.
- Applicants: Contilt Ltd.
- Inventors: Adi OMARI; Obaida ABU ALHIJA
- Web page: https://patentgrep.com/patent/US20230267283A1

## CPC

- G06F 40/253: Grammatical analysis; Style critique
- G06F 40/51: Translation evaluation
- G06F 40/216: using statistical methods
- G06F 40/30: Semantic analysis
- G06F 40/47: Machine-assisted translation, e.g. using translation memory
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A system and method for detecting anomalies in an analyzed text may include providing features of basic elements to a descriptive language model to obtain predicted features of an examined basic element, wherein the basic elements come immediately before and/or after the examined basic element in the analyzed text, wherein the descriptive language model is trained to predict features of the examined basic element based on the features of the basic elements; and comparing the predicted features to real features of the examined basic element to detect an anomaly in the examined basic element.

## Claims

### Claim 1

A method for detecting anomalies in an analyzed text, the method comprising, using a processor:
providing features of basic elements to a descriptive language model to obtain predicted features of an examined basic element, wherein the basic elements come immediately before and/or after the examined basic element in the analyzed text, wherein the descriptive language model is trained to predict features of the examined basic element based on the features of the basic elements; and
comparing the predicted features to real features of the examined basic element to detect an anomaly in the examined basic element.

### Claim 2 (depends on 1)

The method of claim 1, comprising extracting the features of the basic elements.

### Claim 3 (depends on 1)

The method of claim 1, comprising training the descriptive language model using a self-supervised training dataset.

### Claim 4 (depends on 1)

The method of claim 1, comprising training the descriptive language model by:
obtaining a training text in a same language as the analyzed text, wherein the training text includes a plurality of training basic elements;
extracting features of an investigated training basic element of the plurality of training basic elements and of training basic elements that come immediately before and/or after the investigated training basic element in the training text;
providing the features of the training basic elements that come immediately before and/or after the investigated training basic element to the descriptive language model to generate predicted features of the investigated training basic element;
comparing the extracted features of the investigated training basic element with the predicted features of the investigated training basic element; and
adjusting the weights of the descriptive language model based on the comparison.

### Claim 5 (depends on 1)

The method of claim 1, wherein the descriptive language model is a neural network.

### Claim 6 (depends on 5)

The method of claim 5, wherein comparing the predicted features to the real features is performed by a second neural network.

### Claim 7 (depends on 6)

The method of claim 6, comprising generating a training dataset to the second neural network by:
obtaining a training text in a same language as the analyzed text, wherein the training text includes a plurality of training basic elements;
automatically labeling each of the training basic elements, together with the training basic elements coming immediately before and/or after the basic element, as being a true sample;
inserting a mistake to at least one selected basic element; and
labeling the at least one selected basic element, together with the training basic elements coming immediately before and/or after the selected basic element, as a false sample.

### Claim 8 (depends on 7)

The method of claim 7, comprising training the second neural network by:
extracting features of an investigated training basic element of the plurality of training basic elements and of training basic elements that come immediately before and/or after the investigated training basic element in the training text;
providing the features of the training basic elements that come immediately before and/or after the investigated training basic element to the descriptive language model to generate predicted features of the investigated training basic element;
providing the predicted features and the extracted features of the investigated training basic element to the second neural network to generate predicted score of the investigated training basic element;
comparing the predicted score with the label of the investigated training basic element; and
adjusting the weights of the second neural network based on the comparison.

### Claim 9 (depends on 1)

The method of claim 1, comprising:
providing a second type of features of the linguistical basic elements, to a second descriptive language model, wherein the other descriptive language model is trained to predict the second type of features of the linguistical basic element based on the second type features of the linguistical basic elements;
comparing the predicted second type of features to a real second type of features of the examined basic element; and
unifying the results of the comparisons to detect an anomaly in the examined basic element.

### Claim 10

A system for providing localization, the system comprising:
a memory; and
a processor configured to:
provide features of basic elements to a descriptive language model to obtain predicted features of an examined basic element, wherein the basic elements come immediately before and/or after the examined basic element in the analyzed text, wherein the descriptive language model is trained to predict features of the examined basic element based on the features of the basic elements; and
compare the predicted features to real features of the examined basic element to detect an anomaly in the examined basic element.

### Claim 11 (depends on 10)

The system of claim 10, wherein the processor is configured to extract the features of the basic elements.

### Claim 12 (depends on 10)

The system of claim 10, wherein the processor is configured to train the descriptive language model using a self-supervised training dataset.

### Claim 13 (depends on 10)

The system of claim 10, wherein the processor is configured to train the descriptive language model by:
obtaining a training text in a same language as the analyzed text, wherein the training text includes a plurality of training basic elements;
extracting features of an investigated training basic element of the plurality of training basic elements and of training basic elements that come immediately before and/or after the investigated training basic element in the training text;
providing the features of the training basic elements that come immediately before and/or after the investigated training basic element to the descriptive language model to generate predicted features of the investigated training basic element;
comparing the extracted features of the investigated training basic element with the predicted features of the investigated training basic element; and
adjusting the weights of the descriptive language model based on the comparison.

### Claim 14 (depends on 10)

The system of claim 10, wherein the descriptive language model is a neural network.

### Claim 15 (depends on 14)

The system of claim 14, wherein the processor is configured to compare the predicted features to the real features by a second neural network.

### Claim 16 (depends on 15)

The system of claim 15, wherein the processor is configured to generate a training dataset to the second neural network by:
obtaining a training text in a same language as the analyzed text, wherein the training text includes a plurality of training basic elements;
automatically labeling each of the training basic elements, together with the training basic elements coming immediately before and/or after the basic element, as being a true sample;
inserting a mistake to at least one selected basic element; and
labeling the at least one selected basic element, together with the training basic elements coming immediately before and/or after the selected basic element, as a false sample.

### Claim 17 (depends on 16)

The system of claim 16, wherein the processor is configured to train the second neural network by:
extracting features of an investigated training basic element of the plurality of training basic elements and of training basic elements that come immediately before and/or after the investigated training basic element in the training text;
providing the features of the training basic elements that come immediately before and/or after the investigated training basic element to the descriptive language model to generate predicted features of the investigated training basic element;
providing the predicted features and the extracted features of the investigated training basic element to the second neural network to generate predicted score of the investigated training basic element;
comparing the predicted score with the label of the investigated training basic element; and
adjusting the weights of the second neural network based on the comparison.

### Claim 18 (depends on 10)

The system of claim 10, wherein the processor is configured to:
provide a second type of features of the linguistical basic elements, to a second descriptive language model, wherein the other descriptive language model is trained to predict the second type of features of the linguistical basic element based on the second type features of the linguistical basic elements;
compare the predicted second type of features to a real second type of features of the examined basic element; and
unify the results of the comparisons to detect an anomaly in the examined basic element.
