# US 2023/0055769 A1 · Specificity ranking of text elements and applications thereof

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

- Number: US 2023/0055769 A1
- Document ID: US20230055769A1
- Status: Published application
- Kind: A1
- Application number: 17/408,764
- Filed: 2021-08-23
- Published: 2023-02-23
- Earliest claimed: 2021-08-23
- Assignees: International Business Machines Corporation
- Applicants: International Business Machines Corporation
- Inventors: Francesco Fusco; Cesar Berrospi Ramis; Peter Willem Jan Staar
- Web page: https://patentgrep.com/patent/US20230055769A1

## CPC

- G06F 40/284: Lexical analysis, e.g. tokenisation or collocates
- G06F 18/2113: by ranking or filtering the set of features, e.g. using a measure of variance or of feature cross-correlation
- G06N 5/02: Knowledge representation; Symbolic representation
- G06N 5/022: Knowledge engineering; Knowledge acquisition
- G06V 30/262: using context analysis, e.g. lexical, syntactic or semantic context
- G06F 16/93: Document management systems
- G06F 40/30: Semantic analysis
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Ranking a plurality of text elements, each comprising at least one word, by specificity. For each text element to be ranked, such a method includes computing an embedding vector that locates a text element in an embedding space, and selecting a set of text fragments from reference text. Each of these text fragments contains the text element to be ranked and further text elements. For each text fragment, the method calculates respective distances in the embedding space between the further text elements. The method further includes calculating a specificity score for the text element to be ranked and storing the specificity score. After ranking the plurality of text elements, a text data structure using the specificity scores for text elements to extract data having a desired specificity from the data structure may be processed.

## Claims

### Claim 1

A computer-implemented method for ranking a plurality of text elements comprising:
computing, via a word embedding scheme, an embedding vector which locates a first text element of a plurality of text elements to be ranked in an embedding space;
selecting a set of text fragments from a reference text, with each text fragment containing the first text element and at least one other text element to be ranked;
for each text fragment, calculating respective distances in the embedding space between the at least one other text element to be ranked, each located in the space by an embedding vector computed via the word embedding scheme, and the first text element to be ranked;
calculating a specificity score, dependent on the respective distances in the embedding space, for the text element to be ranked; and
storing the specificity score, with the specificity scores for the plurality of text elements defining a ranking of the text elements by specificity.

### Claim 2 (depends on 1)

The method of claim 1 wherein the plurality of text elements to be ranked includes multiword expressions.

### Claim 3 (depends on 1)

The method of claim 1 wherein the plurality of text elements to be ranked include single-word text elements.

### Claim 4 (depends on 1)

The method of claim 1 further including processing a text corpus by:
tokenizing the text corpus such that each of the text elements to be ranked is encoded as a single token and other words in the text corpus are encoded as respective tokens; and
processing the tokenized text via the word embedding scheme to generate an embedding matrix including the embedding vectors corresponding to the text elements to be ranked and the at least one other text element to be ranked.

### Claim 5 (depends on 4)

The method of claim 4 further including:
storing a set of multiword expressions prior to tokenizing the corpus; and
while tokenizing the corpus, encoding each multiword expression in the set of multiword expressions as a single token.

### Claim 6 (depends on 5)

The method of claim 5 further including compiling the set of multiword expressions by processing a text dataset.

### Claim 7 (depends on 1)

The method of claim 1 further including:
for each text element to be ranked:
selecting a plurality of text fragments containing the first text element from the reference text;
for each text fragment, calculating an instance score dependent on the distances between the first text element to be ranked and the at least one other text elements in the fragment; and
calculating the specificity score as a function of the instance scores for the plurality of text fragments.

### Claim 8 (depends on 7)

The method of claim 7 further including:
for each text fragment:
weighting the distance between the first text element to be ranked and each of the at least one other text element by the inverse of the frequency of occurrence of the further text element in a text corpus; and
calculating the instance score as a function of the weighted distances for the text fragment.

### Claim 9 (depends on 1)

The method of claim 1 further including:
for each text element to be ranked:
calculating the instance score for each of the plurality of text fragments by aggregating the weighted distances for the fragment; and
calculating the specificity score by aggregating the instance scores for the plurality of text fragments.

### Claim 10 (depends on 7)

The method of claim 7 wherein the reference text includes a text corpus; and
for each text element to be ranked, a fragment of the text corpus is selected for each instance of the first text element in the text corpus.

### Claim 11 (depends on 1)

The method of claim 1 wherein each text fragment includes a sentence.

### Claim 12 (depends on 1)

The method of claim 1 including, after ranking said plurality of text elements, processing a text data structure using the specificity scores for text elements to extract data having a desired specificity from the data structure.

### Claim 13 (depends on 12)

The method of claim 12 wherein the text data structure includes a corpus of text, and with the method further including:
using the specificity scores for text elements in the corpus to construct a knowledge graph including a set of the most-specific text elements in the corpus; and
in response to input of a search query, searching the knowledge graph to extract data relating to the search query.

### Claim 14 (depends on 12)

The method of claim 12 wherein the text data structure includes a word embedding matrix including vectors locating respective text elements in a latent space, and with the method further including:
in response to input of a text element corresponding to a vector in the latent space, identifying, based on the specificity scores, a set of the most-specific text elements neighboring the input text element in the latent space.

### Claim 15 (depends on 12)

The method of claim 12 wherein the text data structure includes a graph having nodes representing text phrases, with the graph being interconnected by edges representing relations between nodes, and with the method further including:
pruning the graph in dependence on specificity scores for text elements in the text phrases to obtain a subgraph representing a most-specific subset of the phrases; and
processing the subgraph to extract desired phrases.

### Claim 16 (depends on 12)

The method of claim 12 wherein the text data structure includes a search database, and with the method including:
in response to input of a search query:
identifying any ranked text elements in the search query; and
generating a response to the search query by extracting data from the search database in dependence on the specificity scores for any ranked text elements so identified.

### Claim 17

A computer program product for ranking a plurality of text elements comprising:
a machine readable storage device; and
computer code stored on the machine readable storage device, with the computer code including instructions and data for causing a processor(s) set to perform operations including the following:
computing, via a word embedding scheme, an embedding vector which locates a first text element of a plurality of text elements to be ranked in an embedding space,
selecting a set of text fragments from a reference text, with each text fragment containing the first text element and at least one other text element to be ranked,
for each text fragment, calculating respective distances in the embedding space between the at least one other text element to be ranked, each located in the space by an embedding vector computed via the word embedding scheme, and the first text element to be ranked,
calculating a specificity score, dependent on the respective distances in the embedding space, for the text element to be ranked, and
storing the specificity score, with the specificity scores for the plurality of text elements defining a ranking of the text elements by specificity.

### Claim 18 (depends on 17)

The computer program product of claim 17 further including:
after ranking the plurality of text elements, processing a text data structure using the specificity scores for text elements to extract data having a desired specificity from the data structure.

### Claim 19

A computing system for ranking a plurality of text elements comprising:
a processor(s) set;
a machine readable storage device; and
computer code stored on the machine readable storage device, with the computer code including instructions and data for causing the processor(s) set to perform operations including the following:
computing, via a word embedding scheme, an embedding vector which locates a first text element of a plurality of text elements to be ranked in an embedding space,
selecting a set of text fragments from a reference text, with each text fragment containing the first text element and at least one other text element to be ranked,
for each text fragment, calculating respective distances in the embedding space between the at least one other text element to be ranked, each located in the space by an embedding vector computed via the word embedding scheme, and the first text element to be ranked,
calculating a specificity score, dependent on the respective distances in the embedding space, for the text element to be ranked, and
storing the specificity score, with the specificity scores for the plurality of text elements defining a ranking of the text elements by specificity.

### Claim 20 (depends on 19)

The computing system of claim 19 further including:
after ranking the plurality of text elements, processing a text data structure using the specificity scores for text elements to extract data having a desired specificity from the data structure.
