langdrift 日志补尾巴:原 sample 只打前24字,曾造成"译文看着没问题为何被拒"的误导——判错常在中后段(前半译中文尾巴滑回日语);增 tail(尾16字)+len 字段,证据一次到位

This commit is contained in:
liwenhao2 2026-09-16 10:25:41 +08:00
parent e17f8c0659
commit bcf70e40f0
1 changed files with 5 additions and 1 deletions

View File

@ -2301,7 +2301,11 @@ class MainActivity : AppCompatActivity() {
!targetLangOk(tr) -> {
val sample = tr.replace("\n", " ")
Log.i(TAG, "TAP-MISS sid=$sid reason=langdrift temp=$temp" +
" sample=" + sample.take(24) + srcTag)
" sample=" + sample.take(24) +
// 早前版本只打前 24 字,曾误导"译文看起来没问题为何拒"
// ——判错常在后半段(尾巴滑回源语言),尾 16 字必打
" tail=" + sample.takeLast(16) +
" len=" + sample.length + srcTag)
if (sample == lastRej) return null
lastRej = sample
// 漂移一次即弃治疗直接升档:1B 对中文口语/文学体的