<commit_before>/*jshint es5:true */

// the most useful source:
//  http://services.w3.org/xslt?xmlfile=http://www.w3.org/2005/07/13-pubrules-src.html&xslfile=http://www.w3.org/2005/07/13-pubrules-compare.xsl

// Pseudo-constants:
var DELIVERER_IDS_KEY = 'delivererIDs';

var whacko = require("whacko")
,   fs = require("fs")
,   sua = require("./throttled-ua")
,   version = require("../package.json").version
,   Exceptions = require("./exceptions").Exceptions
;

var Specberus = function () {
    this.version = version;
    this.clearCache();
};

Specberus.prototype.clearCache = function () {
    this.docDate = null;
    this.sotdSection = null;
    this.url = null;
    this.source = null;
    this.delivererIDs = [];
    this.shortname = undefined;
    this.exceptions = new Exceptions();
};

Specberus.prototype.validate = function (options) {
    // accepted options:
    //  - url: URL for a document to load
    //  - source: source of a document to parse
    //  - file: file name of a document to load
    //  - document: the document, directly available
    //  - profile: the profile against which to validate
    //  - events: where to send the various events
    //  - validation: whether to skip CSS and HTML validation
    //  - noRecTrack: document uses a Rec-track status but isn't on Rec-track
    //  - informativeOnly: document is informative only
    //  - echidnaReady: document is intended for automatic publication
    //  - patentPolicy: Working Group Patent Policy
    //  - processDocument: process document to be used

    this.clearCache();<commit_msg>Reset property "docDateEl" too when clearing cache<commit_after>/*jshint es5:true */

// the most useful source:
//  http://services.w3.org/xslt?xmlfile=http://www.w3.org/2005/07/13-pubrules-src.html&xslfile=http://www.w3.org/2005/07/13-pubrules-compare.xsl

// Pseudo-constants:
var DELIVERER_IDS_KEY = 'delivererIDs';

var whacko = require("whacko")
,   fs = require("fs")
,   sua = require("./throttled-ua")
,   version = require("../package.json").version
,   Exceptions = require("./exceptions").Exceptions
;

var Specberus = function () {
    this.version = version;
    this.clearCache();
};

Specberus.prototype.clearCache = function () {
    this.docDate = null;
    this.docDateEl = null;
    this.sotdSection = null;
    this.url = null;
    this.source = null;
    this.delivererIDs = [];
    this.shortname = undefined;
    this.exceptions = new Exceptions();
};

Specberus.prototype.validate = function (options) {
    // accepted options:
    //  - url: URL for a document to load
    //  - source: source of a document to parse
    //  - file: file name of a document to load
    //  - document: the document, directly available
    //  - profile: the profile against which to validate
    //  - events: where to send the various events
    //  - validation: whether to skip CSS and HTML validation
    //  - noRecTrack: document uses a Rec-track status but isn't on Rec-track
    //  - informativeOnly: document is informative only
    //  - echidnaReady: document is intended for automatic publication
    //  - patentPolicy: Working Group Patent Policy
    //  - processDocument: process document to be used

    this.clearCache();
{'fraction_non_alphanumeric': 0.12824474660074164, 'fraction_numerical': 0.012360939431396786, 'mean_word_length': 2.885954381752701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 2}, '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': '2707915', 'n_tokens_mistral': 1029, 'n_tokens_neox': 990, 'n_words': 271}