Legal documents
Payment deadlines in a contract clause: what each applies to, the number of days, the event they count from, how strict it is and the statutes it cites, inside the numbered paragraph that states it.
FAR 52.232-25 Prompt Payment Prompt Payment (Jan 2017) Notwithstanding any other payment clause in this contract, the Government will make invoice payments under the terms and conditions specified in this clause. The Government considers payment as being made on the day a check is dated or the date of an electronic funds transfer (EFT). Definitions of pertinent terms are set forth in sections 2.101, 32.001, and 32.902 of the Federal Acquisition Regulation. All days referred to in this clause are calendar days, unless otherwise specified. (However, see paragraph (a)(4) of this clause concerning payments due on Saturdays, Sundays, and legal holidays.) (a) Invoice payments- (1) Due date. (i) Except as indicated in paragraphs (a)(2) and (c) of this clause, the due date for making invoice payments by the designated payment office is the later of the following two events: (A) The 30th day after the designated billing office receives a proper invoice from the Contractor (except as provided in paragraph (a)(1)(ii) of this clause). (B) The 30th day after Government acceptance of supplies delivered or services performed. For a final invoice, when the payment amount is subject to contract settlement actions, acceptance is deemed to occur on the effective date of the contract settlement. (ii) If the designated billing office fails to annotate the invoice with the actual date of receipt at the time of receipt, the invoice payment due date is the 30th day after the date of the Contractor’s invoice, provided the designated billing office receives a proper invoice and there is no disagreement over quantity, quality, or Contractor compliance with contract requirements. (2) Certain food products and other payments. (i) Due dates on Contractor invoices for meat, meat food products, or fish; perishable agricultural commodities; and dairy products, edible fats or oils, and food products prepared from edible fats or oils are- (A) For meat or meat food products, as defined in section 2(a)(3) of the Packers and Stockyard Act of 1921 (7 U.S.C. 182(3)), and as further defined in Pub. L. 98-181, including any edible fresh or frozen poultry meat, any perishable poultry meat food product, fresh eggs, and any perishable egg product, as close as possible to, but not later than, the 7th day after product delivery. (B) For fresh or frozen fish, as defined in section 204(3) of the Fish and Seafood Promotion Act of 1986 (16 U.S.C. 4003(3)), as close as possible to, but not later than, the 7th day after product delivery. (C) For perishable agricultural commodities, as defined in section 1(4) of the Perishable Agricultural Commodities Act of 1930 (7 U.S.C. 499a(4)), as close as possible to, but not later than, the 10th day after product delivery, unless another date is specified in the contract. (D) For dairy products, as defined in section 111(e) of the Dairy Production Stabilization Act of 1983 (7 U.S.C. 4502(e)), edible fats or oils, and food products prepared from edible fats or oils, as close as possible to, but not later than, the 10th day after the date on which a proper invoice has been received. Liquid milk, cheese, certain processed cheese products, butter, yogurt, ice cream, mayonnaise, salad dressings, and other similar products, fall within this classification. Nothing in the Act limits this classification to refrigerated products. When questions arise regarding the proper classification of a specific product, prevailing industry practices will be followed in specifying a contract payment due date. The burden of proof that a classification of a specific product is, in fact, prevailing industry practice is upon the Contractor making the representation. (ii) If the contract does not require submission of an invoice for payment (e.g., periodic lease payments), the due date will be as specified in the contract.
legal-documents.ymlspec
Days: $local: { Count: '\d+' } $fields: { count: Count } $value: '#{count}' Ordinal: '#{count}(st|nd|rd|th) (calendar |business )?day' Number: '(\p{L}+(-\p{L}+)? \()?#{count}\)? (calendar |business )?days' Strictness: AsCloseAsPossible: $patterns: 'as close as possible to, but not later than' $value: 'as close as possible to, but not later than' NotLaterThan: $patterns: - 'not later than' - 'no later than' - 'on or before' $value: 'not later than' Within: $patterns: 'within' $value: 'within' NotEarlierThan: $patterns: - 'not earlier than' - 'no earlier than' - 'on or after' $value: 'not earlier than' Event: $local: Invoice: '(a|an|the) (proper |valid |correct )?invoice' Receiver: '(the )?([a-z]+ ){0,3}(office|Government|agency|Buyer|buyer|Customer|customer|Purchaser|purchaser)' InvoiceReceipt: - '${Receiver} receives ${Invoice}( from the (Contractor|Seller|Supplier|Vendor))?' - '(the date of )?receipt of ${Invoice}' - 'the date (on which )?${Invoice} (has been|was|is) received' FinancingRequestReceipt: - '${Receiver} receives (a|the) (proper )?contract financing request' - '(the date of )?receipt of (a|the) (proper )?contract financing request' Acceptance: '((the )?Government |final )?acceptance( of [\p{L} ]+)?' Delivery: - '(product |the )?delivery( of [\p{L} ]+)?' - 'the date of (product )?delivery' InvoiceDate: - 'the date of (the |an? )?(Contractor’s |Contractor''s |Seller’s |Seller''s )?invoice' - 'the invoice date' UsCode: $local: Title: '\d+' Section: '\d+[a-z]*(-\d+)?(\([a-zA-Z0-9]+\))*' Following: 'et seq\.' $fields: { title: Title, section: Section, following: Following } $patterns: '#{title} U\.S\.C\. (§ ?)?#{section}( #{following})?' $value: '#{title} U.S.C. #{section}[ #{following}]' Act: $local: Year: '(1[789]|20)\d{2}' Name: '[A-Z][\p{L}-]*( (and|of|for|on|to|the|[A-Z][\p{L}-]*))*? Act' $fields: { name: Name, year: Year } $patterns: '#{name}( of #{year})?' $value: { name: '#{name}', year: '#{year}' } PublicLaw: $local: { Number: '\d+-\d+' } $fields: { number: Number } $patterns: 'Pub(\.|lic) ?L(\.|aw) (No\. )?#{number}' $value: 'Pub. L. #{number}' Statute: $local: Section: '\d+[a-z]*(\([a-zA-Z0-9]+\))*' $fields: { section: Section, act: Act, law: PublicLaw, code: UsCode } ActCitation: '(section #{section} of )?(the )?#{act}( \(#{code}\))?' LawCitation: '#{law}( \(#{code}\))?' CodeCitation: '#{code}' TimeLimit: $fields: { strictness: Strictness, days: Days, event: Event } $patterns: '(#{strictness},? )?([Tt]he )?#{days} (after|following|from|of) #{event}' Deadline: $local: Name: '\p{L}[\p{L} -]*?' Payment: '\p{L}+( \p{L}+){0,2}' Goods: $fields: name: Name definitions: { $type: 'Statute[]', $separator: ',? and |, ' } including: { $type: 'Name[]', $separator: ', (and |or )?' } $patterns: '#{name}(,? (and )?as (further )?defined (in|by) #{definitions})*(,? including #{including})?' $fields: payment: Payment goods: { $type: 'Goods[]', $separator: ', (and |or )?|; (and |or )?' } limit: TimeLimit ForGoods: '[Ff]or #{goods}, #{limit}' PayGoods: '[Pp]ay #{goods} #{limit}' PaymentForGoods: '[Pp]ayment for #{goods} (is|will be|shall be) due #{limit}' PaymentDueDate: 'the #{payment} due date (is|will be|shall be) #{limit}' DueDateForPayment: '[Tt]he due date for (making )?#{payment}( by the [\p{L} ]+)? (is|will be|shall be) #{limit}' PaymentPaid: '#{payment} (is|are|shall be|will be) (paid|payable|due) #{limit}' Stated: '#{limit}' Order: Later: $patterns: 'later' $value: 'later' Earlier: $patterns: 'earlier' $value: 'earlier' DueDateRule: $local: Payment: '\p{L}[\p{L} -]*?' $fields: payments: { $type: 'Payment[]', $separator: ', (and |or )?' } order: Order $patterns: 'the due date for (making )?#{payments}( by the [\p{L} ]+)? (is|will be|shall be) the #{order} of the following( \p{L}+)? (events|dates)' CrossReference: $local: Reference: '(\((\d+|[a-z]+|[A-Z])\))+' $fields: paragraphs: { $type: 'Reference[]', $separator: ',? (and|or) |, ' } $patterns: '(sub)?paragraphs? #{paragraphs} of this (clause|section)' Paragraph: $flags: [ MULTILINE ] $fields: label: Label deadlines: 'Deadline[]' rules: 'DueDateRule[]' statutes: 'Statute[]' references: 'CrossReference[]' paragraphs: { $type: 'Paragraph[]', $separator: '\n\n' } $patterns: '^#{label} (#{deadlines}|#{rules}|#{statutes}|#{references}|[^\n])+(\n\n#{paragraphs})?' Level1: $local: { Label: '\([a-z]\)' } $fields: paragraphs: { $type: 'Paragraph::Level2[]', $separator: '\n\n' } Level2: $local: { Label: '\(\d+\)' } $fields: paragraphs: { $type: 'Paragraph::Level3[]', $separator: '\n\n' } Level3: $local: { Label: '\((i|ii|iii|iv|v|vi|vii|viii|ix|x|xi|xii)\)' } $fields: paragraphs: { $type: 'Paragraph::Level4[]', $separator: '\n\n' } Level4: $local: { Label: '\([A-Z]\)' } $patterns: '^#{label} (#{deadlines}|#{rules}|#{statutes}|#{references}|[^\n])+' Numbered: $local: { Label: '\d+(\.\d+)+\.?' } $patterns: '^#{label} (#{deadlines}|#{rules}|#{statutes}|#{references}|[^\n])+'
$ texomy parse input.txt -m legal-documentsAbout this spec
Payment clauses of government and commercial contracts: each payment deadline with its paragraph, what it applies to, the number of days, the event they count from and how strict it is; the statutes cited with each deadline; cross-references to paragraphs of the clause.
Package files
legal-documents.ymlsamples/commercial.txtsamples/government.txtsamples/none.txttests/expected/commercial.yamltests/expected/government.yamltests/expected/none.yamltests/expected/prompt-payment.yamltests/legal-documents.test.ymltexomy.json
127 nodes from 2 top-level matches.
Run it yourself
Save the example from Studio to a folder, then in that folder:
texomy parse input.txt -m legal-documentstexomy 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.
Education
Student, identifier, institution and print date in any order, and each term with its courses, grades, credit hours and totals.
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.
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