<commit_before># h2geo-presets specification

version: 0.1


# Structure
The base yml structure of a preset is the following:

```
name: # Mandatory field, internationalized
version: # Mandatory field
author: # Mandatory field
lastUpdate: # Mandatory field, set automatically
description: # Mandatory field, internationalized
offlineArea: # Optional field: a set of bounding boxes (for implementations compatible with offline areas)
image: # Optional field: an image which represents your preset
groups: # Mandatory field: a set of group of data types inside your preset

```

## $.name
The name of your preset. Must be a set of key/value entries, key being the language, value being the name in the specified language.  
**Warning: the preset must have an entry with the key 'default'**  
Example:  
```
name:
 default: "My preset" # This 'default' entry is mandatory
 fr: "Mon preset"
 en: "My preset"
 es: "Mi preset"
```

## $.version
The version of your preset. Can be any string value.  
Example:  
```
version: 1.0.0-RC1
```

## $.author
The author of your preset. Can be any string value.  
Example:  
```
author: <NAME>
```


## $.description
The description of your preset. Must be a set of key/value entries, key being the language, value being the name in the specified language.  
**Warning: the preset must have an entry with the key 'default'**  
Example:  
```
description:
 default: "This preset is awesome" # This 'default' entry is mandatory
 fr: "Ce preset est trop cool"
 en: "This preset is awesome"
 es: "Este preset es impresionante"
```

## $.offlineArea
The offlineArea represents a set of bounding boxes which may be fetched automatically by a client.
This is useful for presets made for specific regions (Velib Stations of Paris for instance).  
**NB: this entry is optional.**  
**Warning: the syntax of a bounding box is an array of latitude / longitude values in the following order: [west, south, east, north]**  
Example:
```
offlineArea:
 - [2.318866,48.854833,2.349637,48.866211] # tuileries / louvre
 - [2.225740,48.884614,2.256510,48.895985] # la defense
 - [2.305884,48.832803,2.336655,48.844186] # montparnasse
```

## $.image
An image representing your preset. This field is optional.  
Example:
```
image: 'http://static.directmatin.fr/sites/default/files/velib_frein_arriere.jpg'
```

## $.groups
The main field where all your preset structure will be detailed.  
This field is mandatory.
The data field is a set of groups.  
Example:  
```
groups:
 - name: # This will be your first group of items
   icon:
   url:
   items:
 - name: # This will be your second group of items
   icon:
   url:
   items:
 #...
```

## $.groups.$
A group represents a set of items <=> data types.
For instance, imagine a group named "Emergencies" containing the following items:
Police Station, Defibrillator, Fire Station, Hospital, etc...
Every preset requires to have at least one group.

The structure of a group is the following:
```
- name: # This field is mandatory and internationalized
  icon: # This field is optional
  url: # This field is optional
  items: # This field is mandatory
```

## $.groups.$.name
The name of your group. Must be a set of key/value entries, key being the language, value being the group name in the specified language.  
This field is mandatory.  
**Warning: the group name must have an entry with the key 'default'**  
Example:  
```
 groups:
  - name:
   default: "Emergencies" # This 'default' entry is mandatory
   fr: "Urgences"
   en: "Emergencies"
   es: "Emergencia"
```

## $.groups.$.icon
The icon representing your group. Must be pointing to a valid image url. This field is optional.
Example:  
```
 - icon: https://image.freepik.com/free-icon/pharmacy--emergency_318-33252.jpg
```

## $.groups.$.url
A url pointing to the specification of the current group. This field is optional.

## $.groups.$.items
A set of items, each representing a specific data type.  
This field is mandatory.  

The structure of an item is the following:
```
    - name: # This field is mandatory
      url: # This field is optional
      label: # This field is mandatory and internationalized
      description: # This field is mandatory and internationalized
      keywords: # This field is mandatory and internationalized
      tags: # This field is mandatory
      constraints: # This field is optional
```

## $.groups.$.items.$.name
The name of your item. This field is mandatory.  
**Warning: the item name must have an entry with the key 'default'**  
Example:  
```
 items:
  - name: amenity=Police station
```
<commit_msg>Update 0.1.md<commit_after># h2geo-presets specification

version: 0.1


# Structure
The base yml structure of a preset is the following:

```
name: # Mandatory field, internationalized
version: # Mandatory field
author: # Mandatory field
lastUpdate: # Mandatory field, set automatically
description: # Mandatory field, internationalized
offlineArea: # Optional field: a set of bounding boxes (for implementations compatible with offline areas)
image: # Optional field: an image which represents your preset
groups: # Mandatory field: a set of group of data types inside your preset

```

## $.name
The name of your preset. Must be a set of key/value entries, key being the language, value being the name in the specified language.  
**Warning: the preset must have an entry with the key 'default'**  
Example:  
```
name:
 default: "My preset" # This 'default' entry is mandatory
 fr: "Mon preset"
 en: "My preset"
 es: "Mi preset"
```

## $.version
The version of your preset. Can be any string value.  
Example:  
```
version: 1.0.0-RC1
```

## $.author
The author of your preset. Can be any string value.  
Example:  
```
author: <NAME>
```


## $.description
The description of your preset. Must be a set of key/value entries, key being the language, value being the name in the specified language.  
**Warning: the preset must have an entry with the key 'default'**  
Example:  
```
description:
 default: "This preset is awesome" # This 'default' entry is mandatory
 fr: "Ce preset est trop cool"
 en: "This preset is awesome"
 es: "Este preset es impresionante"
```

## $.offlineArea
The offlineArea represents a set of bounding boxes which may be fetched automatically by a client.
This is useful for presets made for specific regions (Velib Stations of Paris for instance).  
**NB: this entry is optional.**  
**Warning: the syntax of a bounding box is an array of latitude / longitude values in the following order: [west, south, east, north]**  
Example:
```
offlineArea:
 - [2.318866,48.854833,2.349637,48.866211] # tuileries / louvre
 - [2.225740,48.884614,2.256510,48.895985] # la defense
 - [2.305884,48.832803,2.336655,48.844186] # montparnasse
```

## $.image
An image representing your preset. This field is optional.  
Example:
```
image: 'http://static.directmatin.fr/sites/default/files/velib_frein_arriere.jpg'
```

## $.groups
The main field where all your preset structure will be detailed.  
This field is mandatory.
The data field is a set of groups.  
Example:  
```
groups:
 - name: # This will be your first group of items
   icon:
   url:
   items:
 - name: # This will be your second group of items
   icon:
   url:
   items:
 #...
```

## $.groups.$
A group represents a set of items <=> data types.
For instance, imagine a group named "Emergencies" containing the following items:
Police Station, Defibrillator, Fire Station, Hospital, etc...
Every preset requires to have at least one group.

The structure of a group is the following:
```
- name: # This field is mandatory and internationalized
  icon: # This field is optional
  url: # This field is optional
  items: # This field is mandatory
```

## $.groups.$.name
The name of your group. Must be a set of key/value entries, key being the language, value being the group name in the specified language.  
This field is mandatory.  
**Warning: the group name must have an entry with the key 'default'**  
Example:  
```
 groups:
  - name:
   default: "Emergencies" # This 'default' entry is mandatory
   fr: "Urgences"
   en: "Emergencies"
   es: "Emergencia"
```

## $.groups.$.icon
The icon representing your group. Must be pointing to a valid image url. This field is optional.
Example:  
```
 - icon: https://image.freepik.com/free-icon/pharmacy--emergency_318-33252.jpg
```

## $.groups.$.url
A url pointing to the specification of the current group. This field is optional.

## $.groups.$.items
A set of items, each representing a specific data type.  
This field is mandatory.  

The structure of an item is the following:
```
    - name: # This field is mandatory
      url: # This field is optional
      query: # This field is optional
      label: # This field is mandatory and internationalized
      description: # This field is mandatory and internationalized
      keywords: # This field is mandatory and internationalized
      tags: # This field is mandatory
      constraints: # This field is optional
```

## $.groups.$.items.$.name
The name of your item. This field is mandatory.  
**Warning: the item name must have an entry with the key 'default'**  
Example:  
```
 items:
  - name: amenity=Police station
```

{'fraction_non_alphanumeric': 0.10036932435368238, 'fraction_numerical': 0.023028459700195524, 'mean_word_length': 3.7118730808597746, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '6045207', 'n_tokens_mistral': 2872, 'n_tokens_neox': 2664, 'n_words': 1210}