<commit_before>ecg-quicktest-model
===================

JavaScript Model for the ECG quick test

### Build Status
[![Build Status](https://travis-ci.org/ecogood/ecg-quicktest-model.svg?branch=master)](https://travis-ci.org/ecogood/ecg-quicktest-model)

## Use

```javascript
var quickTestModel = require('ecg-quicktest-model');
var quickTest = quickTestModel.factory(); // creates test for matrix version 4.1

quickTest.getQuestionsCount(); // how many questions are in the test
quickTest.getAllowedAnswers(); // what answers are allowed for every question
quickTest.getAllowedParticipantTypes(); // e.g. ['company', 'self-employed']

// set the participant type (default is 'company')
quickTest.setParticipantType('self-employed');

// start answering
quickTest.setAnswer(1, 3); // answer the first question with the value 3
quickTest.setAnswer(2, 4); // answer the second question with the value 4
// set the other answers

// get the results
quickTest.getResult().points; // return the achieved points
```

## Testing

Run the tests:

``npm test``

The model is tested with [Mocha](http://visionmedia.github.io/mocha/) and [Chai](http://chaijs.com/).

## Roadmap

* Create a JS model for the quick test and test it with mocha.

## Installation

Requirements:

* Node.js 0.10.x

```
npm install --save ecg-quicktest-model
```

## Contributing

Feel free to contribute to the Roadmap or otherwise.

You can:

* collaborate through GitHub ([See how in this video](https://www.youtube.com/watch?v=SCZF6I-Rc4I#t=1m19s)):
  * fork the repository
  * make changes
  * If you can, run ``npm test`` to make sure that the tests are still running successfully after your changes.
  * send a pull request
* email the translated files to the main developer, see below.

### Issues and Features

Share issues and desired features [in GitHub](https://github.com/ecogood/ecg-quicktest-texts/issues).

## License

[MIT License](LICENSE).

## Developers

* [<NAME>](http://nikolay-georgiev.net/), main developer, ECG Berlin.

## Release History
<commit_msg>added example for allowed answers<commit_after>ecg-quicktest-model
===================

JavaScript Model for the ECG quick test

### Build Status
[![Build Status](https://travis-ci.org/ecogood/ecg-quicktest-model.svg?branch=master)](https://travis-ci.org/ecogood/ecg-quicktest-model)

## Use

```javascript
var quickTestModel = require('ecg-quicktest-model');
var quickTest = quickTestModel.factory(); // creates test for matrix version 4.1

quickTest.getQuestionsCount(); // how many questions are in the test, e.g. 27
quickTest.getAllowedAnswers(); // e.g. [0, 1, 2, 3, 4]
quickTest.getAllowedParticipantTypes(); // e.g. ['company', 'self-employed']

// set the participant type (default is 'company')
quickTest.setParticipantType('self-employed');

// start answering
quickTest.setAnswer(1, 3); // answer the first question with the value 3
quickTest.setAnswer(2, 4); // answer the second question with the value 4
// set the other answers

// get the results
quickTest.getResult().points; // return the achieved points
```

## Testing

Run the tests:

``npm test``

The model is tested with [Mocha](http://visionmedia.github.io/mocha/) and [Chai](http://chaijs.com/).

## Roadmap

* Create a JS model for the quick test and test it with mocha.

## Installation

Requirements:

* Node.js 0.10.x

```
npm install --save ecg-quicktest-model
```

## Contributing

Feel free to contribute to the Roadmap or otherwise.

You can:

* collaborate through GitHub ([See how in this video](https://www.youtube.com/watch?v=SCZF6I-Rc4I#t=1m19s)):
  * fork the repository
  * make changes
  * If you can, run ``npm test`` to make sure that the tests are still running successfully after your changes.
  * send a pull request
* email the translated files to the main developer, see below.

### Issues and Features

Share issues and desired features [in GitHub](https://github.com/ecogood/ecg-quicktest-texts/issues).

## License

[MIT License](LICENSE).

## Developers

* [<NAME>](http://nikolay-georgiev.net/), main developer, ECG Berlin.

## Release History

{'fraction_non_alphanumeric': 0.13863080684596576, 'fraction_numerical': 0.009535452322738386, 'mean_word_length': 4.354712041884817, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 8, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '846019', 'n_tokens_mistral': 1321, 'n_tokens_neox': 1250, 'n_words': 411}