Giter VIP home page Giter VIP logo

grammer_check's Introduction

Check Grammer mistake

Ruby program to check a given sentence for a given set of simple grammer rules. A simple sentence if syntactically correct if it fulfills given rules. The following are given rules.

  1. Sentence must start with a Uppercase character (e.g. Noun/ I/ We/ He / She / etc.)
  2. Then lowercase character follows.
  3. There must be spaces between words.
  4. Then the sentence must end with a full stop(.) after a word.
  5. Two continuous spaces are not allowed.
  6. Two continuous upper case characters are not allowed.
  7. However the sentence can end after an upper case character.

Example input and output

Please enter a sentence to check grammer mistake

welcome to DEMO for checking grammer mistake

Given sentence is wrong because

First character should start with upper case

Two spaces are not allowed

Two Uppercase characters are not allowed continuously

Sentence should end with full stop


Please enter a sentence to check grammer mistake

Welcome to demo for checking Grammer mistakE.

Given sentence is correct, sentence does not have grammer mistake

grammer_check's People

Watchers

Selvaraj 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.