
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Sanscript is a transliteration library for Indian languages. It supports the most popular Indian scripts and several different romanization schemes. Although Sanscript focuses on Sanskrit transliteration, it has partial support for other languages and is easy to extend.
Sanscript is simple to use:
var output = Sanscript.t(input, from, to);
Here, from and to are the names of different schemes. In Sanscript, the word "scheme" refers to both scripts and romanizations. These schemes are of two types:
By default, Sanscript supports the following Brahmic schemes:
bengalidevanagarigujaratigurmukhikannadamalayalamoriyatamilteluguand the following Roman schemes:
hk (Harvard-Kyoto)iast (International Alphabet of Sanskrit Transliteration)itrans (ITRANS)itrans_dravidian (ITRANS with support for Dravidian short "e" and "o")kolkata (National Library at Kolkata)slp1 (Sanskrit Library Phonetic Basic)velthuis (Velthuis)wx (WX)When Sanscript sees the token ##, it toggles the transliteration state:
Sanscript.t('ga##Na##pa##te', 'hk', 'devanagari'); // गNaपte
Sanscript.t('ध##र्म##क्षेत्रे', 'devanagari', 'hk'); // dhaर्मkSetre
When Sanscript sees the token \, it disables transliteration on the character that immediately follows. \ is used for ITRANS compatibility; we recommend always using ## instead.
Sanscript.t('a \\a', 'itrans', 'devanagari'); // अ a
Sanscript.t('\\##aham', 'itrans', 'devanagari'); // ##अहम्
A lossy scheme does not have the letters needed to support lossless translation. For example, Bengali is a lossy scheme because it uses ব for both ba and va. In future releases, Sanscript might let you choose how to handle lossiness. For the time being, it makes some fairly bad hard-coded assumptions. Corrections and advice are always welcome.
You can tweak the transliteration function by passing an options object:
var output = Sanscript.t(input, from, to, options);
options maps options to values. Currently, these options are supported:
skip_sgml - If true, transliterate SGML tags as if they were ordinary words (<b>iti</b> → <ब्>इति</ब्>). Defaults to false.syncope - If true, use Hindi-style transliteration (ajay → अजय). In linguistics, this behavior is known as schwa syncope. Defaults to false.Adding a new scheme is simple:
Sanscript.addBrahmicScheme(schemeName, schemeData);
Sanscript.addRomanScheme(schemeName, schemeData);
For help in creating schemeData, see the comments on the addBrahmicScheme and addRomanScheme functions.
Top level Makefile Starts a Webserver using PHP on Port 9732.
make - will start the webserver on port 9732
Open your browser and launch this url http://127.0.0.1:9732/test/index.html and see that all tests are ok.
FAQs
Transliteration scheme for devanagari characters
The npm package sanscript receives a total of 187 weekly downloads. As such, sanscript popularity was classified as not popular.
We found that sanscript demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.