Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

ROUGE 점수

항목값
화면 이름ROUGE score
식별자rougeScoreV1
지원 실행 방식Batch
범주유사도와 거리 (Distance measurement), 문자열 (String)
반환 자료형Struct<precision:Double, recall:Double, fmeasure:Double>

예측 텍스트와 정답 텍스트의 ROUGE 정밀도, 재현율과 F-measure를 계산합니다. 텍스트를 소문자로 바꾸고 ASCII 영문자와 숫자만 비교하며 나머지 문자는 단어 구분자로 취급합니다. 입력이 null이거나 평가할 수 없으면 null을 반환하며 평가기의 크기 제한 초과도 이에 해당합니다. 비교할 토큰이 없으면 입력이 같아도 점수는 0입니다.

입력 인자

이름지정 여부자료형의미와 조건
Prediction필수Expression<String>평가할 생성 텍스트입니다.
ROUGE type필수Enum<ROUGE-1, ROUGE-2, ROUGE-3, ROUGE-L, ROUGE-Lsum, ROUGE-Lsum (detected sentences)>텍스트 비교에 사용할 ROUGE 변형입니다.
Target필수Expression<String>비교 기준 텍스트입니다.
Use stemmer선택Literal<Boolean>비교 전에 단어의 어간을 추출할지 지정합니다.

입출력 예시

예시 1: 기본 동작

소문자로 바꾼 ASCII 영문자와 숫자만 비교하고 나머지 문자는 단어 구분자입니다. 비교 토큰이 없으면 두 입력이 같아도 점수는 0입니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge1
  • Target: target
  • Use stemmer: null
predictiontarget출력
你好你好{
 fmeasure: 0.0,
 precision: 0.0,
 recall: 0.0,
}
cat你好dogcat dog{
 fmeasure: 1.0,
 precision: 1.0,
 recall: 1.0,
}
CAT 42cat 42{
 fmeasure: 1.0,
 precision: 1.0,
 recall: 1.0,
}
empty stringempty string{
 fmeasure: 0.0,
 precision: 0.0,
 recall: 0.0,
}

예시 2: 기본 동작

ROUGE-2는 연속된 두 단어 묶음의 중복을 측정합니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge2
  • Target: target
  • Use stemmer: null
predictiontarget출력
the cat satthe cat slept{
 fmeasure: 0.5,
 precision: 0.5,
 recall: 0.5,
}

예시 3: 기본 동작

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge1
  • Target: target
  • Use stemmer: null
predictiontarget출력
the cat satthe cat sat{
 fmeasure: 1.0,
 precision: 1.0,
 recall: 1.0,
}

예시 4: 기본 동작

ROUGE-L은 같은 순서로 나타나는 가장 긴 단어 수열을 측정합니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge_l
  • Target: target
  • Use stemmer: null
predictiontarget출력
cat satsat cat{
 fmeasure: 0.5,
 precision: 0.5,
 recall: 0.5,
}

예시 5: 기본 동작

ROUGE-Lsum은 줄바꿈으로 문장을 나눕니다. 구두점만으로는 문장을 나누지 않습니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge_lsum
  • Target: target
  • Use stemmer: null
predictiontarget출력
cat sat.
dog ran.
dog ran.
cat sat.
{
 fmeasure: 1.0,
 precision: 1.0,
 recall: 1.0,
}
cat sat. dog ran.dog ran. cat sat.{
 fmeasure: 0.5,
 precision: 0.5,
 recall: 0.5,
}

예시 6: 기본 동작

ROUGE-1은 개별 단어의 중복을 측정합니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge1
  • Target: target
  • Use stemmer: null
predictiontarget출력
the cat satthe cat slept{
 fmeasure: 0.6666666666666666,
 precision: 0.6666666666666666,
 recall: 0.6666666666666666,
}

예시 7: 기본 동작

어간 추출을 사용하면 관련된 단어 형태를 일치시킬 수 있습니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge1
  • Target: target
  • Use stemmer: true
predictiontarget출력
carscar{
 fmeasure: 1.0,
 precision: 1.0,
 recall: 1.0,
}

예시 8: 기본 동작

ROUGE-Lsum sentences는 문장 경계를 자동 감지하고 문장 순서 변경에 불이익을 주지 않으며 문장 수준의 일치를 비교합니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge_lsum_sentences
  • Target: target
  • Use stemmer: null
predictiontarget출력
The dog ran. The cat sat.The cat sat. The dog ran.{
 fmeasure: 1.0,
 precision: 1.0,
 recall: 1.0,
}
Cat sat. Dog ran.Dog ran. Cat sat.{
 fmeasure: 1.0,
 precision: 1.0,
 recall: 1.0,
}

예시 9: 기본 동작

ROUGE-3는 연속된 세 단어 묶음의 중복을 측정합니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge3
  • Target: target
  • Use stemmer: null
predictiontarget출력
the cat sat downthe cat sat still{
 fmeasure: 0.5,
 precision: 0.5,
 recall: 0.5,
}
the catthe cat{
 fmeasure: 0.0,
 precision: 0.0,
 recall: 0.0,
}

예시 10: null 처리

어느 입력이든 null이면 ROUGE 점수 출력 전체가 null입니다.

인자 값:

  • Prediction: prediction
  • ROUGE type: rouge1
  • Target: target
  • Use stemmer: null
predictiontarget출력
nulltargetnull
predictionnullnull
nullnullnull