Please download the dataset from below link
Extract it inside the same directory as main.py
pip install -r requirements.txt
The Coref Server is part of the innovation in the classification segment.
The article is sent through a coreference resolver to identify references that points to the same entity and aggregate their score.
Please download the model.tar.gz.
Place the model.tar.gz file in the same directory as the server.py.
The coreference resolution server must be run on a different virtual environment from the main server due to package conflicts. The server requires allennlp==2.2.0 which can be installed on linux with.
pip install allennlp==2.2.0
And the server can be ran with :
python server.py
If your machine supports a linux container, follow these steps.
Go into the corefServer directory and build the docker image with:
docker image build -t image_name ./
This may take anywhere from 15 to 30 minutes as we need to install these packages on the docker image :
- pip
- python
- pytorch
- allennlp
Then, starting the container will automatically set the server to listen to port 19000:
docker run -p 19000:19000 --name container_name image_name
###Non Linux Machines Alternatively we can use any linux VM/ container and run:
sudo apt-get install python3
sudo apt-get install python3-pip
pip install allennlp==2.2.0
and start the server with :
python3 server.py
Note that the Coref Server needs port 19000 to be open to communicate with the main server.
streamlit run main.py