Skip to content

masasdani/nangka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Nangka Project

This is a Natural Language Date Parser Library for Java, build using ANTLR4 Library. Currently support for Indonesian and English

It's now available in maven central. latest version: 0.0.6

Usage

add this project as dependency of your project

    <dependency>
        <groupId>com.masasdani</groupId>
        <artifactId>nangka</artifactId>
        <version>0.0.6</version>
    </dependency>

Sample usage :

    String exprEn = "a month later, 20-11-90";
    Nangka nangka = new Nangka();
    DateUnit dateUnit = nangka.parse(exprEn);
    for(Date date : dateUnit.getRelatedDates()){
        System.out.println(date);
    }

The DateUnit class contains

  • unit (the most relevant date from the text given)
  • start (first of relevant date from the text)
  • end (end od relevant date from the text)
  • relatedDates (all the dates found from the text)

About

a natural language date recognition and parser using antlr

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published