ngocdang83 commited on
Commit
c037cda
·
verified ·
1 Parent(s): 403e53a

sync V9 no-speech teacher-object guard from qt2 e8eee55

Browse files
Files changed (1) hide show
  1. src/pronoun_harmonizer_v9.py +2 -0
src/pronoun_harmonizer_v9.py CHANGED
@@ -152,6 +152,8 @@ def dialogue_context(source: str) -> str:
152
 
153
 
154
  def contains_dialogue_context_any(source: str, terms: tuple[str, ...]) -> bool:
 
 
155
  return contains_source_any(dialogue_context(source), terms)
156
 
157
 
 
152
 
153
 
154
  def contains_dialogue_context_any(source: str, terms: tuple[str, ...]) -> bool:
155
+ if not has_speech_marker(source):
156
+ return False
157
  return contains_source_any(dialogue_context(source), terms)
158
 
159