GithubHelp home page GithubHelp logo

boostfighter / apexnlp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from 6thsolution/apexnlp

0.0 1.0 0.0 542 KB

A natural language event parser for java and android.

Java 99.63% Shell 0.37%

apexnlp's Introduction

Build Status Latest Version codecov GitHub Issues GitHub Stars

A natural language processing tool that makes it easy to create events like Piano lessons Tuesdays at 6pm.

ApexNLP is a deterministic rule-based system designed for recognizing and normalizing different formats of event expressions. It will convert given sentences to a simple Event class. Out-of-the-box, it expects and processes English language text. But, it was designed to work with multiple human languages

Overview

There are many date/time parsers like natty or chrono. But ApexNLP is not another date/time parser, It is an event parser with some NLP tasks which helps you to easily create a calendar Event. It supports most event formats from simple to complex such as:

  • Family Dine Out on the 2nd Friday of every month at 6-9p
  • Meet John on monday at Mall
  • Tennis on Mondays, Tuesdays, Fridays at 10
  • Paying bills day repeat on the 3rd Tuesday of each month
  • Piano lessons Tuesdays and Thursdays at 5-6pm from 1/21 to 2/23
  • Meeting with John tomorrow every day until 12.10.2018"

Here are some sample outputs:

input sentence: Lunch at noon for 30 minutes

event response:

{
  "title" : "Lunch",
  "location" : "",
  "startDateTime" : "2017/4/13 12:00",
  "endDateTime" : "2017/4/13 12:30",
  "isAllDay" : false,
  "recurrence" : null
}

input sentence: Family Vacation at Singapore from 12/4 for six days:

event response:

{
  "title" : "Family Vacation ",
  "location" : "Singapore",
  "startDateTime" : "2017/12/04",
  "endDateTime" : "2017/12/09",
  "isAllDay" : true,
  "recurrence" : null
}

Features

  • Robust and Fast
  • Easy to Use
  • Support Multi Languages
  • Written in Java and support Android
  • Support most date/time formats

Installation

First add our repository:

repositories {
    //...
    maven {
        url  "http://dl.bintray.com/6thsolution/apexnlp"
    }

}

Then add needed libraries:

dependencies{
    //ApexNLP core library
    compile 'com.sixthsolution.apex:apex:0.1.0-alpha1'
    //NLP for English
    compile 'com.sixthsolution.apex:english-nlp:0.1.0-alpha1'
    //ThreeTen 
    compile 'org.threeten:threetenbp:1.3.3'
}

Note: If you are using android, replace threeten dependency with ThreeTenABP

Example

Below you can see a sample usage of ApexNLP in android:

public class ExampleApplication extends Application {

  @Override public void onCreate() {
    super.onCreate();
    Apex.init(new Apex.ApexBuilder()
                 .addParser("en", new EnglishParser())
                    .build()); 
  }
  
}

public class ExampleActivity extends Activity {

  public Event getEvent(String sentence){
    return Apex.nlp("en", sentence);                    
  }
  
}

Documentation

Usage Workflows

How to use ApexNLP and its features.

API Reference

Java doc for ApexNLP's API.

Multiple Languages Support

How to add and support a new language to the ApexNLP project.

License

Copyright 2017 6thSolution Technologies Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

apexnlp's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.