andalugeeks / andaluh-js

Transliterate español (spanish) spelling to andaluz proposals using javascript
https://andaluh.es
GNU Lesser General Public License v3.0
27 stars 5 forks source link
andalucia andalusia hacktoberfest hacktoberfest2020 i18n javascript language text-processing translator transliterator typescript

Andaluh-js

Transliterate español (spanish) spelling to andaluz proposals

Table of Contents

Description

The Andalusian varieties of [Spanish] (Spanish: andaluz; Andalusian) are spoken in Andalusia, Ceuta, Melilla, and Gibraltar. They include perhaps the most distinct of the southern variants of peninsular Spanish, differing in many respects from northern varieties, and also from Standard Spanish. Further info: https://en.wikipedia.org/wiki/Andalusian_Spanish.

This package introduces transliteration functions to convert español (spanish) spelling to andaluz. As there's no official or standard andaluz spelling, andaluh-js is adopting the EPA proposal (Er Prinzipito Andaluh). Further info: https://andaluhepa.wordpress.com. Other andaluz spelling proposals are planned to be added as well.

Installation

From NPM repository

$ npm install @andalugeeks/andaluh --save

Usage

First, install dependencies with npm install. Then use tsc CLI to build the distribution /dist folder with tsc.

Javascript

const andaluh = require('@andalugeeks/andaluh');
const EPA = new andaluh.EPA();
console.log(EPA.transcript('El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba el saxofón detrás del palenque de paja'));
// Er belôh murçiélago indú comía felîh cardiyo y kiwi. La çigueña tocaba er çâççofón detrâh der palenque de paha.

TypeScript

You can simply use:

import EPA from '@andalugeeks/andaluh';
var andaluhEPA = new EPA();
console.log(andaluhEPA.transcript('El veloz murciélago hindú comía feliz cardillo y kiwi. La cigüeña tocaba el saxofón detrás del palenque de paja'));
// Er belôh murçiélago indú comía felîh cardiyo y kiwi. La çigueña tocaba er çâççofón detrâh der palenque de paha.

Running tests

For running the basic tests, use

$ npm test

For running the tests based in a manual transcripted csv (some of them are expected to fail), run

$ npm run test:lemario

For running the full suite, use

$ npm run test:all

Publishing

To submit a package to npm registry (as npmjs), use tsc (typescript CLI) to build the distribution folder /dist, then:

$ npm publish

Consider to upgrade the major/minor/patch version before submitting a new package (edit package.json). Also remember to login with npm on your registry account before publishing.

Roadmap

Support

Please open an issue for support.

Contributing

Please contribute using Github Flow. Create a branch, add commits, and open a pull request.