Skip to content

Commit dee4b44

Browse files
committed
Add STI section
1 parent f1e289b commit dee4b44

File tree

5 files changed

+180
-14
lines changed

5 files changed

+180
-14
lines changed

docs/api/mantistable.config.js.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/external-sti-services.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/api/_category_.json renamed to docs/sti/_category_.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"label": "API",
3-
"position": 5,
2+
"label": "STI",
3+
"position": 3,
44
"link": {
55
"type": "generated-index"
66
}

docs/sti/default-sti-approach.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# Default STI Approach
6+
7+
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.
8+
9+
## s-elBat
10+
11+
**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.
12+
13+
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.

docs/sti/external-sti-approach.md

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,165 @@
1+
---
2+
sidebar_position: 1
3+
---
4+
5+
# External STI Approach
6+
7+
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.
8+
9+
:::warning
10+
In order to use your own STI approach you need to implement an API by following the instructions on this page.
11+
:::
12+
13+
## API Endpoints
14+
15+
The API must consists of two main endpoints:
16+
17+
1. **Semantic Table Interpretation**: This endpoint processes a given table and performs semantic interpretation.
18+
2. **Get Table Annotations**: This endpoint returns the table along with its annotations.
19+
20+
## Configuration
21+
22+
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:
23+
24+
- `API_BASE_URL`: the base URL of the API.
25+
- `SEMANTIC_INTERPRETATION_METHOD`: the method name for performing semantic table interpretation.
26+
- `GET_ANNOTATIONS_METHOD`: the method name for retrieving table annotations.
27+
28+
### Example Configuration
29+
30+
```js
31+
API_BASE_URL="http://api.mantistable.com"
32+
SEMANTIC_INTERPRETATION_METHOD="/semantic-interpretation"
33+
GET_ANNOTATIONS_METHOD="/get-annotations"
34+
```
35+
36+
:::warning
37+
To modify the configuration file, refer to the page [Configuration](/docs/getting-started/configuration.md) page.
38+
:::
39+
40+
## Endpoints
41+
42+
### 1. Perform Semantic Table Interpretation
43+
44+
**HTTP Method:** `POST`
45+
46+
**Description:** This endpoint must accpets a table in JSON format and performs semantic interpretation on it.
47+
48+
**Request Headers:**
49+
50+
- `Content-Type: application/json`
51+
52+
**Request Body:**
53+
54+
```js
55+
{
56+
"table": [
57+
["Column1", "Column2", "Column3"],
58+
["Value1", "Value2", "Value3"],
59+
...
60+
]
61+
}
62+
```
63+
64+
**Response:**
65+
66+
```js
67+
{
68+
"status": "success",
69+
"message": "Table interpreted successfully",
70+
"data": {
71+
"table_id": "unique_table_identifier"
72+
}
73+
}
74+
```
75+
76+
**Example Request:**
77+
78+
```sh
79+
curl -X POST http://api.mantistable.com/semantic-interpretation \
80+
-H "Content-Type: application/json" \
81+
-d '{
82+
"table": [
83+
["Name", "Age", "Occupation"],
84+
["John Doe", "29", "Engineer"],
85+
["Jane Smith", "34", "Artist"]
86+
]
87+
}'
88+
```
89+
90+
**Example Response:**
91+
92+
```js
93+
{
94+
"status": "success",
95+
"message": "Table interpreted successfully",
96+
"data": {
97+
"table_id": "1234567890abcdef"
98+
}
99+
}
100+
```
101+
102+
### 2. Get Table Annotations
103+
104+
**HTTP Method:** `GET`
105+
106+
**Description:** This endpoint must returns the table along with its semantic annotations.
107+
108+
**Request Headers:**
109+
110+
- `Content-Type: application/json`
111+
112+
**Request Parameters:**
113+
114+
- `table_id`: The unique identifier of the table.
115+
116+
**Response:**
117+
118+
```js
119+
{
120+
"status": "success",
121+
"data": {
122+
"table": [
123+
["Column1", "Column2", "Column3"],
124+
["Value1", "Value2", "Value3"],
125+
...
126+
],
127+
"annotations": [
128+
{"column": "Column1", "type": "Name", "confidence": 0.95},
129+
{"column": "Column2", "type": "Age", "confidence": 0.98},
130+
...
131+
]
132+
}
133+
}
134+
```
135+
136+
**Example Request:**
137+
138+
```sh
139+
curl -X GET "http://api.mantistable.com/get-annotations?table_id=1234567890abcdef" \
140+
-H "Content-Type: application/json"
141+
```
142+
143+
**Example Response:**
144+
145+
```js
146+
{
147+
"status": "success",
148+
"data": {
149+
"table": [
150+
["Name", "Age", "Occupation"],
151+
["John Doe", "29", "Engineer"],
152+
["Jane Smith", "34", "Artist"]
153+
],
154+
"annotations": [
155+
{"column": "Name", "type": "Person Name", "confidence": 0.95},
156+
{"column": "Age", "type": "Age", "confidence": 0.98},
157+
{"column": "Occupation", "type": "Job Title", "confidence": 0.92}
158+
]
159+
}
160+
}
161+
```
162+
163+
## Conclusion
164+
165+
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.

0 commit comments

Comments
 (0)