ELTE-DH / NoSketch-Engine-Docker

A NoSketch Engine Docker image which is easy to use
GNU Lesser General Public License v3.0
17 stars 10 forks source link

How to access the API? #22

Closed fishfree closed 3 months ago

fishfree commented 3 months ago

I asked a related question here. But I tried to access http://****:10070/search/corp_info, it shows 404 Not Found.

Or even should we firstly enable the API funtionality? If so, how to do?

dlazesz commented 3 months ago

In the case of this repo the base URL is: http://****:10070/bonito/run.cgi

For example: http://****:10070/bonito/run.cgi/wordlist?corpname=susanne&wlattr=word&wlpat=test.*&wlsort=frq&wlmaxitems=2&format=json

Should yield:

{"new_maxitems": 2, "wllimit": 0, "total": 4, "totalfrq": 52, "lastpage": 0, "Items": [{"str": "test", "frq": 26, "relfreq": 172.84246}, {"str": "tested", "frq": 13, "relfreq": 86.42123}], "wlattr_label": "word", "frtp": "frequency", "api_version": "open-5.71.15", "manatee_version": "2.36.7-open-2.225.8", "request": {"wlmaxitems": "2", "wlpat": "test.*", "format": "json", "corpname": "susanne", "wlsort": "frq", "wlattr": "word"}}

No further step should be made.

fishfree commented 3 months ago

@dlazesz Thank you very much!