Skip to content

Commit 3cd7369

Browse files
docs(sentence-wsie-importance): add jsdoc comments
1 parent 379a444 commit 3cd7369

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/sentence-wise-importance.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ const posMask = constants.posMask;
66
// Size of a single token.
77
const tkSize = constants.tkSize;
88

9+
/**
10+
* This implementation is inspired by the hypothesis that *content salience is proportional
11+
* to the frequency of part-of-speech n-grams* as outlined in the paper titled,
12+
* [Examining the Content Load of Part of Speech Blocks for Information Retrieval](https://dl.acm.org/doi/10.5555/1273073.1273142).
13+
*
14+
* @param {object} rdd Raw Document Data structure containing the document whose
15+
* sentence wise importance will be determined.
16+
* @returns {object[]} array of objects, in form of `{ index: <integer>, importance: <0–1>}`,
17+
* where index points to the sentence; 1 means highest importance and 0 indicates lowest.
18+
*/
919
const sentenceWiseImportance = function ( rdd ) {
1020
// Define open class part-of-speeches; used to compute intitial information content
1121
const openClassPOS = Object.create(null);

0 commit comments

Comments
 (0)