Git Product home page Git Product logo

pig_latin's Introduction

Words and Pig Latin

You're working through a marketing campaign for humor website and they're looking for a fun interactive feature on piglatinizing comments. Harry our friendly test dev has already working with the marketing agency to determine the appropriate rules and requirements and built RSpec files for us!

Here's Wikipedia's description of the rules for more context:

For words that begin with vowel sounds or silent letter, "way" is added at the end of the word. Examples are

  • "egg" → "eggway"
  • "inbox" → "inboxway"
  • "eight" → "eightway"

For words that begin with consonant sounds, the initial consonant or consonant cluster is moved to the end of the word, and "ay" is added, as in the following examples:

  • "happy" → "appyhay"
  • "duck" → "uckday"
  • "glove" → "oveglay"

BONUS 1

The letter 'y' can play the role of either consonant or vowel, depending on its location

  • "yellow" → "ellowyay"
  • "rhythm" → "ythmrhay"

BONUS 2

How do you deal with words starting with "qu" or "squ" ?

  • "queen" → "eenquay"
  • "squeal" → "ealsquay"

pig_latin's People

Contributors

jpbarela avatar robertakarobin avatar

Watchers

James Cloos 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.