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.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 8 · Forward citations: 0.
Claims (18 — 2 Independent, 16 Dependent)
- Claim 1Independent Claim
A method comprising: displaying, on a display screen of a computer, a new source logic that contains a sequence of lexical tokens; receiving on a communication network and retaining in a memory in the computer: 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 measurement of a semantic distance between the new source logic and the first reference document, and a measurement of a semantic distance between the new source logic and the second reference document, wherein the sequence of references is ascending sorted by semantic distance; and performing, after said receiving, without performing network communication: a) displaying, on the display screen, the sequence of references; b) increasing in the memory, based on an interactively selected position, on the display screen, 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; c) ascending sorting, in the computer, 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 d) displaying, on the display screen, said reordered sequence of references; wherein the method is performed by the computer.
- Claim 2Depends on #1
The method of claim 1 performed without accessing the first reference document or the second reference document.
- Claim 3Depends on #1
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.
- Claim 4Depends on #3
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.
- Claim 5Depends on #4
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.
- Claim 6Depends on #4
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.
- Claim 7Depends on #1
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.
- Claim 8Depends on #1
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.
- Claim 9Depends on #1
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.
- Claim 10Independent Claim
One or more non-transitory computer-readable media storing instructions that, when executed by one or more processors, cause: displaying, on a display screen of a computer, a new source logic that contains a sequence of lexical tokens; receiving on a communication network and retaining in a memory in the computer: 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 measurement of a semantic distance between the new source logic and the first reference document, and a measurement of a semantic distance between the new source logic and the second reference document, wherein the sequence of references is ascending sorted by semantic distance; and performing, after said receiving, without performing network communication: a) displaying, on the display screen, the sequence of references; b) increasing in the memory, based on an interactively selected position, on the display screen, 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; c) ascending sorting, in the computer, 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 d) displaying, on the display screen, said reordered sequence of references.
- Claim 11Depends on #10
The one or more non-transitory computer-readable media of claim 10 performed without accessing the first reference document or the second reference document.
- Claim 12Depends on #10
The one or more non-transitory computer-readable media of claim 10 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.
- Claim 13Depends on #12
The one or more non-transitory computer-readable media of claim 12 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.
- Claim 14Depends on #13
The one or more non-transitory computer-readable media of claim 13 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.
- Claim 15Depends on #13
The one or more non-transitory computer-readable media of claim 13 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.
- Claim 16Depends on #10
The one or more non-transitory computer-readable media of claim 10 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.
- Claim 17Depends on #10
The one or more non-transitory computer-readable media of claim 10 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.
- Claim 18Depends on #10
The one or more non-transitory computer-readable media of claim 10 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.
Technical Overview & Description
FIELD OF THE INVENTION The present invention relates to natural language processing (NLP). Herein is dynamic and contextual ranking of reference documentation based on an interactively selected position in new source logic. BACKGROUND Software developers consume a considerable amount of documentation such as application programing interfaces (APIs), question-and-answer discussion websites, tutorials, and other knowledge bases to develop software applications. A common entry point to consume such developer support documentation is major search engines. However, finding high quality and up-to-date proprietary documentation by a web search can be challenging. Search results often are diluted with other content and often show outdated versions of proprietary documentation and guides. This problem also occurs with any public and versioned software stack and corresponding documentation. State of the art natural language processing (NLP) provides generative functionality such as code completion for single lines and functions as well as natural language to code translations. The cognitive load on the user is high in the state of the art that requires direct user interaction for problem solving purposes. The approach herein is not generative and is more ergonomic because it expects less interaction than a generative approach. Previous attempts at instrumenting document search for source code have two main shortcomings. First, code-to-code search engines neglect all information contained in non-code portions of documentation pages. Second, using an entire source file as a search query does not take into account the attention (i.e. visual and cognitive focus) of the software engineer user, such as the part of the source file currently being edited by the user. Assuming that the user is mostly interested in documentation related to the code being edited is an assumption overlooked by the state of the art. Thus, search results may have decreased relevance, and demand for compute
Cited By — Indexed Forward Citations (0 of 0 total)
No indexed citing patents in this generation yet. Ingest USPTO/PatentsView bulk citation tables via patents-ingest to expand the local forward citation graph.
References Cited — Backward Prior Art (8)
| Patent | Title | Year | Citations |
|---|
Non-Patent Literature (10)
- Johnson, Jeff, et al.,
- “
- Billion-scale similarity search with GPUs
- ”
- , https://arxiv.org/pdf/1702.08734.pdf, Feb. 28, 2017, 12pgs.
- Feng, Zhangyin, et al.,
- “
- CodeBERT: A Pre-Trained Model for Programming and Natural Languages
- ”
- , Findings of the Assoctn for Computnl Linguistics: EMNLP 2020, pp. 1536-1547, https://doi.org/10.18653/v1/2020.findings-emnlp.139, Nov. 16, 2020, 12pgs.