youssefreda9 commited on
Commit
f4e59e5
·
1 Parent(s): ca212fd

Fix grammar rules output log — remove hardcoded ... truncation marker

Browse files
Files changed (1) hide show
  1. src/nlp/grammar/grammar_service.py +2 -1
src/nlp/grammar/grammar_service.py CHANGED
@@ -112,7 +112,8 @@ class GrammarChecker:
112
  # 3. Preserve original punctuation if the model stripped it
113
  corrected = self._preserve_punctuation(text, corrected)
114
 
115
- logger.info(f"Grammar rules output: '{corrected[:80]}...'")
 
116
 
117
  return corrected
118
 
 
112
  # 3. Preserve original punctuation if the model stripped it
113
  corrected = self._preserve_punctuation(text, corrected)
114
 
115
+ _cr_display = corrected[:80] + ('...' if len(corrected) > 80 else '')
116
+ logger.info(f"Grammar rules output: '{_cr_display}'")
117
 
118
  return corrected
119