GeoNLPlify aims to make variations of an input sentence working on spatial information contained in words


Keywords
data-augmentation, geolocation, nlp
License
GPL-3.0
Install
pip install geonlplify==0.3.10

Documentation

GeoNLPlify :earth_africa: :book:

Documentation Status GitHub GitHub release (latest by date)

A NLP library for data augmentation focusing on spatial information contained in text.

Usage

import geonlplify

my_text = "My name is Clara and I live in Berkeley."
geonlplify.geonlplify(my_text)
'My name is Clara and I live in Bristol'

Installation

pip install GeoNLPlify
# Download data. Please visit Simplemaps: https://simplemaps.com/data/world-cities
python3 -c "from geonlplify import download_simplemaps_data; download_simplemaps_data()"
# Download spacy model
python -m spacy download en_core_web_trf  

Contributions

You can install GeoNLPlify in three ways: in a virtual_env, in a conda environment

Virtual Environment

  1. Git clone this repository
git clone https://github.com/remydecoupes/GeoNLPlify.git
  1. Create a virtual env
python -m venv geonlplify_venv
source geonlplify_venv/bin/activate
pip install --upgrade pip
  1. Install dependencies
cd GeoNLPlify
pip install -r virtual_env_requirements.txt
  1. Donwload world-cities from simple maps
wget -qO- https://simplemaps.com/static/data/world-cities/basic/simplemaps_worldcities_basicv1.75.zip  | bsdtar -xvf- -C ./geonlplify/simplemaps/

Conda environment

  1. Git clone this repository
git clone https://github.com/remydecoupes/GeoNLPlify.git
  1. Create a conda with all the required dependencies
cd GeoNLPlify
conda env create -n geonlplify_conda --file conda_environment.yml python==3.10.6
conda activate geonlplify_conda
  1. Install spacy models
python -m spacy download en_core_web_trf
  1. Donwload world-cities from simple maps
wget -qO- https://simplemaps.com/static/data/world-cities/basic/simplemaps_worldcities_basicv1.75.zip  | bsdtar -xvf- -C ./geonlplify/simplemaps/

Acknowledgement

:pray: This library use those terrific tools/libraries/data :muscle::

Scientific publication

Conference / journal paper description
EGC'2023 short paper (in French) video
Iospress - Intelligent Data Analysis long paper (in English) Open Access