nz.ilbb.labbcat

Client library for communicating with LaBB-CAT servers

https://github.com/nzilbb/labbcat-java

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
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.4%) to scientific vocabulary
Last synced: 10 months ago · JSON representation ·

Repository

Client library for communicating with LaBB-CAT servers

Basic Info
  • Host: GitHub
  • Owner: nzilbb
  • License: gpl-3.0
  • Language: Java
  • Default Branch: master
  • Size: 2.87 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 12
Created over 6 years ago · Last pushed 10 months ago
Metadata Files
Readme Changelog License Citation

README.md

labbcat-java

Client library for communicating with LaBB-CAT servers using Java.

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.

Detailed documentation is available at https://nzilbb.github.io/labbcat-java/

Dependencies

Build targets

  • mvn package - builds target/nzilbb.labbcat-n.n.n.jar
  • mvn test - runs unit tests, which requires a running LaBB-CAT server to work; you must set the URL/credentials in the unit test files in nzilbb/labbcat/test/
  • mvn site - produces JavaDoc API documentation.

Usage

The following example shows how to: 1. get some basic corpus structure information, 1. upload a transcript, 1. wait for annotation layer generation to finish, 1. extract the newly-generated annotations, and 1. search for instances of the word "and".

```Java // create LaBB-CAT client LabbcatView labbcat = new LabbcatView("https://labbcat.canterbury.ac.nz", "demo", "demo");

// get a corpus ID String[] corpora = labbcat.getCorpusIds(); String corpus = ids[0];

// get a transcript type Layer typeLayer = labbcat.getLayer("transcript_type"); String transcriptType = typeLayer.getValidLabels().keySet().iterator().next();

// upload a transcript File transcript = new File("/some/transcript.txt"); String taskId = labbcat.newTranscript(transcript, null, null, transcriptType, corpus, "test");

// wait until all automatic annotations have been generated TaskStatus layerGenerationTask = labbcat.waitForTask(taskId, 30);

// get all the POS annotations Annotation[] pos = labbcat.getAnnotations(transcript.getName(), "pos");

// search for tokens of "and" Matches[] matches = labbcat.getMatches( labbcat.search( new PatternBuilder().addMatchLayer("orthography", "and").build(), participantIds, null, true, false, null), 1); ```

Developers

Prerequisites

  • The JDK for at least Java 8 sudo apt install default-jdk
  • Maven sudo apt install maven

Build nzilbb.labbcat.jar

mvn package

Run all unit tests

mvn test

The following are prerequisites for the tests to succeed:

  • A test LaBB-CAT instance available at http://localhost:8080/labbcat/
  • Password protection
  • An 'admin' user with the credentials specified in\ src/test/java/nzilbb/labbcat/TestLabbcatEdit.java
  • A 'view'-only user with the credentials specified in\ src/test/java/nzilbb/labbcat/TestLabbcatEdit.java
  • Some transcripts uploaded (e.g. the Demo corpus)
  • One transcript that matches the pattern AP511.+\.eaf
  • No empty corpora
  • A layer called phonemes with annotations
  • The first participant on the 'participants' page to have a value for participant_gender and for participant_notes
  • The first participant must have been force-aligned
  • The FlatFileDictionary layer manager must be installed
  • The plain text formatter installed
  • The Praat TextGrid formatter installed

Build documentation site

mvn site

Deploying to OSSRH

OSSRH is the central Maven repository where nzilbb.ag modules are deployed (published).

There are two type of deployment:

  • snapshot: a transient deployment that can be updated during development/testing
  • release: an official published version that cannot be changed once it's deployed

A snapshot deployment is done when the module version (version tag in pom.xml) ends with -SNAPSHOT. Otherwise, any deployment is a release.

Snapshot Deployment

To perform a snapshot deployment:

  1. Ensure the version in pom.xml is suffixed with -SNAPSHOT
  2. Execute the command:
    mvn clean deploy

Release Deployment

To perform a release deployment:

  1. Ensure the version in pom.xml isn't suffixed with -SNAPSHOT e.g. use something like the following command from within the ag directory:
    mvn versions:set -DnewVersion=1.1.0
  2. Execute the command:
    mvn clean deploy -P release
  3. Happy with everything? Complete the release with: mvn nexus-staging:release -P release Otherwise: mvn nexus-staging:drop -P release ...and start again.
  4. Regenerate the citation file: mvn cff:create
  5. Commit/push all changes and create a release in GitHub

Owner

  • Name: Te Kāhui Roro Reo | New Zealand Institute of Language, Brain and Behaviour
  • Login: nzilbb
  • Kind: organization
  • Location: Christchurch, New Zealand

A multi-disciplinary centre dedicated to the study of human language.

Citation (CITATION.cff)

cff-version: 1.2.0
type: software
title: nzilbb.labbcat-java
message: If you use this software, please cite it as below.
authors:
- given-names: Robert
  family-names: Fromont
  email: robert.fromont@canterbury.ac.nz
  affiliation: NZILBB, University of Canterbury
  orcid: https://orcid.org/0000-0001-5271-5487
repository-code: https://github.com/nzilbb/labbcat-java/tree/main
url: https://github.com/nzilbb/labbcat-java/
repository-artifact: https://search.maven.org/artifact/nz.ilbb.labbcat/nzilbb.labbcat
abstract: Client library for communicating with LaBB-CAT corpus servers.
keywords:
- LaBB-CAT
- Linguistic Annotation
license: GPL-3.0-or-later
version: 1.4.0
date-released: 2025-08-18
references:
- type: software
  title: ANTLR 4 Runtime
  version: 4.7.2
  abbreviation: org.antlr:antlr4-runtime
  license: BSD-3-Clause
  notes: More license information can be found in the THIRD-PARTY/ANTLR_4_Runtime
    directory.
  authors:
  - name: Terence Parr
  - name: Sam Harwell
  - name: Eric Vergnaud
  - name: Peter Boyer
  - name: Jim Idle
    email: jimi@idle.ws
  - name: Mike Lischke
  - name: Tom Everett
  repository-code: https://github.com/antlr/antlr4/tree/master/antlr4-runtime
- type: software
  title: Annotation Graphs
  version: 1.2.4
  abbreviation: nz.ilbb.ag:nzilbb.ag
  license-url: https://www.gnu.org/licenses/agpl.txt
  notes: More license information can be found in the THIRD-PARTY/Annotation_Graphs
    directory.
  authors:
  - name: Robert Fromont
    email: robert.fromont@canterbury.ac.nz
  repository-code: https://github.com/nzilbb/ag/tree/main
- type: software
  title: Apache Commons FileUpload
  version: '1.5'
  abbreviation: commons-fileupload:commons-fileupload
  license: Apache-2.0
  notes: More license information can be found in the THIRD-PARTY/Apache_Commons_FileUpload
    directory.
  authors:
  - name: Martin Cooper
    email: martinc@apache.org
  - name: dIon Gillard
    email: dion@apache.org
  - name: John McNally
    email: jmcnally@collab.net
  - name: Daniel Rall
    email: dlr@finemaltcoding.com
  - name: Jason van Zyl
    email: jason@zenplex.com
  - name: Robert Burrell Donkin
    email: rdonkin@apache.org
  - name: Sean C. Sullivan
    email: sean |at| seansullivan |dot| com
  - name: Jochen Wiedmann
    email: jochen.wiedmann@gmail.com
  - name: Simone Tripodi
    email: simonetripodi@apache.org
  - name: Gary Gregory
    email: ggregory@apache.org
  - name: Rob Tompkins
    email: chtompki@apache.org
  repository-code: https://gitbox.apache.org/repos/asf?p=commons-fileupload.git
- type: software
  title: Apache Commons IO
  version: 2.11.0
  abbreviation: commons-io:commons-io
  license: Apache-2.0
  notes: More license information can be found in the THIRD-PARTY/Apache_Commons_IO
    directory.
  authors:
  - name: Scott Sanders
    email: sanders@apache.org
  - name: dIon Gillard
    email: dion@apache.org
  - name: Nicola Ken Barozzi
    email: nicolaken@apache.org
  - name: Henri Yandell
    email: bayard@apache.org
  - name: Stephen Colebourne
  - name: Jeremias Maerki
    email: jeremias@apache.org
  - name: Matthew Hawthorne
    email: matth@apache.org
  - name: Martin Cooper
    email: martinc@apache.org
  - name: Rob Oxspring
    email: roxspring@apache.org
  - name: Jochen Wiedmann
    email: jochen.wiedmann@gmail.com
  - name: Niall Pemberton
  - name: Jukka Zitting
  - name: Gary Gregory
    email: ggregory at apache.org
  - name: Kristian Rosenvold
    email: krosenvold@apache.org
  repository-code: https://gitbox.apache.org/repos/asf?p=commons-io.git
- type: software
  title: Apache Derby Database Engine and Embedded JDBC Driver
  version: 10.17.1.0
  abbreviation: org.apache.derby:derby
  license: Apache-2.0
  notes: More license information can be found in the THIRD-PARTY/Apache_Derby_Database_Engine_and_Embedded_JDBC_Driver
    directory.
  authors:
  - name: The Apache Derby Database Engine and Embedded JDBC Driver 10.17.1.0 Team
  repository-code: http://svn.apache.org/viewcvs.cgi/db/derby/code/trunk/?root=Apache-SVN/derby
- type: software
  title: Apache Derby Shared Code
  version: 10.17.1.0
  abbreviation: org.apache.derby:derbyshared
  license: Apache-2.0
  notes: More license information can be found in the THIRD-PARTY/Apache_Derby_Shared_Code
    directory.
  authors:
  - name: The Apache Derby Shared Code 10.17.1.0 Team
  repository-code: http://svn.apache.org/viewcvs.cgi/db/derby/code/trunk/?root=Apache-SVN/derbyshared
- type: software
  title: JSR 374 (JSON Processing) Default Provider
  version: 1.1.4
  abbreviation: org.glassfish:javax.json
  license: NOASSERTION OR CDDL-1.1
  notes: More license information can be found in the THIRD-PARTY/JSR_374_JSON_Processing_Default_Provider
    directory.
  authors:
  - name: Lukas Jungmann
  repository-code: https://github.com/javaee/jsonp/javax.json

GitHub Events

Total
  • Release event: 3
  • Push event: 15
  • Create event: 3
Last Year
  • Release event: 3
  • Push event: 15
  • Create event: 3

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 5
repo1.maven.org: nz.ilbb.labbcat:nzilbb.labbcat

Client library for communicating with LaBB-CAT corpus servers.

  • Versions: 5
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 32.5%
Average: 39.5%
Dependent packages count: 46.5%
Last synced: 10 months ago

Dependencies

pom.xml maven
  • nz.ilbb.ag:nzilbb.ag 1.1.1-SNAPSHOT compile
  • junit:junit 4.13.1 test