Skip to content

smccamley/ngram

 
 

Repository files navigation

ngram

Usage

Make a request

POST http://url:80/api/ngram/word
{
	"word" : "the"
}

You will get the response

{
  "count": 927838975,
  "probability": 4.762315882559723e-17,
  "year": "2008"
}

Installation

Create a new aws instance with:

  • Image Amazon Linux AMI
  • Type t2.medium
  • Inbound rule port 80 / anywhere.
  • Inbound rule ssh / my ip.

Install docker on the instance according to the Docker Basics guide.
Execute a script with the content

docker stop ngram
docker rm ngram
docker run -p 80:80 --name ngram --memory=3g -d wilmersdorf/ngram:0.1

The image will need about 1 minute to start and load all ngrams into memory.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 85.5%
  • JavaScript 13.9%
  • Shell 0.6%