lawtomated
  • Home
  • About
  • Law
    • All Access to Justice Future lawyers Knowledge Management Law Firms Open-source law Practice of Law
      Access to Justice

      Divorce disruptors – how LawTech start-up amicable is…

      Buying Software

      Selling to Legal Teams: Attention to Detail

      Buying Software

      Selling to Legal Teams: Who to Sell

      Buying Software

      Selling to Legal Teams: 3 Mistakes To Avoid

      Access to Justice

      Divorce disruptors – how LawTech start-up amicable is…

      Future lawyers

      To Code or Not to Code: should lawyers…

      Knowledge Management

      Google Document Understanding AI – features, screenshots and…

      Knowledge Management

      Structured Data vs. Unstructured Data: what are they…

      Law Firms

      Selling to Legal Teams: Attention to Detail

      Law Firms

      Selling to Legal Teams: Who to Sell

      Law Firms

      Selling to Legal Teams: 3 Mistakes To Avoid

      Law Firms

      Killer software demos that win legaltech pitches

      Open-source law

      Open Source Contracts: Part 4

      Open-source law

      Open Source Contracts: Part 3

      Open-source law

      Open Source Contracts: Part 2

      Open-source law

      Open Source Contracts: Part 1

      Practice of Law

      Why are lawyers unhappy?

  • Legaltech
    • All Buying Software Selling Software
      Events

      Introducing Legal Innovators California – 9th June 2022…

      Events

      Future Lawyer Week UK is coming to London…

      Legaltech

      Is mobile the future of legaltech?

      Legaltech

      Future Lawyer Week 2021!

      Buying Software

      Why you should look beyond legaltech: 4 surprising…

      Buying Software

      Selling to Legal Teams: Attention to Detail

      Buying Software

      Selling to Legal Teams: Who to Sell

      Buying Software

      Selling to Legal Teams: 3 Mistakes To Avoid

      Selling Software

      Selling to Legal Teams: Attention to Detail

      Selling Software

      Selling to Legal Teams: Who to Sell

      Selling Software

      Selling to Legal Teams: 3 Mistakes To Avoid

      Selling Software

      Killer software demos that win legaltech pitches

  • Coding
    • Coding

      Coding for beginners: 10 tips on how you…

      Coding

      Coding for beginners: what to learn, where, how…

      Coding

      Coding for beginners: what to learn, where, how…

      Coding

      To Code or Not to Code: should lawyers…

      Coding

      Open Source Contracts: Part 4

  • Careers
    • All Guide Profile
      Careers

      Legaltech Careers: Sharan Kaur, Legaltech Consultant

      Careers

      Legaltech Careers: Dave Wilson, Managing Director & Founder…

      Careers

      The Legaltech cheat sheet. All you need to…

      Careers

      Leaving the Law for Legaltech, Legal Ops or…

      Guide

      The Legaltech cheat sheet. All you need to…

      Guide

      Leaving the Law for Legaltech, Legal Ops or…

      Guide

      Legaltech Careers: Nitish Upadhyaya, Senior Innovation Manager, A&O’s…

      Guide

      Legaltech Careers Guide: Roles, Salaries & Work /…

      Profile

      Legaltech Careers: Sharan Kaur, Legaltech Consultant

      Profile

      Legaltech Careers: Dave Wilson, Managing Director & Founder…

      Profile

      Legaltech Careers: Mary Bonsor, CEO and Co-Founder of…

      Profile

      Legaltech Careers: Devshi Mehrotra, CEO & Co-Founder of…

  • A.I.
    • All Accuracy, Precision, Recall & F1 Score Deep Learning Hype I.A. Machine Learning Reinforcement Learning Supervised Learning Unsupervised Learning
      A.I.

      Contracts and the data capture challenge

      A.I.

      The evolution of Natural Language Processing and its…

      A.I.

      Legaltech adoption barriers. How many apply to your…

      A.I.

      Explainable AI – All you need to know….

      Accuracy, Precision, Recall & F1 Score

      4 things you need to know about AI:…

      Deep Learning

      The evolution of Natural Language Processing and its…

      Deep Learning

      Explainable AI – All you need to know….

      Deep Learning

      Machine learning with school math. Yes, you learnt…

      Deep Learning

      10 hype busting A.I. articles everyone should read

      Hype

      10 hype busting A.I. articles everyone should read

      Hype

      Can your AI vendor answer these 17 questions?…

      Hype

      Why the “I” in A.I. needs to go

      I.A.

      I.A. vs. A.I. – what’s the difference and…

      Machine Learning

      Contracts and the data capture challenge

      Machine Learning

      The evolution of Natural Language Processing and its…

      Machine Learning

      Explainable AI – All you need to know….

      Machine Learning

      Machine learning with school math. Yes, you learnt…

      Reinforcement Learning

      10 hype busting A.I. articles everyone should read

      Reinforcement Learning

      A.I. Technical: Machine vs Deep Learning

      Supervised Learning

      Machine learning with school math. Yes, you learnt…

      Supervised Learning

      4 things you need to know about AI:…

      Supervised Learning

      10 hype busting A.I. articles everyone should read

      Supervised Learning

      A.I. Technical: Machine vs Deep Learning

      Unsupervised Learning

      Machine learning with school math. Yes, you learnt…

      Unsupervised Learning

      10 hype busting A.I. articles everyone should read

      Unsupervised Learning

      A.I. Technical: Machine vs Deep Learning

      Unsupervised Learning

      Google enters the contract extraction space!

  • Contact
lawtomated
  • Home
  • About
  • Law
    • All Access to Justice Future lawyers Knowledge Management Law Firms Open-source law Practice of Law
      Access to Justice

      Divorce disruptors – how LawTech start-up amicable is…

      Buying Software

      Selling to Legal Teams: Attention to Detail

      Buying Software

      Selling to Legal Teams: Who to Sell

      Buying Software

      Selling to Legal Teams: 3 Mistakes To Avoid

      Access to Justice

      Divorce disruptors – how LawTech start-up amicable is…

      Future lawyers

      To Code or Not to Code: should lawyers…

      Knowledge Management

      Google Document Understanding AI – features, screenshots and…

      Knowledge Management

      Structured Data vs. Unstructured Data: what are they…

      Law Firms

      Selling to Legal Teams: Attention to Detail

      Law Firms

      Selling to Legal Teams: Who to Sell

      Law Firms

      Selling to Legal Teams: 3 Mistakes To Avoid

      Law Firms

      Killer software demos that win legaltech pitches

      Open-source law

      Open Source Contracts: Part 4

      Open-source law

      Open Source Contracts: Part 3

      Open-source law

      Open Source Contracts: Part 2

      Open-source law

      Open Source Contracts: Part 1

      Practice of Law

      Why are lawyers unhappy?

  • Legaltech
    • All Buying Software Selling Software
      Events

      Introducing Legal Innovators California – 9th June 2022…

      Events

      Future Lawyer Week UK is coming to London…

      Legaltech

      Is mobile the future of legaltech?

      Legaltech

      Future Lawyer Week 2021!

      Buying Software

      Why you should look beyond legaltech: 4 surprising…

      Buying Software

      Selling to Legal Teams: Attention to Detail

      Buying Software

      Selling to Legal Teams: Who to Sell

      Buying Software

      Selling to Legal Teams: 3 Mistakes To Avoid

      Selling Software

      Selling to Legal Teams: Attention to Detail

      Selling Software

      Selling to Legal Teams: Who to Sell

      Selling Software

      Selling to Legal Teams: 3 Mistakes To Avoid

      Selling Software

      Killer software demos that win legaltech pitches

  • Coding
    • Coding

      Coding for beginners: 10 tips on how you…

      Coding

      Coding for beginners: what to learn, where, how…

      Coding

      Coding for beginners: what to learn, where, how…

      Coding

      To Code or Not to Code: should lawyers…

      Coding

      Open Source Contracts: Part 4

  • Careers
    • All Guide Profile
      Careers

      Legaltech Careers: Sharan Kaur, Legaltech Consultant

      Careers

      Legaltech Careers: Dave Wilson, Managing Director & Founder…

      Careers

      The Legaltech cheat sheet. All you need to…

      Careers

      Leaving the Law for Legaltech, Legal Ops or…

      Guide

      The Legaltech cheat sheet. All you need to…

      Guide

      Leaving the Law for Legaltech, Legal Ops or…

      Guide

      Legaltech Careers: Nitish Upadhyaya, Senior Innovation Manager, A&O’s…

      Guide

      Legaltech Careers Guide: Roles, Salaries & Work /…

      Profile

      Legaltech Careers: Sharan Kaur, Legaltech Consultant

      Profile

      Legaltech Careers: Dave Wilson, Managing Director & Founder…

      Profile

      Legaltech Careers: Mary Bonsor, CEO and Co-Founder of…

      Profile

      Legaltech Careers: Devshi Mehrotra, CEO & Co-Founder of…

  • A.I.
    • All Accuracy, Precision, Recall & F1 Score Deep Learning Hype I.A. Machine Learning Reinforcement Learning Supervised Learning Unsupervised Learning
      A.I.

      Contracts and the data capture challenge

      A.I.

      The evolution of Natural Language Processing and its…

      A.I.

      Legaltech adoption barriers. How many apply to your…

      A.I.

      Explainable AI – All you need to know….

      Accuracy, Precision, Recall & F1 Score

      4 things you need to know about AI:…

      Deep Learning

      The evolution of Natural Language Processing and its…

      Deep Learning

      Explainable AI – All you need to know….

      Deep Learning

      Machine learning with school math. Yes, you learnt…

      Deep Learning

      10 hype busting A.I. articles everyone should read

      Hype

      10 hype busting A.I. articles everyone should read

      Hype

      Can your AI vendor answer these 17 questions?…

      Hype

      Why the “I” in A.I. needs to go

      I.A.

      I.A. vs. A.I. – what’s the difference and…

      Machine Learning

      Contracts and the data capture challenge

      Machine Learning

      The evolution of Natural Language Processing and its…

      Machine Learning

      Explainable AI – All you need to know….

      Machine Learning

      Machine learning with school math. Yes, you learnt…

      Reinforcement Learning

      10 hype busting A.I. articles everyone should read

      Reinforcement Learning

      A.I. Technical: Machine vs Deep Learning

      Supervised Learning

      Machine learning with school math. Yes, you learnt…

      Supervised Learning

      4 things you need to know about AI:…

      Supervised Learning

      10 hype busting A.I. articles everyone should read

      Supervised Learning

      A.I. Technical: Machine vs Deep Learning

      Unsupervised Learning

      Machine learning with school math. Yes, you learnt…

      Unsupervised Learning

      10 hype busting A.I. articles everyone should read

      Unsupervised Learning

      A.I. Technical: Machine vs Deep Learning

      Unsupervised Learning

      Google enters the contract extraction space!

  • Contact
CodingLaw

Law & Coding: variables vs defined terms

by info@lawtomated.com February 28, 2017
February 28, 2017 0 comment
13 min read

We love law and coding – there’s a lot of interesting similarities and differences. The good news is you don’t have to be a genius to code!  Likewise, maths mastery isn’t needed, except for more technical or specialist areas like machine learning. Even in more mathematical domains such as machine learning, the software industry continues to provide abstracted frameworks with which to work above the maths.

Further, law and coding have a lot more in common than coders and lawyers might otherwise appreciate.   Joining the dots between these two domains is increasingly common, although misunderstood in equal measure.

(For more on whether lawyers should code, see our article on that subject!)

In what will hopefully become a series of posts, we’ll try to explain the similarities and differences between coding and legal drafting concepts. Hopefully, these articles will help lawyers and anyone coding in the legaltech domain understand each other better.

Let’s start simple: 

  • variables – a programming concept; and
  • defined terms –a legal drafting concept!

Before we begin

Python

Although variables are a concept common to coding languages, the exact syntax necessary to create and manipulate a variable varies from language to language.  For these purposes, we will use the programming language:

Python Logo
Python

Python is easy to pick up and understand despite it being a massively popular language used in everything from websites to complex machine learning algorithms.  

If you want to know more about python and how to use it, check out this beginner’s guide or this excellent 101 guide.

For the purposes of these posts concerning similarities between law and coding, it’s not strictly necessary to read those guides (or others) as the examples will be super simple for now!

If and as this series progresses, the series might warrant spending an hour or two familiarising yourself with Python in more detail. When that happens we will make it known!

Variables = Defined Terms

and vice versa

To begin with, we will consider variables (coding) and defined terms (contract drafting). This is perhaps one of the simplest law and coding overlaps. In time we will explore other law and coding overlaps.

What is a variable?

In a computer program, a variable is a container used to store information that we want to reference and / or manipulate throughout a computer program.

Good coding principles dictate the use of descriptive label names so the meaning can be understood more easily by the programmer or another programmer reviewing the code.

Here’s an example variable:

container = 1

Subsequent references to container will reference the designated value, in this case: 1

What is a defined term?

In a legal contract, a defined term serves the same purpose as a variable: it stores information we want to reference and / or manipulate in a legal contract.  

Here’s an example:

“Loan Agreement” means the £100 loan agreement dated 28 February 2017 between Big Bank and Joe Bloggs.”

Defined terms are usually grouped together in an alphabetical list and located at the start of a contract under the clause heading, “Defined Terms‘ or “Definitions“.

Sometimes for documents governed by laws other than England & Wales (e.g. contracts governed by the law of a particular State in the USA), the defined terms might be listed in a schedule at the end of the document.

Finally, it’s also common to define defined terms in line. We will describe these distinctions in greater detail below.

Creating Variables + Defined Terms

Declarations vs. Definitions

How do you create a variable?

Creating a variable is easy.  To create a variable you

  1. decide upon the label name; and
  2. assign it the desired value you wish to store in that variable (remember to think of variables as containers for now).

In coding speak, this is known as declaring a variable. For instance:

name = "Derren Brown"

The above:

  • creates a variable label entitled name; and
  • assigns to that label the value  of "Derren Brown", which is a string data type (a string of individual characters, i.e. D-e-r-r-e-n-B-r-o-w-n), using the = symbol.

In other words, the computer program now remembers that (without any further code) any reference to name references the stored value, "Derren Brown".

How do you create a defined term?

Creating a defined term in a contract is equally easy, although deciding on the actual words can be tricky given the imprecise nature of natural language versus the precise nature of programming syntax.

There’s no specified format for creating a defined term in a contract, but most commonly the format is the following:

“[Label]” means [something]. 

The square brackets mean you containerise the words therein.  For instance, using this format we can store the value of a contract’s termination date (i.e. the date the contract terminates) as follows:

“Termination Date” means 28 February 2017.

Without any further drafting, any cross-reference to Termination Date throughout the contract now points to the stored value: 28 February 2017.

Referencing Variables + Defined Terms

call vs. Cross reference

How do you reference a variable?

Variables can be referenced throughout a program.  Often a variable is referenced because it forms an ingredient for a method or function (i.e. a piece of code that uses the variable to complete a computational process).

For instance: print(name).  This passes the name variable to python’s inbuilt print function.   Doing so tells the computer to print to the screen (i.e. display) the current value of name, which is of course "Derren Brown" (i.e. because we assigned that value to the name variable above!).

Here’s what that looks like in real life:

name = "Derren Brown"
print(name)

This causes the computer to return the following:

>> Derren Brown

When referencing variables it is crucial to maintain the correct spelling and capitalisation.  For example, the following code would be incorrect: 

print(Name)

The program would raise an error (i.e. display an error message to the screen) like so:

>> NameError: name 'Name' is not defined

Why? Well, it’s because the variable isn’t Name with a capital “N”, rather it’s name with a lower case ‘n’.  The computer doesn’t know about a variable called Name  so it can’t run the print function on it. This is an example of the literality of computers and code.

How do you reference a defined term?

Defined terms can be referenced anywhere in the body of a contract, whether that is a recital (a series of provisions at the start of a contract usually describing the brief context or historical background to the document’s inception, e.g. a process of prior contracts amending the original contract), a schedule or a clause.

For instance:

“The confidentiality agreement shall cease to be effective on the Termination Date.”

To use the defined term you simply include the capitalised term by reference as above.  Like variables, you must use the correct spelling and capitalisation.  For instance, the following would be incorrect:

“The confidentiality agreement shall cease to be effective on the termination date.”

It’s incorrect because the lower case “termination date” introduces ambiguity.  In other words, someone reading the contract might start to question whether the reference is to the “Termination Date”, which is a certain date specified in the corresponding defined term, or whether it intends to refer to something else, e.g. a termination date in general.

A crucial difference vs. variables is that, unlike a program, a contract won’t raise an error regarding the above unless you use a Word plugin, of which several exist today, e.g. ContractCompanion and Define (explored in more detail below).

Manipulating Variables + Defined Terms

it’s all about doing

How do you manipulate a variable?

A program can manipulate a variable to update the assigned value.  For example: name = "Penn Jillette".  This updates the value of name by assigning it the new value of "Penn Jillette".  

Doing so overwrites the previous value. As a result (after the above step), if we were to then use print(name) the returned value would now be "Penn Jillette" and not  "Derren Brown". Like so:

name = "Derren Brown"
name = "Penn Jillette"
print(name)
>> Penn Jillette 

How do you manipulate a defined term?

Contracts sometimes update the value of a defined term. For instance:

Upon Party A’s receipt of an Extension Notice, the Termination Date shall mean the date falling 10 days after the date Party A receives the Extension Notice.

In the above, the original “Termination Date” is modified for a particular purpose, i.e. to extend the Termination Date in specific circumstances permitted under the contract pursuant to a prescribed process. If activated, i.e. upon Party A’s receipt of an Extension Notice (also a separately defined term) the Termination Date becomes the date falling 10 days after the date Party A receives that notice.

Where law and coding meet: defined terms software

trainee lawyer rocket fuel

Finally, the intersection of variables and defined terms aren’t merely theoretical. In fact, there is even software aimed at interoperating these two domains to improve legal work.

Two excellent and somewhat overlapping tools that illustrate how law and coding can be combined with regard to defined terms include:

  1. Contract Companion; and
  2. Define.

Let’s briefly explain both below.

1. Contract Companion

Contract Companion by Litera is a tool useful to all legal workers. That said, its focus is on typo spotting regarding cross-references and defined terms. As such it naturally fits better with paralegal, secretarial and junior legal resources. This is for a simple reason: these tasks are typically undertaken by the aforementioned individuals given they are the most cost-effective resources within any legal team.

Typo Terminator

To do so, Contract Companion processes Word documents (i.e. contract drafts) in a few seconds to identify and allow easier manual (note: not automated) correction of hard-to-see errors such as:

  • unclosed brackets, e.g. “A, B and C (the “Parties” .”
  • defined but unused defined terms
  • capitalised but undefined defined terms
  • clause / list numbering issues
  • inconsistent phrase usage
  • incorrect cross-references
  • inconsistent dates, addresses, company names, monetary values, credit card numbers, and more

Why is this cool?

Before such tools these tasks were accomplished by either:

  1. printing a document and manually proofreading it, which naturally entails lots of back and forth page turning to check and double-check all the referencing by hand; or
  2. ctrl + f searching within Microsoft Word, which is equally suboptimal in time and efficiency.

Given the high number of document changes in any given negotiation, this process is repeated many times, exacerbating its inefficiency absent of software tools such as Contract Companion.

An example screenshot of the interface is shown below:

Litera Contract Companion Defined Terms Checker

2. Define

Define’s mission is to make the reading, understanding, and drafting of documents simple. Unlike Contract Companion, Define is more focused on aiding understanding vs. typo spotting, albeit Define also offers features in service of the latter need.

To do so Define processes a Microsoft Word document in a matter of seconds, essentially building links between every capitalised term and the corresponding place within the document where such term is defined, whether defined terms are defined in a list or “in line”.

To the non-lawyers reading this, we mean the distinction between:

Listed Defined Terms

“Facilities” means Facility A and Facility B.

“Facility A” means £100,000,000.

“Facility B” means £250,000,000.

In-line Defined Terms

Information regarding the Transaction (the “Confidential Information“) shall be kept confidential until the date falling 2 years after the date of this Agreement.

The result is an ability to simply click any capitalised term (i.e. a cross-referenced defined term) anywhere in the document and have a pop-up menu in Word appear that presents the corresponding defined term alongside the clause.

The corresponding defined term can be edited alongside the clause and vice versa.

Nested Defined Terms

Even better is the ability to drill down to defined terms within defined terms, e.g. the below, which nests two further defined terms, i.e. “Facility A” and “Facility B”:

“Facilities” means Facility A and Facility B;

The benefit of all this is that the reviewer can read a clause and understand the intra-clause defined terms in context and vice versa without having to navigate away from the focus of their review, i.e. a particular clause.

Why is this cool?

Without such functionality, the reviewer must either print the document and page turn back and forth between clause and defined terms (and between further defined terms) or replicate the equivalent behaviour in Word by scrolling or ctrl + F searches, neither of which are great and both cause the reviewer to lose context and slow review.

If this still doesn’t make sense (quite possibly to non-lawyers less familiar with this pain point) the best thing is to see Define in action:

Conclusion

A simpe but illustrative crossover

In short, there are a lot of similarities between the concepts of variables in coding and defined terms in contract drafting!

There are of course many differences, however, we don’t want to get too bogged down and detract from the purpose of these articles, which is to help understand how key concepts are more similar than they might otherwise appear!

Finally, thanks to clever people joining the dots between the world of software and contracts it is now possible to automate some of the previously mind-numbing checking of defined terms and cross-referencing typos (and semantic concerns) via tools such as Contract Companion and Define.

We hoped you enjoyed this introduction to the intersection of law and coding!

CodingContract DraftingDefined TermsLawPythonVariables
0 comment
next post
Contracts: the legaltech status quo

Related Posts

Coding for beginners: 10 tips on how you...

February 25, 2020

Coding for beginners: what to learn, where, how...

February 13, 2020

Search

Stay in touch

Facebook Twitter Instagram Linkedin Email

Tweets

Great piece by @LegalTechHub1 summarizing critical evaluation criteria for use of LLMs in legal settings. Asking t… https://t.co/3dxfx7UFzw

17-Mar-2023

Reply Retweet Favorite
Unsurprising but exciting. To what extent will this overlap with or challenge the "for legal" apps offering, or lau… https://t.co/Gzw4jYrMAs

16-Mar-2023

Reply Retweet Favorite
GPT4 demo's last 5 mins should be a must watch for legal / tax folks! Spoiler Alert: snippet of US tax code is use… https://t.co/RqcljH3ILK

14-Mar-2023

Reply Retweet Favorite
AI-generated works, artists and IP. Who owns what? Great read (with a US focus) on some key themes re generative… https://t.co/Sn289Ce4zW

06-Mar-2023

Reply Retweet Favorite
A #legaltech rap by @bing chat 🎶 Yo, listen up, I got a story to tell, About legaltech and how it's changing the… https://t.co/ofrNBdfIVj

02-Mar-2023

Reply Retweet Favorite

Popular Posts

  • 1

    Structured Data vs. Unstructured Data: what are they and why care?

  • 2

    Is mobile the future of legaltech?

  • 3

    The Legaltech cheat sheet. All you need to know about legaltech products and use cases

  • 4

    Explainable AI – All you need to know. The what, how, why of explainable AI

  • 5

    Legaltech vs Lawtech. What is the difference between legaltech and lawtech? Is there one and does it matter?

Categories

Tags

A.I. AI Artificial Intelligence Avvoka Buying Software Career Profile Careers Coding Contract Data Deep Learning DMS Document Management System EdX Git GitHub Google Hype iManage Javascript Law Law Firms Lawtech Lawyers Legal Legal A.I. Legal Drafting Legal Innovation Legal Ops Legal Teams Legaltech Legatics Linux Machine Learning Marginal Gains Office & Dragons Open-source law Open-source software Open Source Initiative OSS Python Search Selling Software Supervised Learning Unsupervised Learning
  • Facebook
  • Twitter
  • Instagram
  • Linkedin
  • Email
  • Reddit
  • RSS

@2020 - All Rights Reserved Lawtomated