Skip to content

Commit

Permalink
add documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lfoppiano committed Jan 4, 2025
1 parent 9b7eeff commit 2a849b9
Show file tree
Hide file tree
Showing 2 changed files with 89 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/build.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,10 @@ Prometheus metrics (e.g. for Graphana monitoring) are available at http://localh
Creating a new Knowledge Base version
*************************************

The knowledge base used by *entity-fishing* can be updated with new versions of Wikidata and Wikipedia using the pre-processing from the library `GRISP <https://github.com/kermitt2/grisp>`_, see `https://github.com/kermitt2/grisp <https://github.com/kermitt2/grisp>`_.
The knowledge base used by *entity-fishing* can be updated with new versions of Wikidata and Wikipedia using the pre-processing from the library `GRISP <https://github.com/kermitt2/grisp>`_.

The files generated by GRISP (see `listing all necessary files <https://github.com/kermitt2/grisp?tab=readme-ov-file#final-hierarchy-of-files>`_) should be used via the configuration:

- ``dataDirectory`` in the files ``wikipedia-XY.yml`` (with XY equal to the language, e.g. ``en``, ``fr``) for the Wikipedia related knowledge base. Note: The ``XYwiki-latest-pages-articles-multistream.xml.bz2`` can be left compressed

- ``dataDirectory`` in the file ``kb.yml`` for the Wikidata knowledge base (db-kb)
82 changes: 82 additions & 0 deletions doc/restAPI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1295,3 +1295,85 @@ Or in case of issues:
"ok": "false",
"message": "The customisation already exists."
}

Data and statistics API
***********************

GET /data
^^^^^^^^^

Retrieve information about the loaded data, showing the number of concept per Knowledge base.

(1) Example response

Here a sample of the response
::
{
"upperKnowledgeBaseStatisticsCount": {
"Concepts": 113276007,
"Labels": 113331134,
"Statements": 112505569
},
"lowerKnowledgeBaseStatisticsCount": {
"de": {
"Pages": 0,
"Articles": 0
},
"hi": {
"Pages": 0,
"Articles": 0
},
"ru": {
"Pages": 0,
"Articles": 0
},
"sv": {
"Pages": 0,
"Articles": 0
},
"pt": {
"Pages": 0,
"Articles": 0
},
"en": {
"Pages": 20279663,
"Articles": 6649343
},
"it": {
"Pages": 0,
"Articles": 0
},
"fr": {
"Pages": 0,
"Articles": 0
},
"bn": {
"Pages": 0,
"Articles": 0
},
"es": {
"Pages": 0,
"Articles": 0
},
"zh": {
"Pages": 0,
"Articles": 0
},
"ar": {
"Pages": 0,
"Articles": 0
},
"uk": {
"Pages": 0,
"Articles": 0
},
"ja": {
"Pages": 0,
"Articles": 0
},
"fa": {
"Pages": 0,
"Articles": 0
}
}
}

0 comments on commit 2a849b9

Please sign in to comment.