Science Score: 44.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
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.5%) to scientific vocabulary
Repository
LaBB-CAT client API for JavaScript
Basic Info
- Host: GitHub
- Owner: nzilbb
- License: gpl-3.0
- Language: JavaScript
- Default Branch: main
- Size: 1.19 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 1
- Releases: 9
Metadata Files
README.md
labbcat-js
Client library for communicating with LaBB-CAT servers using JavaScript.
```javascript const labbcat = require("@nzilbb/labbcat");
const corpus = new labbcat.LabbcatEdit("https://sometld.com", "your username", "your password");
corpus.newTranscript( "quakestory.eaf", "quakestory.wav", "story", "QB", taskId => { corpus.waitForTask(taskId, 30, task=>{ corpus.getAnnotations("quakestory.eaf", "pos", (tags) => { // process POS tags... }); }); }); ```
LaBB-CAT is a web-based linguistic annotation store that stores audio or video recordings, text transcripts, and other annotations.
Annotations of various types can be automatically generated or manually added.
LaBB-CAT servers are usually password-protected linguistic corpora, and can be accessed manually via a web browser, or programmatically using a client library like this one.
This library is both a node module and a browser-importable script (nzilbb.labbcat.js) that provides functionality for querying and extracting data from LaBB-CAT corpora, directly from JavaScript.
The current version of this library requires LaBB-CAT version 20200608.1507.
Detailed documentation is available at https://nzilbb.github.io/labbcat-js/
Basic usage
The following example shows how to perform a search and download audio and Praat TextGrids for the results.
For batch uploading and other example code, see the examples subdirectory.
```javascript const labbcat = require("@nzilbb/labbcat");
const corpus = new labbcat.LabbcatView("https://sometld.com", "your username", "your password");
// get the first participant in the corpus corpus.getParticipantIds((ids, errors, messages)=>{ const participantId = ids[0];
// all their instances of "the" followed by a word starting with a vowel
const pattern = [
{"orthography" : "i"},
{"phonemes" : "[cCEFHiIPqQuUV0123456789~#\\$@].*"}];
// start searching
corpus.search(pattern, [ participantId ], false, (response, errors, messages)=>{
const taskId = response.threadId
// wait for the search to finish
corpus.waitForTask(taskId, 30, (task, errors, messages)=>{
// get the matches
corpus.getMatches(taskId, (result, errors, messages)=>{
const matches = result.matches;
console.log("There were " + matches.length + " matches for " + participantId);
// get TextGrids of the utterances
corpus.getFragments(
matches, [ "orthography", "phonemes" ], "text/praat-textgrid",
(textgrids, errors, messages)=>{
for (let textgrid of textgrids) {
console.log(textgrid);
}
// get the utterance recordings
corpus.getSoundFragments(matches, (wavs, errors, messages)=>{
for (let wav of wavs) {
console.log(wav);
}
});
});
});
});
});
}); ```
Developers
Running unit tests
NB Automated tests will currently only work on a server with 'Basic' authentication, not 'Form' authentication.
npm test
To run specific tests, provide the path to the test module, e.g.
npm test -- test/TestLabbcatEdit --grep newTranscript
Generating documentation
Documentation is generated using jsdoc, which you must install first:
npm install -g jsdoc
Once jsdoc has been installed, you can generate the documentation, which is saved in the
docs subdirectory, using:
npm run docs
Publishing to npm
Publishing to the npm package repository requires that you have an npm username/password that corresponds to a package maintainer in npm.
The one-time login command is:
npm login
Once logged in, publishing to npm is achieved using:
npm publish
Owner
- Name: Te Kāhui Roro Reo | New Zealand Institute of Language, Brain and Behaviour
- Login: nzilbb
- Kind: organization
- Location: Christchurch, New Zealand
- Website: http://www.nzilbb.canterbury.ac.nz/
- Repositories: 43
- Profile: https://github.com/nzilbb
A multi-disciplinary centre dedicated to the study of human language.
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: @nzilbb/labbcat JavaScript package
message: >-
If you use this software, please cite it using the
metadata from this file.
type: software
authors:
- given-names: Robert
family-names: Fromont
email: robert.fromont@canterbury.ac.nz
affiliation: NZILBB
orcid: 'https://orcid.org/0000-0001-5271-5487'
repository-code: 'https://github.com/nzilbb/labbcat-js/'
url: 'https://www.npmjs.com/package/@nzilbb/labbcat'
abstract: >-
Client library for communicating with LaBB-CAT
servers using JavaScript.
license: AGPL-3.0-or-later
version: 1.8.0
date-released: '2025-08-19'
GitHub Events
Total
- Release event: 3
- Push event: 8
- Create event: 3
Last Year
- Release event: 3
- Push event: 8
- Create event: 3
Committers
Last synced: almost 3 years ago
Top Committers
| Name | Commits | |
|---|---|---|
| Robert Fromont | r****t@f****z | 132 |
| dependabot[bot] | 4****]@u****m | 11 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 12
- Average time to close issues: N/A
- Average time to close pull requests: 4 months
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 11
- Bot issues: 0
- Bot pull requests: 12
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- dependabot[bot] (13)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- npm 2 last-month
- Total dependent packages: 1
- Total dependent repositories: 0
- Total versions: 13
- Total maintainers: 1
npmjs.org: @nzilbb/labbcat
Client library for communicating with LaBB-CAT servers
- Homepage: https://github.com/nzilbb/labbcat-js#readme
- License: GPL-3.0-or-later
-
Latest release: 1.8.0
published 8 months ago
Rankings
Maintainers (1)
Dependencies
- 121 dependencies
- chai ^4.2.0 development
- mocha ^7.0.1 development
- btoa ^1.2.1
- form-data ^3.0.0
- fs 0.0.1-security
- minimist >=0.2.1
- url ^0.11.0
- xhr2 ^0.2.0