diff --git a/README.md b/README.md index 5747759f28e4e5f993c537c6575f6daa9969d30d..ee8abdbaf72c0d9e1df7b9879467acd57f984c99 100644 --- a/README.md +++ b/README.md @@ -5,14 +5,28 @@ PLWN API PLWN API is a library for accessing the plWordNet lexicon in a Python program. +Setup +===== + +To use the api one has to download a default data dump. To setup the api you have to `download` command from plwn library. + +```python +import plwn + +plwn.download() +``` + +The script will download a default plWordNet dump in sqlite format. The default dump is a compressed version of plWordNet 4.5 - a database file `default_model` should be downloaded to your disk. + + Usage ===== Access is provided using a PLWordNet object, with data loaded from the database -dump. +dump. To get thethe database dump use the `download` method (see ,,Setup'' section). >>> import plwn - >>> wn = plwn.load_default() + >>> wn = plwn.load("./default_model") Using that object, it's possible to obtain synset and lexical unit data. @@ -80,7 +94,7 @@ To load this version at a later date, use `plwn.load(path)` instead of `plwn.loa >>> api = plwn.load("storage-dumps/plwn-new.db") -Downloading API dumps +Manually downloading API dumps ===================== In order to download one of the dumps available at https://minio.clarin-pl.eu/minio/public/models/: