Skip to content

cssuh/Defacto

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Defacto

An open source, crowd sourcing information initiative to stop the dissemination of so called "fake news" and "alternative facts."

DeFacto utilizes machine learning techniques as well as other apis to help you determine whether or not news sources are credible. DeFacto also collects helpful data about news sources that can be used for data analysis, tracking, and machine learning seeding.

  • Actively collects information on credible and non-credible sources/articles
  • Machine learning and NLP
  • Changes credibility values based on user input

REST API

DeFacto's RESTful API can provide useful information such as:

  • Truthfulness rating on articles
  • User submitted fact checks
  • Satire rating
  • Article sentiment (A rating of the article's positivity)

Endpoints

baseURL : localhost:3000/api/

Endpoint API
Article
Method Description Params/Body
GET Returns a list of recently uploaded articles
limitThe number of articles to return per page
pageThe page to return
sortThe field used to sort results. Possible values: "rating"
orderThe order results are sorted in. Possible values: "asc", "desc"
rgeOnly return articles with rating greater than or equal to a value
POST Creates a new article
titleArticle Title
AuthorsComma seperated list of authors
siteName/Url of website article was found on
urlURL of article
commentsComments that should be included with the new article
publishedArticle publication date
Article/url/:url
Method Description Params/Body
GET Searches for an article by its url in the database
urlThe url of the article to be searched. The url must be escaped or uri encoded.
PUT Searches for an article by its url in the database and if found uploads it as a comment.
CommentThe comment text
AuthorThe author of the comment

Response

Sites Response

{
    // title of website
    title : String,
    // url of website
    url : String,
    // website description
    descr : String,
    // search url for site
    search_url : String,
    // type of website bias
    bias : String,
    // whether or not the website is satire
    isSatire : Boolean,
    // average rating for website's credibility
    rating : Number,
    // for selecting information (?) 
    selectors : [{field : String, selector : String}],
}

Articles

{
    // title of article
    title : String,
    // author(s) of article
    authors: [String],
    // summary of article
    summary : String,
    // website article comes from
    site : {
        type : String,
        ref : 'Site'
    },
    // url of article
    url : String,
    // rating of particular article
    rating : Number,
    // article keywords
    keywords : [String],
    // user-moderated content on particular article
    comments : [{author : String, comment : String}],
    // sentiment rating
    sentiment : Number,
    // truthfulness
    truthfulness : Number,
    // date article was published
    published: {
        default: Date.now(),
        type: Date
    }
}

DeFacto.js

DeFacto's JS library allows you to interact with our API easily.

Get Articles

Write Comment

After obtaining an article a comment can be written on that article using:

DeFactoInstance.addComment(params : Object);

Chrome Extension

The DeFacto Chrome Extension utilizes DeFacto.js as well as the RESTful API to provide user-contributed fact checking to every website.

About

Tribe Hacks III

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •