Skip to content

Commit 51263dd

Browse files
committed
feat(citations): widen no-answer detection for PL/EN refusals
1 parent ebfd6d4 commit 51263dd

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

constants/citations.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ const NO_ANSWER_META_PL =
1616

1717
// English "no information" refusal patterns; each negation is tied to a coverage noun.
1818
export const NO_ANSWER_PATTERNS_EN: RegExp[] = [
19+
new RegExp(`\\bno (${NO_ANSWER_META_EN})\\b`, 'i'),
1920
new RegExp(`\\bthere (is|are|'s) no (${NO_ANSWER_META_EN})\\b`, 'i'),
2021
new RegExp(
2122
`\\b(does|do|did|could|can) ?n['o]?t (contain|mention|include|provide|specify|cover|have|state|say)( any| any relevant)? (${NO_ANSWER_META_EN})\\b`,
@@ -36,6 +37,8 @@ export const NO_ANSWER_PATTERNS_PL: RegExp[] = [
3637
`\\b(nie ma|brak|nie zawiera\\w*|nie znaleziono|nie podano|nie wymienia\\w*) (żadn\\w* )?(${NO_ANSWER_META_PL})\\b`,
3738
'i'
3839
),
40+
/\bnie wspomina\w*\b/i,
41+
/\bnie odnosi si\w*\b/i,
3942
/\bnie wiem\b/i,
4043
/\bnie mog\w* (znaleźć|odpowiedzieć|okre\w*)\b/i,
4144
];

0 commit comments

Comments
 (0)