Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixbug: Expand sentence-ending punctuation check in _create_statement…
…s method (#1523) **Description** This pull request addresses an issue where non-English punctuation (e.g., "。", "!") was not properly handled in the `_create_statements` function, causing sentences in languages like Chinese to be ignored and potentially leading to incorrect faithfulness scores. **Changes Made** Updated the condition: ```python if sentence.strip().endswith("."): ``` to ```python if sentence.strip().endswith(('.', '。', '!', '!')): ``` This ensures that sentences with non-English punctuation are included in the processing. **Impact** This change allows the system to correctly process sentences in languages like Chinese, preventing empty `sentences_with_index` variables and ensuring accurate faithfulness scores. --- Let me know if this works or if you need further edits! Thanks! Co-authored-by: jeff yang <[email protected]>
- Loading branch information