<commit_before>[![travis](https://travis-ci.org/CanalTP/mimirsbrunn.svg?branch=master)](https://travis-ci.org/CanalTP/mimirsbrunn)
[![GitHub license](https://img.shields.io/github/license/CanalTP/mimirsbrunn.svg)](https://github.com/CanalTP/mimirsbrunn/blob/master/LICENSE)
[![GitHub tag](https://img.shields.io/github/tag/CanalTP/mimirsbrunn.svg)](https://github.com/CanalTP/mimirsbrunn/tag)
[![Twitter](https://img.shields.io/twitter/url/https/github.com/CanalTP/mimirsbrunn.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:&url=https%3A%2F%2Fgithub.com%2FCanalTP%2Fmimirsbrunn)

# Mimirsbrunn

Mimirsbrunn is an independent geocoding and reverse-geocoding system written in [Rust](https://www.rust-lang.org/en-US/) and build upon [Elasticsearch](https://www.elastic.co).
It can handle addresses, streets, points-of-interest (POI), administrative regions or public transport stops.
In particular [Navitia](https://github.com/CanalTP/navitia) uses it as its global geocoding service.

## Getting Started

Mimirsbrunn is composed of several [parts](#components): some of them manage the data import in Elasticsearch while a web service ([bragi](#bragi)) wraps Elasticsearch interactions in order to return formated responses (using [geocodejson](https://github.com/geocoders/geocodejson-spec) as the responses format)

### Install

- To use the Mimirsbrunn components you need an Elasticsearch database (Elasticsearch version needs to be > 2.x).
- To build you must first install rust:
```shell
curl https://sh.rustup.rs -sSf | sh
```
- Then to build Mimirsbrunn:
```shell
cargo build --release
```

### Data Input

Mimirsbrunn relies on geographical datasets to find what users are looking for.
These locations belong to different data types and come from various sources.
To import these locations Mimirsbrunn comes along with the following specific tools:

Data Types | Data Sources | [Import Tools](#components)
:---: | :---: | :---:
Addresses | OpenAddresses  or BANO (the french opendata dataset) | openaddresses2mimir or bano2mimir
Streets | OpenStreetMap | osm2mimir
POI | OpenStreetMap | osm2mimir
Public Transport Stops | Navitia.io data platform  or any GTFS data repository | ntfs2mimir or stops2mimir
Administrative Regions | OpenStreetMap or Cosmogony | osm2mimir or cosmogony2mimir

To use another datasource you have to write your own data importer.
See for instance [Fafnir](https://github.com/QwantResearch/fafnir), an external component to import POIs from another database.

## <a name=components> Components: Import Tools & Web Service </a><commit_msg>changes<commit_after>[![travis](https://travis-ci.org/CanalTP/mimirsbrunn.svg?branch=master)](https://travis-ci.org/CanalTP/mimirsbrunn)
[![GitHub license](https://img.shields.io/github/license/CanalTP/mimirsbrunn.svg)](https://github.com/CanalTP/mimirsbrunn/blob/master/LICENSE)
[![GitHub tag](https://img.shields.io/github/tag/CanalTP/mimirsbrunn.svg)](https://github.com/CanalTP/mimirsbrunn/tag)

# Mímirsbrunn

Mimirsbrunn is an independent geocoding and reverse-geocoding system written in [Rust](https://www.rust-lang.org/en-US/) and built upon [Elasticsearch](https://www.elastic.co).
It can handle addresses, streets, points-of-interest (POI), administrative regions or public transport stops.
In particular [Navitia](https://github.com/CanalTP/navitia) uses it as its global geocoding service.

## Getting Started

Mimirsbrunn is composed of several [parts](#components): some of them manage the data import in Elasticsearch while a web service ([bragi](#bragi)) wraps Elasticsearch interactions in order to return formated responses (using [geocodejson](https://github.com/geocoders/geocodejson-spec) as the responses format)

### Install

- To use the Mimirsbrunn components you need an Elasticsearch database (Elasticsearch version needs to be 2.x).
- To build you must first install rust following [these instructions](https://www.rust-lang.org/en-US/install.html).
- Then to build Mimirsbrunn:
```shell
cargo build --release
```

### Data Input

Mimirsbrunn relies on geographical datasets to find what users are looking for.
These locations belong to different data types and come from various sources.
To import these locations Mimirsbrunn comes along with the following specific tools:

Data Types | Data Sources | [Import Tools](#components)
:---: | :---: | :---:
Addresses | OpenAddresses  or BANO (the french opendata dataset) | openaddresses2mimir or bano2mimir
Streets | OpenStreetMap | osm2mimir
POI | OpenStreetMap | osm2mimir
Public Transport Stops | Navitia.io data platform  or any GTFS data repository | ntfs2mimir or stops2mimir
Administrative Regions | OpenStreetMap or Cosmogony | osm2mimir or cosmogony2mimir

To use another datasource you have to write your own data importer.
See for instance [Fafnir](https://github.com/QwantResearch/fafnir), an external component to import POIs from another database.

## <a name=components> Components: Import Tools & Web Service </a>
{'fraction_non_alphanumeric': 0.11042084168336673, 'fraction_numerical': 0.004609218436873747, 'mean_word_length': 5.366071428571429, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 26, 'lorem ipsum': 0, 'www.': 5, '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': '691128', 'n_tokens_mistral': 1603, 'n_tokens_neox': 1543, 'n_words': 466}