GithubHelp home page GithubHelp logo

partoftheorigin / predict-blog-author-features Goto Github PK

View Code? Open in Web Editor NEW
8.0 1.0 2.0 58 KB

Predicts gender, age, label, and zodiac sign of the writer from the given text.

Python 100.00%
natural-language-processing machine-learning text-classification text-processing data-preprocessing prediction-algorithm classification-model blogs contextual-data

predict-blog-author-features's Introduction

Contextual Classification of Long & Short Text

Build Status PRs Welcome

Predicts gender, age, label, and zodiac sign of the author from the given text.

Pretrained Model for Long Text Classification

Algorithms

Accuracy

Algorithm Label Gender Age Zodiac
Logistic Regression tf-0.367, cv-0.371* tf-0.527, cv-0.571* tf-0.145, cv-0.148 tf-0.095, cv-0.101*
MultinomialNB tf-0.367, cv-0.354 tf-0.568, cv-0.570 tf-0.149*, cv-0.137 tf-0.099, cv-0.101*
Random Forests       tf-0.354, cv-0.326 tf-0.520, cv-0.560 tf-0.126, cv-0.141 tf-0.094, cv-0.096
BernoulliNB         tf-0.322, cv-0.322 tf-0.556, cv-0.556 tf-0.116, cv-0.116 tf-0.099, cv-0.099
SGDClassifier tf-0.361, cv-0.334 tf-0.504, cv-0.563 tf-0.073, cv-0.072 tf-0.076, cv-0.079

tf = TfidfVectorizer, cv=CountVectorizer, values represent accuracy score.

Dataset

The Blog Authorship Corpus

The Blog Authorship Corpus consists of the collected posts of 19,320 bloggers gathered from blogger.com in August 2004. The corpus incorporates a total of 681,288 posts and over 140 million words - or approximately 35 posts and 7250 words per person.

Each blog is presented as a separate file, the name of which indicates a blogger id# and the blogger’s self-provided gender, age, industry and astrological sign. (All are labeled for gender and age but for many, industry and/or sign is marked as unknown.)

All bloggers included in the corpus fall into one of three age groups:

  • 8240 "10s" blogs (ages 13-17)
  • 8086 "20s" blogs(ages 23-27)
  • 2994 "30s" blogs (ages 33-47)

For each age group there are an equal number of male and female bloggers.

Each blog in the corpus includes at least 200 occurrences of common English words. All formatting has been stripped with two exceptions. Individual posts within a single blogger are separated by the date of the following post and links within a post are denoted by the label urllink.

Download Corpus: http://www.cs.biu.ac.il/~koppel/blogs/blogs.zip

Dependencies

Pull requests

We hope that other people can benefit from the project. We are thankful for any contributions from the community.

predict-blog-author-features's People

Contributors

partoftheorigin avatar rand0wn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

predict-blog-author-features's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.