<commit_before># Regs Data

## Intro
- App inits in static/js/regulations.js
- Data module is static/js/regs-data.js
  - Deps: regs-helpers.js, sample-json.js

## Tech stack
- RequireJS with jQuery built in
- Grunt
- Jasmine
  - When you run specs, for now you'll see an error like "Illegal path or script error: ['jquery']". I think this has to do with us using the RequireJS with jQuery built in. All specs should run fine, though.

## Dependencies
- If you have the Grunt packages installed already, you should just be able to "npm install" at the project root and get all dependencies

## Doing stuff
- To run tests, "grunt jasmine" at the project root

## Goal
To experiment and test solutions for managing data on the client in a way that:
- is flexible for any type of pairing of content
- minimizes DOM traversal for performance
- minimizes API calls for performance
- can use data stored both in cache and in the DOM to give content different presentation attributes based on user input
- to accept data from the server in either html and json, to be extensible for other input
- to keep the DOM light enough so that the user has a fluid experience<commit_msg>some updates to the docs<commit_after># Regs Data

## Intro
- App inits in static/js/regulations.js
- Data module is static/js/regs-data.js
  - Deps: regs-helpers.js, sample-json.js

## Tech stack
- Backbone, Underscore
- RequireJS with jQuery built in
- Vanilla RequireJS and jQuery 1.9.1 for unit tests
- Grunt
- Jasmine

## Dependencies
- If you have the Grunt packages installed already, you should just be able to "npm install" at the project root and get all dependencies

## Doing stuff
- To run tests on the command line, "grunt jasmine" at the project root
- To run tests in the browser, use python -m SimpleHTTPServer and then load up 0.0.0.0:8000/tests/browser/_SpecRunner.html

## Current Direction
- Management of DOM manipulation, custom event triggers/handlers and URL routing via Backbone
- Custom data management module to replace Backbone's Model and Collection modules

## Goal
To experiment and test solutions for managing data on the client in a way that:
- is flexible for any type of pairing of content
- minimizes DOM traversal for performance
- minimizes API calls for performance
- can use data stored both in cache and in the DOM to give content different presentation attributes based on user input
- to accept data from the server in either html and json, to be extensible for other input
- to keep the DOM light enough so that the user has a fluid experience
{'fraction_non_alphanumeric': 0.05279624560031287, 'fraction_numerical': 0.004301916308173641, 'mean_word_length': 3.90978886756238, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, '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': '1833511', 'n_tokens_mistral': 693, 'n_tokens_neox': 662, 'n_words': 389}