Finds the source of original reporting behind a news story
npm install ground-truthA node library to identify the sources of news articles on the web. The library takes in a URL and returns the URL of the most similar source behind that URL.
``
npm install ground-truth
`
ground-truth exports a single function, findSourceReporting. That function takes in a URL to find the source of, a similarity threshold, a maximum number of hops, and a callback. The callback takes in a results object and a path object. The results object contains a source URL and a similarity score. The path object contains a list of URLs which lead from the inputted URL to the source URL.
`javascript
var gt = require('ground-truth');
gt.findSourceReporting('http://www.dukechronicle.com/article/2017/01/report-duke-head-coach-mike-krzyzewski-disciplines-team-following-loss-to-n-c-state', 0.5, 15, function(results, path) {console.log("RESULT: " + JSON.stringify(results) + " " + "PATH: " + JSON.stringify(path))});
``
Similarity is computed by vectorizing the text on a page using a count-vector and then comparing count-vectors
Copyright Duke Reporters' Lab
ground-truth is made available under the MIT licence