Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于中文化常用DSL的一些想法 #72

Closed
4b5ent1 opened this issue Jul 26, 2018 · 6 comments
Closed

关于中文化常用DSL的一些想法 #72

4b5ent1 opened this issue Jul 26, 2018 · 6 comments
Assignees
Labels
active 不一定活跃,但没有弃坑 APL +组合逻辑/tacit族 +erlang +BEAM +forth stack based desgin FP/λ +函数式 想法 +思路/观点 自然语言NLP nV-非冯 非冯诺依曼架构/体系 #prolog 逻辑编程 todo 设计 design 输入法 keyboard input method engine 长期 原则上仅对索引帖适用
Milestone

Comments

@4b5ent1
Copy link
Member

4b5ent1 commented Jul 26, 2018

最近有人请教我一些问题,一类是perl的问题,涉及正则比较多;另一类是python/django的问题,主要涉及SQL/ORM。

这使我不经想把两者的核心问题关联到一起:perl的代码看不懂,主要是因为正则,而数据库这个有些人玩不转,主要也是卡在SQL这块地方。

所以既然这两种都是DSL,而且正则的特性恰恰和APL的组合子逻辑很接近,为什么不试着做一套基于中文的正则表达式规则呢?同理也适用于SQL,当然SQL的问题要更复杂一点,因为SQL涉及到数据层的通信标准,而正则只需要匹配处理字符串。

@4b5ent1 4b5ent1 added 想法 +思路/观点 长期 原则上仅对索引帖适用 labels Jul 26, 2018
@nobodxbodon
Copy link
Member

知乎有位在做一套中文语法的类似SQL语言: https://www.zhihu.com/question/33983820/answer/186692475

This was referenced Jul 27, 2018
@4b5ent1 4b5ent1 added this to self in E2030 Jul 29, 2018
@swizl
Copy link

swizl commented Aug 7, 2018

基于中文的正则表达式规则?能举例子吗?
我觉得正则已经跟中英文没有关系了,纯符号的了。除非你想匹配偏旁部首,但这已经不是正则该做的了。

@swizl
Copy link

swizl commented Aug 7, 2018

当然SQL汉化我也有兴趣,但优先级排在比较后面。打算以后用mysql,试试。

@4b5ent1
Copy link
Member Author

4b5ent1 commented Aug 8, 2018

基于中文的正则表达式规则?能举例子吗?

@swizl
这个暂时很难想出合适的例子,简单说正则的符号可读性,比APL的希腊字母还要差,还是有改进余地的。

这个帖子关于正则的内容我都是可以有空再补充想想。


正则里面,.+*这种不影响,继续保留,\w这种可以替换成 ,\d->数,\a-zA-Z -> 全字母

@4b5ent1 4b5ent1 added the 设计 design label Aug 8, 2018
@4b5ent1 4b5ent1 added this to the 2018戊戌 milestone Aug 9, 2018
@4b5ent1 4b5ent1 added APL +组合逻辑/tacit族 化学方法/化合思想 labels Aug 9, 2018
@nobodxbodon nobodxbodon removed the c化 label Aug 13, 2018
@4b5ent1
Copy link
Member Author

4b5ent1 commented Aug 23, 2018

前面的关于匹配偏旁部首这段的内容之前没看到,感觉以后要做也可以。不过确实已经不属于标准正则需要考虑的问题了。

@nobodxbodon
Copy link
Member

看起来已在#89 继续此话题.

@4b5ent1 4b5ent1 self-assigned this Nov 30, 2018
@4b5ent1 4b5ent1 added this to archive in e2018 Nov 30, 2018
@4b5ent1 4b5ent1 added 输入法 keyboard input method engine FP/λ +函数式 todo active 不一定活跃,但没有弃坑 自然语言NLP nV-非冯 非冯诺依曼架构/体系 +erlang +BEAM +forth stack based desgin #prolog 逻辑编程 labels Dec 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
active 不一定活跃,但没有弃坑 APL +组合逻辑/tacit族 +erlang +BEAM +forth stack based desgin FP/λ +函数式 想法 +思路/观点 自然语言NLP nV-非冯 非冯诺依曼架构/体系 #prolog 逻辑编程 todo 设计 design 输入法 keyboard input method engine 长期 原则上仅对索引帖适用
Projects
E2030
self
e2018
  
archive
Development

No branches or pull requests

3 participants