gpt4 book ai didi

docker - 如何使用dbpedia Spotlight docker 镜像?

转载 作者:行者123 更新时间:2023-12-02 18:38:26 25 4
gpt4 key购买 nike

我面临着dbpedia聚光灯的问题。我似乎无法连接到找到的本地docker镜像here

我将命令docker pull dbpedia/spotlight-englishdocker run -i -p 2222:80 dbpedia/spotlight-english一起使用,然后检查容器是否正在使用docker ps运行。一切正常。

之后,我尝试通过运行Spotlight documentation中给出的curl查询服务器:

curl http://0.0.0.0:2222/en/annotate  \
--data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break
for students included in last year's economic stimulus package, arguing
that the policy provides more generous assistance." \
--data "confidence=0.35"

与以下URL相同:
  • http://127.0.0.1:2222/en/annotate/
  • http://127.0.0.1:2222/en/
  • http://127.0.0.1:2222/
  • http://0.0.0.0:2222/en/
  • http://0.0.0.0:2222/

  • 我得到的只是 curl: (52) Empty reply from server

    我什么不来?所有帮助表示赞赏。

    最佳答案

    正确的是

    curl -X POST \
    http://localhost:2222/rest/annotate \
    -H 'accept: application/json' \
    -H 'content-type: application/x-www-form-urlencoded' \
    --data-urlencode "text=President Obama called Wednesday on Congress to extend a tax break for students included in last year's economic stimulus package, arguing that the policy provides more generous assistance" \
    --data-urlencode "confidence=0.35"

    关于docker - 如何使用dbpedia Spotlight docker 镜像?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50735033/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com