巴利语文献全文搜索 #545
Replies: 6 comments 3 replies
-
复合词
-- 复合词在搜索的时候,需要拆分后匹配吗? 比如在搜索 akusaladhammo 的时候,需要匹配 kusaladhammo 或者 kusala 吗? https://www.wikipali.org/app/search/paliword.php?key=akusaladhammo |
Beta Was this translation helpful? Give feedback.
-
目前有一个预计算的单词拆分数据表可以使用,其内容已经可以使用,地址链接 https://github.com/iapt-platform/mint/tree/master/app/dict -- 链接里看到了算法,基于算法生成的数据表是在这里吗? https://github.com/iapt-platform/mint/tree/master/dicttext/system 另外,这个数据表,应该是不能完全覆盖所有巴利语合成词的,对吗? |
Beta Was this translation helpful? Give feedback.
-
需要。但是,如果可能的话,代价又不大。搜索 akusaladhammo 的时候,包涵akusala 的结果 要比 包涵kusala
的结果排名靠前。因为词义相关性更强。当然如果比较麻烦也可以不考虑词义。
Vito Van ***@***.***>于2021年10月10日 周日下午3:11写道:
… 复合词
kusaladhammo = kusala+dhamma+o
akusaladhammo = a+kusala+dhamma+o
--
复合词在搜索的时候,需要拆分后匹配吗?
比如在搜索 akusaladhammo 的时候,需要匹配 kusaladhammo 或者 kusala 吗?
https://www.wikipali.org/app/search/paliword.php?key=akusaladhammo
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#545 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APII2PMDOWMSPUAFKZX4QD3UGFGTXANCNFSM5FFZTKXQ>
.
|
Beta Was this translation helpful? Give feedback.
-
拆分表有两张。一张是比较准确的。您提到的链接。覆盖大约一半的词。另一个是机器根据语法可能性猜测的。几乎覆盖所有词。
Vito Van ***@***.***>于2021年10月10日 周日下午3:49写道:
… 目前有一个预计算的单词拆分数据表可以使用,其内容已经可以使用,地址链接
https://github.com/iapt-platform/mint/tree/master/app/dict
--
链接里看到了算法,基于算法生成的数据表是在这里吗?
https://github.com/iapt-platform/mint/tree/master/dicttext/system
另外,这个数据表,应该是不能完全覆盖所有巴利语合成词的,对吗?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#545 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APII2PMFC5FBHJ2EM4Q4IDDUGFLCFANCNFSM5FFZTKXQ>
.
|
Beta Was this translation helpful? Give feedback.
-
是的。因为有一半的单词拆词是程序做的。会有错误。另外一半是根据巴缅字典。不会错。
Vito Van ***@***.***>于2021年10月10日 周日下午3:57写道:
… 正是因为 “不能完全覆盖所有巴利语合成词”,所以才有 “该分词器应该是可以更新的。当拆词表改变的时候,分词器可以定期刷新。” 这个需求,对吗?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#545 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APII2PIEFTNIJFVJRHNJ3FLUGFMBHANCNFSM5FFZTKXQ>
.
|
Beta Was this translation helpful? Give feedback.
-
如果不考虑词义因素。这几个结果都是可以。如果考虑语义。凡是单词中包涵akusala
成分的结果,相关性更强,需要排在前面。因为首字母a是否定词前缀。相当于英语的un 或 dis 。好在巴利语只有一个否定前缀。
Vito Van ***@***.***>于2021年10月10日 周日下午4:47写道:
… 好的。
akusaladhammo 拆分匹配的优先级,这一部分我觉得我还需要更多巴利语基础。
以下几种变形、拆分的匹配优先级,应该是怎么样的呢?
1. akusaladhammo
2. kusaladhamma
3. akusala + dhamma
4. kusala + dhamma
5. na + kusala + dhama + o
6. ...
如果因为我缺乏语法基础一句两句说不清楚的话,如果可以帮忙贴一些有讲相关语法的网页链接也可以,我可以针对性的学一下。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#545 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/APII2PPZTUCKOIHMY2KMAWDUGFR3PANCNFSM5FFZTKXQ>
.
|
Beta Was this translation helpful? Give feedback.
-
问题的提出:
原有的搜索包括全文搜索和标题搜索。
目前标题搜索可以正常工作,全文搜索中包含两个搜索逻辑:
单个单词搜索
代码:https://github.com/iapt-platform/mint/blob/master/app/search/paliword_sc.php
以段落为搜索结果的单元。使用单词数据库,将用户输入单词进行变形后,查询各个变形在段落中的出现的次数。黑体字增加权重。然后计算段落搜索结果权重。根据权重将段落结果排序。
目前这个搜索逻辑工作较好。
多个单词搜索
仅实现了多个单词在段落中按照输入顺序精确匹配的结果。目前这个搜索效果不是很好。
业务需求:
解决方案:
单词拆分简述
目前有一个预计算的单词拆分数据表可以使用,其内容已经可以使用,地址链接
简单词
当用户输入词为 dhamma dhammo dhammesu 上述两个词应该能被搜索到
复合词
Beta Was this translation helpful? Give feedback.
All reactions