• Stars
    star
    216
  • Rank 182,599 (Top 4 %)
  • Language
    Java
  • Created almost 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Natural Language Date Time Parser that Extract date and time from text with context and parse to the required format

HAWKING

A natural language date parser written in Java

About • Key Features • Configurations

About

Given any date expression in a sentence, Hawking will apply standard language recognition and parser techniques to produce a list of corresponding dates with optional parse and syntax information.

It supports for almost every existing date format: absolute dates, relative dates(on Sunday, at 12 PM, at 04/11/2021, etc).

Here is sample input:
HawkingTimeParser parser = new HawkingTimeParser();
String inputText = "Good morning, Have a nice day. Shall we meet on December 20 ?";
DatesFound datesFound = parser.parse(inputText, referenceDate, hawkingConfiguration, "eng");

//"eng" refers to English language
//referenceDate, hawkingConfiguration are explained in detail below
Output object "datesFound" contains following information and more:
Text : on December 20
Start : 2021-12-20T00:00:00.000+05:30
End : 2021-12-20T23:59:59.000+05:30

Check out the Demo file: HawkingDemo

Releases

Hawking date time parser releases are available in the Maven Central repository

Models

The models used in Hawking Time Parser in the latest code are listed below.

*Parser Model : Custom NER model to parse all dates in a sentence

src/main/resources/parser/parser.crf.ser.gz

*Stanford NLP POS Tagger: Used for Tense Prediction

src/main/resources/tense/english-left3words-distsim.tagger

Key Features

Here are some key features of Hawking Time Parser,

Tense Consideration :

Tense of the sentence is considered while parsing date.

I met you on Monday
I will meet you on Monday

Context Understanding :

Hawking Time Parser can understand and detect the date components based on context.

Good morning, I am so happy to see you(No dates)
Sun rises in the east(No dates) -- On sun, John met Lisa(Date: on sun)
I watched Tomorrow Never Dies(No dates) -- Can we go to the movie tomorrow ?(Date: tomorrow)

Multiple Dates :

It can detect multiple dates for a given input.

I am going for a trade show at evening. From December 2nd, most of the companies will be open in Tamil Nadu. (Dates: at evening, from December 2nd)

Date Time Relation and Duration :

Hawking time parser can parse duration or span cases .

Next 2 weeks, I am going to London for a conference.
We have been working on this project for 3 months.
Call me in 2 hours.

Prefix & Postfix Importance :

Prefix and postfix plays a vital role in parsing datetime text. Each prefix/postfix refers different date and time

Prefix -> Since Monday, Next Monday, within Monday, for Monday.
Postfix -> 2 weeks back, 10 months ago, 5 hours later.

Hawking time Parser can account 30+ prefix and suffix while parsing and returns date as input referred to(since, from, till, until, within, for, at, on, in, next, last, past and so on).

Complex cases :

Hawking can detect and parse date time more than 5 words.

next year 1st weekend Sunday morning 9 am

Reference time :

A reference time is the time from which date text has to be parsed

  *Let's say reference time = 01/11/2020 9:00 AM
    Input : "I will call at 2 PM"
    output = 01/11/2020 2:00 PM

  *Let's say reference time = 01/11/2020 8:00 PM
    Input : "I will call at 2 PM"
    Output = 02/11/2020 2:00 PM (As input is in future tense at night
    8 PM, it's obvious that it refers to tomorrow)

So parsing dates based on input reference time is a base for Hawking time parser(if reference time is not passed, current system time will be default reference time)

Time Zone Handling :

Hawking time parser can parse dates and time along with timezone. Currently it supports 500+ Time zones

  Call me at 9 AM Singapore time
  I will schedule demo at 13:30 PST
  Meeting will start at 10:00 AM (Asia/Calcutta)

Configurations

Hawking time Parser's versatility allows to the user to configure everything in the way they need the date text to parsed.

Needs for configuration :

Even though date and time is globally referred by same common words in English, the context of date text can differs from person to person, locale to locale, country to country, business to business.

When someone says "we will go out on weekend "
  -> In India it's Saturday and Sunday
  -> In UAE it's Friday and Saturday

Date formats :
  In Europe  = DD/MM/YYYY
  In United States = MM/DD/YYYY

So Hawking Configurations enable user to control the date and time output based on their perspective and requirements.

Cases for configurations :

Hawking Time Parser allows user set configuration to 30+ date and time components based on the needs.

*Show me meeting schedules for next 2 days

User can expect next 48 hours or next 2 days (from tomorrow))

*Show me meeting schedules for next week

WeekStart and WeekEnd can be given by user like Sunday to Saturday. For Business model user can set week to represent only weekdays-Monday to Friday

*I will call you at 12 am

User can set their time zone as default timezone instead of mentioning timezone in input every time

*Schedule meeting on 07/12/2020

User can set default dateformats like (DD/MM/YYYY or MM/DD/YYYY) more than 20 DateFormats is supported.

Business Custom Cases:

Hawking time parser supports business date cases like Fiscal year, Financial year, Annual year, quarterly, Q3, etc.

* Revenue generated this quarter
* In the last fiscal year, our company reached more than 20 million users

Users can set configuration for the Fiscal year start and end too based on their business model (February to January or April to March...)

To understand the Hawking configuration input, check: HawkingConfiguration

More Repositories

1

zcrm-php-sdk

Zoho CRM API SDK is a wrapper to Zoho CRM APIs. By using this sdk, user can build the application with ease
PHP
85
star
2

zcrm-python-sdk

Python SDK is wrapper for Zoho CRM APIs. By using this SDK, user can build the application with ease
Python
40
star
3

zcrm-nodejs-sdk

Node SDK for Zoho CRM
JavaScript
25
star
4

zcrm-csharp-sdk

C# SDK
C#
25
star
5

zcrm-js-sdk

JS Sdk for Zoho CRM
JavaScript
19
star
6

zohocrm-php-sdk

PHP SDK (version 3.x.x and above) for Zoho CRM's v2 REST APIs
PHP
18
star
7

zohofinance-automation-samples

14
star
8

salesiq-mobilisten-android-sample

Sample App to integrate SalesIQ Android SDK (Mobilisten)
Java
14
star
9

salesiq-mobilisten-flutter

SalesIQ Mobilisten plugin for Flutter.
Dart
12
star
10

zomoji-web-library

This repo contains js, css and image files required to convert text codes into zomojis.
CSS
12
star
11

SalesIQ-Mobilisten-iOS

Your mobile app's ideal live chat partner. Power up your iOS App with the SalesIQ Mobilisten iOS SDK.
Swift
11
star
12

subscriptions-workflow-samples

A sample collection of custom functions to demonstrate the automation workflow in Zoho Subscriptions, a recurring billing and subscriptions management software.
JavaScript
11
star
13

books-java-wrappers

Java
9
star
14

SalesIQ-Mobilisten-ReactNative

Your mobile app's ideal live chat partner. Power up your mobile App with the SalesIQ Mobilisten SDK for React-Native.
C++
9
star
15

books-dotnet-wrappers

C#
7
star
16

books-python-wrappers

Python
7
star
17

zohocrm-php-sdk-2.0

PHP SDK for Zoho CRM's v2 REST APIs
PHP
7
star
18

SalesIQ-Mobilisten-Cordova

SalesIQ Mobilisten plugin for Apache Cordova/PhoneGap/Ionic.
Java
7
star
19

react-native-zohodesk-portal-sdk

Java
7
star
20

zohocrm-csharp-sdk

C# SDK (version 3.x.x and above) for Zoho CRM's v2 REST APIs
C#
6
star
21

SalesIQ-Mobilisten-iOS-SP

Swift Package for the SalesIQ Mobilisten iOS SDK. Mobilisten is your mobile app's ideal live chat partner. Power up your iOS App with the SalesIQ Mobilisten iOS SDK.
Swift
5
star
22

Assist-Customer-Android-SDK-Demo

Kotlin
5
star
23

ZohoDeskPortalSDK

Objective-C
5
star
24

zohocrm-python-sdk

Python SDK (version 3.x.x and above) for Zoho CRM's v2 REST APIs
Python
5
star
25

zomoji-iOS-keyboard

This repo has a custom input view for iOS keyboards which contains zomojis
Swift
5
star
26

zohocrm-nodejs-sdk-2.1

NODEJS SDK for Zoho CRM's v2.1 REST APIs
JavaScript
4
star
27

zohocrm-nodejs-sdk-2.0

JavaScript
4
star
28

zohocrm-php-sdk-2.1

PHP SDK for Zoho CRM's v2.1 REST APIs
PHP
4
star
29

zohocrm-python-sdk-2.1

PYTHON SDK for Zoho CRM's v2.1 REST APIs
Python
4
star
30

zsign-php-sdk

This SDK provides wrapper functions for Zoho Sign v1 API's Document Management and Template Management.
PHP
4
star
31

zohocrm-java-sdk

Java SDK (version 3.x.x and above) for Zoho CRM's v2 REST APIs
Java
4
star
32

subscriptions-java-client

Java client for Zoho Subscriptions.
Java
3
star
33

zohocrm-nodejs-sdk

NODE SDK (version 1.x.x and above) for Zoho CRM's v2 REST APIs
JavaScript
3
star
34

zohocrm-javascript-sdk-2.0

JavaScript
3
star
35

projects-python-wrappers

Python
3
star
36

LensCustomerSDK

Swift
3
star
37

AssistSDK

Objective-C
3
star
38

zohocrm-python-sdk-2.0

Python
3
star
39

zohocrm-javascript-sdk-2.1

JavaScript
3
star
40

zomojis-android-library

Custom input view with Zomojis for Android apps
Java
3
star
41

zohocrm-python-sdk-6.0

Python
3
star
42

zohocrm-nodejs-sdk-6.0

JavaScript
3
star
43

zohocrm-nodejs-sdk-5.0

JavaScript
2
star
44

Mobilisten-iOS-Beta

Mobilisten iOS SDK - Beta Release
Ruby
2
star
45

zohocrm-typescript-sdk

TypeScript
2
star
46

Zoho-Sites-Commerce-Template

SCSS
2
star
47

ZSInAppPurchaseKit

ZSInAppKit
Objective-C
2
star
48

CRM-iOSSDK

Swift
2
star
49

Apptics

Ruby
2
star
50

zohocrm-java-sdk-2.0

Java
2
star
51

zohofinance-calendar-widget

Vue
2
star
52

ZCRMSDKSampleProject

Java
2
star
53

zohocrm-csharp-sdk-2.0

C#
2
star
54

zdesk-asap-flutter

Dart
2
star
55

zohocrm-csharp-sdk-6.0

C#
2
star
56

ZohoGCSDKiOS

1
star
57

zohocrm-php-sdk-4.0

PHP
1
star
58

zoho-oauth-client

OAuth Client for zoho
PHP
1
star
59

ZohoDesk-PortalSDK-sample-apps-android

Sample code implementing Android Zoho Desk Portal SDK
Java
1
star
60

zohocrm-typescript-sdk-2.1

TypeScript
1
star
61

Zoho-Desk-ASAP-React-Native-sample

JavaScript
1
star
62

ruby-client-library

Ruby
1
star
63

ZohoCreator-IOS-frameworks

ZohoCreator IOS Frameworkss
Ruby
1
star
64

Catalyst-iOS-SDK-Sample-App

Catalyst iOS SDK Sample App
Swift
1
star
65

ZiaSDK

Zia is an AI-driven platform written in swift for iOS, which uses NLP to solve business case problems.
Ruby
1
star
66

ZCRM-Android-SDK-Sample-App

Kotlin
1
star
67

projects-dotnet-wrappers

C#
1
star
68

projects-java-wrappers

Java
1
star
69

cc-nodejs-sdk

JavaScript
1
star
70

zohocrm-php-sdk-7.0

PHP
1
star
71

zoho-iot-sdk-python

Python
1
star
72

zoho-iot-sdk-c

C
1
star
73

zsign-nodejs-sdk

This SDK provides wrapper functions for Zoho Sign v1 API's Document Management and Template Management.
JavaScript
1
star
74

zoho-iot-sdk-arduino

C++
1
star
75

zohocrm-csharp-sdk-2.1

CSHARP SDK for Zoho CRM's v2.1 REST APIs
C#
1
star
76

Desk-iOSUIKit

Objective-C
1
star
77

ZohoPageSenseSDK

Objective-C
1
star
78

CRM-iOS-CustomerPortal-SampleApp

Swift
1
star
79

Desk-androidSampleApp

Java
1
star
80

SalesIQ-iOS-SDK-Sample

A sample app to see how to use SalesIQ iOS SDK and and its api's
Swift
1
star
81

cc-php-sdk

PHP
1
star
82

zohofinance-Bitly-Invoice-Link

JavaScript
1
star
83

zohocrm-typescript-sdk-5.0

TypeScript
1
star
84

zohocrm-php-sdk-5.0

PHP
1
star
85

custompaymentgateway

Java
1
star
86

zohocrm-javascript-sdk-6.0

JavaScript
1
star
87

ZohoDesk-PortalSDK-sample-apps-reactnative

1
star
88

zohocrm-typescript-sdk-6.0

TypeScript
1
star
89

zohocrm-php-sdk-6.0

PHP
1
star
90

zohocrm-java-sdk-6.0

Java
1
star
91

zohocrm-ruby-sdk

Ruby
1
star