I am working on a Natural Language parser which examines a sentence in english and extracts some information like name, date etc.
for example: \"Lets meet next t
You can use JChronic, the Java port of Chronic.
For my use case, I had more luck with chrono-java - sadly it looks stale and is not available in any Maven repository (also not via https://jitpack.io/ since the build is broken), so you have to fix and build it for yourself.
However, checking out the code and fixing a dependency (maven-javadoc-plugin
was missing groupId and I updated the version), allowed me to build and run a simple example successfully:
List<ParsedResult> results = Chrono.Parse("Datum Freitag, 08.04. bis einschl. Sonntag 10.04.2016");
results.forEach(result -> System.out.println(result));
resulted in 2 Dates being extracted:
ParsedResult: " 08.04" > 04/08/2018 12:00
ParsedResult: "10.04.2016" > 04/10/2016 12:00
Natty is a really good replacement for JChronic.
I would suggest using UIMA with OpenNLP connectors and same hand made regexp rules.
Pretty old question bur PrettyTime::NLP is another option to try
Have you tried jchronic? However, I doubt any library could directly work with sentences: you'd have to extract sentence fragments and feeding them to a NLP date parsing framework yourself, perhaps on a trial-n-error basis (larger and larger fragments until the framework throws an error).