📃 JSDoc for Typescript added

This commit is contained in:
2021-06-17 00:05:30 -07:00
parent b801ce7eb3
commit 64d6f59a9d
13 changed files with 690 additions and 72 deletions

View File

@@ -8,7 +8,12 @@ nlp.extend(sentences);
nlp.extend(numbers);
nlp.extend(dates);
export function tokenize(inputString) {
/**
* Tokenizes a search string
* @function
* @param {string} inputString - The string used to search against CV, Shortboxed, and other APIs.
*/
export const tokenize = (inputString) => {
const doc = nlp(inputString);
const sentence = doc.sentences().json();
const number = doc.numbers().fractions();
@@ -41,7 +46,7 @@ export function tokenize(inputString) {
},
};
return queryObject;
}
};
export function refineQuery(queryString) {
const queryObj = tokenize(queryString);