Education
Student, identifier, institution and print date in any order, and each term with its courses, grades, credit hours and totals.
ILLUSTRATIVE ACADEMIC RECORD
Student: Joe Test
Student identifier: 0123456
Institution: Test University
Printed: 31-Jul-2024
Fall 2023
Code Subject Grade Hours Points
ACCT2103 Fundamentals of Financial Acct B 3.00 9.00
ACCT2203 Fundamentals Managerial Acct C 3.00 6.00
ECON2213 Principles of Microeconomics C 3.00 6.00
Term totals: attempted 9.00; earned 9.00; points 21.00; GPA 2.333
Summer 2023
Code Subject Grade Hours Points
BUS5113 Research Methods B 3.00 9.00
MNGT5773 Principle-CTR Leadership & Eth A 3.00 12.00
Term totals: attempted 6.00; earned 6.00; points 21.00; GPA 3.500education.ymlspec
$flags: [ CASE_INSENSITIVE, MULTILINE ] Number: '\d+(\.\d+)?' Year: '(19|20)\d{2}' Date: $local: Day: $patterns: '0[1-9]|[12]\d|3[01]' Single: $local: { Digit: '[1-9]' } $fields: { digit: Digit } $patterns: '#{digit}' $value: '0#{digit}' Month: Jan: { $patterns: [ 'January', 'Jan\.?' ], $value: '01' } Feb: { $patterns: [ 'February', 'Feb\.?' ], $value: '02' } Mar: { $patterns: [ 'March', 'Mar\.?' ], $value: '03' } Apr: { $patterns: [ 'April', 'Apr\.?' ], $value: '04' } May: { $patterns: 'May', $value: '05' } Jun: { $patterns: [ 'June', 'Jun\.?' ], $value: '06' } Jul: { $patterns: [ 'July', 'Jul\.?' ], $value: '07' } Aug: { $patterns: [ 'August', 'Aug\.?' ], $value: '08' } Sep: { $patterns: [ 'September', 'Sept?\.?' ], $value: '09' } Oct: { $patterns: [ 'October', 'Oct\.?' ], $value: '10' } Nov: { $patterns: [ 'November', 'Nov\.?' ], $value: '11' } Dec: { $patterns: [ 'December', 'Dec\.?' ], $value: '12' } Number: $patterns: '0[1-9]|1[0-2]' Single: $local: { Digit: '[1-9]' } $fields: { digit: Digit } $patterns: '#{digit}' $value: '0#{digit}' $fields: { day: Day, month: Month, year: Year } $value: '#{year}-#{month}-#{day}' DayMonthYear: $patterns: '#{day}[ -]#{month}[-, ]{1,2}#{year}' MonthDayYear: $patterns: '#{month} #{day},? #{year}' Numeric: $patterns: '#{month:Month::Number}/#{day}/#{year}' Iso: $patterns: '#{year}-#{month:Month::Number}-#{day}' Season: Fall: { $patterns: [ 'Fall', 'Autumn' ], $value: 'Fall' } Winter: { $patterns: 'Winter', $value: 'Winter' } Spring: { $patterns: 'Spring', $value: 'Spring' } Summer: { $patterns: 'Summer', $value: 'Summer' } TermName: $local: { Unit: 'Semester|Term|Quarter|Session' } $fields: { season: Season, year: Year } $patterns: - '#{season}( ${Unit})? #{year}' - '#{year} #{season}( ${Unit})?' $value: '#{season} #{year}' Detail: $local: { Name: '[^\s:][^\n:]*[^\s:]' } Detail::StudentName: $local: Label: [ 'Student', 'Student name', 'Name' ] $fields: { name: Name } $patterns: '^${Label} *: *#{name} *$' $value: '#{name}' Detail::StudentId: $local: Label: [ 'Student identifier', 'Student ID', 'Student number', 'Student no\.?', 'ID', 'ID number', 'ID no\.?' ] Id: '[A-Z0-9][A-Z0-9-]{2,}' $fields: { id: Id } $patterns: '^${Label} *: *#{id} *$' $value: '#{id}' Detail::Institution: $local: Label: [ 'Institution', 'School', 'College', 'University' ] $fields: { name: Name } $patterns: '^${Label} *: *#{name} *$' $value: '#{name}' Detail::PrintDate: $local: Label: [ 'Printed', 'Printed on', 'Print date', 'Date printed', 'Issued', 'Date issued', 'Issue date' ] $fields: { date: Date } $patterns: '^${Label} *: *#{date} *$' $value: '#{date}' Course: $local: Code: '[A-Z]{2,5} ?-?\d{3,4}[A-Z]?' Title: '\S.*\S|\S' Grade: $flags: [ -CASE_INSENSITIVE ] $patterns: [ '[A-D][+-]?', 'F', 'P', 'NP', 'S', 'U', 'W', 'WF', 'I', 'IP', 'CR', 'NC', 'AU' ] CodeHeader: [ '^Code$', '^Course$', 'Course code', 'Course no\.?', 'Course number', 'Course ID' ] TitleHeader: [ 'Subject', 'Title', 'Course title', 'Description', 'Course name' ] GradeHeader: [ '^Grade$', '^Grd$' ] HoursHeader: [ 'Hours', 'Hrs', 'Credits?', 'Credit hours', 'Units' ] PointsHeader: [ 'Points', 'Pts', 'QPts', 'Quality points', 'Grade points' ] $fields: { code: Code, title: Title, grade: Grade, hours: Number, points: Number } $tables: $columns: code: CodeHeader title: TitleHeader grade: GradeHeader hours: HoursHeader points: PointsHeader Totals: $local: Attempted: [ 'attempted', 'hours attempted', 'credits attempted', 'att hrs' ] Earned: [ 'earned', 'hours earned', 'credits earned', 'earned hrs' ] Points: [ 'points', 'quality points', 'grade points', 'QPts' ] Gpa: [ 'GPA', 'term GPA', 'grade point average' ] Gap: ' *[;,]? +' $fields: { attempted: Number, earned: Number, points: Number, gpa: Number } $patterns: '^${Label} *:? *${Attempted} *:? *#{attempted}${Gap}${Earned} *:? *#{earned}${Gap}${Points} *:? *#{points}${Gap}${Gpa} *:? *#{gpa} *$' Term: { $local: { Label: [ 'Term totals', 'Term total', 'Semester totals', 'Term' ] } } Cumulative: { $local: { Label: [ 'Cumulative totals', 'Cumulative', 'Cum totals', 'Overall' ] } } Term: $fields: name: TermName courses: { $type: 'Course[]', $separator: '\n' } totals: Totals::Term cumulative: Totals::Cumulative $patterns: '^#{name}\n#{courses}(\n#{totals})?(\n#{cumulative})?' Transcript: $local: { Other: '^[^\n:]*[^\s:] *: *[^\n]*[^\s]' } $fields: student: Detail::StudentName id: Detail::StudentId institution: Detail::Institution printed: Detail::PrintDate terms: { $type: 'Term[]', $separator: '\n\s*' } $patterns: '((#{student}|#{id}|#{institution}|#{printed}|${Other})\n)+\s*#{terms}'
$ texomy parse input.txt -m educationAbout this spec
Academic transcripts: the student, identifier, institution and print date in any order, and per term the courses (code, title, grade, credit hours, grade points) with the term and cumulative totals.
Package files
education.ymlsamples/in-progress.txtsamples/prose.txtsamples/variant.txttests/education.test.ymltests/expected/in-progress.yamltests/expected/original.yamltests/expected/variant.yamltexomy.json
60 nodes from 1 top-level matches.
Run it yourself
Save the example from Studio to a folder, then in that folder:
texomy parse input.txt -m educationtexomy testMore examples
Invoices
Supplier, invoice number, dates, amounts, payment terms and order references, plus charge rows that take their section from the table caption.
Bank statements
Account, period and balance summary, and transactions read from a table whose Debit and Credit columns give each amount its sign.
Logistics
Bills of lading: references, vehicles, sender and receiver with addresses, cargo lines with count, kind and mass, and the totals, in whatever order the document states them.
Resumes
Candidate name, headline and contacts, each job and degree with its own dates, courses, and skills grouped under their area.
Addresses
Address blocks and one-line addresses: recipient, street or post office box with building, suite or mail stop, city, state, postal code and country.
Insurance claims
Explanation of Benefits tables: each claim line with service dates, description, status and every amount in its own field, the totals line as a type of its own, and the remark codes explained below.
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