View on GitHub


A JavaScript library that converts scription text files to DLx JSON format


npm (scoped) npm GitHub issues Travis (.org) branch GitHub GitHub stars

A JavaScript library that converts linguistic texts in scription format to the Data Format for Digital Linguistics (DaFoDiL) in JSON. It runs in recent versions of browsers and Node.js. It is useful for language researchers who want to work with their data in text formats that are simple to type and read (scription), but want to convert their data for use in other Digital Linguistics tools.



Install the library in your project from the command line: npm i @digitallinguistics/scription2dlx


Option 1: Include the scription2dlx library as a script in your HTML from the DLx CDN:

<script src=></script>

Option 2: Download the scription2dlx.js file from the releases page and include it in a script tag in your HTML:

<script src=scription2dlx.js></script>

Option 3: Install scription2dlx in your project using npm (see above), and then include the script in your HTML with a script tag. You may choose to use either the bundled distribution or the distribution that supports ES modules:

<script src=node_modules/@digitallinguistics/scription2dlx/scription2dlx.js></script>

Both options will make a global scription2dlx function available in the browser.


The library exports a single function, scription2dlx, which accepts a String and returns a DaFoDiL Text Object.


title: How the world began
waxdungu qasi
one day a man


const data = await fetch(`data.txt`);
const text = scription2dlx(data);
console.log(text.title); // "How the world began"

Using as a Dependency

If you would like to use scription2dlx as a dependency in your library, it is recommended that you use the files in the /src folder. The source code for the scription2dlx library is written using ES modules and the latest JavaScript syntax and features. You will need to bundle and/or transpile the code accordingly.