<commit_before>[![Build Status](https://travis-ci.org/w3c/specberus.svg?branch=master)](https://travis-ci.org/w3c/specberus)

# Specberus

Specberus is a checker for W3C's Publication Rules (PubRules).

## Installation

Specberus is a Node application. It will eventually be distributed through npm, but in the meantime
you can simply clone this repository and run:

    npm install -d

In order to get all the dependencies installed. Naturally, this requires that you have a reasonably
recent version of Node installed.

## Running

Currently there is no shell to run Specberus. Later we will add both Web and CLI interfaces based
on the same core library.

## Testing

Testing is done using mocha. Simply run:

    mocha

from the root and you will be running the test suite. Mocha can be installed with:

    npm install -g mocha

Some of the tests can on occasion take a long time, or fail outright because a remote service is
unavailable. To work around this, you can set SKIP_NETWORK:

    SKIP_NETWORK=1 mocha

## API

The interface you get when you `require("specberus")` is that from `lib/validator`. `new Specberus()`
then gives you a validator instance that is properly configured for operation in the Node environment
(there is nominal support for running Specberus under other environments, but it isn't usable at this time).

The validator interface supports a `validate(options)` methods, which takes an object with the<commit_msg>Tiny tweak to a sentence on README.<commit_after>[![Build Status](https://travis-ci.org/w3c/specberus.svg?branch=master)](https://travis-ci.org/w3c/specberus)

# Specberus

Specberus is a checker for W3C's Publication Rules (PubRules).

## Installation

Specberus is a Node application. It will eventually be distributed through npm, but in the meantime
you can simply clone this repository and run:

    npm install -d

In order to get all the dependencies installed. Naturally, this requires that you have a reasonably
recent version of Node installed.

## Running

Currently there is no shell to run Specberus. Later we will add both Web and CLI interfaces based
on the same core library.

## Testing

Testing is done using mocha. Simply run:

    mocha

from the root and you will be running the test suite. Mocha can be installed with:

    npm install -g mocha

Some of the tests can on occasion take a long time, or fail outright because a remote service is
unavailable. To work around this, you can set SKIP_NETWORK:

    SKIP_NETWORK=1 mocha

## API

The interface you get when you `require("specberus")` is that from `lib/validator`. It returns a
`Specberus` instance that is properly configured for operation in the Node environment
(there is nominal support for running Specberus under other environments, but it isn't usable at this time).

The validator interface supports a `validate(options)` methods, which takes an object with the
{'fraction_non_alphanumeric': 0.058396682791983415, 'fraction_numerical': 0.0027643400138217, 'mean_word_length': 4.331491712707182, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2416745', 'n_tokens_mistral': 811, 'n_tokens_neox': 770, 'n_words': 410}