当前位置:网站首页>自定义一个下划线分词器
自定义一个下划线分词器
2022-08-02 03:38:00 【绅士jiejie】
参考代码:
PUT /index
{
"settings": {
"analysis": {
"char_filter": {
"_to_space": {
"type": "mapping",
"mappings": [
"_ =>\\u0020"
]
}
},
"analyzer": {
"my_analyzer": {
"type": "custom",
"char_filter": [
"_to_space"
],
"tokenizer": "whitespace",
"filter": [
"lowercase"
]
}
}
}
}
}
以上思路简单描述下,其实底层还是使用的空格分词器,只是添加了一个过滤器,把下划线_换成了空格\u0020,扩展下,这里自然也可以把其他符号转成空格,再交给空格分词器做处理。
边栏推荐
猜你喜欢
QT中更换OPENCV版本(3->4),以及一些宏定义的改变
LVS+Keepalived实现高可用的负载均衡
科研笔记(八) 深度学习及其在 WiFi 人体感知中的应用(上)
Excel操作技巧大全
[Study Notes] How to Create an Operation and Maintenance Organizational Structure
其他语法和模块的导出导入
吴恩达机器学习系列课程笔记——第十五章:异常检测(Anomaly Detection)
Win8.1下QT4.8集成开发环境的搭建
Research Notes (8) Deep Learning and Its Application in WiFi Human Perception (Part 1)
micro-ros arduino esp32 ros2 笔记
随机推荐
GO Module的依赖管理(二)
可视水印的实现——1使用加法实现(add,+)
节流阀和本地存储
侦听器watch及其和计算属性、methods方法的总结
STM32/TMS320F2812+W5500硬软件调试总结
Qt编写物联网管理平台49-设备模拟工具
ScholarOne Manuscripts submits journal LaTeX file and cannot convert PDF successfully!
分布式系统的一致性与共识(1)-综述
吴恩达机器学习系列课程笔记——第十八章:应用实例:图片文字识别(Application Example: Photo OCR)
SCI写作攻略——附带常见英语写作句式
Computer Basics
科研笔记(五) SLAC WiFi Fingerprint+ Step counter融合定位
吴恩达机器学习系列课程笔记——第九章:神经网络的学习(Neural Networks: Learning)
offset、client 和 scroll
深蓝学院-视觉SLAM十四讲-第六章作业
空卡安装设置树莓派4B并安装opencv+QT
使用 Fastai 构建食物图像分类器
Your device is corrupt. It cant‘t be trusted and may not work propely.
MapFi论文架构整理
列表总结