Coder Social home page Coder Social logo

greeklish_iso843's Introduction

greeklish_iso843

A Ruby library that converts Greek text to Greeklish, conforming to the ISO 843 (ELOT 743) standard used by the Greek State.

Installation

As a Gem:

gem install greeklish_iso843

Use

Require the library in your code:

require 'greeklish_iso843'

Then you can use it to convert text:

GreeklishIso843::Converter.convert("Μπάμπης") # => "Bampis"
GreeklishIso843::Converter.convert("Άγγελος") # => "Angelos"
GreeklishIso843::Converter.convert("Ευάγγελος") # => "Efangelos"

Alternatively, you can require the String core extension for more convenience:

require 'greeklish_iso843/core_ext/string'

Then you can use it to convert text:

"Μπάμπης".to_greeklish # => "Bampis"
"Άγγελος".to_greeklish # => "Angelos"
"Ευάγγελος".to_greeklish # => "Efangelos"

There's also a command line utility that accepts Greek text from the standard input and prints the corresponding Greeklish text to the standard output:

$ greeklish_iso843
Μπάμπης
Άγγελος
Ευάγγελος
^D
Bampis
Angelos
Efangelos
$

Note: ^D represents the EOF (End Of File) character, emitted with Ctrl-D.

To-do

  • Tests 😅

Acknowledgements

This library is a Ruby port of an official implementation in JavaScript.

License

MIT

Author

Angelos Orfanakos

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.