GeoNLPlify :earth_africa: :book:
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
- Git clone this repository
git clone https://github.com/remydecoupes/GeoNLPlify.git
- Create a virtual env
python -m venv geonlplify_venv
source geonlplify_venv/bin/activate
pip install --upgrade pip
- Install dependencies
cd GeoNLPlify
pip install -r virtual_env_requirements.txt
- 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
- Git clone this repository
git clone https://github.com/remydecoupes/GeoNLPlify.git
- 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
- Install spacy models
python -m spacy download en_core_web_trf
- 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 |