annotator.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:python-stanford-corenlp 作者: stanfordnlp 项目源码 文件源码
def do_GET(self):
            """
            Handle a ping request
            """
            if not self.path.endswith("/"): self.path += "/"
            if self.path == "/ping/":
                msg = "pong".encode("UTF-8")

                self.send_response(HTTPStatus.OK)
                self.send_header("Content-Type", "text/application")
                self.send_header("Content-Length", len(msg))
                self.end_headers()
                self.wfile.write(msg)
            else:
                self.send_response(HTTPStatus.BAD_REQUEST)
                self.end_headers()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号