- edited description
영문+숫자 형태의 단어가 토크나이징이 안됩니다.
Issue #8
new
안녕하세요. 문의드릴게 있습니다.
엘라스틱서치에서 인덱스를 생성하고 아래와 같이 세팅하였습니다.
"tokenizer": {
"seunjeon_default_tokenizer": {
"type": "seunjeon_tokenizer",
"index_eojeol": false,
"pos_tagging": false,
"index_poses" : ["N"],
"user_words": ["타이틀","리스트","915","d2"]
}
},
"analyzer":{
"korean_without_synonym":{
"filter":[
"trim","lowercase"
],
"type":"custom",
"tokenizer":"seunjeon_default_tokenizer"
}
}
그리고 아래 2문장을 분석합니다.
-
'타이틀리스트915d2'
-
'타이틀리스트915d28'
이 후 아래 두 문장을 분석한 결과입니다.
/ '타이틀리스트915d2' 분석 /
curl -XGET 'http://localhost:9200/eunjeon_test/_analyze?analyzer=korean_with_synonym&pretty' -d '타이틀리스트915d2'
{
"tokens" : [ {
"token" : "타이틀",
"start_offset" : 0,
"end_offset" : 3,
"type" : "N",
"position" : 0
}, {
"token" : "리스트",
"start_offset" : 3,
"end_offset" : 6,
"type" : "N",
"position" : 1
}, {
"token" : "915",
"start_offset" : 6,
"end_offset" : 9,
"type" : "N",
"position" : 2
}, {
"token" : "d2",
"start_offset" : 9,
"end_offset" : 11,
"type" : "N",
"position" : 3
} ]
}
/ 정상적인 토크나이징 /
/# '타이틀리스트915d28' 분석 /
curl -XGET 'http://localhost:9200/eunjeon_test/_analyze?analyzer=korean_with_synonym&pretty' -d '타이틀리스트915d28'
{
"tokens" : [ {
"token" : "타이틀",
"start_offset" : 0,
"end_offset" : 3,
"type" : "N",
"position" : 0
}, {
"token" : "리스트",
"start_offset" : 3,
"end_offset" : 6,
"type" : "N",
"position" : 1
}, {
"token" : "915",
"start_offset" : 6,
"end_offset" : 9,
"type" : "N",
"position" : 2
} ]
}
/ 'd2' 토큰이 분석되지 않음 /
보시다시피, '915d2'->'915', 'd2'로 정상이지만, '915d28'->'915'만 가져오고 d2를 토큰으로 가져오질 못합니다.
'd2' 단어를 user_words에 추가했고 "d2, 5000"을 입력하여 옵션값을 줘도 똑같습니다.
해결책이 있는지 궁금합니다.
잘 부탁드립니다.
Comments (1)
-
reporter - Log in to comment