diff --git a/docs/api/mantistable.config.js.md b/docs/api/mantistable.config.js.md deleted file mode 100644 index 81ce1a2..0000000 --- a/docs/api/mantistable.config.js.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -sidebar_position: 0 -description: API reference for Docusaurus configuration file. ---- - -# `mantistable.config.js` \ No newline at end of file diff --git a/docs/external-sti-services.md b/docs/external-sti-services.md deleted file mode 100644 index 572c3e6..0000000 --- a/docs/external-sti-services.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -sidebar_position: 3 ---- - -# External STI Services - diff --git a/docs/api/_category_.json b/docs/sti/_category_.json similarity index 58% rename from docs/api/_category_.json rename to docs/sti/_category_.json index e26930d..1ccdd90 100644 --- a/docs/api/_category_.json +++ b/docs/sti/_category_.json @@ -1,6 +1,6 @@ { - "label": "API", - "position": 5, + "label": "STI", + "position": 3, "link": { "type": "generated-index" } diff --git a/docs/sti/default-sti-approach.md b/docs/sti/default-sti-approach.md new file mode 100644 index 0000000..08fac88 --- /dev/null +++ b/docs/sti/default-sti-approach.md @@ -0,0 +1,13 @@ +--- +sidebar_position: 1 +--- + +# Default STI Approach + +MantisTable UI intagrate a default STI approach: **s-elBat**. If you want to integrate your approach, please follow the instuction in the [External STI Approach](external-sti-approach) page. + +## s-elBat + +**s-elBat** 🦇 (the name comes from taBle-s and Semantic Entity Linking to BAtch Table) is a supervised and unsupervised STI approach.It incorporates various strategies to address all STI challenges. + +This new approach, s-elBat, builds upon and enhances our previous STI approaches ([Cremaschi et. al, 2019](https://ceur-ws.org/Vol-2553/paper3.pdf) - [Cremaschi et. al, 2020](https://ceur-ws.org/Vol-2775/paper8.pdf) - [Avogadro et al., 2021](https://ceur-ws.org/Vol-3103/paper7.pdf)). Based on the experience gained from those solutions and their involvement in [SemTab Challenge](https://www.cs.ox.ac.uk/isg/challenges/sem-tab/), it integrates a feature vector-based entity disambiguation approach. This approach combines heuristic and machine learning techniques to achieve precise disambiguation results. \ No newline at end of file diff --git a/docs/sti/external-sti-approach.md b/docs/sti/external-sti-approach.md new file mode 100644 index 0000000..44284d5 --- /dev/null +++ b/docs/sti/external-sti-approach.md @@ -0,0 +1,165 @@ +--- +sidebar_position: 1 +--- + +# External STI Approach + +MantisTable UI can interacts with an API to integrate an external STI approach. This document describes the API endpoints, their methods, and how to configure MantisTable UI to use these endpoints. + +:::warning +In order to use your own STI approach you need to implement an API by following the instructions on this page. +::: + +## API Endpoints + +The API must consists of two main endpoints: + +1. **Semantic Table Interpretation**: This endpoint processes a given table and performs semantic interpretation. +2. **Get Table Annotations**: This endpoint returns the table along with its annotations. + +## Configuration + +The URL of the API endpoint and the names of the methods are configurable through the MantisTable UI configuration file (`.env`). The relevant configuration parameters are: + +- `API_BASE_URL`: the base URL of the API. +- `SEMANTIC_INTERPRETATION_METHOD`: the method name for performing semantic table interpretation. +- `GET_ANNOTATIONS_METHOD`: the method name for retrieving table annotations. + +### Example Configuration + +```js +API_BASE_URL="http://api.mantistable.com" +SEMANTIC_INTERPRETATION_METHOD="/semantic-interpretation" +GET_ANNOTATIONS_METHOD="/get-annotations" +``` + +:::warning +To modify the configuration file, refer to the page [Configuration](/docs/getting-started/configuration.md) page. +::: + +## Endpoints + +### 1. Perform Semantic Table Interpretation + +**HTTP Method:** `POST` + +**Description:** This endpoint must accpets a table in JSON format and performs semantic interpretation on it. + +**Request Headers:** + +- `Content-Type: application/json` + +**Request Body:** + +```js +{ + "table": [ + ["Column1", "Column2", "Column3"], + ["Value1", "Value2", "Value3"], + ... + ] +} +``` + +**Response:** + +```js +{ + "status": "success", + "message": "Table interpreted successfully", + "data": { + "table_id": "unique_table_identifier" + } +} +``` + +**Example Request:** + +```sh +curl -X POST http://api.mantistable.com/semantic-interpretation \ +-H "Content-Type: application/json" \ +-d '{ + "table": [ + ["Name", "Age", "Occupation"], + ["John Doe", "29", "Engineer"], + ["Jane Smith", "34", "Artist"] + ] +}' +``` + +**Example Response:** + +```js +{ + "status": "success", + "message": "Table interpreted successfully", + "data": { + "table_id": "1234567890abcdef" + } +} +``` + +### 2. Get Table Annotations + +**HTTP Method:** `GET` + +**Description:** This endpoint must returns the table along with its semantic annotations. + +**Request Headers:** + +- `Content-Type: application/json` + +**Request Parameters:** + +- `table_id`: The unique identifier of the table. + +**Response:** + +```js +{ + "status": "success", + "data": { + "table": [ + ["Column1", "Column2", "Column3"], + ["Value1", "Value2", "Value3"], + ... + ], + "annotations": [ + {"column": "Column1", "type": "Name", "confidence": 0.95}, + {"column": "Column2", "type": "Age", "confidence": 0.98}, + ... + ] + } +} +``` + +**Example Request:** + +```sh +curl -X GET "http://api.mantistable.com/get-annotations?table_id=1234567890abcdef" \ +-H "Content-Type: application/json" +``` + +**Example Response:** + +```js +{ + "status": "success", + "data": { + "table": [ + ["Name", "Age", "Occupation"], + ["John Doe", "29", "Engineer"], + ["Jane Smith", "34", "Artist"] + ], + "annotations": [ + {"column": "Name", "type": "Person Name", "confidence": 0.95}, + {"column": "Age", "type": "Age", "confidence": 0.98}, + {"column": "Occupation", "type": "Job Title", "confidence": 0.92} + ] + } +} +``` + +## Conclusion + +The API provides essential functionalities for semantic table interpretation and retrieval of annotations, which are crucial for the MantisTable UI. Proper configuration of the API endpoints ensures seamless interaction between the MantisTable UI and the external API. \ No newline at end of file