Skip to main content

openstreetmap-tags-to-rivescript

Convert of openstreetmap/id-tagging-schema to RiveScript, the Artificial Intelligence Scripting Language (alternative to AIML)

Quickstart

Explains how to generate the RiveScripts

Install

No pip release yet, install from GitHub

pip install https://github.com/fititnt/openstreetmap-tags-to-rivescript/archive/main.zip

Fetch cache

# Prepare the cache directory
git clone https://github.com/openstreetmap/id-tagging-schema.git ./id-tagging-schema

Generate RiveScript

osmtags2rive --language=pt > example/brain/osm-tagging_pt.rive
osmtags2rive --language=pt --reverse-index > example/brain/osm-tagging-reverse_pt.rive

Extras

Quick example on how to use the generated RiveScripts

Check Rivescript website page for interpreters for other programming languages. They all have a similar interface: allow you to deposit all files in a directory which is loaded by your interpreter.

Python example

Using Rive Python interpreter from https://github.com/aichaos/rivescript-python

# install the script
pip install rivescript

python shell.py
# file shell.py

from rivescript import RiveScript

# bot = RiveScript(utf8=True)
bot = RiveScript()
bot.load_directory("./example/brain")
bot.sort_replies()

while True:
    msg = input('You> ')
    if msg == '/quit':
        quit()

    reply = bot.reply("localuser", msg)
    print ('Bot>', reply)

Disclaimers

OpenStreetMap™ is a trademark of the OpenStreetMap Foundation, and is used with their permission. This project is not endorsed by or affiliated with the OpenStreetMap Foundation. (via OSMF Trademark_Policy)

License

Public Domain

Public domain

Metadata

Release files for osmtags2rive 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osmtags2rive 0.6.0
File Size Uploaded
osmtags2rive-0.6.0.tar.gz 7.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for osmtags2rive 0.6.0
File Interpreter ABI Platform
osmtags2rive-0.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.2 kB

Release files / osmtags2rive-0.6.0.tar.gz

Download URL osmtags2rive-0.6.0.tar.gz
Size 7.0 kB
Tags Source
SHA-256 checksum
How to use checksums
fe4660a977a37478556956827574504897eb46d78cab785d28c6298cd4f9864c
BLAKE2b-256 checksum
How to use checksums
ee1f07806febd70a34bbbb3e98dfca7cdf003c463b6ab2b46a02cc0a9024435c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release files / osmtags2rive-0.6.0-py3-none-any.whl

Download URL osmtags2rive-0.6.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e58b8eb2c340d172cc061f277e55a060db59408242ec041d367ad9ab5665ecde
BLAKE2b-256 checksum
How to use checksums
63076d0edda16bfa15e13aff436d707c949c82caaa5d897b4577d0950ab7a51c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.6

Release history Release notifications | RSS feed

This release

0.6.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page