Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documented batch API in README #32

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 61 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,67 @@

Provides an API to extract keywords from a text. It using [SpaCy](https://spacy.io/) to find noun chunks and some additional post-processing.

## API

### `/v1/batch-extract-keywords`

Example Input:

```json
{
"data": [
{
"type": "extract-keyword-request",
"id": "doc-1",
"attributes": {
"content": "I am interested in biochemistry and neuroscience."
},
"meta": {
"extra_id": "doc-1/v1"
}
}
]
}
```

Required fields: `type` and `attributes.content`

The `id` and `meta` fields are optional. When provided, they will also be included in the response.

Example response:

```json
{
"data": [
{
"type": "extract-keyword-result",
"attributes": {
"keywords": [
{
"keyword": "biochemistry",
"count": 1
},
{
"keyword": "neuroscience",
"count": 1
}
]
},
"id": "doc-1",
"meta": {
"extra_id": "doc-1/v1"
}
}
],
"meta": {
"spacy_version": "2.3.9",
"spacy_language_model_name": "en_core_web_lg",
"python_version": "3.11.11",
"revision": "6ec060c861a133ec986d883e86404a43bcd32930"
}
}
```

## Development Using Virtual Environment

### Pre-requisites (Virtual Environment)
Expand Down
Loading