Skip to content

Resumes

Candidate name, headline and contacts, each job and degree with its own dates, courses, and skills grouped under their area.

input.txtHover a value to see its type · click it to find it in the treeRun in Studio
Richard Hendriks
Programmer
Email: [email protected]
Telephone: (912) 555-4321
Website: http://richardhendricks.example.com

Employment
CEO/President — Pied Piper, Palo Alto, CA
2013-12-01 to 2014-12-01

Education
Bachelor — Information Technology
University of Oklahoma
2011-06-01 to 2014-01-01
GPA: 4.0
Courses:
DB1101 - Basic SQL
CS2011 - Java Introduction

Skills
Web Development: HTML, CSS, Javascript
Compression: Mpeg, MP4, GIF
hr-resumes.ymlspec
# Facts of a plain-text resume.

# Contact details

EmailAddress: '[\w.+-]+@[\w-]+(\.[\w-]+)+'

PhoneNumber:
  $before: Date
  $patterns:
    - '\+\d{1,3}[ .-]?(\(\d{1,4}\)|\d{1,4})([ .-]?\d{2,4}){2,4}'
    - '(\(\d{3}\)|\d{3}) ?[.-]?\d{3}[ .-]?\d{4}'

WebAddress:
  - 'https?://[^\s|,;]+'
  - 'www\.[^\s|,;]+'

# Dates

Date:
  $local:
    Yyyy: '(19|20)\d{2}'
    Mm: '0[1-9]|1[0-2]'
    M: '[1-9]'
    Dd: '0[1-9]|[12]\d|3[01]'
    MonthName:
      $flags: [ CASE_INSENSITIVE ]
      January: { $patterns: [ 'January', 'Jan\.?' ], $value: '01' }
      February: { $patterns: [ 'February', 'Feb\.?' ], $value: '02' }
      March: { $patterns: [ 'March', 'Mar\.?' ], $value: '03' }
      April: { $patterns: [ 'April', 'Apr\.?' ], $value: '04' }
      May: { $patterns: 'May', $value: '05' }
      June: { $patterns: [ 'June', 'Jun\.?' ], $value: '06' }
      July: { $patterns: [ 'July', 'Jul\.?' ], $value: '07' }
      August: { $patterns: [ 'August', 'Aug\.?' ], $value: '08' }
      September: { $patterns: [ 'September', 'Sept?\.?' ], $value: '09' }
      October: { $patterns: [ 'October', 'Oct\.?' ], $value: '10' }
      November: { $patterns: [ 'November', 'Nov\.?' ], $value: '11' }
      December: { $patterns: [ 'December', 'Dec\.?' ], $value: '12' }

  Day:
    $fields: { year: Yyyy, month: Mm, day: Dd }
    $patterns: '#{year}-#{month}-#{day}'
    $value: '#{year}-#{month}-#{day}'

  Month:
    $fields: { year: Yyyy, month: Mm }
    $patterns:
      - '#{year}-#{month}'
      - '#{month}/#{year}'
    $value: '#{year}-#{month}'

  ShortMonth:
    $fields: { year: Yyyy, month: M }
    $patterns: '#{month}/#{year}'
    $value: '#{year}-0#{month}'

  NamedMonth:
    $fields: { year: Yyyy, month: MonthName }
    $patterns: '#{month},? #{year}'
    $value: '#{year}-#{month}'

  Year: '(19|20)\d{2}'

Period:
  $local:
    Date:
      Present:
        $flags: [ CASE_INSENSITIVE ]
        $patterns: [ 'Present', 'Current', 'Now', 'Today', 'Ongoing' ]
        $value: 'present'
  $fields: { start: Date, end: Date }
  $patterns: '#{start}( ?[–—] ?| ?- ?| to | until | through )#{end}'

# Candidate: the name on the first line, a headline under it and the contact details in any order

Contact:
  $flags: [ CASE_INSENSITIVE ]

  Email:
    $fields: { address: EmailAddress }
    $patterns: '(E-?mail:? )?#{address}'
    $value: '#{address}'

  Phone:
    $fields: { number: PhoneNumber }
    $patterns: '((Tele)?phone|Tel\.?|Mobile|Cell):? #{number}|#{number}'
    $value: '#{number}'

  Website:
    $fields: { address: WebAddress }
    $patterns: '((Web(site)?|Homepage|Portfolio|URL):? )?#{address}'
    $value: '#{address}'

Candidate:
  $local:
    PersonName: '\p{Lu}[\p{L}.''-]*( \p{Lu}[\p{L}.''-]*){1,3}'
    Headline: '\p{L}[\p{L} &/,-]*\p{L}'
  $fields:
    name: PersonName
    headline: Headline
    contacts: { $type: 'Contact[]', $separator: ' \| |\n' }
  $patterns: '^#{name}\n(#{headline}\n)?#{contacts}'

# Employment: position, employer and location on one line, the dates on it or on the next line

Employment:
  $local:
    Position: '[^\n—–|@,]*?[^\s—–|@,]'
    Employer: '[^\n—–|@,()]*[^\s—–|@,()]'
    Location: '[^\n—–|()]*[^\s—–|(),]'
    Separator: ' ?[—–|@] ?| - | at |, '
  $fields: { position: Position, employer: Employer, location: Location, dates: Period }
  $patterns: '#{position}(${Separator})#{employer}((${Separator})#{location})?( ?[|,] ?| \(|\n)#{dates}\)?'

# Education: degree and field of study, the institution, the dates, then GPA and courses

Degree:
  $flags: [ CASE_INSENSITIVE ]
  $patterns:
    - 'Bachelor(''s)?( of (Science|Arts|Engineering|Business Administration|Fine Arts|Laws))?'
    - 'Master(''s)?( of (Science|Arts|Engineering|Business Administration|Fine Arts|Laws))?'
    - 'Associate(''s)?( of (Science|Arts))?'
    - 'Doctor of Philosophy'
    - 'Doctorate'
    - 'Ph\.? ?D\.?'
    - 'B\.? ?(S|A|Sc|Eng)\.?'
    - 'M\.? ?(S|A|Sc|Eng)\.?'
    - 'MBA'
    - 'High School Diploma'
    - 'Diploma'

Course:
  $local:
    Code: '[A-Z]{2,5} ?-?\d{2,5}[A-Z]?'
    Title: '[^\n,;]+'
  $fields: { code: Code, title: Title }
  $patterns: '#{code}( ?[-–—:] ?| )#{title}'

Education:
  $before: Employment
  $local:
    Field: '[^\n,|]*[^\s,|]'
    Institution: '[^\n|]*[^\s,|]'
    Gpa: '\d(\.\d{1,2})?( ?/ ?\d(\.\d{1,2})?)?'
    Separator: ' ?[—–|] ?| - |, | in | of '
  $fields:
    degree: Degree
    field: Field
    institution: Institution
    dates: Period
    completed: Date
    gpa: Gpa
    courses: { $type: 'Course[]', $separator: '\n|, ?|; ?' }
  $patterns: '#{degree}((${Separator})#{field})?(\n|(${Separator}))#{institution}( ?[|,] ?|\n)(#{dates}|#{completed})(\n(GPA:? #{gpa}|Courses?:?\s#{courses}))*'

# Skills: a heading, then lines of skills, each line under its area when it names one

Skills:
  $local:
    SkillsHeading:
      $flags: [ CASE_INSENSITIVE ]
      $patterns: '((Technical|Core|Key|Professional) )?(Skills|Competencies|Expertise)( (&|and) (Expertise|Competencies|Tools))?'
    SkillGroup:
      $local:
        Area: '[^\n:,;]*[^\s:,;]'
        Skill: '[^\n:,;]*[^\s:,;]'
      $fields:
        area: Area
        skills: { $type: 'Skill[]', $separator: ', ?|; ?' }
      $patterns: '([-•*] )?(#{area}: ?)?#{skills}'
  $flags: [ MULTILINE ]
  $fields:
    groups: { $type: 'SkillGroup[]', $separator: '\n' }
  $patterns: '^${SkillsHeading}:?\n#{groups}'
$ texomy parse input.txt -m hr-resumes
hr-resumes.json
[
  {
    "type": "Candidate",
    "start": 0,
    "end": 131,
    "fields": {
      "name": {
        "type": "PersonName",
        "start": 0,
        "end": 16,
        "text": "Richard Hendriks"
      },
      "headline": {
        "type": "Headline",
        "start": 17,
        "end": 27,
        "text": "Programmer"
      },
      "contacts": [
        {
          "type": "Contact::Email",
          "start": 28,
          "end": 60,
          "fields": {
            "address": {
              "type": "EmailAddress",
              "start": 35,
              "end": 60,
              "text": "[email protected]"
            }
          },
          "value": "[email protected]"
        },
        {
          "type": "Contact::Phone",
          "start": 61,
          "end": 86,
          "fields": {
            "number": {
              "type": "PhoneNumber",
              "start": 72,
              "end": 86,
              "text": "(912) 555-4321"
            }
          },
          "value": "(912) 555-4321"
        },
        {
          "type": "Contact::Website",
          "start": 87,
          "end": 131,
          "fields": {
            "address": {
              "type": "WebAddress",
              "start": 96,
              "end": 131,
              "text": "http://richardhendricks.example.com"
            }
          },
          "value": "http://richardhendricks.example.com"
        }
      ]
    }
  },
  {
    "type": "Employment",
    "start": 144,
    "end": 210,
    "fields": {
      "position": {
        "type": "Position",
        "start": 144,
        "end": 157,
        "text": "CEO/President"
      },
      "employer": {
        "type": "Employer",
        "start": 160,
        "end": 170,
        "text": "Pied Piper"
      },
      "location": {
        "type": "Location",
        "start": 172,
        "end": 185,
        "text": "Palo Alto, CA"
      },
      "dates": {
        "type": "Period",
        "start": 186,
        "end": 210,
        "fields": {
          "start": {
            "type": "Date::Day",
            "start": 186,
            "end": 196,
            "fields": {
              "year": {
                "type": "Yyyy",
                "start": 186,
                "end": 190,
                "text": "2013"
              },
              "month": {
                "type": "Mm",
                "start": 191,
                "end": 193,
                "text": "12"
              },
              "day": {
                "type": "Dd",
                "start": 194,
                "end": 196,
                "text": "01"
              }
            },
            "value": "2013-12-01"
          },
          "end": {
            "type": "Date::Day",
            "start": 200,
            "end": 210,
            "fields": {
              "year": {
                "type": "Yyyy",
                "start": 200,
                "end": 204,
                "text": "2014"
              },
              "month": {
                "type": "Mm",
                "start": 205,
                "end": 207,
                "text": "12"
              },
              "day": {
                "type": "Dd",
                "start": 208,
                "end": 210,
                "text": "01"
              }
            },
            "value": "2014-12-01"
          }
        }
      }
    }
  },
  {
    "type": "Education",
    "start": 222,
    "end": 367,
    "fields": {
      "degree": {
        "type": "Degree",
        "start": 222,
        "end": 230,
        "text": "Bachelor"
      },
      "field": {
        "type": "Field",
        "start": 233,
        "end": 255,
        "text": "Information Technology"
      },
      "institution": {
        "type": "Institution",
        "start": 256,
        "end": 278,
        "text": "University of Oklahoma"
      },
      "dates": {
        "type": "Period",
        "start": 279,
        "end": 303,
        "fields": {
          "start": {
            "type": "Date::Day",
            "start": 279,
            "end": 289,
            "fields": {
              "year": {
                "type": "Yyyy",
                "start": 279,
                "end": 283,
                "text": "2011"
              },
              "month": {
                "type": "Mm",
                "start": 284,
                "end": 286,
                "text": "06"
              },
              "day": {
                "type": "Dd",
                "start": 287,
                "end": 289,
                "text": "01"
              }
            },
            "value": "2011-06-01"
          },
          "end": {
            "type": "Date::Day",
            "start": 293,
            "end": 303,
            "fields": {
              "year": {
                "type": "Yyyy",
                "start": 293,
                "end": 297,
                "text": "2014"
              },
              "month": {
                "type": "Mm",
                "start": 298,
                "end": 300,
                "text": "01"
              },
              "day": {
                "type": "Dd",
                "start": 301,
                "end": 303,
                "text": "01"
              }
            },
            "value": "2014-01-01"
          }
        }
      },
      "gpa": {
        "type": "Gpa",
        "start": 309,
        "end": 312,
        "text": "4.0"
      },
      "courses": [
        {
          "type": "Course",
          "start": 322,
          "end": 340,
          "fields": {
            "code": {
              "type": "Code",
              "start": 322,
              "end": 328,
              "text": "DB1101"
            },
            "title": {
              "type": "Title",
              "start": 331,
              "end": 340,
              "text": "Basic SQL"
            }
          }
        },
        {
          "type": "Course",
          "start": 341,
          "end": 367,
          "fields": {
            "code": {
              "type": "Code",
              "start": 341,
              "end": 347,
              "text": "CS2011"
            },
            "title": {
              "type": "Title",
              "start": 350,
              "end": 367,
              "text": "Java Introduction"
            }
          }
        }
      ]
    }
  },
  {
    "type": "Skills",
    "start": 369,
    "end": 442,
    "fields": {
      "groups": [
        {
          "type": "SkillGroup",
          "start": 376,
          "end": 414,
          "fields": {
            "area": {
              "type": "Area",
              "start": 376,
              "end": 391,
              "text": "Web Development"
            },
            "skills": [
              {
                "type": "Skill",
                "start": 393,
                "end": 397,
                "text": "HTML"
              },
              {
                "type": "Skill",
                "start": 399,
                "end": 402,
                "text": "CSS"
              },
              {
                "type": "Skill",
                "start": 404,
                "end": 414,
                "text": "Javascript"
              }
            ]
          }
        },
        {
          "type": "SkillGroup",
          "start": 415,
          "end": 442,
          "fields": {
            "area": {
              "type": "Area",
              "start": 415,
              "end": 426,
              "text": "Compression"
            },
            "skills": [
              {
                "type": "Skill",
                "start": 428,
                "end": 432,
                "text": "Mpeg"
              },
              {
                "type": "Skill",
                "start": 434,
                "end": 437,
                "text": "MP4"
              },
              {
                "type": "Skill",
                "start": 439,
                "end": 442,
                "text": "GIF"
              }
            ]
          }
        }
      ]
    }
  }
]

About this spec

Plain-text resumes: the candidate's name, headline and contacts, each employment entry with its dates, each education entry with its dates, GPA and courses, and skills grouped under their area.

Package files

  • hr-resumes.yml
  • samples/architect.txt
  • samples/cover-letter.txt
  • samples/engineer.txt
  • samples/minimal.txt
  • tests/expected/architect.yaml
  • tests/expected/cover-letter.yaml
  • tests/expected/engineer.yaml
  • tests/expected/input.yaml
  • tests/expected/minimal.yaml
  • tests/hr-resumes.test.yml
  • texomy.json

53 nodes from 4 top-level matches.

Run it yourself

Save the example from Studio to a folder, then in that folder:

texomy parse input.txt -m hr-resumes
texomy test

Write the spec once. Run it on everything.

Install the CLI, connect your agent, and turn your first sample into typed data in minutes.

brew install texomy/tap/texomy