Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

토큰 집합 유사도 비율

항목값
화면 이름Token set ratio
식별자tokenSetRatioV1
지원 실행 방식Batch, Streaming
범주유사도와 거리 (Distance measurement), 문자열 (String)
반환 자료형Double

두 문자열의 유사성을 0~1 비율로 계산합니다. 0은 유사성이 없음을 뜻하고, 1은 두 문자열이 같거나 한쪽 내용이 다른 쪽에 포함되는 경우를 뜻합니다.

입력 인자

이름지정 여부자료형의미와 조건
Ignore case필수Literal<Boolean>좌우 문자열 비교에서 대소문자를 무시할지 지정합니다.
Left필수Expression<String>비교할 왼쪽 문자열입니다.
Right필수Expression<String>비교할 오른쪽 문자열입니다.

입출력 예시

예시 1: 기본 동작

인자 값:

  • Ignore case: false
  • Left: left
  • Right: right
leftright출력
hello worldworld hello1.0
Hellohello world0.5
hello hello WorlDhello world0.8181818181818181
hellofarewell0.46153846153846156
empty stringempty string1.0

예시 2: 기본 동작

ignore case를 true로 두면 대소문자가 달라도 같은 문자로 취급합니다.

인자 값:

  • Ignore case: true
  • Left: left
  • Right: right
leftright출력
Hellohello world1.0
hello hello WorlDhello world1.0
helloFAREWELL0.46153846153846156

예시 3: null 처리

인자 값:

  • Ignore case: false
  • Left: left
  • Right: right
leftright출력
hellonullnull
nullhellonull
nullnullnull