https://github.com/medelman17/blackstone-api
Blackstone is a spaCy model and library for processing long-form, unstructured legal text. Here, we wrap Blackstone with a performant API layer written in Go.
https://github.com/medelman17/blackstone-api
legaltech microservice nlp
Last synced: 6 months ago
JSON representation
Blackstone is a spaCy model and library for processing long-form, unstructured legal text. Here, we wrap Blackstone with a performant API layer written in Go.
- Host: GitHub
- URL: https://github.com/medelman17/blackstone-api
- Owner: medelman17
- Created: 2020-11-03T18:31:50.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-01-12T19:03:30.000Z (over 4 years ago)
- Last Synced: 2025-04-19T11:24:28.395Z (6 months ago)
- Topics: legaltech, microservice, nlp
- Language: Python
- Homepage:
- Size: 21.5 KB
- Stars: 59
- Watchers: 2
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blackstone Microservice
Blackstone is a spaCy model and library for processing long-form, unstructured legal text.
Here, we wrap Blackstone with a performant API layer written in Go. Communication between
Blackstone and the API layer happens via gRPC. All of the above has been containerized to
facilitate deploying "Blackstone as a Microservice".## Get Started
You must have Docker installed on your machine and access to the internet. Assuming the above,
simply run:`docker-compose up -d`
Running the above command starts the underlying Blackstone service as well as the API layer,
which, by default, is accessible at http://localhost:8080. Note, however, as explained below,
the API layer currently does not support any GET requests. So, navigating to the address above
will return a `404-Not Found` error. No worries--check out Postman (https://www.postman.com/)
for easy programmatic access.## Routes
All of the below routes accept a POST request with a JSON body that includes a "text" property. E.g.,
```json
{
"text": "This is the text you want to process..."
}
```### /entities
The NER component of the Blackstone model has been trained to detect the following entity types:
| Ent | Name | Examples |
| ------------- |-------------| -----:|
| CASENAME | Case names | e.g. *Smith v Jones*, *In re Jones*, In *Jones'* case |
| CITATION | Citations (unique identifiers for reported and unreported cases) | e.g. (2002) 2 Cr App R 123 |
| INSTRUMENT | Written legal instruments | e.g. Theft Act 1968, European Convention on Human Rights, CPR |
| PROVISION | Unit within a written legal instrument | e.g. section 1, art 2(3) |
| COURT | Court or tribunal | e.g. Court of Appeal, Upper Tribunal |
| JUDGE | References to judges | e.g. Eady J, Lord Bingham of Cornhill |The API layer will return a JSON response with the following shape:
```json
{
"data": [{"text": "Some identified text", "label": "CASENAME", "labelNumber": 1562316511}, ...]
}```
### /categories
Documentation forthcoming...
### /abbreviations
### /compound-references