All Projects → ms2008 → lua-resty-pyf

ms2008 / lua-resty-pyf

Licence: MIT license
Lua 汉字拼音首字母提取

Programming Languages

c
50402 projects - #5 most used programming language
lua
6591 projects
Makefile
30231 projects

Projects that are alternatives of or similar to lua-resty-pyf

Orange
OpenResty/Nginx Gateway for API Monitoring and Management.
Stars: ✭ 2,208 (+7260%)
Mutual labels:  openresty, ngx-lua
using-ngxlua-in-upyun
2014 Beijing OSC, 2015 Beijing OpenResty Con
Stars: ✭ 78 (+160%)
Mutual labels:  openresty, ngx-lua
lua-resty-busted
Test OpenResty scripts with busted
Stars: ✭ 29 (-3.33%)
Mutual labels:  openresty, ngx-lua
openresty-project-v0.01
🌹 基于OpenResty编写一个MVC模式的WEB项目 V0.01
Stars: ✭ 40 (+33.33%)
Mutual labels:  openresty, ngx-lua
lua-resty-http2
The HTTP/2 Protocol (Client Side) Implementation for OpenResty.
Stars: ✭ 73 (+143.33%)
Mutual labels:  openresty
cimgui
c-api for imgui and implementations programmatically generated (https://github.com/ocornut/imgui)
Stars: ✭ 22 (-26.67%)
Mutual labels:  luajit-ffi-bindings
Lapis
A web framework for Lua and OpenResty written in MoonScript
Stars: ✭ 2,621 (+8636.67%)
Mutual labels:  openresty
Dice
前后端分离Blog系统,采用Nuxt、Vue 2.x 和 SpringBoot 全家桶。
Stars: ✭ 222 (+640%)
Mutual labels:  openresty
lua-resty-feishu-auth
适用于 OpenResty / ngx_lua 的基于飞书组织架构的登录认证
Stars: ✭ 28 (-6.67%)
Mutual labels:  openresty
lua-resty-beanstalkd
non-blocking beanstalkd client lib for ngx_lua
Stars: ✭ 58 (+93.33%)
Mutual labels:  ngx-lua
wired-vpn
WireGuard behind OIDC
Stars: ✭ 21 (-30%)
Mutual labels:  openresty
raylib-lua
A modern LuaJIT binding for Raylib (also available at https://gitlab.com/TSnake41/raylib-lua)
Stars: ✭ 47 (+56.67%)
Mutual labels:  luajit-ffi-bindings
raylua
Cross-Platform, Modern, And updated LuaJIT bindings for raylib library.
Stars: ✭ 77 (+156.67%)
Mutual labels:  luajit-ffi-bindings
luafilesystem
Reimplement luafilesystem via LuaJIT FFI with unicode facilities
Stars: ✭ 19 (-36.67%)
Mutual labels:  luajit-ffi-bindings
lua-casbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Lua (OpenResty)
Stars: ✭ 43 (+43.33%)
Mutual labels:  openresty
Apicast
3scale API Gateway
Stars: ✭ 225 (+650%)
Mutual labels:  openresty
dnmp
docker-compose部署LNMP环境 Nginx/Openresty、MySQL(5.7、8.0、8.1)、PHP7.4(8.0、5.6)、Redis5.0、PHPMyAdmin、Xdebug、RabbitMQ、Nacos
Stars: ✭ 138 (+360%)
Mutual labels:  openresty
z-blog-openresty
程序员技术之旅-OpenResty
Stars: ✭ 25 (-16.67%)
Mutual labels:  openresty
ngx-lua-images
OpenResty (nginx+lua)+Ceph+GraphicsMagick 动态生成处理图片
Stars: ✭ 34 (+13.33%)
Mutual labels:  openresty
casper
Yelp's internal caching proxy, powered by Nginx and OpenResty at its core
Stars: ✭ 81 (+170%)
Mutual labels:  openresty

lua-resty-pyf

Lua 汉字拼音首字母提取。可以用于汉字拼音排序、检索。

Requirements

  • LuaJIT

Install

默认安装到 /usr/local/openresty/lualib

make
make install

测试

[root@master:lua-resty-pyf (master)]# luajit pyf_test.lua
汉字是迄今为止连续使用时间最长的文字,也是上古时期各大文字体系中唯一传承至今的文字,中国历代皆以汉字为主要官方文字。汉字在古代已发展至高度完备的水准,不单中国使用,在很长时期内还充当东亚地区唯一的国际交流文字,20世纪前都是日本、朝鲜半岛、越南、琉球等国家官方的书面规范文字,东亚诸国都有一定程度地自行创制汉字。
 h z s q j w z l x s y s j z z d w z # y s s g s q g d w z t x z w y c c z j d w z # z g l d j y h z w z y g f w z # h z z g d y f z z g d w b d s z # b d z g s y # z h z s q n h c d d y d q w y d g j j l w z # # # s j q d s r b # c x b d # y n # l q d g j g f d s m g f w z # d y z g d y y d c d d z x c z h z #
[root@master:lua-resty-pyf (master)]#

Usage

local pyf = require "pyf"

local result = pyf:pinyin("你好世界")
print(result)

API

pyf:pinyin(s)

将传入的字符串提取出汉字拼音的首字母。

s 必须为 UTF-8 编码,目前对数字和标点符号的处理均返回 #

pyf:jieba(l)

实验性功能,随机生成 l 个汉字(有很多生僻字)。

License

MIT

Thanks...

George wrote the clib.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].