Semantic type recommendation API is developed based on Flask web framework.
- Clone this repository
$ git clone https://github.com/machines-reading-maps/entity-recommendation-api.git
Configure port number in Dockerfile and app.py before installing docker image
- Build docker image
$ cd entity-recommendation-api/
$ docker build -t entity-recommendation-api .
- Download word vectors trained on Wikipedia using fastText
$ cd data/
$ wget https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/wiki.en.zip
$ unzip wiki.en.zip
-
Return all entities
- Description: Return all entities
- Request URL: http://127.0.0.1:8000/entities/all
- Request value: None.
- Return values: all_entities
-
Return entity search suggestions for a user input
- Description: Return a list of entities sorted by similarity score for a (required) user input.
- Request URL: http://127.0.0.1:8000/entities?input=
- Request value: a user input
- Return values: input, cadidates
- Example request: if user input was retrieved as "store", http://127.0.0.1:8000/entities?input=store