スノーボールトークンフィルター
スノーボール生成のステマーを使用して単語をステム化するフィルターです。language
パラメータは、次の利用可能な値でステマーを制御します: Arabic
, Armenian
, Basque
, Catalan
, Danish
, Dutch
, English
, Estonian
, Finnish
, French
, German
, German2
, Hungarian
, Italian
, Irish
, Kp
, Lithuanian
, Lovins
, Norwegian
, Porter
, Portuguese
, Romanian
, Russian
, Serbian
, Spanish
, Swedish
, Turkish
。
例えば:
Python
resp = client.indices.create(
index="my-index-000001",
settings={
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [
"lowercase",
"my_snow"
]
}
},
"filter": {
"my_snow": {
"type": "snowball",
"language": "Lovins"
}
}
}
},
)
print(resp)
Ruby
response = client.indices.create(
index: 'my-index-000001',
body: {
settings: {
analysis: {
analyzer: {
my_analyzer: {
tokenizer: 'standard',
filter: [
'lowercase',
'my_snow'
]
}
},
filter: {
my_snow: {
type: 'snowball',
language: 'Lovins'
}
}
}
}
}
)
puts response
Js
const response = await client.indices.create({
index: "my-index-000001",
settings: {
analysis: {
analyzer: {
my_analyzer: {
tokenizer: "standard",
filter: ["lowercase", "my_snow"],
},
},
filter: {
my_snow: {
type: "snowball",
language: "Lovins",
},
},
},
},
});
console.log(response);
コンソール
PUT /my-index-000001
{
"settings": {
"analysis": {
"analyzer": {
"my_analyzer": {
"tokenizer": "standard",
"filter": [ "lowercase", "my_snow" ]
}
},
"filter": {
"my_snow": {
"type": "snowball",
"language": "Lovins"
}
}
}
}
}