https://github.com/andrewprifer/polygraph
Lie detector for news sites.
https://github.com/andrewprifer/polygraph
Last synced: 17 days ago
JSON representation
Lie detector for news sites.
- Host: GitHub
- URL: https://github.com/andrewprifer/polygraph
- Owner: AndrewPrifer
- Created: 2017-01-16T01:10:38.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-05-22T16:19:09.000Z (almost 6 years ago)
- Last Synced: 2025-02-13T23:27:16.447Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 128 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Polygraph
Polygraph is a Chrome extension for detecting clickbaity, possibly dishonest news articles. It works by checking the headline of the webpage against a set of rules that recogize certain "dishonesty traits". These are then presented to the user as a Page Action popup in the form of a list of expandable descriptions. A badge is also shown with the number of detected traits.
Note, Polygraph is not meant to be used to accurately measure the truthfulness of an article and I provide no guarantee of that. The idea behind this project (at least in its current form) is to encourage and promote the use of honest, useful, non-clickbaity headlines.
This is an early release and as such functions as more of a proof of concept and as a framework to build upon in the feature.
## How it works
Polygraph works by matching the headline of articles against a set of regular expressions to detect dishonesty traits.### Examples of traits
- **Exaggerated value:** The article is trying to grab attention by exaggerating the value it provides to the reader.
- **Quotation or loose definition:** Out-of-context quotations can sometimes convey a completely different meaning than what was originally intended.
- **Uncertainty:** Communicating uncertainty in the title allows the author to convey information that is false or inaccurate without taking responsibility for it.
- **Incomplete title:** Information is omitted from the title in order to entice curiosity.
- **Exaggeration:** The article uses exaggeration for sensationalistic purposes.## Limitations
Polygraph only displays meaningful results on actual articles. Since it cannot detect whether a webpage is an online newspaper or not, it will sometimes also analyze headlines on regular webpages.# Development
`npm install`Run `gulp --watch` and load the `dist`-directory into chrome.
## Tasks
### Build
`gulp`| Option | Description |
|----------------|-----------------------------------------------------------------------|
| `--watch` | Starts a livereload server and watches all assets. |
| `--production` | Minifies all assets. |
| `--verbose` | Log additional data to the console. |
| `--vendor` | Compile the extension for different vendors (chrome, firefox, opera). |
| `--sourcemaps` | Force the creation of sourcemaps. |### Pack
Zips your `dist` directory and saves it in the `packages` directory.`gulp pack --vendor=firefox`
### Version
Increments version number of `manifest.json` and `package.json`,
commits the change to git and adds a git tag.`gulp patch` => 0.0.X
or
`gulp feature` => 0.X.0
or
`gulp release` => X.0.0
## Globals
The build tool also defines a variable named `ENV` in your scripts. It will be set to `development` unless you use the `--production` option.**Example:** `./app/background.js`
```javascript
if(ENV === 'development'){
console.log('We are in development mode!');
}
```