likerRr / code4goal-resume-parser

Solution for Code4Goal challenge
MIT License
129 stars 68 forks source link
cvs js node nodejs resume-parser textract

IMPORTANT NOTICE

Library currently is not actively maintained, but I still read all the issues and try to give directions of their solving.

I believe during that year I will find time to fix existing issues and make it more library-like rather then application for fun (like it is for now).

If you want to collaborate and solve some existing issues, there is a branch ce (community edition) where I merge community's PRs.

Don't miss a chance to make resume-parser great again :)

Also, there is a project based on my resume-parser, which solved most of issues and published it's solution to npm. I believe it's more stable then current version of resume-parser.

Resume parser

Solution for Code4Goal - Coding Contest

Authored and maintained by Lizurchik Alexey, 2015

The Problem

Often Companies have problems with sorting out large volumes of CVs / Resumes advertising for their job roles. In order to minimise their time in sorting out and have a benchmark way of comparing candidates, you've been tasked with the challenging task of assisting their problem.

Contest

Develop a parser that is able to parse through CVs / Resumes in the word (.doc or .docx) / RTF / TXT / PDF / HTML format to extract the necessary information in a predefined JSON format. If the CVs / Resumes contain any social media profile links then the solution should also parse the public social profile web-pages and organize the data in JSON format (e.g. Linkedin public profile, Github, etc.)

Solution

This Resume parser can run throught unlimited number of Resumes and get relevant info from that. With full-feature installation it supports most of the common use formats, provided by textract:

Pre-Requirements

Current solution tested on Windows 7 x64 Maximum (with babun shell), but it also may run on OSX, Linux. Application is hard dependend on text extracting library textract.

Fast install

Project is nodejs cli application with some dependencies. If you already have installed copy of nodejs, you can just clone this repo and run npm install:

git clone git@github.com:likerRr/code4goal-resume-parser.git
npm install

Step-by-step fresh installation

Please, note, that it's not necessary install support of all formats but preferably. As for me, I didn't get setup catdoc for .DOC files under Windows 7, so I played only with .TXT, .HTML, .PDF formats, but I know, it will also work with the rest formats :)

Run

When you finish installation it's time to run application. Just put some Resume files to /public (it already has 3 for tests) directory and run in terminal node app.js from project's root. Then you can access JSONed results in /compiled folder (all file there will represent JSON string of parsed data.

Execution presents as dialog between HR manager, that has a lot of Resume to work with, and ParseBoy, who volunteered to help with it, i thought that it should have some fun.

How it works

Base principle on how parser works, based on dictionary of rules of how to handle Resume file. So we have /src/dictionary.js file, where all rules places. It represents javascript object with the following structure:

{
    titles: {},
    profiles: [],
    inline: {},
    regular: {}
}

All of these keys titles, profiles, inline, regular are converted to regular expressions, that handled by specific conditions:

OBJECTIVE

Seeking a challenging position to use my software Web development and process optimization skills.

SUMMARY

I worked on a wide range of products including building advanced dynamic multi language web sites, internal and external API's, well as creating new internal workflows.

If we now run application it will go through next Application Loop (AL):

So, according to this loop in the end we will have following JSON file:

{
    objective: 'Seeking a challenging position to use my software Web development and process optimization skills.'
    summary: 'I worked on a wide range of products including building advanced dynamic multi language web sites, internal and external API's, well as creating new internal workflows.'
}

It looks quite a big, but very flexible.

So here we can see, that profiles contains two rules: github.com with callback and stackoverflow.com. When profile rule enters Application Loop (AL) and it has valid callback, so it will try to request profile page from Internet and parse data on requested page, according to rules in callback. Then it places all data into Resume object under the represented key (github in out case). If rule is just a string and it meets match in AL row, so it simple puts profile link to profile key in Resume object.

expr+":?[\\s]*(.*)"

Example:

inline: {
  skype: 'skype'
},

Text:

skype: sweet-liker

Result will be skype key with sweet-liker value in Resume object. So it can be extended with simple lines of data, e.g. address or first name or whatever.

Note, that these rules are unreliable, cause can touch sensitive data from context, e.g. "I don't have a skype, but I have IM". After parsing that string data in Resume will be as key skype and value but I have IM. So use on your own risk.

Will try find name, email, phone by expression sign.

Generic format

This solution hasn't generic output format of JSON string, cause it filled if rule in dictionary match the condition. So, the full possible data, that may be extracted from Resume may have such format:

{
  objective: '',
  summary: '',
  technology: '',
  experience: '',
  education: '',
  skills: '',
  languages: '',
  cources: '',
  projects: '',
  links: '',
  contacts: '',
  positions: '',
  profiles: '',
  awards: '',
  honors: '',
  additional: '',
  certification: '',
  interests: '',
  github: {
    name: '',
    location: '',
    email: '',
    link: '',
    joined: '',
    company: ''
  },
  linkedin: {
    summary: '',
    name: '',
    positions: [],
    languages: [],
    skills: [],
    educations: [],
    volunteering: [],
    volunteeringOpportunities: []
  },
  skype: '',
  name: '',
  email: '',
  phone: ''
}

Extending

All 'action' are by building dictionary.js file. For now it has only basics rules, that I met while develop this solution, but it's very flexible (although a bit complicated) and extensible. Just put your rule according to existing and following main principles and enjoy!

Vocabulary

Technologies / References

Application built on javascript with nodejs 0.10.31 under Windows 7 x64 This application on github

Dependencies are:

In action

In action