Skip to content

Commit 73891cc

Browse files
clay-goodclaude
andcommitted
fix(extract): recognize an adverb in 'governed exclusively/solely by …'
A manner adverb ("exclusively", "solely", "only", "entirely") routinely sits between "governed" and "by", and the rigid `governed\s+by` token dropped the entire clause — so CHOICE-001 reported "no governing-law clause" on a document whose Governing Law section plainly names one. Both the "laws of X" (GOV_LAW) and adjectival "X law" (GOV_LAW_ADJECTIVAL) patterns now accept the optional adverb via a shared GOVERNED_BY fragment. The adverb does not change the clause's meaning, so this only widens matches; no corpus/fixture uses the form, so goldens are unchanged. Adds 4 tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f6f6c8f commit 73891cc

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

src/extract/govlaw-phrasing.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ const REGISTERS: Array<[clause: string, want: RegExp]> = [
1212
["This Agreement is governed by the internal substantive laws of Texas.", /Texas/],
1313
["The internal laws of the State of Delaware shall govern this Agreement.", /Delaware/],
1414
["The substantive laws of Nevada shall apply to this Agreement.", /Nevada/],
15+
// A manner adverb between "governed" and "by" must not drop the clause.
16+
["This Agreement shall be governed exclusively by the laws of California.", /California/],
17+
["This Agreement shall be governed solely by the laws of the State of Delaware.", /Delaware/],
18+
["This Agreement is governed only by the laws of New York.", /New York/],
19+
["This Agreement shall be governed entirely by Texas law.", /Texas/],
1520
];
1621

1722
// Decoys: an adjective before "laws" must not turn a non-choice-of-law phrase

src/extract/jurisdictions.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,14 @@ const JURISDICTION_AFTER_LOCALITY = new RegExp(
5555
* "Ireland" venue.
5656
*/
5757
const SOVEREIGN_PREFIX = String.raw`the\s+(?:State|Commonwealth|Republic|Kingdom|Province)\s+of\s+|the\s+`;
58+
// A manner adverb routinely sits between "governed" and "by" — "governed
59+
// exclusively by", "governed solely by" — and the rigid "governed\s+by" token
60+
// dropped the whole clause, so CHOICE-001 reported "no governing-law clause" on
61+
// a document that plainly names one. The adverb is optional and does not change
62+
// the clause's meaning, so this only widens what matches.
63+
const GOVERNED_BY = String.raw`governed\s+(?:(?:exclusively|solely|only|entirely)\s+)?by`;
5864
const GOV_LAW = new RegExp(
59-
String.raw`\b((?:governed\s+by|(?:interpreted|construed|resolved)\s+(?:under|in\s+accordance\s+with)|subject\s+to|determined\s+(?:under|by|in\s+accordance\s+with))\s*,?\s*(?:and\s+construed\s+(?:in\s+accordance\s+with\s*,?\s*)?)?the\s+(?:substantive\s+|internal\s+|domestic\s+|local\s+|applicable\s+)*laws?\s+of\s+(?:${SOVEREIGN_PREFIX})?([A-Z][A-Za-z\s&-]+?))(?=[.,;)]|\s+(?:without|excluding|and|regardless)|$)`,
65+
String.raw`\b((?:${GOVERNED_BY}|(?:interpreted|construed|resolved)\s+(?:under|in\s+accordance\s+with)|subject\s+to|determined\s+(?:under|by|in\s+accordance\s+with))\s*,?\s*(?:and\s+construed\s+(?:in\s+accordance\s+with\s*,?\s*)?)?the\s+(?:substantive\s+|internal\s+|domestic\s+|local\s+|applicable\s+)*laws?\s+of\s+(?:${SOVEREIGN_PREFIX})?([A-Z][A-Za-z\s&-]+?))(?=[.,;)]|\s+(?:without|excluding|and|regardless)|$)`,
6066
"gi",
6167
);
6268

@@ -82,7 +88,7 @@ const GOV_LAW_IS = new RegExp(
8288
* "federal law", "such law").
8389
*/
8490
const GOV_LAW_ADJECTIVAL = new RegExp(
85-
String.raw`\b(?:governed\s+by|(?:construed|interpreted)\s+(?:under|in\s+accordance\s+with))\s+(?:${SOVEREIGN_PREFIX})?([A-Z][A-Za-z&-]+(?:\s+[A-Z][A-Za-z&-]+){0,2})\s+law\b`,
91+
String.raw`\b(?:${GOVERNED_BY}|(?:construed|interpreted)\s+(?:under|in\s+accordance\s+with))\s+(?:${SOVEREIGN_PREFIX})?([A-Z][A-Za-z&-]+(?:\s+[A-Z][A-Za-z&-]+){0,2})\s+law\b`,
8692
"gi",
8793
);
8894
// The subject-first adjectival form: "Georgia law governs this Agreement",

0 commit comments

Comments
 (0)