@chaffjs/lang-ja 0.37.0 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/dist/structure.d.ts.map +1 -1
  2. package/dist/structure.js +5 -2
  3. package/dist/structure.js.map +1 -1
  4. package/lexicons/ai-tell.yaml +38 -20
  5. package/lexicons/announcing-opener.yaml +4 -0
  6. package/lexicons/closing-cliche.yaml +27 -1
  7. package/lexicons/closing-exhortation.yaml +23 -0
  8. package/lexicons/cold-open.yaml +30 -0
  9. package/lexicons/common-acronym.yaml +14 -1
  10. package/lexicons/comparative-baseline.yaml +8 -0
  11. package/lexicons/condition-heading.yaml +14 -0
  12. package/lexicons/contact-line-opener.yaml +16 -0
  13. package/lexicons/contrast-amount.yaml +14 -0
  14. package/lexicons/contrast-lead.yaml +5 -0
  15. package/lexicons/contrast-turn.yaml +5 -0
  16. package/lexicons/declaration-particle.yaml +14 -0
  17. package/lexicons/definitions-inherited.yaml +10 -0
  18. package/lexicons/email-closing.yaml +5 -3
  19. package/lexicons/email-greeting.yaml +10 -3
  20. package/lexicons/everyday-name.yaml +29 -0
  21. package/lexicons/fixed-name-ending.yaml +3 -0
  22. package/lexicons/honesty-marker.yaml +12 -0
  23. package/lexicons/intent-ending.yaml +33 -0
  24. package/lexicons/interviewer-mark.yaml +15 -0
  25. package/lexicons/list-continues.yaml +7 -0
  26. package/lexicons/name-capitals-prefix.yaml +15 -0
  27. package/lexicons/name-copula.yaml +17 -0
  28. package/lexicons/name-direction-word.yaml +8 -0
  29. package/lexicons/name-title-head.yaml +23 -0
  30. package/lexicons/navigation-line.yaml +14 -0
  31. package/lexicons/neutral-wish.yaml +8 -0
  32. package/lexicons/ngram-fixed-ending.yaml +14 -1
  33. package/lexicons/nominalization-event-noun.yaml +7 -3
  34. package/lexicons/option-choice-label.yaml +7 -0
  35. package/lexicons/organisation-unit.yaml +6 -0
  36. package/lexicons/orthographic-variant-law-number.yaml +7 -0
  37. package/lexicons/orthographic-variant-light-verb.yaml +8 -0
  38. package/lexicons/orthographic-variant-means.yaml +9 -0
  39. package/lexicons/orthographic-variant-name-ending.yaml +10 -0
  40. package/lexicons/orthographic-variant-whole-word.yaml +6 -0
  41. package/lexicons/padded-intro.yaml +11 -0
  42. package/lexicons/particle-run-set-phrase.yaml +8 -0
  43. package/lexicons/placeholder-word.yaml +32 -0
  44. package/lexicons/product-name.yaml +9 -0
  45. package/lexicons/quote-label.yaml +16 -0
  46. package/lexicons/quote-not-attribution.yaml +13 -0
  47. package/lexicons/request-deadline-section.yaml +2 -0
  48. package/lexicons/request-invitation.yaml +3 -0
  49. package/lexicons/request-no-deadline-title.yaml +6 -0
  50. package/lexicons/requirement-open-end.yaml +9 -0
  51. package/lexicons/set-polite-phrase.yaml +13 -0
  52. package/lexicons/sql-keyword.yaml +28 -0
  53. package/lexicons/statute-article-opener.yaml +6 -0
  54. package/lexicons/superlative-goal.yaml +16 -0
  55. package/lexicons/superlative-phrase.yaml +5 -0
  56. package/lexicons/superlative-realm.yaml +14 -0
  57. package/lexicons/superlative-viewpoint.yaml +6 -0
  58. package/lexicons/takeup-opener.yaml +13 -0
  59. package/lexicons/template-heading.yaml +32 -0
  60. package/lexicons/text-message-verb.yaml +11 -0
  61. package/lexicons/title-ending.yaml +6 -1
  62. package/lexicons/topic-clause-close.yaml +11 -0
  63. package/lexicons/unnumbered-heading.yaml +3 -0
  64. package/lexicons/unprompted-denial.yaml +99 -0
  65. package/lexicons/verbatim-lead.yaml +9 -0
  66. package/package.json +1 -1
  67. package/src/structure.ts +5 -2
@@ -0,0 +1,99 @@
1
+ # 誰も言っていない前提を打ち消して終わる文。group は unprompted-denial.ts の読み方:
2
+ # end 文がこの語で閉じれば打ち消し(〜の話ではありません、〜材料になりません、〜の余地がありません)
3
+ # exempt end の直前にあれば数えない語。「だけではない」は足し算、「べきではない」は禁止、「簡単ではない」は評価、
4
+ # 「この限りではない」は決まった言い回しで、前提の打ち消しではない
5
+ # basis 同じ文にあれば数えない語。理由を添えた打ち消しは事実を言っている
6
+ # reason 文がこの語で閉じれば、basis を見ない。「性能が同じだから並ぶのではありません」は理由そのものを打ち消している
7
+ # premise 前の文にあれば数えない語。打ち消す相手(〜と思うかもしれません)が文書の中にある
8
+ # question 前の文がこの語で閉じれば数えない(問いに答える打ち消し)
9
+ id: unprompted-denial
10
+ language: ja
11
+ entries:
12
+ - pattern: ではありません
13
+ group: end
14
+ - pattern: ではない
15
+ group: end
16
+ - pattern: じゃありません
17
+ group: end
18
+ - pattern: じゃない
19
+ group: end
20
+ - pattern: ではないのです
21
+ group: end
22
+ - pattern: ではないんです
23
+ group: end
24
+ - pattern: になりません
25
+ group: end
26
+ - pattern: にはなりません
27
+ group: end
28
+ - pattern: にならない
29
+ group: end
30
+ - pattern: にはならない
31
+ group: end
32
+ - pattern: 余地がありません
33
+ group: end
34
+ - pattern: 余地はありません
35
+ group: end
36
+ - pattern: 余地がない
37
+ group: end
38
+ - pattern: 余地はない
39
+ group: end
40
+ - pattern: だけ
41
+ group: exempt
42
+ - pattern: ばかり
43
+ group: exempt
44
+ - pattern: のみ
45
+ group: exempt
46
+ - pattern: べき
47
+ group: exempt
48
+ - pattern: 簡単
49
+ group: exempt
50
+ - pattern: 容易
51
+ group: exempt
52
+ - pattern: 明確
53
+ group: exempt
54
+ - pattern: 適切
55
+ group: exempt
56
+ - pattern: 十分
57
+ group: exempt
58
+ - pattern: 過言
59
+ group: exempt
60
+ - pattern: ゼロ
61
+ group: exempt
62
+ - pattern: 限り
63
+ group: exempt
64
+ - pattern: ので
65
+ group: basis
66
+ - pattern: ため
67
+ group: basis
68
+ - pattern: から
69
+ group: basis
70
+ - pattern: により
71
+ group: basis
72
+ - pattern: によって
73
+ group: basis
74
+ - pattern: 以上、
75
+ group: basis
76
+ - pattern: のではありません
77
+ group: reason
78
+ - pattern: のではない
79
+ group: reason
80
+ - pattern: と思う
81
+ group: premise
82
+ - pattern: と思わ
83
+ group: premise
84
+ - pattern: と思い
85
+ group: premise
86
+ - pattern: と考え
87
+ group: premise
88
+ - pattern: と言われ
89
+ group: premise
90
+ - pattern: といわれ
91
+ group: premise
92
+ - pattern: かもしれ
93
+ group: premise
94
+ - pattern: と感じ
95
+ group: premise
96
+ - pattern: と誤解
97
+ group: premise
98
+ - pattern: か
99
+ group: question
@@ -0,0 +1,9 @@
1
+ # 次の段落が他の文書の文をそのまま写したものだと言う前置きの言葉(「同条は次のように規定している:」)。前置きはコロンで終わる。
2
+ # max-sentence-length はその次の段落を測らない。前置きのどこにあってもよい。
3
+ id: verbatim-lead
4
+ language: ja
5
+ entries:
6
+ - pattern: 次のように規定
7
+ - pattern: 次のとおり規定
8
+ - pattern: 以下のように規定
9
+ - pattern: 以下のとおり規定
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chaffjs/lang-ja",
3
- "version": "0.37.0",
3
+ "version": "0.39.0",
4
4
  "description": "Japanese language adapter for chaff",
5
5
  "license": "MIT",
6
6
  "author": "isamu",
package/src/structure.ts CHANGED
@@ -12,8 +12,11 @@ import { deniesSaying } from "./denied-saying.ts";
12
12
  const NUMBER = "[0-90-9〇一二三四五六七八九十百千]{1,6}";
13
13
  const SPACE = "[ \\t\\u3000]";
14
14
 
15
- /** 見出しとして読めるのは、番号の直後が空白・括弧・行末のとき。「第3条に定める」は本文。 */
16
- const ARTICLE = new RegExp(`^${SPACE}*第(?<n>${NUMBER})条(?:の(?<sub>${NUMBER}))?(?<rest>(?:${SPACE}|(|\\().*|)$`, "u");
15
+ /**
16
+ * 見出しとして読めるのは、番号の直後が空白・括弧・行末のとき。「第3条に定める」は本文。
17
+ * ひな形が選択肢ごとに項を見出しにした「第1条1項(オプション1:…)」は第1条の見出し。項の後ろは括弧に限る(「第3条第2項中」は改める文)。
18
+ */
19
+ const ARTICLE = new RegExp(`^${SPACE}*第(?<n>${NUMBER})条(?:の(?<sub>${NUMBER}))?(?:第?${NUMBER}項(?=[((]))?(?<rest>(?:${SPACE}|(|\\().*|)$`, "u");
17
20
  /**
18
21
  * 見出しの行では、題を詰めて書いた「第7条委託」「第2章概要」も読む。後ろが平仮名(「第3条に定める」「第2章では」)、
19
22
  * 次の番号(「第2章第1節」)、並べる語(「第4条及び第5条」「第2条若しくは第3条」「第2条乃至第5条」)なら、番号は題の札でないので読まない。