Skip to content

Commit

Permalink
fix plugins errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Fabio9705 committed Sep 16, 2024
1 parent 2d5f465 commit 4f22b2a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 16 deletions.
10 changes: 5 additions & 5 deletions docs/plug-in/add-on.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 2

# Add-on

Add-on plugins enable MantisTable UI to perform arbitrary tasks on the annotated table. An example of `add-on` plugin is the lexicalization of the annotated table (`mantistablex`).
Add-on plugins enable MantisTable UI to perform arbitrary tasks on the annotated table. An example of add-on plugin is (`mantistablex`), which performs the lexicalization of an annotated table.

### General Guidelines

Expand Down Expand Up @@ -57,15 +57,15 @@ output_file_path = f"{os.path.dirname(os.path.realpath(__file__))}/output.html"
}
```

The entry file is specified by the `entry_file` field in the `config.json` file and it represents the entry point of the plugin, because it is the file that is executed to apply the plugin. Once the plugin is selected, the annotated table (defined in the output of the STI sytem ~ [External STI Approach](/docs/sti/external-sti-approach)) is injected in the `input.json` file. In this case, there is also the possibility to define an html form to enable the user to send input data to the add-on plugin for its execution. To add input data, it's important to define the form in the `input.html` file using a `<div>` as root element. Then, the `entry_file` is applied using the `subprocess` module in python and, finally, the output is read in the file defined by the `config.json` using the `output` field (usually defined as `output.html`) in the root folder. For this reason it is very important to use the following structure to identify the correct file path in the plugin:
The entry file is specified by the `entry_file` field in the `config.json` file and it represents the entry point of the plugin, as it is the file that is executed to apply the plugin. Once the plugin is selected, the annotated table (defined in the output of the STI sytem ~ [External STI Approach](/docs/sti/external-sti-approach)) is injected in the `input.json` file. In this case, there is also the possibility to define an html form to enable the user to send input data to the add-on plugin for its execution. To add input data, it is important to define the form in the `input.html` file using a `<div>` as root element. Then, the `entry_file` is applied using the `subprocess` module in python and, finally, the output is read in the file defined by the `config.json` using the `output` field (usually defined as `output.html`) in the root folder. For this reason, it is crucial to use the following structure to identify the correct file path in the plugin:

```python
table_input_path = f"{os.path.dirname(os.path.realpath(__file__))}/input.json" # input table
input_data_path = f"{os.path.dirname(os.path.realpath(__file__))}/inputData.json" # input data
output_file_path = f"{os.path.dirname(os.path.realpath(__file__))}/output.html" # output html
```

The plugin is executed on an isolated environment, so you can't install your own libraries but some are already installed:
The plugin is executed in an isolated environment. Therefore, you can't install you own libraries, but the following ones are already installed:

```
tqdm
Expand All @@ -75,7 +75,7 @@ numpy
requests
```

Add-on plugins are very powerful because the definition of the UI to display the data entry form and the plugin's output is left to the plugin developer, who will define the UI using HTML Markup language and inline CSS to style the content.
Add-on plugins are very powerful because they let the plugin developer define the UI to be used to display the data entry form and the plugin's output, by using HTML Markup Language and inline CSS to style the content.

## Using Plugins in MantisTable UI

Expand All @@ -93,7 +93,7 @@ Add-on plugins are very powerful because the definition of the UI to display the
- Add-on plugins are typically accessed through semantic processing options.
- Transformation plugins can be applied through the data transformation tools in the UI.

## Plugin already available
## Already available plugins

- **`Mantistablex`**

Expand Down
16 changes: 8 additions & 8 deletions docs/plug-in/export.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 1

# Export Plugins

Export plugins enable MantisTable UI to export data and annotation in user-defined formats.
Export plugins enable MantisTable UI to export data and annotations in user-defined formats.

### General Guidelines

Expand Down Expand Up @@ -44,18 +44,18 @@ export_file_path = f"{os.path.dirname(os.path.realpath(__file__))}/output/kg.jso
"output": "kg.json",
"entry_file": "export.py",
"name": "json",
"description": "The 'json' Export Plugin allows users to export annotated tables from Wikidata into JSON triples. This plugin processes tables annotated with Wikidata properties and values, converting them into a structured JSON format that represents each cell's data as subject-predicate-object triples. It simplifies data extraction and integration for developers and researchers working with linked data and semantic web applications"
"description": "The 'json' Export Plugin allows users to export annotated tables from Wikidata into JSON triples. This plugin processes tables annotated with Wikidata properties and values, converting them into a structured JSON format that represents each cell's data as <subject-predicate-object> triples. It simplifies data extraction and integration for developers and researchers working with linked data and semantic web applications"
}
```

The entry file is specified by the `entry_file` field in the `config.json` file and it represents the entry point of the plugin, because it is the file that is executed to apply the plugin. Once the plugin is selected, the annotated table (defined in the output of the STI sytem ~ [External STI Approach](/docs/sti/external-sti-approach)) is injected in the `input.json` file. Then, the `entry_file` is applied using the `subprocess` module in python and, finally, the output is read in the file defined by the `config.json` using the `output` field in the `output` directory. For this reason it is very important to use the following structure to identify the correct file path in the plugin:
The entry file is specified by the `entry_file` field in the `config.json` file and it represents the entry point of the plugin, as it is the file that is executed to apply the plugin. Once the plugin is selected, the annotated table (defined in the output of the STI sytem ~ [External STI Approach](/docs/sti/external-sti-approach)) is injected in the `input.json` file. Then, the `entry_file` is applied using the `subprocess` module in python and, finally, the output is read in the file defined by the `config.json` using the `output` field in the `output` directory. For this reason, it is very important to use the following structure to identify the correct file path in the plugin:

```python
file_path = f"{os.path.dirname(os.path.realpath(__file__))}/input.json" # input
export_file_path = f"{os.path.dirname(os.path.realpath(__file__))}/output/kg.json" # output
```

The plugin is executed on an isolated environment, so you can't install your own libraries but some are already installed:
The plugin is executed in an isolated environment. Therefore, you can't install you own libraries, but the following ones are already installed:

```
tqdm
Expand Down Expand Up @@ -85,24 +85,24 @@ requests

- **`TTL`**

The `Turtle` (ttl) plugin facilitates the creation of export files from annotated tables in Wikidata. This tool converts the annotated data into Turtle triples, a popular format for representing RDF (Resource Description Framework) data. Users can effortlessly generate these export files to utilize in various semantic web applications, ensuring a smooth and structured data interchange.
The `Turtle` (ttl) plugin facilitates the creation of export files from annotated tables in Wikidata. This tool converts the annotated data into Turtle triples, a popular format for representing RDF (Resource Description Framework) data. Users can effortlessly generate these export files to be utilized in various semantic web applications, ensuring a smooth and structured data interchange.

- **`XML`**

The `XML` Export Plugin is designed to generate XML files containing triples extracted from annotated tables within Wikidata. This plugin identifies and processes annotated data, transforming it into structured XML format. The resulting XML triples encapsulate relationships and entities, facilitating data interoperability and integration with other systems. Ideal for developers and data scientists, this tool enhances data extraction and export capabilities from Wikidata's rich dataset.

- **`JSON`**

The `JSON` Export Plugin allows users to export annotated tables from Wikidata into JSON triples. This plugin processes tables annotated with Wikidata properties and values, converting them into a structured JSON format that represents each cell's data as subject-predicate-object triples. It simplifies data extraction and integration for developers and researchers working with linked data and semantic web applications.
The `JSON` Export Plugin allows users to export annotated tables from Wikidata into JSON triples. This plugin processes tables annotated with Wikidata properties and values, converting them into a structured JSON format that represents each cell's data as `<subject-predicate-object>` triples. It simplifies data extraction and integration for developers and researchers working with linked data and semantic web applications.

- **`N3`**

This plugin enables users to export annotated tables from Wikidata into `N3` (Notation3) triples format. By integrating with Wikidata's data model, it captures semantic annotations and converts them into structured N3 triples. This facilitates interoperability and enhances data sharing by adhering to linked data principles. Ideal for researchers and developers, it simplifies the extraction of rich, machine-readable data from Wikidata's vast knowledge base.

- **`NTriples`**

This plugin enables users to export annotated tables from Wikidata into `NTriples` format. It efficiently converts the structured data and metadata from Wikidata entries into a series of RDF triples, adhering to the NTriples specification. Ideal for researchers and developers, it facilitates seamless data integration and interoperability within semantic web applications. Simply annotate your table in Wikidata, and use the plugin to generate an export file containing the corresponding NTriples triples.
This plugin enables users to export annotated tables from Wikidata into `NTriples` format. It efficiently converts the structured data and metadata from Wikidata entries into a series of RDF triples, adhering to the NTriples specification. Ideal for researchers and developers, it facilitates data integration and interoperability within semantic web applications. You can simply annotate your table in Wikidata, and use the plugin to generate an export file containing the corresponding NTriples triples.

- **`TRIG`**

The `TRIG` plugin facilitates the creation of export files from annotated tables in Wikidata. This tool converts the annotated data into Turtle triples, a popular format for representing RDF (Resource Description Framework) data. Users can effortlessly generate these export files to utilize in various semantic web applications, ensuring a smooth and structured data interchange.
The `TRIG` plugin facilitates the creation of export files from annotated tables in Wikidata. This tool converts the annotated data into Turtle triples, a popular format for representing RDF (Resource Description Framework) data. Users can effortlessly generate these export files to be utilized in various semantic web applications, ensuring a smooth and structured data interchange.
6 changes: 3 additions & 3 deletions docs/plug-in/transformation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ sidebar_position: 3

# Transformation

Transformation plugins allow you to modify table data by applying `Transformations` to the data. Each plugin is applied to individual columns and allows you to modify the column while leaving the rest of the table unchanged, or add a new column based on an existing one by applying the selected plugin
Transformation plugins allow to modify table data by applying `Transformations` to the data. Each plugin is applied to individual columns and enables the user to modify a column while leaving the rest of the table unchanged. Alternatively, it enables to add a new column based on an existing one.

### General Guidelines

Expand Down Expand Up @@ -54,7 +54,7 @@ with open(f"{os.path.dirname(os.path.realpath(__file__))}/output/transform.json"
}
```

The entry file is specified by the `entry_file` field in the `config.json` file and it represents the entry point of the plugin, because it is the file that is executed to apply the plugin. Once the plugin is selected, the annotated table (defined in the output of the STI sytem ~ [External STI Approach](/docs/sti/external-sti-approach)) is injected in the `input.json` file. Then, the `entry_file` is applied using the `subprocess` module in python and, finally, the output is read in the file defined by the `config.json` using the `output` field (usually defined as `output.html`) in the root folder. For this reason it is very important to use the following structure to identify the correct file path in the plugin:
The entry file is specified by the `entry_file` field in the `config.json` file and it represents the entry point of the plugin, as it is the file that is executed to apply the plugin. Once the plugin is selected, the annotated table (defined in the output of the STI sytem ~ [External STI Approach](/docs/sti/external-sti-approach)) is injected in the `input.json` file. Then, the `entry_file` is applied using the `subprocess` module in python and, finally, the output is read in the file defined by the `config.json` using the `output` field (usually defined as `output.html`) in the root folder. For this reason it is very important to use the following structure to identify the correct file path in the plugin:

```python
table_input_path = f"{os.path.dirname(os.path.realpath(__file__))}/input.json" # input table
Expand Down Expand Up @@ -91,7 +91,7 @@ requests

- **`UPPERCASE`**

The `uppercase` plugin has been added to have a simple example on how plugins work in MantisTable UI. This plugin works with `STRING` only columns by converting each cell to uppercase.
The `uppercase` plugin has been added to have a simple example on how plugins work in MantisTable UI. This plugin works with `STRING` only columns and converts each cell's text to uppercase text.

- **`REVERSE_GEOCODING`**

Expand Down

0 comments on commit 4f22b2a

Please sign in to comment.