Language
Parsing the scraped front page text.
Language
Static Members
Get part of speech tags for the input sentence.
Parameters
text (String)
The sentence to tag part of speech elements in.
Returns
Promize<Object>
:
Part of speech data.
Parse
Parsing the scraped front page text.
Parse
Static Members
▸
FilterLength(texts, length)
Filter out text from a URL's primary render HTML that isn't longer than X words (sentence).
Parameters
texts (Array)
Array containing the text of sentences scraped.
length (Number)
The minimum word count to filter sentences against.
Returns
Array
:
The filtered array of texts, containing only sentences longer
than X words.
Split up monolithic text from a URL by instances of two capitalized words merged
into one. eg. "MarketWatch"
Parameters
texts (Array)
Array containing the text of sentences scraped.
// * @param {Number} length The maximum length to consider a text monolithic.
Returns
Array
:
The new array of texts, containing the split up texts.
▸
FilterSubject(texts, keywords)
Filter text from a URL's primary render HTML that mentions any of the subject keywords.
Parameters
texts (Array)
Array containing the text of sentences scraped.
keywords (Array<String>)
Array of strings to search for in the texts.
Returns
Array
:
The filtered array of texts, containing only sentences mentioning
the keywords input by the user.
Scrape
Scraping raw text data from news outlet
front page HTML (headlines, major stories).
Scrape
Static Members
Get all text from a URL's primary render HTML.
Parameters
url (String)
Web url to scrape for text.
Returns
Promise<Array>
:
Promise of an array containing the text of sentences scraped.
Sentiment
Get sentiment data from text.
Sentiment
Static Members
Compute sentiment score from a sentence.
Parameters
text (String)
The sentence to analyze for sentiment.
Returns
Promise<Object>
:
Sentiment data.
Tag
Get topic/tag data from text.
Tag
Static Members
Count the occurrences of words in a string.
CountWords(str: any): [
Object]
Parameters
Returns
[Object]
:
An array of objects containing word and count data.
▸
IsWordWorthChecking(word)
Determine if a word is worth counting.
IsWordWorthChecking(word: any):
boolean
Parameters
word (any)
The word to test for relevance.
Returns
boolean
:
Whether or not this word should be counted.