# US 2024/0202447 A1 · Generating semantic triplets from unstructured text

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

- Number: US 2024/0202447 A1
- Document ID: US20240202447A1
- Status: Published application
- Kind: A1
- Application number: 18/080,872
- Filed: 2022-12-14
- Published: 2024-06-20
- Earliest claimed: 2022-12-14
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Gaetano Rossiello; Alfio Massimiliano Gliozzo; NANDANA SAMPATH MIHINDUKULASOORIYA; Faisal Mahbub Chowdhury; Michael Robert Glass
- Web page: https://patentgrep.com/patent/US20240202447A1

## CPC

- G06F 40/295: Named entity recognition
- G06F 16/3344: {using natural language analysis}
- G06F 40/103: Formatting, i.e. changing of presentation of documents (automatic justification G06F40/189; automatic line break hyphenation G06F40/191)
- G06F 40/126: Character encoding
- G06F 40/30: Semantic analysis
- G06F 40/40: Processing or translation of natural language (natural language analysis G06F40/20; semantic analysis G06F40/30)
- G06N 3/045: Combinations of networks
- G06N 5/02: Knowledge representation; Symbolic representation
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

An embodiment includes generating a training dataset by aligning text from a document of a document database with a named entity from a knowledge base. The embodiment generates an enhanced training dataset by updating the training dataset to include a named entity type and a named entity label associated with the named entity. The embodiment trains a natural language processing (NLP) model using the enhanced training dataset resulting in a trained NLP model. The embodiment identifies, using the trained NLP model, the named entity in a block of unstructured text and generates, using the trained NLP model, a target sequence that includes a relationship between the named entity and a tail entity, as well as the named entity type and the named entity label of the named entity and a tail entity type and a tail entity label of the tail entity.

## Claims

### Claim 1

A computer-implemented method comprising:
generating a training dataset by aligning text from a document of a document database with a named entity from a knowledge base;
generating an enhanced training dataset by updating the training dataset to include a named entity type and a named entity label associated with the named entity;
training a natural language processing (NLP) model using the enhanced training dataset resulting in a trained NLP model;
identifying, using the trained NLP model, the named entity in a block of unstructured text;
generating, using the trained NLP model, a target sequence that includes a relationship between the named entity and a tail entity, wherein the target sequence includes the named entity type and the named entity label of the named entity and includes a tail entity type and a tail entity label of the tail entity.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, further comprising:
validating the target sequence using a classifier model that analyzes the relationship and outputs an indication of an accuracy of the relationship.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, further comprising:
validating the target sequence by:
translating the target sequence into a natural language statement;
issuing a query to the document database, wherein the query comprises the natural language statement; and
generating, responsive to receiving a query result from the document database in response to the query, a validation result based on a comparison of the natural language statement to the query result.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, wherein the generating of the training dataset comprises using a distance supervision technique that automatically aligns text from documents of the document database with pairs of entities from the knowledge base, wherein each pair of entities comprises a named entity and a tail entity.

### Claim 5 (depends on 4)

The computer-implemented method of claim 4, wherein the distance supervision technique automatically aligns text from documents of the document database with semantic triplets from the knowledge base, wherein the semantic triplets include named entities as subject entities and object entities of the semantic triplets.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the generating of the enhanced training dataset comprises using a distance supervision technique that automatically updates the training dataset to include the named entity type and the named entity label.

### Claim 7 (depends on 6)

The computer-implemented method of claim 6, wherein the distance supervision technique automatically updates the training dataset by querying the knowledge base for the named entity, retrieving the named entity type and the named entity label from the knowledge base, and associating the named entity type and the named entity label with the named entity.

### Claim 8 (depends on 7)

The computer-implemented method of claim 7, wherein the block of unstructured text is a sentence, and wherein the method further comprises extracting the sentence from the unstructured text.

### Claim 9 (depends on 1)

The computer-implemented method of claim 1, wherein the NLP model comprises a sequence-to-sequence model comprising an encoder and a decoder.

### Claim 10 (depends on 9)

The computer-implemented method of claim 9, wherein the generating of the target sequence comprises:
generating, using the encoder, a numeric representation of a word from the block of unstructured text; and
generating, using the decoder, the target sequence as a prediction of the relationship based at least in part on the numeric representation of the word.

### Claim 11 (depends on 10)

The computer-implemented method of claim 10, wherein the generating of the target sequence by the decoder comprises formatting the target sequence according to a predefined schema that specifies an arrangement of the target sequence.

### Claim 12 (depends on 11)

The computer-implemented method of claim 11, wherein the predefined schema specifies the arrangement to include the named entity, followed by the named entity type, followed by the named entity label, followed by the relationship, followed by the tail entity, followed by the tail entity type, and followed by the tail entity label.

### Claim 13

A computer program product comprising one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by a processor to cause the processor to perform operations comprising:
generating a training dataset by aligning text from a document of a document database with a named entity from a knowledge base;
generating an enhanced training dataset by updating the training dataset to include a named entity type and a named entity label associated with the named entity;
training a natural language processing (NLP) model using the enhanced training dataset resulting in a trained NLP model;
identifying, using the trained NLP model, the named entity in a block of unstructured text;
generating, using the trained NLP model, a target sequence that includes a relationship between the named entity and a tail entity, wherein the target sequence includes the named entity type and the named entity label of the named entity and includes a tail entity type and a tail entity label of the tail entity.

### Claim 14 (depends on 13)

The computer program product of claim 13, wherein the stored program instructions are stored in a computer readable storage device in a data processing system, and wherein the stored program instructions are transferred over a network from a remote data processing system.

### Claim 15 (depends on 13)

The computer program product of claim 13, wherein the stored program instructions are stored in a computer readable storage device in a server data processing system, and wherein the stored program instructions are downloaded in response to a request over a network to a remote data processing system for use in a computer readable storage device associated with the remote data processing system, further comprising:
program instructions to meter use of the program instructions associated with the request; and
program instructions to generate an invoice based on the metered use.

### Claim 16 (depends on 13)

The computer program product of claim 13, wherein the generating of the enhanced training dataset comprises using a distance supervision technique that automatically updates the training dataset to include the named entity type and the named entity label.

### Claim 17 (depends on 16)

The computer program product of claim 16, wherein the distance supervision technique automatically updates the training dataset by querying the knowledge base for the named entity, retrieving the named entity type and the named entity label from the knowledge base, and associating the named entity type and the named entity label with the named entity.

### Claim 18

A computer system comprising a processor and one or more computer readable storage media, and program instructions collectively stored on the one or more computer readable storage media, the program instructions executable by the processor to cause the processor to perform operations comprising:
generating a training dataset by aligning text from a document of a document database with a named entity from a knowledge base;
generating an enhanced training dataset by updating the training dataset to include a named entity type and a named entity label associated with the named entity;
training a natural language processing (NLP) model using the enhanced training dataset resulting in a trained NLP model;
identifying, using the trained NLP model, the named entity in a block of unstructured text;
generating, using the trained NLP model, a target sequence that includes a relationship between the named entity and a tail entity, wherein the target sequence includes the named entity type and the named entity label of the named entity and includes a tail entity type and a tail entity label of the tail entity.

### Claim 19 (depends on 18)

The computer system of claim 18, wherein the generating of the enhanced training dataset comprises using a distance supervision technique that automatically updates the training dataset to include the named entity type and the named entity label.

### Claim 20 (depends on 19)

The computer system of claim 19, wherein the distance supervision technique automatically updates the training dataset by querying the knowledge base for the named entity, retrieving the named entity type and the named entity label from the knowledge base, and associating the named entity type and the named entity label with the named entity.
