Skip to content

Language-Research-Technology/ldac-profile

Repository files navigation

Language Data Commons RO-Crate Profile Validator

This project will validate RO-Crate metadata against the RO-Crate Metadata Profile for Language Data Commons

To check a file

To get a complete report on a file, run this: node ldac-check.js test-data/paradisec/1/ro-crate-metadata.json

To get just the errors:

node ldac-check.js -e test-data/paradisec/1/ro-crate-metadata.json

Which should produce this output:


[
  {
    entity: './',
    property: 'license',
    message: 'License @id does not start with LICENSE',
    clause: 'MUST have a `license` property with reference to an entity of type [File, DataReuseLicense] with an `@id` property that starts with `LICENSE.` and a `URL` property that is a valid URL'
  },
  {
    entity: './',
    property: 'license',
    message: 'There is a reference to a LICENSE entity but it does not have "File" as a type value: {"@id":"_:b0","@type":"CreativeWork","name":"Open (subject to agreeing to PDSC access conditions)"}',
    clause: 'MUST have a `license` property with reference to an entity of type [File, DataReuseLicense] with an `@id` property that starts with `LICENSE.` and a `URL` property that is a valid URL'
  },
  {
    entity: './',
    property: 'license',
    message: 'There is a reference to a LICENSE entity but it does not have "DataReuseLicense" as a @type value: {"@id":"_:b0","@type":"CreativeWork","name":"Open (subject to agreeing to PDSC access conditions)"}',
    clause: 'MUST have a `license` property with reference to an entity of type [File, DataReuseLicense] with an `@id` property that starts with `LICENSE.` and a `URL` property that is a valid URL'
  },
  {
    entity: './',
    property: 'license',
    message: 'There is a reference to a LICENSE entity but it does not have a `URL` property which is a well-formed URL: {"@id":"_:b0","@type":"CreativeWork","name":"Open (subject to agreeing to PDSC access conditions)"}',
    clause: 'MUST have a `license` property with reference to an entity of type [File, DataReuseLicense] with an `@id` property that starts with `LICENSE.` and a `URL` property that is a valid URL'
  }
]



PARADISEC

There are some PARADISEC-specific tests that show how to take some test records from PARADISEC created before this profile was developed, and firstly make them validate and secondly, demonstrate some optional profile features.

To run the tests:

mocha test/validator.paradisec.spec.js

Updating profile.md with make-profile.js

profile/profile.md is generated by the make-profile.js script and its contents. If updates are required, edit the following files in this repository:

  • profile-text/profile.md
  • examples

Or these files in other repositories:

  • ro-crate-modes/modes/language-data-commons-collection.json

Ensure Lodash is installed:

npm install lodash

To run the script:

node make-profile.js

About

LDAC specific RO Crate Profile

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published