Contextual re-ranking based on cursor position for documentation recommender systems
Abstract
Here is dynamic and contextual ranking of reference documentation based on an interactively selected position in new source logic. A computer receives a vocabulary of lexical tokens, a sequence of references that contains a first reference to a first reference document before a second reference to a second reference document, respective subsets of the vocabulary that occur in the first and second reference documents, a new source logic that contains a sequence of lexical tokens, respective measurements of semantic distance between the new source logic and the first and second reference documents, and a selected position in the sequence of lexical tokens. Based on the selected position, the measurements of semantic distance are selectively increased. Based on that increasing the measurements of the semantic distance, a relative ordering of the first and second references is reversed to generate and display a reordered sequence of references.
Claims
exact text as granted — not AI-modified1 . A method comprising:
receiving:
a vocabulary plurality of lexical tokens,
a sequence of references that contains a first reference to a first reference document before a second reference to a second reference document,
a subset of the vocabulary plurality of lexical tokens that occurs in the first reference document,
a subset of the vocabulary plurality of lexical tokens that occurs in the second reference document,
a new source logic that contains a sequence of lexical tokens,
a measurement of a semantic distance between the new source logic and the first reference document,
a measurement of a semantic distance between the new source logic and the second reference document, and
an interactively selected position in the sequence of lexical tokens in the new source logic;
increasing, based on the interactively selected position in the sequence of lexical tokens:
said measurement of the semantic distance between the new source logic and the first reference document, and
said measurement of the semantic distance between the new source logic and the second reference document;
ascending sorting the sequence of references by semantic distance, including reversing, based on said increasing the measurements of the semantic distances between the new source logic and the respective reference documents of the first reference and the second reference, a relative ordering of the first reference and the second reference in the sequence of references, to generate a reordered sequence of references; and displaying said reordered sequence of references; wherein the method is performed by one or more computers.
2 . The method of claim 1 performed without accessing the first reference document or the second reference document.
3 . The method of claim 1 wherein said increasing the measurement of the semantic distance between the new source logic and the first reference document is based on a subset of the vocabulary plurality of lexical tokens that occur in the sequence of lexical tokens.
4 . The method of claim 3 further comprising measuring a plurality of positional distances that contains a respective positional distance between the interactively selected position in the sequence of lexical tokens and a respective position of each lexical token in the sequence of lexical tokens.
5 . The method of claim 4 wherein said increasing the measurement of the semantic distance between the new source logic and the first reference document is based on the plurality of positional distances.
6 . The method of claim 4 wherein:
the sequence of lexical tokens contains multiple instances of a particular lexical token;
the method further comprises detecting a minimum of the positional distances of the multiple instances of a particular lexical token.
7 . (canceled)
8 . The method of claim 1 wherein the interactively selected position in the sequence of lexical tokens indicates one selected from a group consisting of:
a lexical token that represents a new identifier,
a lexical token that occurs in a source comment,
a lexical token that does not occur in a definition of a subroutine, and
a lexical token that is syntactically valid but not semantically valid.
9 . The method of claim 1 wherein said increasing the measurement of the semantic distance between the new source logic and the first reference document is not based on a particular lexical token that does not occur in at least one selected from a group consisting of: a) the sequence of lexical tokens and b) the vocabulary plurality of lexical tokens.
10 . The method of claim 1 wherein:
the interactively selected position in the sequence of lexical tokens is a boundary between a first half of the sequence of lexical tokens and a second half of the sequence of lexical tokens;
the first half of the sequence of lexical tokens and the second half of the sequence of lexical tokens have a same particular length;
that does not exceed a predefined maximum length;
the new source logic further contains multiple lexical tokens that do not occur in the sequence of lexical tokens.
11 . One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause:
receiving:
a vocabulary plurality of lexical tokens,
a sequence of references that contains a first reference to a first reference document before a second reference to a second reference document,
a subset of the vocabulary plurality of lexical tokens that occurs in the first reference document,
a subset of the vocabulary plurality of lexical tokens that occurs in the second reference document,
a new source logic that contains a sequence of lexical tokens,
a measurement of a semantic distance between the new source logic and the first reference document,
a measurement of a semantic distance between the new source logic and the second reference document, and
an interactively selected position in the sequence of lexical tokens in the new source logic;
increasing, based on the interactively selected position in the sequence of lexical tokens:
said measurement of the semantic distance between the new source logic and the first reference document, and
said measurement of the semantic distance between the new source logic and the second reference document;
ascending sorting the sequence of references by semantic distance, including reversing, based on said increasing the measurements of the semantic distances between the new source logic and the respective reference documents of the first reference and the second reference, a relative ordering of the first reference and the second reference in the sequence of references, to generate a reordered sequence of references; and displaying said reordered sequence of references.
12 . The one or more non-transitory computer-readable media of claim 11 performed without accessing the first reference document or the second reference document.
13 . The one or more non-transitory computer-readable media of claim 11 wherein said increasing the measurement of the semantic distance between the new source logic and the first reference document is based on a subset of the vocabulary plurality of lexical tokens that occur in the sequence of lexical tokens.
14 . The one or more non-transitory computer-readable media of claim 13 wherein the instructions further cause measuring a plurality of positional distances that contains a respective positional distance between the interactively selected position in the sequence of lexical tokens and a respective position of each lexical token in the sequence of lexical tokens.
15 . The one or more non-transitory computer-readable media of claim 14 wherein said increasing the measurement of the semantic distance between the new source logic and the first reference document is based on the plurality of positional distances.
16 . The one or more non-transitory computer-readable media of claim 14 wherein:
the sequence of lexical tokens contains multiple instances of a particular lexical token;
the instructions further cause detecting a minimum of the positional distances of the multiple instances of a particular lexical token.
17 . (canceled)
18 . The one or more non-transitory computer-readable media of claim 11 wherein the interactively selected position in the sequence of lexical tokens indicates one selected from a group consisting of:
a lexical token that represents a new identifier,
a lexical token that occurs in a source comment,
a lexical token that does not occur in a definition of a subroutine, and
a lexical token that is syntactically valid but not semantically valid.
19 . The one or more non-transitory computer-readable media of claim 11 wherein said increasing the measurement of the semantic distance between the new source logic and the first reference document is not based on a particular lexical token that does not occur in at least one selected from a group consisting of: a) the sequence of lexical tokens and b) the vocabulary plurality of lexical tokens.
20 . The one or more non-transitory computer-readable media of claim 11 wherein:
the interactively selected position in the sequence of lexical tokens is a boundary between a first half of the sequence of lexical tokens and a second half of the sequence of lexical tokens;
the first half of the sequence of lexical tokens and the second half of the sequence of lexical tokens have a same particular length;
that does not exceed a predefined maximum length;
the new source logic further contains multiple lexical tokens that do not occur in the sequence of lexical tokens.Join the waitlist — get patent alerts
Track US2025110961A1 — get alerts on status changes and closely related new filings.
We store only your email — no account needed. See our privacy policy.