Community
Generate keyword labels and legal category classification for a community of nodes. Uses TF-IDF vectorization on node summaries to extract top keywords, then classifies into legal categories: CRIMINAL, IMMIGRATION, CIVIL, ADMINISTRATIVE, or UNDEFINED.
POST/api/community
Generate keyword labels and legal category classification for a community of nodes. Uses TF-IDF vectorization on node summaries to extract top keywords, then classifies into legal categories: CRIMINAL, IMMIGRATION, CIVIL, ADMINISTRATIVE, or UNDEFINED.
Parameters
| Field | Type | Notes |
|---|---|---|
community_id | int | Required. Identifier for the community. |
nodes | array | Required. Nodes with optional summary text. |
nodes[].id | string | Optional. ECLI or node identifier. |
nodes[].summary | string | Recommended. Case summary text used for keyword extraction. |
Response fields
| Field | Description |
|---|---|
community_id | The requested community identifier. |
keywords.keywords | Top 3 extracted keywords (TF-IDF weighted). |
keywords.category | Legal category: CRIMINAL, IMMIGRATION, CIVIL, ADMINISTRATIVE, or UNDEFINED. |
keywords.scores | TF-IDF relevance scores for each keyword. |
node_count | Total nodes in the request. |
summary_count | Nodes that had summary text. |
Examples
Request
{ "community_id": 1, "nodes": [ { "id": "ECLI:NL:...", "summary": "Vreemdelingenrecht en asielaanvraag..." }, { "id": "ECLI:NL:...", "summary": "Verblijfsvergunning en terugkeerbesluit..." } ] }
Response
{ "community_id": 1, "keywords": { "keywords": [ "asiel", "vreemdeling", "verblijfsvergunning" ], "category": "IMMIGRATION", "scores": [0.29, 0.22, 0.18] }, "node_count": 2, "summary_count": 2 }