<commit_before># range

Range is a random data generator.

# Usage

## Generation configuration

Range works based on a JSON configuration file. An example is as follows:

```
{

	config: {
	
		// The number of data items to be generated
		limit:	5,
		
		// The output format of the generated data
		format:	"csv",
		
		// The location to persist the generated data
		location: "/tmp/output.csv",
		
		// The data properties:
		//		- the name of the property
		//		- the type of the property
		// 		- refer to com.narmnevis.range.generator for the supported types
		data: {
			date:				"date",
			description:		"enum(gift, income, loan, budget, temp)",
			amount:				"range(0, 1000)",
			email:				"regex([a-z]{4}@[a-z]{4}.com)"
			from:				"enum(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)",
			to:					"enum(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)"
		}
	}

}
```

in which:

* `limit` is the number of data items to be generated.
* `format` is the for format with which the generated is published.
* `location` is the location at which the generated data is published.
* `data` holds the "names" and "types" of the data items to be generated.
 
## Generate data

To generate data:

* Download the distribution package from [here][v1] and unpack it.
* Create your generation configuration as described above.
* Run the following script:

```bash
/path/to/range-1.0-standanle/range.sh /path/to/range/config
```
* Collect the generated data from `location` configured in the configuration file.
<commit_msg>Add missing comma in example<commit_after># range

Range is a random data generator.

# Usage

## Generation configuration

Range works based on a JSON configuration file. An example is as follows:

```
{

	config: {
	
		// The number of data items to be generated
		limit:	5,
		
		// The output format of the generated data
		format:	"csv",
		
		// The location to persist the generated data
		location: "/tmp/output.csv",
		
		// The data properties:
		//		- the name of the property
		//		- the type of the property
		// 		- refer to com.narmnevis.range.generator for the supported types
		data: {
			date:				"date",
			description:		"enum(gift, income, loan, budget, temp)",
			amount:				"range(0, 1000)",
			email:				"regex([a-z]{4}@[a-z]{4}.com)",
			from:				"enum(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)",
			to:					"enum(P1, P2, P3, P4, P5, P6, P7, P8, P9, P10)"
		}
	}

}
```

in which:

* `limit` is the number of data items to be generated.
* `format` is the for format with which the generated is published.
* `location` is the location at which the generated data is published.
* `data` holds the "names" and "types" of the data items to be generated.
 
## Generate data

To generate data:

* Download the distribution package from [here][v1] and unpack it.
* Create your generation configuration as described above.
* Run the following script:

```bash
/path/to/range-1.0-standanle/range.sh /path/to/range/config
```
* Collect the generated data from `location` configured in the configuration file.

{'fraction_non_alphanumeric': 0.12003968253968254, 'fraction_numerical': 0.021825396825396824, 'mean_word_length': 3.149519890260631, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1103262', 'n_tokens_mistral': 1122, 'n_tokens_neox': 996, 'n_words': 394}