offset 오류
Issue #19
new
seunjeon v1.5.0 을 ES 6.2.3 에 설치하고
제형이 적당해서 무르지 않으면서도 충분히 발리는 느낌이 좋네요.\n눅x랑 꼬달x 썼었는데 이게 확실히 좋아요.
위 문장을 인덱싱하니 아래와 같은 오류가 났습니다.
'error': {'type': 'illegal_argument_exception', 'reason': "startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=42,endOffset=43,lastStartOffset=43 for field 'reviewText'"}
analyzer 로 형태소 분석한 결과는 아래와 같이 나오는데 엉뚱하게 나온 "하/V" 가 그 뒤 "x/SL" 보다 offset 이 뒤에 있네요.
{
"tokens": [
{
"token": "제형/N",
"start_offset": 0,
"end_offset": 2,
"type": "N",
"position": 0
},
{
"token": "제형이/EOJ",
"start_offset": 0,
"end_offset": 3,
"type": "EOJ",
"position": 0
},
{
"token": "적당/XR",
"start_offset": 4,
"end_offset": 6,
"type": "XR",
"position": 1
},
{
"token": "적당해서/EOJ",
"start_offset": 4,
"end_offset": 8,
"type": "EOJ",
"position": 1
},
{
"token": "무르/V",
"start_offset": 9,
"end_offset": 11,
"type": "V",
"position": 2
},
{
"token": "무르지/EOJ",
"start_offset": 9,
"end_offset": 12,
"type": "EOJ",
"position": 2
},
{
"token": "않/V",
"start_offset": 13,
"end_offset": 14,
"type": "V",
"position": 3
},
{
"token": "않으면서도/EOJ",
"start_offset": 13,
"end_offset": 18,
"type": "EOJ",
"position": 3
},
{
"token": "충분히/M",
"start_offset": 19,
"end_offset": 22,
"type": "M",
"position": 4
},
{
"token": "발리/V",
"start_offset": 23,
"end_offset": 25,
"type": "V",
"position": 5
},
{
"token": "발리는/EOJ",
"start_offset": 23,
"end_offset": 26,
"type": "EOJ",
"position": 5
},
{
"token": "느낌/N",
"start_offset": 27,
"end_offset": 29,
"type": "N",
"position": 6
},
{
"token": "느낌이/EOJ",
"start_offset": 27,
"end_offset": 30,
"type": "EOJ",
"position": 6
},
{
"token": "좋/V",
"start_offset": 31,
"end_offset": 32,
"type": "V",
"position": 7
},
{
"token": "좋네요/EOJ",
"start_offset": 31,
"end_offset": 34,
"type": "EOJ",
"position": 7
},
{
"token": "눅/V",
"start_offset": 36,
"end_offset": 37,
"type": "V",
"position": 8
},
{
"token": "x/SL",
"start_offset": 37,
"end_offset": 38,
"type": "SL",
"position": 9
},
{
"token": "x랑/EOJ",
"start_offset": 37,
"end_offset": 39,
"type": "EOJ",
"position": 9
},
{
"token": "꼬/V",
"start_offset": 40,
"end_offset": 41,
"type": "V",
"position": 10
},
{
"token": "꼬달/EOJ",
"start_offset": 40,
"end_offset": 42,
"type": "EOJ",
"position": 10,
"positionLength": 2
},
{
"token": "하/V",
"start_offset": 43,
"end_offset": 44,
"type": "V",
"position": 11
},
{
"token": "x/SL",
"start_offset": 42,
"end_offset": 43,
"type": "SL",
"position": 12
},
{
"token": "쓰/V",
"start_offset": 44,
"end_offset": 45,
"type": "V",
"position": 13
},
{
"token": "썼었는데/EOJ",
"start_offset": 44,
"end_offset": 48,
"type": "EOJ",
"position": 13
},
{
"token": "이것/N",
"start_offset": 49,
"end_offset": 51,
"type": "N",
"position": 14
},
{
"token": "확실히/M",
"start_offset": 52,
"end_offset": 55,
"type": "M",
"position": 15
},
{
"token": "좋/V",
"start_offset": 56,
"end_offset": 57,
"type": "V",
"position": 16
},
{
"token": "좋아요/EOJ",
"start_offset": 56,
"end_offset": 59,
"type": "EOJ",
"position": 16
}
]
}