input text to analyze
Optional
options: { phrases model
default=5 - maximum words in a keyphrase
default=1 - minimum words in a keyphrase
default=3 - minimum length of a word
default=0.2 - percentage of top keyphrases to consider
default=5 - maximum number of top sentences to return
default=10 - maximum number of top keyphrases to return
default=6 - minimum length of a keyphrase
query to give heavy weight to
const result = extractSEEKTOPIC(testDoc, { phrasesModel, heavyWeightQuery: "self attention", limitTopSentences: 10});
console.log(result.topSentences); // Array of top sentences with their keyphrases and weights
console.log(result.keyphrases); // Array of top keyphrases with their weights and associated sentence indices
console.log(result.sentences); // Array of all sentences in the input text
🔤📊 SEEKTOPIC: Summarization by Extracting Entities, Keyword Tokens, and Outline Phrases Important to Context
Extracts unique, domain-specific key phrases from a document using noun n-grams and ranks sentences based on their centrality to the most frequently referenced key phrase concepts, enabling efficient extraction of domain-specific content. This can be a first step to use key sentences or topics to vectorize or fit more docs into context limit and visualize them in vector space.