mnvx/syntax-tree

语法树

v0.0.1 2016-08-25 22:15 UTC

This package is auto-updated.

Last update: 2024-09-21 01:32:02 UTC


README

插图

如何安装

执行以下命令

git clone git@github.com:mnvx/syntax-tree.git
cd syntax-tree
composer install
cp src/api/Config/Configuration.php.tpl src/api/Config/Configuration.php

编辑配置文件:src/api/Config/Configuration.php

public 路径设置为 Web 服务器的根目录。

如何使用

发送带有以下参数的 POST 请求。

curl -d text="Мама мыла раму." -d format="JSON" http://<语法树安装的主机>

您将获得以下结果

[{"number":"2","text":"\u043c\u044b\u043b\u0430","children":[{"number":"1","text":"\u041c\u0430\u043c\u0430","children":[]},{"number":"3","text":"\u0440\u0430\u043c\u0443.","children":[]}]}]