@digitallinguistics/scription2dlx

A JavaScript library that converts scription text files to the Data Format for Digital Linguistics

https://github.com/digitallinguistics/scription2dlx

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.1%) to scientific vocabulary

Keywords

digital-humanities digital-linguistics dlx documentary-linguistics language language-documentation linguistics scription
Last synced: 6 months ago · JSON representation ·

Repository

A JavaScript library that converts scription text files to the Data Format for Digital Linguistics

Basic Info
Statistics
  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • Open Issues: 11
  • Releases: 24
Topics
digital-humanities digital-linguistics dlx documentary-linguistics language language-documentation linguistics scription
Created almost 7 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License Citation

README.md

scription2dlx

GitHub version downloads GitHub issues tests status license DOI GitHub stars

A JavaScript library that converts linguistic texts in scription format to the Data Format for Digital Linguistics (DaFoDiL). This library 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.

Quick Links

Contents

Basic Usage

  1. Install the library using npm or yarn:

cmd npm i @digitallinguistics/scription2dlx yarn add @digitallinguistics/scription2dlx

Or download the latest release from the releases page.

  1. Import the library into your project:

Node:

js import convert from '@digitallinguistics/scription2dlx';

HTML:

html <script src=scription2dlx.js type=module></script>

  1. The library exports a single function which accepts a string and returns a DaFoDiL Text Object.

data.txt

```


title: How the world began


waxdungu qasi one day a man ```

script.js

``js const data = await fetch(data.txt`); const text = scription2dlx(data);

console.log(text.utterances.transcription); // "waxdungu qasi" ```

You may also pass an options hash as the second option. See the Options section below.

js const text = scription2dlx(data, { /* options */ });

Notes

  • If your project does not support ES modules and/or the latest JavaScript syntax, you may need to transpile this library using tools like Babel, and possibly bundle the library using a JavaScript bundler.

  • The scription2dlx library does not perform validation on the text data. You should use another validator like AJV to validate your data against the DLx DaFoDiL format.

  • In order to keep this library small and dependency-free, scription2dlx does not automatically parse the YAML header of a scription document. Instead, the header string is returned as a header property on the text object. If you would like scription2dlx to parse the header, pass a YAML parser to the parser option when calling the scription2dlx function:

```js import yaml from 'yaml'; // use your preferred YAML parsing library

const text = scription2dlx(data, { parser: yaml.parse }); ```

Options

| Option | Default | Description | | ------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | codes | {} | This option allows you to use custom backslash codes in your interlinear glosses. It should be a hash containing the scription code as a key (without a leading backslash), and the custom code as the value; ex: "txn": "t" will allow you to write \t instead of \txn for transcription lines. | | emphasis | true | This option specifies whether emphasis should be passed through as-is (true, default), or stripped from the data (false). | errors | "warn" | This option allows you to specify how to handle errors. If set to "warn"" (the default), an utterance which throws an error is skipped and a warning is logged to the console. If set to "object", an error object with information is returned in the results array. If set to false, utterances with errors will be skipped silently. If set to true, utterances with errors will throw and stop further processing. | | orthography | "default" | An abbreviation for the default orthography to use for transcriptions when one is not specified. | | parser | undefined | A YAML parser to use in parsing the header of a scription document. If none is present, the header will be provided as a string in the header property of the returned object. | | utteranceMetadata | true | Whether to parse the utterance metadata line (the first line when it begins with #). If set to true, a metadata property will be added to each utterance that has it. |

Owner

  • Name: Digital Linguistics
  • Login: digitallinguistics
  • Kind: organization

The science of managing linguistic data, digitally

Citation (CITATION.cff)

cff-version: 1.2.0
message: If you use this software in your research, please cite it following the model below.
authors:
  - family-names: Hieber
    given-names: Daniel W.
    orcid: https://orcid.org/0000-0002-1411-3773
title: '@digitallinguistics/scription2dlx'
version: 0.14.0
doi: https://github.com/digitallinguistics/scription2dlx
date-released: 2023-11-18
url: https://github.com/digitallinguistics/scription2dlx

GitHub Events

Total
  • Issues event: 3
  • Pull request event: 1
  • Create event: 1
Last Year
  • Issues event: 3
  • Pull request event: 1
  • Create event: 1

Committers

Last synced: almost 3 years ago

All Time
  • Total Commits: 73
  • Total Committers: 2
  • Avg Commits per committer: 36.5
  • Development Distribution Score (DDS): 0.096
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Daniel W. Hieber d****b@g****m 66
dependabot[bot] 4****]@u****m 7

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 69
  • Total pull requests: 54
  • Average time to close issues: 5 months
  • Average time to close pull requests: 2 months
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 0.29
  • Average comments per pull request: 0.11
  • Merged pull requests: 47
  • Bot issues: 0
  • Bot pull requests: 15
Past Year
  • Issues: 7
  • Pull requests: 2
  • Average time to close issues: 8 minutes
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 2
Top Authors
Issue Authors
  • dwhieb (69)
Pull Request Authors
  • dwhieb (39)
  • dependabot[bot] (16)
Top Labels
Issue Labels
enhancement (22) dev (11) docs (6) bug (5) wontdo (1) dependencies (1) blocked (1)
Pull Request Labels
enhancement (21) dependencies (17) dev (7) docs (4) bug (2)

Packages

  • Total packages: 1
  • Total downloads:
    • npm 13 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 18
  • Total maintainers: 1
npmjs.org: @digitallinguistics/scription2dlx

A JavaScript library for converting linguistic texts in scription format to the DLx JSON format

  • Versions: 18
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 13 Last month
Rankings
Dependent repos count: 10.4%
Downloads: 11.3%
Average: 14.6%
Stargazers count: 14.6%
Forks count: 15.5%
Dependent packages count: 21.1%
Maintainers (1)
Last synced: 6 months ago

Dependencies

package-lock.json npm
  • 189 dependencies
package.json npm
  • eslint ^7.4.0 development
  • expect.js ^0.3.1 development
  • mocha ^8.0.1 development
  • yamljs ^0.3.0 development
.github/workflows/release.yml actions
  • actions/checkout v2 composite
  • actions/setup-node v1 composite
.github/workflows/tests.yml actions
  • actions/checkout v2 composite
  • actions/setup-node v1 composite
.github/workflows/year.yml actions
  • JasonEtco/create-an-issue v2 composite