Skip to content

Commit

Permalink
added docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SteffenHankiewicz committed Jul 25, 2024
1 parent a470f4f commit 1e6e364
Show file tree
Hide file tree
Showing 4 changed files with 150 additions and 0 deletions.
75 changes: 75 additions & 0 deletions docs/index_de.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Automatische Geonames Annotierung
identifier: intranda_step_geonamesautoannotator
published: true
description: Goobi Step Plugin für die Annotation automatisch vorhandener "location" NER Tags in ALTO Dateien mit Geonames URLs.
---
## Einführung
Dieses Step Plugin für Goobi workflow annotiert automatisch vorhandene "location" NER Tags in ALTO Dateien mit Geonames URLs. Dabei wird immer der erste Treffer der Suchanfrage genommen. Es ist also empfehlenswert, die Ergebnisse noch einmal zu überprüfen und zu korrigieren.


## Installation
Das Plugin besteht aus folgenden Dateien:

```bash
goobi_plugin_step_geonamesautoannotator-base.jar
plugin_intranda_step_geonamesautoannotator.xml
```

Die Datei `goobi_plugin_step_geonamesautoannotator-base.jar` muss in dem richtigen Verzeichnis installiert werden, so dass diese nach der Installation an folgendem Pfad vorliegt:

```bash
/opt/digiverso/goobi/plugins/step/plugin_intranda_step_geonamesautoannotator-base.jar
```

Daneben gibt es eine Konfigurationsdatei, die an folgender Stelle liegen muss:

```bash
/opt/digiverso/goobi/config/plugin_intranda_step_geonamesautoannotator.xml
```


## Überblick und Funktionsweise
Dieses Plugin wird in den Workflow so integriert, dass es automatisch ausgeführt wird. Eine manuelle Interaktion mit dem Plugin ist nicht notwendig. Zur Verwendung innerhalb eines Arbeitsschrittes des Workflows sollte es wie im nachfolgenden Screenshot konfiguriert werden.

![Integration des Plugins in den Workflow](screen1_de.png)

Das Plugin durchsucht für alle `location` NER Tags die Geonames-Datenbank. Sollten ein oder mehrere Suchtreffer zurückgegeben werden, wird der erste Suchtreffer in der Liste in das ALTO übernommen.


## Konfiguration
Die Konfiguration des Plugins erfolgt über die Konfigurationsdatei `plugin_intranda_step_geonamesautoannotator.xml` und kann im laufenden Betrieb angepasst werden. Im folgenden ist eine beispielhafte Konfigurationsdatei aufgeführt:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<config_plugin>
<!--
order of configuration is:
1.) project name and step name matches
2.) step name matches and project is *
3.) project name matches and step name is *
4.) project name and step name are *
-->

<config>
<!-- which projects to use for (can be more then one, otherwise use *) -->
<project>*</project>
<step>*</step>

<!-- geonames account -->
<geonamesAccount>testuser</geonamesAccount>
<!-- geonames API URL - if you have a paid plan, use http://ws.geonames.net here -->
<geonamesApiUrl>http://api.geonames.org</geonamesApiUrl>
</config>

</config_plugin>
```

| Parameter | Erläuterung |
| :--- | :--- |
| `project` | Dieser Parameter legt fest, für welches Projekt der aktuelle Block `<config>` gelten soll. Verwendet wird hierbei der Name des Projektes. Dieser Parameter kann mehrfach pro `<config>` Block vorkommen. |
| `step` | Dieser Parameter steuert, für welche Arbeitsschritte der Block `<config>` gelten soll. Verwendet wird hier der Name des Arbeitsschritts. Dieser Parameter kann mehrfach pro `<config>` Block vorkommen. |
| `geonamesAccount` | Mit diesem Parameter wird der Account-Name für den GeoNames-Zugriff definiert. |
| `geonamesApiUrl` | Hier wird die URL für den Zugriff auf die API von GeoNames festgelegt. |

Es empfielt sich für den Betrieb des Plugins eine höhere Quota bei geonames einzukaufen. Wenn dies getan wurde, muss die `geonamesApiUrl` auf `http://ws.geonames.net` umgestellt werden.
75 changes: 75 additions & 0 deletions docs/index_en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
---
title: Geonames Annotation
identifier: intranda_step_geonamesautoannotator
published: true
description: Goobi Step Plugin for annotating automatically existing "location" NER tags in ALTO files with Geonames URLs.
---
## Introduction
This step plugin for Goobi workflow automatically annotates existing "location" NER tags in ALTO files with GeoNames URLs. The first hit of the search query is always taken. It is therefore recommended to check and correct the results again.


## Installation
The plugin consists of the following files:

```bash
goobi_plugin_step_geonamesautoannotator-base.jar
plugin_intranda_step_geonamesautoannotator.xml
```

The file `goobi_plugin_step_geonamesautoannotator-base.jar` must be installed in the correct directory so that it is available at the following path after installation:

```bash
/opt/digiverso/goobi/plugins/step/plugin_intranda_step_geonamesautoannotator-base.jar
```

In addition, there is a configuration file that must be located in the following place:

```bash
/opt/digiverso/goobi/config/plugin_intranda_step_geonamesautoannotator.xml
```


## Overview and functionality
This plugin is integrated into the workflow in such a way that it is executed automatically. Manual interaction with the plugin is not necessary. For use within a workflow step, it should be configured as shown in the screenshot below.

![Integration of the plugin into the workflow](screen1_en.png)

The plugin searches the GeoNames database for all `location` NER tags. If one or more search hits are returned, the first search hit in the list is transferred to the ALTO.


## Configuration
The configuration of the plugin is done via the configuration file `plugin_intranda_step_geonamesautoannotator.xml` and can be adjusted during operation. The following is an example configuration file:

```xml
<?xml version="1.0" encoding="UTF-8"?>
<config_plugin>
<!--
order of configuration is:
1.) project name and step name matches
2.) step name matches and project is *
3.) project name matches and step name is *
4.) project name and step name are *
-->

<config>
<!-- which projects to use for (can be more then one, otherwise use *) -->
<project>*</project>
<step>*</step>

<!-- geonames account -->
<geonamesAccount>testuser</geonamesAccount>
<!-- geonames API URL - if you have a paid plan, use http://ws.geonames.net here -->
<geonamesApiUrl>http://api.geonames.org</geonamesApiUrl>
</config>

</config_plugin>
```

| Parameter | Explanation |
| :--- | :--- |
| `project` | This parameter determines the project for which the current block `<config>` is to apply. The name of the project is used here. This parameter can occur several times per `<config>` block. |
| `step` | This parameter controls for which workflow steps the block `<config>` is to apply. The name of the step is used here. This parameter can occur several times per `<config>` block. |
| `geonamesAccount` | This parameter defines the account name for GeoNames access. |
| `geonamesApiUrl` | The URL for accessing the GeoNames API is set here. |

It is recommended to purchase a higher quota from geonames for the operation of the plugin. If this has been done, the `geonamesApiUrl` must be changed to `http://ws.geonames.net`.
Binary file added docs/screen1_de.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/screen1_en.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 1e6e364

Please sign in to comment.