Giter Site home page Giter Site logo

multilingual.jl's Introduction

Multilingual.jl

Multilingual.jl is a Julia package that provides list of words from various languages in different categories.

This package was inspired by Languages.jl and WordLists.jl packages.

Status

In construction!

Available languages:

  • English
  • Portuguese
  • Spanish
  • Italian
  • French
  • German
  • Romanian
  • Catalan
  • Latin

Available categories:

  • colors
  • people
  • family
  • week
  • months
  • seasons
  • greetings
  • numbers
  • animals
  • shapes
  • body
  • fruits
  • transport
  • astronomy
  • house
  • soccer
  • verbs

Install

Clone the repository, open Julia, activate the environment and load the package. Follow the commands:

git clone https://github.com/ajdavidl/Multilingual.jl.git
cd Multilingual.jl
julia

Then:

julia> # Press ']' key.
(@v1.9) pkg>
(@v1.9) pkg> activate .
  Activating project at `Multilingual.jl`
(Multilingual) pkg> 
julia> using Multilingual

Usage

The function content prints the words of a category in a requested language:

julia> using Multilingual

julia> content("en","greetings")
hello => ["hello", "hi"]
welcome => welcome

julia> content("pt","week")
Friday => sexta-feira
Monday => segunda-feira
Saturday => sábado
Sunday => domingo
Thursday => quinta-feira
Tuesday => terça-feira
Wednesday => quarta-feira
week => semana
weekend => fim de semana

The function compare prints the words from two languages in a given category.

julia> compare("es","it","months")
April :
        es => abril
        it => aprile
August :
        es => agosto
        it => agosto
December :
        es => diciembre
        it => dicembre
February :
        es => febrero
        it => febbraio
January :
        es => enero
        it => gennaio
July :
        es => julio
        it => luglio
June :
        es => junio
        it => giugno
March :
        es => marzo
        it => marzo
May :
        es => mayo
        it => maggio
November :
        es => noviembre
        it => novembre
October :
        es => octubre
        it => ottobre
September :
        es => septiembre
        it => settembre

The function readData returns all the data in a Dictionary structure.

julia> data = readData("fr")
Dict{Any, Any} with 14 entries:
  "family"    => Dict{Any, Any}("grandson"=>"le petit-fils", "brother-in-law"=> ...
  "animals"   => Dict{Any, Any}("lion"=>"lion", "giraffe"=>"girafe", "whale"=> ...
  "colors"    => Dict{Any, Any}("white"=>["blanc", "blanche"], "green"=>["vert", ...
  "week"      => Dict{Any, Any}("Thursday"=>"jeudi", "week"=>"semaine", "Wednesday" ...
  "astronomy" => Dict{Any, Any}("satellite"=>"satellite", "meteor"=>"météore",  ...
  "transport" => Dict{Any, Any}("yacht"=>"yacht", "truck"=>"camion", "bus"=>"bus", ...
  "numbers"   => Dict{Any, Any}(5=>"cinq", 200=>"deux cents", 16=>"seize", 20=> ...
  "greetings" => Dict{Any, Any}("welcome"=>"bienvenue", "hello"=>["salut", "bonjour" ...
  "shapes"    => Dict{Any, Any}("pyramid"=>"pyramide", "triangle"=>"triangle", ...
  "seasons"   => Dict{Any, Any}("Summer"=>"été", "Autumn"=>"automne", "Spring" ...
  "body"      => Dict{Any, Any}("nail"=>"ongle", "mouth"=>"bouche", "ear"=> ...
  "fruits"    => Dict{Any, Any}("blackberry"=>"mûre", "lemon"=>"citron", "pear" ...
  "house"     => Dict{Any, Any}("living_room"=>"salon", "roof"=>"toit", "toilet" ...
  "months"    => Dict{Any, Any}("January"=>"janvier", "May"=>"mai", "December" ...

Contributing

Pull requests are welcome. You can help adding new languages and news categories of words. You can also help fixing mistakes in the translations.

multilingual.jl's People

Contributors

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