<commit_before># Fixed Length Parser

Parses a column as fixed length record with range specifications specified.

## Syntax
```
 parse-as-fixed-length <column> width[,width]*
```

## Usage Notes

## Examples
```
parse-as-fixed-length body 2,4,5,3
```
<commit_msg>Update fixed-length-parser.md<commit_after># Fixed Length Parser

Parses a column as fixed length record with widths for each field specified.

## Syntax
```
 parse-as-fixed-length <column> width[,width]* [padding]
```

## Usage Notes

Fixed width text files are special cases of text files where the format is specified by column widths,
pad character and left/right alignment.  Column widths are measured in units of characters.
For example, if you have data in a text file where the first column always has exactly 10 characters,
and the second column has exactly 5, the third has exactly 12 (and so on), this would be categorized as a
fixed width text file.

## Examples

Let's assume a sample record as shown below:

```
  {
    "body" : "12  10  ABCXYZ"
  }
```

applying the PARSE-AS-FIXED-LENGTH directive assumes SPACE as the default padding
character.

```
parse-as-fixed-length body 2,4,5,3
```

would generate the following record

```
  {
    "body" : "12  10  ABCXYZ",
    "body_1" : "12",
    "body_2" : "  10",
    "body_3" : "  ABC",
    "body_4" : "XYZ
  }
```

{'fraction_non_alphanumeric': 0.10945644080416977, 'fraction_numerical': 0.021593447505584513, 'mean_word_length': 3.7829181494661923, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, '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': '3732274', 'n_tokens_mistral': 452, 'n_tokens_neox': 412, 'n_words': 169}