GithubHelp home page GithubHelp logo

suggestion_engine_serverless's Introduction

Suggestion Engine

The goal of this application is to provide grammar suggestions for a sentence, paragraph or a full text document. The application consists of an endpoint which will send the suggestions based on the text received.

Usage

Request:

POST http://localhost:3000/
content-type: application/json
{
  "text": "The car was repaired carefully by the skilled mechanic."
}

Response:

{
  "matches": [
    {
      "message": "\"carefully\" can weaken meaning",
      "shortMessage": "Adverb found.",
      "offset": 21,
      "length": 9,
      "sentence": "The car was repaired carefully by the skilled mechanic.",
      "rule": {
        "id": "ADVERB",
        "description": "An adverb is found."
      }
    },
    {
      "message": "\"was repaired\" may be passive voice",
      "shortMessage": "Passive voice found.",
      "offset": 8,
      "length": 12,
      "sentence": "The car was repaired carefully by the skilled mechanic.",
      "rule": {
        "id": "PASSIVE_VOICE",
        "description": "Use of passive voice was found."
      }
    }
  ],
  "stats": {
    "score": 7.78,
    "rules": [
      {
        "id": "ADVERB",
        "count": 1
      },
      {
        "id": "PASSIVE_VOICE",
        "count": 1
      },
      {
        "id": "COMPLEX_SENTENCE",
        "count": 0
      }
    ]
  }
}

Basic Starter for NestJS on AWS Lambda with Serverless

serverless

We use Serverless Framework to do production ready deployments and local development using serverless-offline.

Usage

To install this example to bootstrap your project, run the following command:

npx serverless install -u https://github.com/nanlabs/devops-reference/tree/main/examples/serverless-node-typescript-nest -n my-project

Requirements

You’ll need to have Node 16.13.2 or later on your local development machine (but it’s not required on the server). You can use fnm to easily switch Node versions between different projects.

git clone https://github.com/nanlabs/devops-reference.git
cd devops-reference/examples/serverless-node-typescript-nest
fnm use
npm install

Local Development

This repo has a local development set up that uses the file .env.local to configure the local environment. Run the following command to start the local development server:

npm run sls:offline

It will start the following services:

  • AWS Lambda at http://localhost:3000

Lambda Deployment

To deploy the app to AWS, you'll first need to configure your AWS credentials. There are many ways to set your credentials, for more information refer to the AWS documentation.

Once set you can deploy your app using the serverless framework with:

npm run sls:deploy

suggestion_engine_serverless's People

Contributors

giannativo avatar toti-biasotti avatar

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.