- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想了解一下Elasticsearch如何标记英语以外的其他语言,然后尝试了它提供的analytics API。但是我根本看不懂输出。举个例子
GET myindex/_analyze?analyzer=hindi&text="में कहता हूँ और तुम सुनना "
{
"tokens": [
{
"token": "2350",
"start_offset": 3,
"end_offset": 7,
"type": "<NUM>",
"position": 1
},
{
"token": "2375",
"start_offset": 10,
"end_offset": 14,
"type": "<NUM>",
"position": 2
},
{
"token": "2306",
"start_offset": 17,
"end_offset": 21,
"type": "<NUM>",
"position": 3
},
{
"token": "2325",
"start_offset": 25,
"end_offset": 29,
"type": "<NUM>",
"position": 4
},
{
"token": "2361",
"start_offset": 32,
"end_offset": 36,
"type": "<NUM>",
"position": 5
},
{
"token": "2340",
"start_offset": 39,
"end_offset": 43,
"type": "<NUM>",
"position": 6
},
{
"token": "2366",
"start_offset": 46,
"end_offset": 50,
"type": "<NUM>",
"position": 7
},
{
"token": "2361",
"start_offset": 54,
"end_offset": 58,
"type": "<NUM>",
"position": 8
},
{
"token": "2370",
"start_offset": 61,
"end_offset": 65,
"type": "<NUM>",
"position": 9
},
{
"token": "2305",
"start_offset": 68,
"end_offset": 72,
"type": "<NUM>",
"position": 10
},
{
"token": "2324",
"start_offset": 76,
"end_offset": 80,
"type": "<NUM>",
"position": 11
},
{
"token": "2352",
"start_offset": 83,
"end_offset": 87,
"type": "<NUM>",
"position": 12
},
{
"token": "2340",
"start_offset": 91,
"end_offset": 95,
"type": "<NUM>",
"position": 13
},
{
"token": "2369",
"start_offset": 98,
"end_offset": 102,
"type": "<NUM>",
"position": 14
},
{
"token": "2350",
"start_offset": 105,
"end_offset": 109,
"type": "<NUM>",
"position": 15
},
{
"token": "2360",
"start_offset": 113,
"end_offset": 117,
"type": "<NUM>",
"position": 16
},
{
"token": "2369",
"start_offset": 120,
"end_offset": 124,
"type": "<NUM>",
"position": 17
},
{
"token": "2344",
"start_offset": 127,
"end_offset": 131,
"type": "<NUM>",
"position": 18
},
{
"token": "2344",
"start_offset": 134,
"end_offset": 138,
"type": "<NUM>",
"position": 19
},
{
"token": "2366",
"start_offset": 141,
"end_offset": 145,
"type": "<NUM>",
"position": 20
}
]
}
最佳答案
您如何调用elasticsearch API-客户端可能会将北印度语字符弄乱了?
在带有curl的Linux上,它对我来说可以正常工作(至少在结果中出现北印度语字符):
curl -XPOST 'http://localhost:9200/myindex/_analyze?analyzer=hindi&pretty' -d 'में कहता हूँ और तुम सुनना '
{
"tokens" : [ {
"token" : "कह",
"start_offset" : 4,
"end_offset" : 8,
"type" : "<ALPHANUM>",
"position" : 2
}, {
"token" : "हुं",
"start_offset" : 9,
"end_offset" : 12,
"type" : "<ALPHANUM>",
"position" : 3
}, {
"token" : "तुम",
"start_offset" : 16,
"end_offset" : 19,
"type" : "<ALPHANUM>",
"position" : 5
}, {
"token" : "सुन",
"start_offset" : 20,
"end_offset" : 25,
"type" : "<ALPHANUM>",
"position" : 6
} ]
}
关于elasticsearch - 用于国际语言的Elasticsearch标记化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27204925/
我需要一个正则表达式来匹配所有标点符号,例如标准的 [,!@#$%^&*()],但包括国际标记,例如倒置的西类牙语问号、中文句号等.我的 google-fu 快用完了。有人手头有这样一个与 Javas
跟进之前的 question我有关于水平数组和垂直数组的问题,我对它们各自的分隔符有疑问。 问题定义: 这里是比较两个数组的错误方法的示例: {=SUMPRODUCT(--({"Apple","Pea
我正在尝试对手机号码进行验证检查,有点类似于 gmail 的实现。 Gmail signup page link 但是各个国家/地区的电话号码差异很大,因此很难为此构建正则表达式。 我在这里查看了一些
这就是我们所拥有的: 数据库中的用户,包括 phone_number 字段。当用户创建他们的帐户时,他们必须输入他们的电话号码。我们可以要求特定的格式,我们会这样做: + [countrycode]
对于Google-Chrome扩展程序,我想在所有Google页面上加载内容脚本。做这个的最好方式是什么? 我在manifest.json中尝试了此操作,但它不起作用: "matches": ["ht
在 JavaScript 中使用数字格式化程序时,是否可以在值之前使用欧元符号来格式化值? this.formatter = new Intl.NumberFormat('nl-be', { st
我们有一个 iOS 应用程序,在美国拥有数百万用户,需要国际化并在 11 个不同的国家/地区(许多国家/地区使用不同的语言)提供。已制定出适用于特定国家/地区以及不同货币等的公开隐藏功能的所有技术细节
如何在使用 react-intl 时使用 来控制断字。我有一条像 Rs 这样的消息。 100,00,000 但它正在打破卢比。无论如何可以将消息写为 Rs. 100,00,000当我尝试这样做时,
我正在研究具有端点的 swagger API 规范: /authorizations 我也想为这个端点定义一个替代拼写(授权)。这可能吗?或者我是否需要为每个拼写定义一个单独的路由? /authori
我正在研究具有端点的 swagger API 规范: /authorizations 我也想为这个端点定义一个替代拼写(授权)。这可能吗?或者我是否需要为每个拼写定义一个单独的路由? /authori
我正在尝试安装 CakePHP 3-0-0 版本并且我已经从 here 下载了源代码.但它显示启用 intl 扩展 的错误。因为我已经在 php.ini 文件中将 ;extension=php_int
#include #include #include int main() { const wchar_t *str = L"\u041F\u043E\u0440\u044F\u0434
Transliterator::listIDs()将列出 ID,但显然它不是完整列表。 在example from this page ,ID 看起来像: Any-Latin; NFD; [:Nons
任务是在不同的语言环境中显示订阅价格,例如 5$/month。 我可以用 Intl 管理价格部分很好,但坚持时间段翻译部分。 我可以使用自己的翻译字符串,但如果可能,我更愿意使用默认的 Intl 版本
任务是在不同的语言环境中显示订阅价格,例如 5$/month。 我可以用 Intl 管理价格部分很好,但坚持时间段翻译部分。 我可以使用自己的翻译字符串,但如果可能,我更愿意使用默认的 Intl 版本
我正在使用 React 制作一个多语言通用应用程序,但我很难找到处理区域设置数据的最佳方法。该应用程序将提供 16 种语言版本,并且翻译的消息量非常大,因此我无法将所有消息加载到一个大 json 中(
我是一名优秀的程序员,十分优秀!