How To Extract Dates from Text With AI

Forefront
3 min readAug 25, 2022

--

A core function of Natural Language Processing (NLP) systems is the ability to pull out structured pieces of information from free text. This process of extracting and labeling structured “entities” from raw text is called Named Entity Recognition (NER).‍

There are all kinds of entities that people want to extract from text. A popular entity is “dates” — references to points in time. For example, the sentence “ Elizabeth is going to Boston on Thursday “ contains the date entity “Thursday” as well as the person entity “Elizabeth”.

‍There are many reasons why people would need to automatically extract dates from free text. Legal systems can use date entity extraction to categorize legal documents by referenced dates. Home automation systems use date extraction to automate home functions like setting reminders. Date extraction technology can benefit all kinds of organizations and people but up until now any kind of entity extraction system has been difficult to set up and use.‍

Forefront Extract‍

To make date extraction as simple as an API call, we created Forefront Extract, an easy-to-use entity extraction API. Using the API to extract dates from text is simple and requires only two inputs:

  1. text — a piece of text that can be any length
  2. entities — A list of entity types that you are looking to extract. There are many entity options and the one we will highlight here is “dates” — references to points in time

Let’s see the Extract API in action for the examples we outlined.‍

Example 1: Legal document structuring

Legal documents can be long-winded and frankly tiring to read manually. Entity extraction systems can parse documents for referenced dates to help paralegals and lawyers sort through and categorize documents. Let’s watch Forefront Extract pull out dates from a recent patent.‍

‍We can see that with Forefront Extract, dates can be automatically extracted from long patent documents without having to manually sift through them.‍

Example 2: Home automation

Home automation systems (HAS) can help you set reminders hands-free by extracting dates from your commands. For example if you wanted your HAS to set a reminder to go shopping you might say something like: “Remind me to go shopping tomorrow”. Let’s see how Forefront Extract would handle this:‍

‍We can see that the Extract API knows that “tomorrow” is a date even while not explicitly mentioning a specific date on a calendar.‍

Get started today with Forefront Extract

It’s clear from our examples that Forefront Extract can intelligently extract dates and other entities from text. The possibilities unlocked by Forefront Extract are endless. Documentation for the Extract API can be found here.

‍Ready to sign up and get started? Sign up for Forefront today!

Originally published at https://www.forefront.ai.

--

--

Forefront
Forefront

Written by Forefront

Deploy powerful language models in one click, fine-tune for free.

No responses yet