Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions text/packages/chaff/rules/obligation-without-deadline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ example:
3. On termination, the Supplier shall return all Confidential Information to the Customer within ten days.

not_flagged:
ja: 期限を書いた文が、期限の無い義務の文より多くない文書では、書き手がそう書くと決めたとみなして指しません。同じ文に期限(7日以内、毎月末日までに、直ちに、事前に)があれば指しません。「速やかに」「遅滞なく」だけの期限は vague-deadline が見ます。権利を定める文(「返還を請求することができる」)と、金額を書いた文(「月額150,000円を支払う」は値段を決める文で、いつ払うかは別の条が決めます)は見ません。義務は文の終わりの述語で読み、条件の中の語(「通知したときは」)は見ません。法令・判決・特許は見ません。契約書・規約のジャンルで見ます。義務と同じ条(条が無ければ同じ箇条書きか段落)が、その行いの日付を名指す期限(支払う義務なら支払期日、納入なら納期)を書いていれば、その日が義務の時なので指しません。同じ条のほかの項が同じ行いに期限を書き、どちらかがもう一方を指していれば(第1項で何を払うかを書き、第3項が「本条1項に定める対価」をいつまでに払うかを書く条。「前項の対価を振込みで支払う」も同じ)、その期限が義務の時なので指しません。「2か月を目途に」も期限です。「次回の支払いの際に」のように決まった折に行う義務と、「翌月の請求と合算して」のようにほかの支払いと一緒に行う義務も、その折が義務の時です。英語の文書では、支払の予定表(according to the Payment Schedule)や確定した判決の額(damages finally awarded)に時を任せる義務と、事前の承認を求めて出す義務(submit samples for prior approval)、相手の返品の承認(return material authorization)を得て返す義務も指しません。返品は相手が開く手続きに沿って行うからです。
en: 'A document where sentences stating a limit are not more than those holding a duty with none is taken to write its duties that way on purpose, and is not reported. A sentence that states a limit (within seven days, by the fifth business day, immediately) is not reported; one with "promptly" alone is vague-deadline''s. A sentence that grants a right (may) or states an amount (shall pay a monthly fee of $9,000, which sets the price; another clause says when) is not read. "by email" says how, not when, and is not a limit. Statutes, court decisions and patents are not read; the contract genre runs this rule. A duty whose article (else its list or paragraph) names the dated deadline of its act (the Due Date for a duty to pay, the Delivery Date for one to deliver) is timed by it, and is not reported. Nor is a duty whose article states a limit for the same act in another paragraph, when one of the two points at the other (the first paragraph says what is paid; the third pays "the fee in paragraph 1 of this Article" within ten days). In Japanese, a duty done on a set occasion (次回の支払いの際に, at the next payment) or together with another payment (翌月の請求と合算して, added to the next month''s invoice) is timed by it. Nor is a duty whose time a payment schedule (according to the Payment Schedule) or a court''s final award (damages finally awarded) sets, or one done for prior approval (submit samples for prior approval), which comes before the use it must precede. Nor is a return made under the other party''s return authorization (return Products after obtaining a return material authorization number), which follows the claim process that party opens.'
ja: 期限を書いた文が、期限の無い義務の文より多くない文書では、書き手がそう書くと決めたとみなして指しません。同じ文に期限(7日以内、毎月末日までに、直ちに、事前に)があれば指しません。「速やかに」「遅滞なく」だけの期限は vague-deadline が見ます。権利を定める文(「返還を請求することができる」)と、金額を書いた文(「月額150,000円を支払う」は値段を決める文で、いつ払うかは別の条が決めます)は見ません。義務は文の終わりの述語で読み、条件の中の語(「通知したときは」)は見ません。法令・判決・特許は見ません。契約書・規約のジャンルで見ます。義務と同じ条(条が無ければ同じ箇条書きか段落)が、その行いの日付を名指す期限(支払う義務なら支払期日、納入なら納期)を書いていれば、その日が義務の時なので指しません。同じ条のほかの項が同じ行いに期限を書き、どちらかがもう一方を指していれば(第1項で何を払うかを書き、第3項が「本条1項に定める対価」をいつまでに払うかを書く条。「前項の対価を振込みで支払う」も同じ)、その期限が義務の時なので指しません。「2か月を目途に」も期限です。「次回の支払いの際に」のように決まった折に行う義務と、「翌月の請求と合算して」のようにほかの支払いと一緒に行う義務も、その折が義務の時です。遅れた支払いに付く遅延損害金・遅延利息を払う義務も、遅れた支払いと一緒に払うので指しません。英語の文書では、支払の予定表(according to the Payment Schedule)や確定した判決の額(damages finally awarded)に時を任せる義務と、事前の承認を求めて出す義務(submit samples for prior approval)、相手の返品の承認(return material authorization)を得て返す義務も指しません。返品は相手が開く手続きに沿って行うからです。
en: 'A document where sentences stating a limit are not more than those holding a duty with none is taken to write its duties that way on purpose, and is not reported. A sentence that states a limit (within seven days, by the fifth business day, immediately) is not reported; one with "promptly" alone is vague-deadline''s. A sentence that grants a right (may) or states an amount (shall pay a monthly fee of $9,000, which sets the price; another clause says when) is not read. "by email" says how, not when, and is not a limit. Statutes, court decisions and patents are not read; the contract genre runs this rule. A duty whose article (else its list or paragraph) names the dated deadline of its act (the Due Date for a duty to pay, the Delivery Date for one to deliver) is timed by it, and is not reported. Nor is a duty whose article states a limit for the same act in another paragraph, when one of the two points at the other (the first paragraph says what is paid; the third pays "the fee in paragraph 1 of this Article" within ten days). In Japanese, a duty done on a set occasion (次回の支払いの際に, at the next payment) or together with another payment (翌月の請求と合算して, added to the next month''s invoice) is timed by it. So is a duty to pay a charge that accrues on a late payment (遅延損害金, late payment interest), which is paid with it. Nor is a duty whose time a payment schedule (according to the Payment Schedule) or a court''s final award (damages finally awarded) sets, or one done for prior approval (submit samples for prior approval), which comes before the use it must precede. Nor is a return made under the other party''s return authorization (return Products after obtaining a return material authorization number), which follows the claim process that party opens.'
rewrite:
depth: light
ja:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
// a vague limit (promptly) is vague-deadline's; one stating an amount (pays a fee of $9,000) sets a price, and its
// timing is another clause's. The words come from the language package's word lists: timed-duty (the act),
// duty-marker (shall, will), duty-ending (う, するものとする: what may follow a Japanese act at the sentence end),
// stated-deadline (by the, までに) with concrete-deadline and vague-deadline, deadline-permission, currency-notation and paragraph-pointer (前項). Pure.
// stated-deadline (by the, までに) with concrete-deadline and vague-deadline, deadline-permission, currency-notation, paragraph-pointer (前項)
// and accrued-charge (遅延損害金: paid with the late payment it accrues on). Pure.
import { quoteAt } from "./structure-tree.ts";
import { actsTimedAt, type NamedDeadline, type Units } from "./deadline-unit.ts";
import { pointedParagraphs } from "./paragraph-pointer.ts";
Expand Down Expand Up @@ -48,6 +49,8 @@ export type DutyWords = {
readonly currencies: readonly LexiconEntry[];
/** Words that point at another paragraph of the article (前項, 本条1項). */
readonly paragraphPointers?: readonly LexiconEntry[];
/** Charges that accrue on another payment while it is late (遅延損害金, late payment interest): that payment times them. */
readonly accruals?: readonly string[];
};

const LATIN = /\p{Script=Latin}/u;
Expand Down Expand Up @@ -198,6 +201,7 @@ export const untimedDuties = (texts: readonly Text[], words: DutyWords): Untimed
const line = texts.slice(index, ends[index]);
if (line.some((later) => limited(later, words) || words.deferrals.some((deferral) => phraseIn(later.text, deferral)))) return [];
if (grantsRight(text, words.permissions) || statesAmount(text.text, words.currencies)) return [];
if ((words.accruals ?? []).some((accrual) => phraseIn(text.text, accrual))) return [];
const act = actIn(text.text, words);
if (act === undefined || (LATIN.test(act.act) && !isWordStart(text.text, act.at))) return [];
if (text.timedActs?.some((timed) => timed.toLowerCase() === act.act.toLowerCase()) === true) return [];
Expand Down Expand Up @@ -269,6 +273,7 @@ export const obligationWithoutDeadline: Detector = (doc): Finding[] => {
permissions: doc.lexicons["deadline-permission"] ?? [],
currencies: doc.lexicons["currency-notation"] ?? [],
paragraphPointers: doc.lexicons["paragraph-pointer"] ?? [],
accruals: patternsOf(doc, "accrued-charge"),
},
).map((duty) => ({
rule: "obligation-without-deadline",
Expand Down
10 changes: 10 additions & 0 deletions text/packages/lang-en/lexicons/accrued-charge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Charges that build up on a payment while it is late (late payment interest, a late charge). Their amount runs with the delay
# and they are paid with the late payment, which times them: obligation-without-deadline does not report a duty to pay one.
# The duty to make the late payment itself is read in its own sentence.
id: accrued-charge
language: en
entries:
- pattern: late payment interest
- pattern: late payment charge
- pattern: late charge
- pattern: default interest
9 changes: 9 additions & 0 deletions text/packages/lang-ja/lexicons/accrued-charge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 遅れた支払いの上に積み上がる金(遅延損害金、遅延利息)。額は遅れた期間で決まり、遅れた支払いと一緒に払うので、その支払いが義務の時になる。
# 文にこの語があれば、obligation-without-deadline は「支払う」に期限が無いとは指さない。遅れた元の支払いの義務は、その文で見る。
id: accrued-charge
language: ja
entries:
- pattern: 遅延損害金
- pattern: 遅延利息
- pattern: 延滞金
- pattern: 延滞利息
14 changes: 14 additions & 0 deletions text/test/test_obligation_without_deadline.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,14 @@ describe("obligation-without-deadline", () => {
assert.deepEqual(wordsIn(ja, ja_("第3条 甲は、不足額を乙に支払う。")), ["支払"]);
});

it("a charge accruing on a late payment (遅延損害金, late payment interest) is paid with it; the late payment's own duty is still read", () => {
const late = "第3条 乙は、甲に前払金を返還しなければならない。返還が遅れた場合は、遅れた期間に応じた遅延損害金を支払うものとする。";
assert.deepEqual(wordsIn(ja, ja_(late)), ["返還"]);
assert.deepEqual(wordsIn(ja, ja_("第3条 乙は、遅延利息を甲に支払う。")), []);
assert.deepEqual(wordsIn(en, en_("3. If any amount is late, the Customer shall pay late payment interest on it.")), []);
assert.deepEqual(wordsIn(en, en_("3. The Customer shall pay the overdue amount.", "", "4. The Customer shall also pay a late charge.")), ["pay"]);
});

it("does not run in a statute nor outside the legal genres", () => {
assert.deepEqual(wordsIn(ja, ja_("第3条 事業者は、手数料を国に支払う。"), "legal/statute"), []);
assert.deepEqual(wordsIn(en, en_("3. The seller must deliver the goods."), "business/report"), []);
Expand Down Expand Up @@ -225,6 +233,12 @@ describe("untimedDuties", () => {
assert.deepEqual(untimedDuties([text("Customer shall promptly pay."), ...LIMITS], words()), []);
});

it("leaves a duty whose sentence names a charge accruing on a late payment", () => {
const accruing = words({ accruals: ["late payment interest"] });
assert.deepEqual(untimedDuties([text("Customer shall pay late payment interest."), ...LIMITS], accruing), []);
assert.deepEqual(untimedDuties([text("Customer shall pay the fees."), ...LIMITS], accruing).length, 1);
});

it("says nothing for empty input or empty word lists", () => {
assert.deepEqual(untimedDuties([], words()), []);
assert.deepEqual(untimedDuties([text("Customer shall pay."), ...LIMITS], words({ acts: [] })), []);
Expand Down
Loading