Thai Natural Language Processing
vi21
•
3 years ago
•
100%
JSON-RPC server สำหรับโปรแกรมตัดคำ
github.comผมทำ JSON-RPC server สำหรับโปรแกรมตัดคำ โดยสรุปคือรันแบบนี้เลย คำสั่งเดียว
docker run -d --name wordcut --net=host veer66/wordcut-json-rpc-server
ในตัวอย่างนี้ผมเรียกใช้งานจาก PHP แต่จริง ๆ ใช้อย่างอื่นก็ได้
<?php
require __DIR__ . '/vendor/autoload.php';
use JsonRPC\Client;
$client = new Client("http://localhost:8999");
var_dump($client->execute("put_delimiters", ["กากากา", "|"]));
?>
Comments 0