xmflswood / pinyin-match Goto Github PK
View Code? Open in Web Editor NEW拼音匹配,具备分词、缩写、多音字匹配能力,支持繁体版
License: Other
拼音匹配,具备分词、缩写、多音字匹配能力,支持繁体版
License: Other
刚看了代码库里的文件,发现没有 LICENSE 文件,建议补充 LICENSE 文件,告诉用户他们能够对你的代码做什么,不能做什么。
参考:
比如 “测试一个小目标”,使用“测试yg”不能匹配
您好!该插件存在常用字搜索不到的情况,查看源码发现没有收录“啰”字,但是常用搜索“哈啰单车”,能否将“啰”字加入常用简体汉字中,谢谢!
PinyinMatch.match('万智', 'm') => [0,0]
比如说:中 国 ,中间有一个空格,却匹配不到,我们项目中输入昵称时可以输入空格,这样就检索不到
试了下微信是支持的,希望能支持下这个,谢谢了。
lueduo lveduo 都是"掠夺", 但是只能匹配出 lveduo ,其实很多人打字的时候打的是u而不是v
在某些场景下,比如菜单搜索场景下,我们不可能需要匹配姓氏或者多音字,那么就可以关闭,不然我输入s,”单“跑出来了,并且我还做了高亮处理,是有点尴尬的啊
。。
大佬,是否可以商用?
比如QQ音乐,如果我输入qqyy是可以匹配的,但是我正常输入qqyinyue是匹配不到的。
可否暴露一个获取拼音首字母的方法
Originally posted by @hqzh in #11 (comment)
RT,试了你的demo发现的
PinyinMatch.match(text, 'zengji ng cang') // [3, 5]
PinyinMatch.match(text, 'zengji ng cangsdjfkl') // false
text
应为 test
多音字 钭 dou tou
#16 会导致ts编译不过报错,无法正确引用到pinyinmatch
建议将 ts 定义中的 boolean
调整为 false
function match(input: string, keys: string): [number, number] | false
let test = '朱'
PinyinMatch.match(test, 's');
此时得到的结果是【0,0】
按理得到的结果应该是false
大佬是我用VUE3的,使用VITE作为编译工具
如果我用const a= require (..)的方式在浏览器运行的时候就会提示require is not defined
如果我import pinyinMatch from 'pinyin-match' 就会说The requested module '/@modules/pinyin-match/dist/main.js' does not provide an export named 'default'
我这边试着做了一下姓氏检索,输入H后检索结果会出现“许”这个姓氏。
这个算法很棒,不知道有没有c#版本的呢?谢谢~
看 npm 上最新的版本,Dependencies 中有 rollup,在项目中使用这个包时会额外的下载 rollup,是否应该把 rollup 作为开发依赖?
原来pinyin.match(),现在pinyin.default.match()
能提供typescript下用法的示例么?
1.我喜欢学前端 输入: 喜欢java 可以匹配上喜欢这个两个字
2.一句话里面 出现多个关键词 貌似目前只能匹配第一次出现的
比如 重庆
的拼音是
chong qing
zhong qing
其中 重
的前缀子串有:
c
ch
cho
chon
chong
z
zh
zho
zhon
zhong
庆
的前缀子串有:
q
qi
qin
qing
那么按照前缀匹配的话,以下输入组合都可以进行匹配:
cq
cqi
cqin
cqing
chq
chqi
chqin
chqing
choq
choqi
choqin
choqing
chonq
chonqi
chonqin
chonqing
chongq
chongqi
chongqin
chongqing
zq
zqi
zqin
zqing
zhq
zhqi
zhqin
zhqing
zhoq
zhoqi
zhoqin
zhoqing
zhonq
zhonqi
zhonqin
zhonqing
zhongq
zhongqi
zhongqin
zhongqing
搜索结果匹配到“开”字而不是“卡”
看起来似乎是字库排序的问题?
谢谢
('aba', 'a')=>[1,2] : now;
demand :
('aba', 'a')=>[[0,1],[1,2]]
原因:
#10 (comment)
目前有
朱 shu
许 hu
大 tai
请问何时可以支援繁体中文?
谢谢。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.