Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
trickl authored Dec 24, 2018
1 parent e9b92c8 commit 096e63e
Showing 1 changed file with 6 additions and 21 deletions.
27 changes: 6 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
[![Test Coverage](https://api.codeclimate.com/v1/badges/be4af1f4cc620e465849/test_coverage)](https://codeclimate.com/github/trickl/language/test_coverage)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

A set of short utility functions for parsing common English language constructs.
Natural Language Parsing For

Specifically - reading numbers, currency amounts and durations as English text and converting into a strongly typed class.
### Numbers (e.g. one thousand and four)
### Currency Amount (e.g. $13 million)
### Temporal Durations (e.g. 1 day 3 hours 17 minutes 10 seconds)

### Prerequisites
## Prerequisites

Requires Maven and a Java 8 compiler installed on your system.

## Usage

See the Junit tests for usage

### Installing
## Installing

To download the library into a folder called "language" run

Expand All @@ -31,23 +33,6 @@ To build the library run
mvn clean build
```

## Examples

### Duration Parsing

* "1 day 3 hours 17 minutes 10 seconds" -> java.time.Duration
* "7 seconds 320 millis" -> java.time.Duration

### Number Parsing

* "two hundred sixty four" -> 264
* "23 million, three hundred and 97" -> 23000397

### Currency Amount Parsing

* "$13 million" -> (USD, 13000000)
* "one hundred british pound sterling" -> (GBP, 100)

## Acknowledgments

* The number parsed was built with an inspiration from a blog post https://blog.cordiner.net/2010/01/02/parsing-english-numbers-with-perl/
Expand Down

0 comments on commit 096e63e

Please sign in to comment.