Skip to content

Latest commit

 

History

History
29 lines (19 loc) · 912 Bytes

readme.md

File metadata and controls

29 lines (19 loc) · 912 Bytes

NGender PHP

这是https://github.com/observerss/ngender的PHP版本.

Usage

复制两个文件 (ngender.php & charfreq.csv) 到一个支持PHP的网站. 用HTTP/GET请求网站, 参数是"name=xxx", 网站内容是json格式, 可以被其它程序解析. 可选参数:

  1. keepFirst=true 不跳过第一个字(姓) 一般在查询非人名时用到(如网名)

Example

http://localhost/ngender.php?name=赵本山
{"result": ["male", 0.9836229687547], "keepFirst": false, "actualName": "赵本山"}

http://localhost/ngender.php?name=宋丹丹
{"result": ["female", 0.97594861289499], "keepFirst": false, "actualName": "宋丹丹"}

http://[::1]/ngender.php?name=暮光小猿wzt&keepFirst=true
{"result": ["male", 0.88108764477142], "keepFirst": true, "actualName": "暮光小猿"}

About

BiliBili

https://space.bilibili.com/15858903