Skip to main content

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

Project description

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 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 paper description
EGC'2023 short paper (in French) video

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geonlplify-0.3.1.tar.gz (17.1 kB view hashes)

Uploaded Source

Built Distribution

geonlplify-0.3.1-py3-none-any.whl (17.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page