Comments (10)
我看源码里两处require都没做缓存机制,是否考虑优化,考虑常驻进程框架的使用场景。
from pinyin.
@huangdijia 常驻进程会 require 多次吗?
from pinyin.
多次调用不会多次require吗?
from pinyin.
@huangdijia 噢。你说的是数据的那两次 require,那是因为为了控制内存占用,所以把内存占用控制在单个文件所占用的大小,如果将结果缓存的话,那数据就不需要分片了。
from pinyin.
@huangdijia 这是经过多次测试分片大小,目前的大小是内存和转换速度的最适合的大小(在我的电脑上测试是这样)
from pinyin.
@huangdijia 这是经过多次测试分片大小,目前的大小是内存和转换速度的最适合的大小(在我的电脑上测试是这样)
你的意思是全部放内存里,转换速度还没有分片每次都从文件加载快吗?(其实我也不是很懂)
from pinyin.
from pinyin.
多音字的 API polyphonic
是不是用 heteronym
合适一些?
https://www.sagebookshk.com/activities-to-practice-heteronyms/
https://en.wikipedia.org/wiki/Heteronym_(linguistics)
from pinyin.
@yisibl 也可以,因为当时我的确是找了好多种渠道,包括参考了一些开源库的命名。我先把它都加上
from pinyin.
Nice!
from pinyin.
Related Issues (20)
- 提取首字母小bug HOT 2
- Laravel 命名空间方式无法使用 PINYIN_UNICODE
- 可以添加遇到不能翻译的特殊字符如➕ 等。保持原样输出 HOT 3
- 名字“乐慧英”,拼音是lehuiying,而不是yuehuiying HOT 3
- 读音有误的感觉 HOT 2
- Error in data HOT 3
- 保留标点不生效 HOT 4
- 安装版本要求太高,能否兼容 php 7 HOT 1
- 关于 女 这个 拼音 HOT 5
- 如何转首拼或者全拼的字符串中如果是1111 四个数字开头的字符串会转换失败,报错信息和代码我放下面了 HOT 5
- 多音字句子中的"家长" HOT 22
- $pinyin = Pinyin::polyphones('你电脑电脑电脑什么的',Converter::TONE_STYLE_NUMBER); HOT 1
- 腾讯云自动检测会报警 HOT 2
- 腾讯管家报毒:\overtrue\pinyin\bin\build HOT 3
- 取首字母时,能否保留完整的英文 HOT 1
- 「仆区」应该读 pú ōu 而非 pú qū HOT 5
- 请问一下4.x 版本支持单字返回多音吗? HOT 1
- 曾字应该读作zeng HOT 4
- 一直用4.1版本 内存型 速度非常快 循环5000次 也就几秒 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pinyin.