-
Notifications
You must be signed in to change notification settings - Fork 0
7. Configuration of the Named Entity Recognition component
Paris Koloveas edited this page Sep 12, 2024
·
1 revision
To build the Named Entity Recognition component, we need to first build its Docker image. To do so, we create the Dockerfile that contains the commands that need to be executed.
FROM python:3.7
RUN mkdir /named-entity-recognition
WORKDIR /named-entity-recognition
COPY . /named-entity-recognition
RUN pip3 install -r requirements.txt
RUN python -m spacy download en_core_web_lg
ENTRYPOINT ["python", "content_rank.py"]The docker-compose.yml file can be seen below with the get-entities command and a --post-window=15 that ranks the first 15 entries of the collection wilders_security_forum.
version: '2'
services:
named-entity-recognition:
image: named-entity-recognition
entrypoint: python3 ner.py get-ents
--ip="localhost"
--username="user"
--password="pass"
--db_crawl="CrawlDB"
--collection_crawl="wilders_security_forum"
--post_window=15
volumes:
- ./data/:/ner/data
To start the NER script we run the following command:
docker-compose up -dOr if we want to be able to view the output messages:
docker-compose upIn order to stop the NER script we run the following command:
docker-compose down