W3C home > Mailing lists > Public > semantic-web@w3.org > December 2019

Re: [ANN] nomunofu v0.1.0

From: Amirouche Boubekki <amirouche.boubekki@gmail.com>
Date: Thu, 12 Dec 2019 15:57:18 +0100
Message-ID: <CAL7_Mo-xn1sSRhXWX3gnAbZArK7_-_KheSxLkmOXBb9tuF94XA@mail.gmail.com>
To: Guile User <guile-user@gnu.org>, Discussion list for the Wikidata project <Wikidata@lists.wikimedia.org>, semantic-web <semantic-web@w3.org>
I am pleased to share with you the v0.1.4 binary release. It contains
the following improvements:

- The REST API takes JSON as input, which will make it easier to
create clients in other programming languages;

- The REST API takes limit and offset as query string. The maximum
limit is 1000;

- There is better error handling, the server will return a HTTP status
code 400 if it detects an error;

- Add aggregation queries `sum`, `count` and `average`, see the Python
client (nomunofu.py) to know how to properly format the query;

- Python client method `Nomunofu.query(*patterns, limit=None,
offset=None)` returns a generator.

Also, the harmless warnings are silenced. The database files are
compatible with the previous release.

This release comes with full wikidata lexemes triples.

You can download the amd64 portable binary release plus database files
with the following command:

  wget http://hyper.dev/nomunofu-v0.1.4.tar.bz2

The directory is 11G uncompressed.

Grab the source code with the following command:

  git clone https://github.com/amirouche/nomunofu

Here is an example Python query that returns at most 5 adverbs:

In [10]: for item in nomunofu.query(
    ...:     (var('uid'), wikibase('lexicalCategory'),
'http://www.wikidata.org/entity/Q380057'),
    ...:     (var('uid'), rdfschema('label'), var('label')),
    ...:     limit=5):
    ...:     print(item)
    ...:
{'uid': 'http://www.wikidata.org/entity/L3244', 'label': 'always'}
{'uid': 'http://www.wikidata.org/entity/L4124', 'label': 'here'}
{'uid': 'http://www.wikidata.org/entity/L4326', 'label': 'often'}
{'uid': 'http://www.wikidata.org/entity/L5201', 'label': 'too'}
{'uid': 'http://www.wikidata.org/entity/L5321', 'label': 'yet'}



Cheers,



Amirouche ~ zig ~ https://hyper.dev
Received on Thursday, 12 December 2019 14:57:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:51:41 UTC