Chem NER is a RESTFul based application to upload an archive of xml fies, which contains details of patents. And the application persists NERS based on inbuilt and custom model which is trained on the data provided. It contains two end point.
- patents/archive_upload/
- patents/delete_patent
Used a number of open source projects to work properly:
- [django_rest_framework] - Web frame work in python for building REST API's
- [redis] - Message Broker
- [celery] - Celery is an open source asynchronous task queue
- [Spacy] - Package for NLP
- [MongoDB] - Document Based DataBase
Install the dependencies.
$ pip install -r requirements.txtStart redis server...
$ redis-serverCheck if redis is running or not..
$ redis-cli pingRun celery..
$ celery -A NER worker -l infoMake sure the mongo DB is installed and configured accordingly in settings.py
DATABASES = {
'default': {
'ENGINE': 'djongo',
'NAME': 'DB_NAME',
}
}Make Migrations and Migrate..
$ python manage.py makemigrations
$ python namage.py migrateFinally run the Server..
$ python manage.py runserverHTTP VERB : POST http://localhost:8000/patents/archive_upload/ In form-data pass: archive : zip_file
[
"File uspat1_201831_back_80001_100000.zip uploaded Successfully and started processing"
]HTTP VERB : DELETE http://localhost:8000/patents/delete_patent/?patent_id=USD0437352S1
{
"message": "Patent Deleted"
}