hanlint 0.0.18 โ†’ 0.0.19

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 (125) hide show
  1. package/README.md +17 -16
  2. package/data/calqueFrame.json +20 -20
  3. package/data/cliches.json +33 -33
  4. package/data/confusable.json +20 -20
  5. package/data/easyWords.json +12 -12
  6. package/data/exemplars.json +30 -30
  7. package/data/hiddenDeps.txt +11 -11
  8. package/data/japaneseLoan.json +27 -27
  9. package/data/koreanProse.txt +31 -31
  10. package/data/patterns.json +26 -26
  11. package/data/phraseRepeat.json +2 -2
  12. package/data/platformApis.txt +11 -11
  13. package/data/redundantPair.json +16 -16
  14. package/data/ruleDocs.json +56 -56
  15. package/data/screenNarration.json +10 -10
  16. package/data/screenSentence.json +12 -12
  17. package/data/screenTone.json +6 -6
  18. package/data/screenWord.json +70 -70
  19. package/data/spacing.json +11 -11
  20. package/data/spelling.json +29 -29
  21. package/data/translationese.json +23 -24
  22. package/data/usageCounts.report.json +2 -2
  23. package/data/version.json +1 -1
  24. package/package.json +1 -1
  25. package/src/analysis/grammar/ending.js +1 -1
  26. package/src/analysis/grammar/hangul.js +4 -4
  27. package/src/analysis/grammar/josa.js +1 -1
  28. package/src/analysis/grammar/register.js +1 -1
  29. package/src/analysis/grammar/voice.js +1 -1
  30. package/src/analysis/index.js +2 -2
  31. package/src/analysis/josa.js +1 -1
  32. package/src/analysis/splitSentences.js +1 -1
  33. package/src/analysis/tokenize.js +13 -13
  34. package/src/baseline/store.js +8 -8
  35. package/src/cli/help.js +11 -11
  36. package/src/cli/main.js +135 -124
  37. package/src/cli/walk.js +1 -1
  38. package/src/cli/welcome.js +8 -8
  39. package/src/config/loadConfig.js +3 -3
  40. package/src/config/patch.js +6 -6
  41. package/src/config/readerContract.js +26 -26
  42. package/src/config/settings.js +30 -28
  43. package/src/config/toml.js +9 -9
  44. package/src/data/exemplars.js +21 -21
  45. package/src/data/load.js +6 -6
  46. package/src/data/operations.js +14 -14
  47. package/src/data/patches.js +10 -10
  48. package/src/data/patterns.js +5 -5
  49. package/src/data/profiles.js +5 -5
  50. package/src/data/prose.js +5 -5
  51. package/src/document/model.js +4 -4
  52. package/src/document/parseMarkdown.js +7 -7
  53. package/src/document/plainText.js +3 -3
  54. package/src/document/sourceText.js +24 -24
  55. package/src/edit/applyFixes.js +0 -0
  56. package/src/fingerprint/build.js +6 -6
  57. package/src/fingerprint/codeBlocks.js +3 -3
  58. package/src/fingerprint/codeMarkers.js +4 -4
  59. package/src/fingerprint/dictionaries.js +7 -7
  60. package/src/fingerprint/markers.js +7 -7
  61. package/src/fingerprint/readerState.js +9 -9
  62. package/src/fingerprint/sourceSentence.js +1 -1
  63. package/src/fingerprint/topics.js +1 -1
  64. package/src/guard/contract.js +6 -6
  65. package/src/guard/editLocality.js +1 -1
  66. package/src/guard/outline.js +1 -1
  67. package/src/guard/receipt.js +13 -13
  68. package/src/guard/surface.js +4 -4
  69. package/src/index.js +6 -6
  70. package/src/learn/edits.js +2 -2
  71. package/src/learn/operations.js +1 -1
  72. package/src/regex.js +2 -2
  73. package/src/report/compactReport.js +3 -3
  74. package/src/report/fingerprintJson.js +2 -2
  75. package/src/report/githubReport.js +1 -1
  76. package/src/report/jsonReport.js +2 -2
  77. package/src/report/registerMatch.js +2 -2
  78. package/src/report/sheet.js +16 -16
  79. package/src/report/textReport.js +12 -12
  80. package/src/report/writingSpec.js +15 -15
  81. package/src/rules/code/inputFileSource.js +1 -1
  82. package/src/rules/code/installImport.js +2 -2
  83. package/src/rules/code/platformApi.js +1 -1
  84. package/src/rules/document/countMismatch.js +2 -1
  85. package/src/rules/document/enoughOnce.js +2 -1
  86. package/src/rules/document/fieldEcho.js +10 -6
  87. package/src/rules/document/keywordHeading.js +1 -1
  88. package/src/rules/document/keywordMissing.js +1 -1
  89. package/src/rules/document/noQuestion.js +2 -2
  90. package/src/rules/document/promiseRecall.js +1 -1
  91. package/src/rules/document/tableOddCell.js +1 -1
  92. package/src/rules/finding.js +4 -4
  93. package/src/rules/paragraph/factListParagraph.js +1 -1
  94. package/src/rules/paragraph/paraFragment.js +1 -1
  95. package/src/rules/readerDebt.js +1 -1
  96. package/src/rules/registry.js +26 -26
  97. package/src/rules/sentence/connectorRepeat.js +2 -1
  98. package/src/rules/sentence/danglingDeixis.js +1 -1
  99. package/src/rules/sentence/dash.js +1 -1
  100. package/src/rules/sentence/deixis.js +1 -1
  101. package/src/rules/sentence/doubleNegative.js +2 -1
  102. package/src/rules/sentence/doublePassive.js +2 -1
  103. package/src/rules/sentence/draftHistory.js +2 -1
  104. package/src/rules/sentence/endingRepeat.js +3 -2
  105. package/src/rules/sentence/euiChain.js +1 -1
  106. package/src/rules/sentence/fillerOpener.js +1 -1
  107. package/src/rules/sentence/imperativePeriod.js +1 -1
  108. package/src/rules/sentence/longSentence.js +1 -1
  109. package/src/rules/sentence/negationRedefine.js +1 -1
  110. package/src/rules/sentence/numberOrphan.js +1 -1
  111. package/src/rules/sentence/outsideProfile.js +8 -3
  112. package/src/rules/sentence/phraseRepeat.js +2 -1
  113. package/src/rules/shared/candidates.js +2 -2
  114. package/src/rules/shared/dictionaryRule.js +9 -2
  115. package/src/rules/shared/repeat.js +2 -2
  116. package/src/rules/structure/bridgeRepeat.js +3 -3
  117. package/src/rules/structure/emojiBullet.js +1 -1
  118. package/src/rules/structure/headingSkip.js +1 -1
  119. package/src/rules/structure/headingUniform.js +2 -1
  120. package/src/rules/structure/loneSubheading.js +1 -1
  121. package/src/rules/structure/moreLater.js +1 -1
  122. package/src/text.js +2 -2
  123. package/src/usage/counts.js +3 -3
  124. package/src/usage/index.js +3 -3
  125. package/src/usage/sentences.js +17 -17
@@ -1,22 +1,22 @@
1
1
  // @ts-check
2
2
  /**
3
3
  * ์†Œ์Šค ํŒŒ์ผ์˜ ๊ธ€ ๋งˆ๋””. ์‚ฌ๋žŒ์ด ์ฝ๋Š” ํ•œ๊ตญ์–ด ๋ฌธ์ž์—ด ๋ฆฌํ„ฐ๋Ÿด๊ณผ JSX ๊ธ€์„ ์ค„ ๋ฒˆํ˜ธ์™€ ํ•จ๊ป˜ ๋ฝ‘๋Š”๋‹ค.
4
- * ๋œป๊ณผ ๊ทœ์น™์€ ํŒŒ์ด์ฌ document/sourceText.py ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. ์—ฌ๊ธฐ๋Š” ๊ฐ™์€ ๊ฐ’์„ ๋‚ธ๋‹ค.
4
+ * ๋œป๊ณผ ๊ทœ์น™์€ ํŒŒ์ด์ฌ document/sourceText.py๊ฐ€ ์ •ํ•œ๋‹ค. ์—ฌ๊ธฐ๋Š” ๊ฐ™์€ ๊ฐ’์„ ๋‚ธ๋‹ค.
5
5
  */
6
6
 
7
7
  export const SOURCE_SUFFIXES = [".js", ".jsx", ".mjs", ".cjs", ".ts", ".tsx", ".rs", ".py", ".html", ".htm", ".vue", ".svelte"];
8
- /** ํƒœ๊ทธ ์‚ฌ์ด ๊ธ€๊ณผ ์†์„ฑ๊ฐ’์„ JSX ์™€ ๊ฐ™์€ ๊ธธ๋กœ ์ฝ๋Š” ํŒŒ์ผ. HTML ์ฃผ์„ `<!-- -->` ์„ ๊ฑท์–ด๋‚ธ๋‹ค. */
8
+ /** ํƒœ๊ทธ ์‚ฌ์ด ๊ธ€๊ณผ ์†์„ฑ๊ฐ’์„ JSX์™€ ๊ฐ™์€ ๊ธธ๋กœ ์ฝ๋Š” ํŒŒ์ผ. HTML ์ฃผ์„ `<!-- -->`์„ ๊ฑท์–ด๋‚ธ๋‹ค. */
9
9
  const MARKUP_SUFFIXES = [".html", ".htm", ".vue", ".svelte"];
10
10
 
11
11
  const KOREAN = /[๊ฐ€-ํžฃ]/;
12
- // ๋ฌธ์ž์—ด์˜ ๊ฒฝ๊ณ„. ์ค„์„ ์•ž์—์„œ๋ถ€ํ„ฐ ํ›‘์–ด ์—ฌ๋Š” ๋”ฐ์˜ดํ‘œ์—์„œ ๊ฐ™์€ ๋‹ซ๋Š” ๋”ฐ์˜ดํ‘œ๊นŒ์ง€๋ฅผ ํ•œ ๋งˆ๋””๋กœ ๋ณธ๋‹ค. ํŒŒ์ด์ฌ sourceText.py ์™€ ๊ฐ™๋‹ค.
12
+ // ๋ฌธ์ž์—ด์˜ ๊ฒฝ๊ณ„. ์ค„์„ ์•ž์—์„œ๋ถ€ํ„ฐ ํ›‘์–ด ์—ฌ๋Š” ๋”ฐ์˜ดํ‘œ์—์„œ ๊ฐ™์€ ๋‹ซ๋Š” ๋”ฐ์˜ดํ‘œ๊นŒ์ง€๋ฅผ ํ•œ ๋งˆ๋””๋กœ ๋ณธ๋‹ค. ํŒŒ์ด์ฌ sourceText.py์™€ ๊ฐ™๋‹ค.
13
13
  const QUOTES = ["'", '"', "`"];
14
14
  const BLOCK_COMMENT = /\/\*[\s\S]*?\*\//g;
15
15
  const HTML_COMMENT = /<!--[\s\S]*?-->/g;
16
16
  const DEVELOPER_LINE = /new Error\(|console\.|panic!\(|expect\(|assert/;
17
17
  const RUST_CONTINUATION = /\\\r?\n[ \t]*/g;
18
18
  const RUST_TEST_MARKER = "#[cfg(test)]";
19
- /** ๋ฌธ์žฅ์„ ๋Š์ง€ ์•Š๋Š” HTML ์ธ๋ผ์ธ ํƒœ๊ทธ. ๊ฐ™์€ ์ค„์—์„œ ์ด ํƒœ๊ทธ๋งŒ ์‚ฌ์ด์— ๋‘” ๊ธ€ ์กฐ๊ฐ์€ ํ•œ ๋งˆ๋””๋กœ ์ž‡๋Š”๋‹ค. ํŒŒ์ด์ฌ INLINE_TAGS ์™€ ๊ฐ™๋‹ค. */
19
+ /** ๋ฌธ์žฅ์„ ๋Š์ง€ ์•Š๋Š” HTML ์ธ๋ผ์ธ ํƒœ๊ทธ. ๊ฐ™์€ ์ค„์—์„œ ์ด ํƒœ๊ทธ๋งŒ ์‚ฌ์ด์— ๋‘” ๊ธ€ ์กฐ๊ฐ์€ ํ•œ ๋งˆ๋””๋กœ ์ž‡๋Š”๋‹ค. ํŒŒ์ด์ฌ INLINE_TAGS์™€ ๊ฐ™๋‹ค. */
20
20
  const INLINE_TAGS = new Set("a abbr b bdi bdo cite code data del dfn em i ins kbd mark q s samp small span strong sub sup time u var wbr br".split(" "));
21
21
  const INLINE_TAG = /<\/?([a-zA-Z][a-zA-Z0-9]*)[^<>]*>/g;
22
22
  const INLINE_GAP = /^(?:\s*<\/?[a-zA-Z][a-zA-Z0-9]*[^<>]*>)+\s*$/;
@@ -32,11 +32,11 @@ const HEAD_TEXT = /^\s*[^<\s][^<]*(?=<\/)/;
32
32
  * @typedef {object} SourceLiteral
33
33
  * @property {number} line 1๋ถ€ํ„ฐ ์„ธ๋Š” ์ค„ ๋ฒˆํ˜ธ. ์—ฌ๋Ÿฌ ์ค„์„ ์ด์€ ๋Ÿฌ์ŠคํŠธ ๋ฌธ์ž์—ด์€ ์‹œ์ž‘ ์ค„์ด๋‹ค
34
34
  * @property {string} text ๋”ฐ์˜ดํ‘œ์™€ ํƒœ๊ทธ๋ฅผ ๋บ€ ๊ธ€. ํŒŒ์ผ์— ์žˆ๋Š” ๊ทธ๋Œ€๋กœ๋ผ ๋˜๋Œ๋ ค ์“ธ ๋•Œ ์ฐพ์„ ์ˆ˜ ์žˆ๋‹ค
35
- * @property {string} plain ๊ฒ€์‚ฌ์— ์“ฐ๋Š” ๊ธ€. ์‹ (`${...}`, `{...}`) ์„ ๋น„์šฐ๊ณ  ๊ณต๋ฐฑ์„ ํ•˜๋‚˜๋กœ ๋ชจ์•˜๋‹ค
36
- * @property {number} column 1๋ถ€ํ„ฐ ์„ธ๋Š” ์นธ. ๊ทธ ์ค„์—์„œ text ๊ฐ€ ์‹œ์ž‘ํ•˜๋Š” ์ž๋ฆฌ
35
+ * @property {string} plain ๊ฒ€์‚ฌ์— ์“ฐ๋Š” ๊ธ€. ์‹(`${...}`, `{...}`)์„ ๋น„์šฐ๊ณ  ๊ณต๋ฐฑ์„ ํ•˜๋‚˜๋กœ ๋ชจ์•˜๋‹ค
36
+ * @property {number} column 1๋ถ€ํ„ฐ ์„ธ๋Š” ์นธ. ๊ทธ ์ค„์—์„œ text๊ฐ€ ์‹œ์ž‘ํ•˜๋Š” ์œ„์น˜
37
37
  */
38
38
 
39
- /** `start` ์˜ `{` ๋ฅผ ๋‹ซ๋Š” `}` ์˜ ์ž๋ฆฌ. ๋œป์€ ํŒŒ์ด์ฌ balancedEnd ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} line @param {number} start */
39
+ /** `start`์˜ `{`๋ฅผ ๋‹ซ๋Š” `}`์˜ ์œ„์น˜. ๋œป์€ ํŒŒ์ด์ฌ balancedEnd๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} line @param {number} start */
40
40
  function balancedEnd(line, start) {
41
41
  let depth = 0;
42
42
  let index = start;
@@ -58,7 +58,7 @@ function balancedEnd(line, start) {
58
58
  return -1;
59
59
  }
60
60
 
61
- /** ๊ธ€์— ๋‚€ ์‹ `{...}` ์™€ `${...}` ์˜ [์‹œ์ž‘, ๋ ๋‹ค์Œ]. ๋œป์€ ํŒŒ์ด์ฌ expressionSpans ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} text @returns {[number, number][]} */
61
+ /** ๊ธ€์— ๋‚€ ์‹ `{...}`์™€ `${...}`์˜ [์‹œ์ž‘, ๋ ๋‹ค์Œ]. ๋œป์€ ํŒŒ์ด์ฌ expressionSpans๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} text @returns {[number, number][]} */
62
62
  export function expressionSpans(text) {
63
63
  /** @type {[number, number][]} */
64
64
  const spans = [];
@@ -77,7 +77,7 @@ export function expressionSpans(text) {
77
77
  return spans;
78
78
  }
79
79
 
80
- /** ํ…œํ”Œ๋ฆฟ ๋ฆฌํ„ฐ๋Ÿด์˜ `${ ... }` ์‹์„ ๊ฐ™์€ ๊ธธ์ด์˜ ๋นˆ์นธ์œผ๋กœ ๋ฐ”๊พผ๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ withoutTemplateExpressions ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} source */
80
+ /** ํ…œํ”Œ๋ฆฟ ๋ฆฌํ„ฐ๋Ÿด์˜ `${ ... }` ์‹์„ ๊ฐ™์€ ๊ธธ์ด์˜ ๋นˆ์นธ์œผ๋กœ ๋ฐ”๊พผ๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ withoutTemplateExpressions๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} source */
81
81
  export function withoutTemplateExpressions(source) {
82
82
  let output = source;
83
83
  for (const [start, end] of expressionSpans(source)) {
@@ -107,8 +107,8 @@ export function userFacingSource(source, path) {
107
107
 
108
108
 
109
109
  /**
110
- * ๋”ฐ์˜ดํ‘œ ๋ฐ–์˜ `//` ๋ถ€ํ„ฐ ์ž๋ฅธ๋‹ค. `https://` ์ฒ˜๋Ÿผ `:` ๋’ค์˜ `//` ๋Š” ์ฃผ์†Œ๋ผ ๋‘๊ณ , ๋ฌธ์ž์—ด ์•ˆ์˜ `//` ๋„ ๋‘”๋‹ค.
111
- * ๋œป์€ ํŒŒ์ด์ฌ document/sourceText.py ์˜ withoutLineComment ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค.
110
+ * ๋”ฐ์˜ดํ‘œ ๋ฐ–์˜ `//`๋ถ€ํ„ฐ ์ž๋ฅธ๋‹ค. `https://`์ฒ˜๋Ÿผ `:` ๋’ค์˜ `//`๋Š” ์ฃผ์†Œ๋ผ ๋‘๊ณ , ๋ฌธ์ž์—ด ์•ˆ์˜ `//`๋„ ๋‘”๋‹ค.
111
+ * ๋œป์€ ํŒŒ์ด์ฌ document/sourceText.py์˜ withoutLineComment๊ฐ€ ์ •ํ•œ๋‹ค.
112
112
  */
113
113
  export function withoutLineComment(line) {
114
114
  let quote = null;
@@ -132,12 +132,12 @@ export function plainText(text) {
132
132
  cursor = end;
133
133
  }
134
134
  plain += text.slice(cursor);
135
- // ์ธ๋ผ์ธ ํƒœ๊ทธ๋ฅผ ๋น„์šด๋‹ค. ์ด๋ฆ„์ด ์˜๋ฌธ์ž๋กœ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ๋งŒ์ด๋ผ `<๋Œ€์ƒ> ํ•„์š”` ์˜ ๊บพ์‡ ๋Š” ๋‚จ๋Š”๋‹ค.
135
+ // ์ธ๋ผ์ธ ํƒœ๊ทธ๋ฅผ ๋น„์šด๋‹ค. ์ด๋ฆ„์ด ์˜๋ฌธ์ž๋กœ ์‹œ์ž‘ํ•˜๋Š” ๊ฒƒ๋งŒ์ด๋ผ `<๋Œ€์ƒ> ํ•„์š”`์˜ ๊บพ์‡ ๋Š” ๋‚จ๋Š”๋‹ค.
136
136
  plain = plain.replace(INLINE_TAG, (tag, name) => (INLINE_TAGS.has(name.toLowerCase()) ? "" : tag));
137
137
  return plain.replace(/\s+/g, " ").trim();
138
138
  }
139
139
 
140
- /** `start` ์˜ ๋”ฐ์˜ดํ‘œ๋ฅผ ๋‹ซ๋Š” ์ž๋ฆฌ. ๋ฐฑํ‹ฑ ์•ˆ์˜ `${...}` ์€ ํ†ต์งธ๋กœ ๊ฑด๋„ˆ๋›ด๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ closingQuote ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} line @param {number} start */
140
+ /** `start`์˜ ๋”ฐ์˜ดํ‘œ๋ฅผ ๋‹ซ๋Š” ์œ„์น˜. ๋ฐฑํ‹ฑ ์•ˆ์˜ `${...}`์€ ํ†ต์งธ๋กœ ๊ฑด๋„ˆ๋›ด๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ closingQuote๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} line @param {number} start */
141
141
  function closingQuote(line, start) {
142
142
  const quote = line[start];
143
143
  let index = start + 1;
@@ -159,14 +159,14 @@ function closingQuote(line, start) {
159
159
  return -1;
160
160
  }
161
161
 
162
- /** `index` ์˜ `>` ๊ฐ€ JSX ์—ฌ๋Š” ํƒœ๊ทธ์˜ ๋์ธ๊ฐ€. ๋œป์€ ํŒŒ์ด์ฌ tagCloses ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} line @param {number} index */
162
+ /** `index`์˜ `>`๊ฐ€ JSX ์—ฌ๋Š” ํƒœ๊ทธ์˜ ๋์ธ๊ฐ€. ๋œป์€ ํŒŒ์ด์ฌ tagCloses๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} line @param {number} index */
163
163
  function tagCloses(line, index) {
164
164
  if (index === 0 || line[index + 1] === "=") return false;
165
165
  const before = line[index - 1];
166
166
  return "\"'}".includes(before) || /[A-Za-z0-9]/.test(before);
167
167
  }
168
168
 
169
- /** `start` ๋ถ€ํ„ฐ์˜ JSX ๊ธ€์ด ๋๋‚˜๋Š” `<` ์˜ ์ž๋ฆฌ. ์‹ ์•ˆ์˜ `<` ๋Š” ๊ธ€์˜ ๋์ด ์•„๋‹ˆ๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ jsxTextEnd ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} line @param {number} start */
169
+ /** `start`๋ถ€ํ„ฐ์˜ JSX ๊ธ€์ด ๋๋‚˜๋Š” `<`์˜ ์œ„์น˜. ์‹ ์•ˆ์˜ `<`๋Š” ๊ธ€์˜ ๋์ด ์•„๋‹ˆ๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ jsxTextEnd๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} line @param {number} start */
170
170
  function jsxTextEnd(line, start) {
171
171
  let index = start;
172
172
  while (index < line.length) {
@@ -183,7 +183,7 @@ function jsxTextEnd(line, start) {
183
183
  return -1;
184
184
  }
185
185
 
186
- /** ๊ธ€์— ๋‚€ ์‹ ์•ˆ์˜ ๊ธ€ ๋งˆ๋””. ๋œป์€ ํŒŒ์ด์ฌ innerLiterals ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} text @param {number} offset @returns {[number, string][]} */
186
+ /** ๊ธ€์— ๋‚€ ์‹ ์•ˆ์˜ ๊ธ€ ๋งˆ๋””. ๋œป์€ ํŒŒ์ด์ฌ innerLiterals๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} text @param {number} offset @returns {[number, string][]} */
187
187
  function innerLiterals(text, offset) {
188
188
  /** @type {[number, string][]} */
189
189
  const found = [];
@@ -194,10 +194,10 @@ function innerLiterals(text, offset) {
194
194
  return found;
195
195
  }
196
196
 
197
- /** ํ•œ ์ค„์˜ ๊ธ€ ๋งˆ๋””๋ฅผ [์‹œ์ž‘ ์ž๋ฆฌ, ๊ธ€] ๋กœ ๋‚˜์˜จ ์ฐจ๋ก€๋กœ. ๋œป์€ ํŒŒ์ด์ฌ lineLiterals ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค. @param {string} line @param {number} [offset] @returns {[number, string][]} */
197
+ /** ํ•œ ์ค„์˜ ๊ธ€ ๋งˆ๋””๋ฅผ [์‹œ์ž‘ ์œ„์น˜, ๊ธ€]๋กœ ๋‚˜์˜จ ์ฐจ๋ก€๋กœ. ๋œป์€ ํŒŒ์ด์ฌ lineLiterals๊ฐ€ ์ •ํ•œ๋‹ค. @param {string} line @param {number} [offset] @returns {[number, string][]} */
198
198
  /**
199
- * openEnded (๋งˆํฌ์—… ํŒŒ์ผ) ์ด๋ฉด ์—ฌ๋Š” ํƒœ๊ทธ ๋’ค ์ค„ ๋๊นŒ์ง€์˜ ๊ธ€๊ณผ ์ค„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹ซ๋Š” ํƒœ๊ทธ ์•ž๊นŒ์ง€์˜ ๊ธ€๋„ ๋งˆ๋””๋‹ค.
200
- * ๋œป์€ ํŒŒ์ด์ฌ lineLiterals ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค.
199
+ * openEnded(๋งˆํฌ์—… ํŒŒ์ผ)์ด๋ฉด ์—ฌ๋Š” ํƒœ๊ทธ ๋’ค ์ค„ ๋๊นŒ์ง€์˜ ๊ธ€๊ณผ ์ค„ ์ฒ˜์Œ๋ถ€ํ„ฐ ๋‹ซ๋Š” ํƒœ๊ทธ ์•ž๊นŒ์ง€์˜ ๊ธ€๋„ ๋งˆ๋””๋‹ค.
200
+ * ๋œป์€ ํŒŒ์ด์ฌ lineLiterals๊ฐ€ ์ •ํ•œ๋‹ค.
201
201
  * @param {string} line @param {number} [offset] @param {boolean} [openEnded]
202
202
  */
203
203
  export function lineLiterals(line, offset = 0, openEnded = false) {
@@ -239,7 +239,7 @@ export function lineLiterals(line, offset = 0, openEnded = false) {
239
239
 
240
240
  /**
241
241
  * ์‚ฌ์ด๊ฐ€ ์ธ๋ผ์ธ ํƒœ๊ทธ๋ฟ์ธ ํƒœ๊ทธ ์‚ฌ์ด ๊ธ€ ์กฐ๊ฐ์„ ํ•œ ๋งˆ๋””๋กœ ์ž‡๋Š”๋‹ค. ํƒœ๊ทธ ์•ˆ์˜ ์†์„ฑ ๋ฌธ์ž์—ด์€ ์ž‡๊ธฐ์— ๋ผ์ง€ ์•Š๊ณ  ์ œ ๋งˆ๋””๋กœ ๋‚จ๋Š”๋‹ค.
242
- * ๋œป์€ ํŒŒ์ด์ฌ joinInline ์ด ์†Œ์œ ํ•œ๋‹ค.
242
+ * ๋œป์€ ํŒŒ์ด์ฌ joinInline์ด ์ •ํ•œ๋‹ค.
243
243
  * @param {string} line @param {[number, string][]} found @param {number} offset @returns {[number, string][]}
244
244
  */
245
245
  function joinInline(line, found, offset) {
@@ -263,13 +263,13 @@ function joinInline(line, found, offset) {
263
263
  return [...joined, ...attributes].sort((a, b) => a[0] - b[0]);
264
264
  }
265
265
 
266
- /** position ์ด ํƒœ๊ทธ ์•ˆ (`<` ๋’ค, `>` ์•ž) ์ธ๊ฐ€. @param {string} line @param {number} position */
266
+ /** position์ด ํƒœ๊ทธ ์•ˆ(`<` ๋’ค, `>` ์•ž)์ธ๊ฐ€. @param {string} line @param {number} position */
267
267
  function insideTag(line, position) {
268
268
  const opened = line.lastIndexOf("<", position - 1);
269
269
  return opened >= 0 && line.lastIndexOf(">", position - 1) < opened;
270
270
  }
271
271
 
272
- /** ์‚ฌ์ด๊ฐ€ ์ธ๋ผ์ธ ํƒœ๊ทธ๋ฟ์ด๊ณ  ํ˜•์ œ (`</a><a>`) ๊ฐ€ ์•„๋‹ˆ๋‹ค. @param {string} gap */
272
+ /** ์‚ฌ์ด๊ฐ€ ์ธ๋ผ์ธ ํƒœ๊ทธ๋ฟ์ด๊ณ  ํ˜•์ œ(`</a><a>`)๊ฐ€ ์•„๋‹ˆ๋‹ค. @param {string} gap */
273
273
  function inlineOnly(gap) {
274
274
  if (!INLINE_GAP.test(gap) || SIBLING_GAP.test(gap)) return false;
275
275
  return [...gap.matchAll(INLINE_TAG)].every((match) => INLINE_TAGS.has(match[1].toLowerCase()));
@@ -280,7 +280,7 @@ export function sourceLiterals(source, path = "") {
280
280
  /** @type {SourceLiteral[]} */
281
281
  const found = [];
282
282
  const markup = MARKUP_SUFFIXES.some((suffix) => path.endsWith(suffix));
283
- // ๋งˆํฌ์—…์€ ์ฃผ์„ ์ง€์šฐ๊ธฐ๊ฐ€ ์ค„ ์ˆ˜๋ฅผ ์ง€ํ‚ค๋ฏ€๋กœ ์›๋ฌธ ์ค„๊ณผ ๋‚˜๋ž€ํžˆ ๊ฐ„๋‹ค. script ๋ธ”๋ก ํŒ์ •์€ ์›๋ฌธ ์ค„๋กœ ํ•œ๋‹ค (`// ์ฃผ์„</script>` ๊ฐ€ ์ง€์›Œ์ ธ๋„).
283
+ // ๋งˆํฌ์—…์€ ์ฃผ์„ ์ง€์šฐ๊ธฐ๊ฐ€ ์ค„ ์ˆ˜๋ฅผ ์ง€ํ‚ค๋ฏ€๋กœ ์›๋ฌธ ์ค„๊ณผ ๋‚˜๋ž€ํžˆ ๊ฐ„๋‹ค. script ๋ธ”๋ก ํŒ์ •์€ ์›๋ฌธ ์ค„๋กœ ํ•œ๋‹ค (`// ์ฃผ์„</script>`๊ฐ€ ์ง€์›Œ์ ธ๋„).
284
284
  const rawLines = markup ? source.split("\n") : [];
285
285
  let inCode = false;
286
286
  userFacingSource(source, path).split("\n").forEach((line, index) => {
@@ -304,7 +304,7 @@ export function sourceLiterals(source, path = "") {
304
304
  }
305
305
 
306
306
  /**
307
- * ํ•œ ์ค„ ์•ˆ์—์„œ ๊ธ€ `old` ๋ฅผ `new` ๋กœ ๋ฐ”๊พผ๋‹ค. ๋ช‡ ๋ฒˆ ๋‚˜์™”๋Š”์ง€ ๊ฐ™์ด ์ค€๋‹ค (ํ•œ ๋ฒˆ์ผ ๋•Œ๋งŒ ๋ฐ”๊พผ ๊ฒƒ์ด ํ™•์ •์ด๋‹ค).
307
+ * ํ•œ ์ค„ ์•ˆ์—์„œ ๊ธ€ `old`๋ฅผ `new`๋กœ ๋ฐ”๊พผ๋‹ค. ๋ช‡ ๋ฒˆ ๋‚˜์™”๋Š”์ง€ ๊ฐ™์ด ์ค€๋‹ค (ํ•œ ๋ฒˆ์ผ ๋•Œ๋งŒ ๋ฐ”๊พผ ๊ฒƒ์ด ํ™•์ •์ด๋‹ค).
308
308
  * @param {string} lineText @param {string} oldText @param {string} newText @returns {[string, number]}
309
309
  */
310
310
  export function replaceLiteral(lineText, oldText, newText) {
Binary file
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** ๋ฌธ์„œ ๋ชจ๋ธ์„ ํ•œ ๋ฒˆ ํ›‘์–ด ๊ธ€ ์ง€๋ฌธ์„ ๋งŒ๋“ ๋‹ค. ํ…์ŠคํŠธ๋ฅผ ์ฝ๋Š” ์œ ์ผํ•œ ์ž๋ฆฌ๋‹ค. ํŒŒ์ด์ฌ fingerprint/build.py ์™€ ๊ฐ™๋‹ค. */
2
+ /** ๋ฌธ์„œ ๋ชจ๋ธ์„ ํ•œ ๋ฒˆ ํ›‘์–ด ๊ธ€ ๋ถ„์„ ๊ฒฐ๊ณผ๋ฅผ ๋งŒ๋“ ๋‹ค. ํ…์ŠคํŠธ๋ฅผ ์ฝ๋Š” ๊ณณ์€ ์—ฌ๊ธฐ ํ•˜๋‚˜๋‹ค. ํŒŒ์ด์ฌ fingerprint/build.py์™€ ๊ฐ™๋‹ค. */
3
3
  import { defaultConfig } from "../config/settings.js";
4
4
  import { NONE as NO_REGISTER, documentRegister, lastWord, registerOfWord } from "../analysis/grammar/register.js";
5
5
  import { doublePassiveSpans, euiCount, longestNounRun, splitSentences } from "../analysis/index.js";
@@ -88,9 +88,9 @@ import { overlap, topicsOf, unionOf } from "./topics.js";
88
88
  * @property {number} readerCallCount
89
89
  * @property {[number, string, number, string][]} countPromises (์ˆ˜, ๋‹จ์œ„, ์ค„, ์›๋ฌธ)
90
90
  * @property {import("./codeBlocks.js").CodeBlock[]} codeBlocks ์ฝ”๋“œ ํŽœ์Šค๋ฅผ ์–ธ์–ด์™€ ๋ณธ๋ฌธ ์ค„๋กœ ํ‘ผ ๊ฒƒ
91
- * @property {import("./readerState.js").ReaderTrail} reader ์ž๋ฆฌ๋งˆ๋‹ค์˜ ๋…์ž ์ƒํƒœ. ์•ฝ์†๊ณผ ํšŒ์ˆ˜ ํ‘œ์ง€๋Š” final ์— ์žˆ๋‹ค
91
+ * @property {import("./readerState.js").ReaderTrail} reader ์œ„์น˜๋งˆ๋‹ค์˜ ๋…์ž ์ƒํƒœ. ์•ฝ์†ํ•˜๋Š” ๋ง๊ณผ ๋‹ค์‹œ ๋‹ค๋ฃจ๋Š” ๋ง์€ final์— ์žˆ๋‹ค
92
92
  * @property {[string, number, number][]} disabled
93
- * @property {import("../document/model.js").Block[]} ignored ์„ค์ •์ด ์ง€๋ฌธ์—์„œ ๋บ€ ํŽœ์Šค
93
+ * @property {import("../document/model.js").Block[]} ignored ์„ค์ •์ด ๊ธ€ ๋ถ„์„์—์„œ ๋บ€ ํŽœ์Šค
94
94
  * @property {string} register
95
95
  * @property {number} registerShare
96
96
  * @property {SectionPrint} intro
@@ -131,7 +131,7 @@ function makeSentencePrint(build, text, line, block, sectionIndex, quoted) {
131
131
  const { entries } = build;
132
132
  const ending = markers.endingOf(text);
133
133
  const protectedSpans = markers.termSpans(text, build.protectedTerms);
134
- // ์ธ์šฉ ์•ˆ์˜ ๊ฒƒ๊ณผ ๋ณดํ˜ธํ•œ ์šฉ์–ด์— ๊ฑธ์นœ ๊ฒƒ์€ ๋บ€๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ fingerprint/build.py ์˜ kept ๊ฐ€ ์ •ํ•œ๋‹ค.
134
+ // ์ธ์šฉ ์•ˆ์˜ ๊ฒƒ๊ณผ ๋ณดํ˜ธํ•œ ์šฉ์–ด์— ๊ฑธ์นœ ๊ฒƒ์€ ๋บ€๋‹ค. ๋œป์€ ํŒŒ์ด์ฌ fingerprint/build.py์˜ kept๊ฐ€ ์ •ํ•œ๋‹ค.
135
135
  /** @param {number} start @param {number} end */
136
136
  const kept = (start, end) => !markers.insideAny(start, end, quoted) && !markers.overlapsAny(start, end, protectedSpans);
137
137
  const deixis = markers
@@ -233,7 +233,7 @@ function buildSection(build, section, sectionIndex) {
233
233
  const line = block.startLine + countIn(text, "\n", sentence.start);
234
234
  const quoted = quotedIn(sentence, blockSpans);
235
235
  const made = makeSentencePrint(build, sentence.text, line, block, sectionIndex, quoted);
236
- // ๋งŒ๋“  ์ž๋ฆฌ์—์„œ ๋ฐ”๋กœ ์Œ“๋Š”๋‹ค. ๋‹ค์Œ ๋ฌธ์žฅ์˜ index ๊ฐ€ ์ด ๊ธธ์ด์—์„œ ๋‚˜์˜ค๋ฏ€๋กœ ๋ฏธ๋ฃจ๋ฉด ์…ˆ์ด ์–ด๊ธ‹๋‚œ๋‹ค.
236
+ // ๋งŒ๋“  ๊ณณ์—์„œ ๋ฐ”๋กœ ์Œ“๋Š”๋‹ค. ๋‹ค์Œ ๋ฌธ์žฅ์˜ index๊ฐ€ ์ด ๊ธธ์ด์—์„œ ๋‚˜์˜ค๋ฏ€๋กœ ๋ฏธ๋ฃจ๋ฉด ์…ˆ์ด ์–ด๊ธ‹๋‚œ๋‹ค.
237
237
  sentences.push(made);
238
238
  blockSentences.push(made);
239
239
  }
@@ -269,7 +269,7 @@ function buildSection(build, section, sectionIndex) {
269
269
  * @returns {DocumentPrint}
270
270
  */
271
271
  export function buildFingerprint(doc, config = defaultConfig()) {
272
- // ์ฝ”๋“œ๋„ ์‚ฐ๋ฌธ๋„ ์•„๋‹Œ ํŽœ์Šค๋Š” ์ง€๋ฌธ์— ๋“ค์–ด์˜ค๊ธฐ ์ „์— ๋บ€๋‹ค. ๋ชจ๋“  ์ง„์ž…์ ์ด ์—ฌ๊ธฐ๋ฅผ ์ง€๋‚˜๋ฏ€๋กœ ํ•œ ์ž๋ฆฌ๋ฉด ๋œ๋‹ค.
272
+ // ์ฝ”๋“œ๋„ ์‚ฐ๋ฌธ๋„ ์•„๋‹Œ ํŽœ์Šค๋Š” ๋ถ„์„์— ๋“ค์–ด์˜ค๊ธฐ ์ „์— ๋บ€๋‹ค. ๋ชจ๋“  ์ง„์ž…์ ์ด ์—ฌ๊ธฐ๋ฅผ ์ง€๋‚˜๋ฏ€๋กœ ํ•œ ๊ณณ์ด๋ฉด ๋œ๋‹ค.
273
273
  doc = dropFences(doc, config.ignoreFences);
274
274
  const build = {
275
275
  entries: entriesFor(config),
@@ -1,8 +1,8 @@
1
1
  // @ts-check
2
2
  /**
3
- * ์ฝ”๋“œ ๋ธ”๋ก์„ ์–ธ์–ด์™€ ๋ณธ๋ฌธ์œผ๋กœ ๋‚˜๋ˆˆ๋‹ค. ์ง€๋ฌธ์ด ํ•œ ๋ฒˆ ๋งŒ๋“ค๊ณ  (DocumentPrint.codeBlocks) code ๋ถ€๋ฅ˜ ๊ทœ์น™๊ณผ ๋…์ž ์ƒํƒœ๊ฐ€
4
- * ์ฝ๋Š”๋‹ค. ํŒŒ์ด์ฌ fingerprint/codeBlocks.py ์™€ ๊ฐ™๋‹ค.
5
- * ํŽœ์Šค ์ฒซ ์ค„์˜ ์–ธ์–ด ํ‘œ๊ธฐ (```python) ๋ฅผ ์ฝ๊ณ  ๋ณธ๋ฌธ ์ค„์— ์›๋ฌธ ์ค„ ๋ฒˆํ˜ธ๋ฅผ ๋ถ™์ธ๋‹ค. text ํŽœ์Šค๋Š” ์ถœ๋ ฅ์ด๋‹ค.
3
+ * ์ฝ”๋“œ ๋ธ”๋ก์„ ์–ธ์–ด์™€ ๋ณธ๋ฌธ์œผ๋กœ ๋‚˜๋ˆˆ๋‹ค. ๊ธ€ ๋ถ„์„์ด ํ•œ ๋ฒˆ ๋งŒ๋“ค๊ณ (DocumentPrint.codeBlocks) code ๋ฌถ์Œ ๊ทœ์น™๊ณผ ๋…์ž ์ƒํƒœ๊ฐ€
4
+ * ์ฝ๋Š”๋‹ค. ํŒŒ์ด์ฌ fingerprint/codeBlocks.py์™€ ๊ฐ™๋‹ค.
5
+ * ํŽœ์Šค ์ฒซ ์ค„์˜ ์–ธ์–ด ํ‘œ๊ธฐ(```python)๋ฅผ ์ฝ๊ณ  ๋ณธ๋ฌธ ์ค„์— ์›๋ฌธ ์ค„ ๋ฒˆํ˜ธ๋ฅผ ๋ถ™์ธ๋‹ค. text ํŽœ์Šค๋Š” ์ถœ๋ ฅ์ด๋‹ค.
6
6
  */
7
7
  import { CODE } from "../document/model.js";
8
8
  import { fenceLanguage } from "../document/parseMarkdown.js";
@@ -1,7 +1,7 @@
1
1
  // @ts-check
2
2
  /**
3
3
  * ์ฝ”๋“œ ์ค„์—์„œ ํŒŒ์ผ์˜ ๊ณต๊ธ‰๊ณผ ์ˆ˜์š”๋ฅผ ์ฝ๋Š”๋‹ค. ์–ด๋–ค ์ค„์ด ํŒŒ์ผ์„ ๋งŒ๋“ค๊ณ  (์“ฐ๊ธฐ, ํด๋” ๋งŒ๋“ค๊ธฐ) ์–ด๋–ค ์ค„์ด ํŒŒ์ผ์„ ์ฝ๋Š”๊ฐ€.
4
- * ํŒŒ์ด์ฌ fingerprint/codeMarkers.py ์™€ ๊ฐ™๋‹ค. ์ค„๋งˆ๋‹ค ๋Œ€์กฐํ•˜๋ฏ€๋กœ ์—ฌ๋Ÿฌ ์ค„์— ๊ฑธ์นœ ํ˜ธ์ถœ์€ ๋ณด์ง€ ์•Š๋Š”๋‹ค.
4
+ * ํŒŒ์ด์ฌ fingerprint/codeMarkers.py์™€ ๊ฐ™๋‹ค. ์ค„๋งˆ๋‹ค ๋Œ€์กฐํ•˜๋ฏ€๋กœ ์—ฌ๋Ÿฌ ์ค„์— ๊ฑธ์นœ ํ˜ธ์ถœ์€ ๋ณด์ง€ ์•Š๋Š”๋‹ค.
5
5
  */
6
6
 
7
7
  const QUOTED = "\\(\\s*[\"']([^\"'\\n]+)[\"']";
@@ -19,7 +19,7 @@ const WRITES = new RegExp(
19
19
  const SHELL_WRITES = /(?:>>?|-o|-O|--output|Out-File)\s*["']?([\w./\\-]+\.[A-Za-z0-9]+)/g;
20
20
  const SQL_PATHS = /FROM\s+'([^']+\.(?:csv|parquet|json|xlsx))'/gi;
21
21
  const MAKES_DIR = /(?:mkdir(?:\s+-p)?|makedirs|md)\s*\(?\s*["']?([\w./\\-]+)|Path\(\s*["']([^"']+)["']\s*\)\.mkdir/g;
22
- /** open ์˜ ๋ชจ๋“œ์— ์ด ๊ธ€์ž๊ฐ€ ์žˆ์œผ๋ฉด ์“ฐ๊ธฐ๋‹ค. ์—†์œผ๋ฉด (๊ธฐ๋ณธ r) ์ฝ๊ธฐ๋‹ค. */
22
+ /** open์˜ ๋ชจ๋“œ์— ์ด ๊ธ€์ž๊ฐ€ ์žˆ์œผ๋ฉด ์“ฐ๊ธฐ๋‹ค. ์—†์œผ๋ฉด (๊ธฐ๋ณธ r) ์ฝ๊ธฐ๋‹ค. */
23
23
  const WRITE_MODES = [..."wax"];
24
24
 
25
25
  /** @param {string} path */
@@ -41,7 +41,7 @@ function all(pattern, text, group) {
41
41
  }
42
42
 
43
43
  /**
44
- * ์ฝ”๋“œ ์ค„๋“ค์ด ๋งŒ๋“œ๋Š” [ํŒŒ์ผ ์ด๋ฆ„, ํด๋” ์ด๋ฆ„]. ์“ฐ๊ธฐ ํ•จ์ˆ˜, ์…ธ ๋ฆฌ๋‹ค์ด๋ ‰์…˜, ์“ฐ๊ธฐ ๋ชจ๋“œ์˜ open, mkdir ์„ ๋ณธ๋‹ค.
44
+ * ์ฝ”๋“œ ์ค„๋“ค์ด ๋งŒ๋“œ๋Š” [ํŒŒ์ผ ์ด๋ฆ„, ํด๋” ์ด๋ฆ„]. ์“ฐ๊ธฐ ํ•จ์ˆ˜, ์…ธ ๋ฆฌ๋‹ค์ด๋ ‰์…˜, ์“ฐ๊ธฐ ๋ชจ๋“œ์˜ open, mkdir ํ˜ธ์ถœ์„ ๋ณธ๋‹ค.
45
45
  * @param {string[]} lines
46
46
  * @returns {[Set<string>, Set<string>]}
47
47
  */
@@ -59,7 +59,7 @@ export function createdIn(lines) {
59
59
  return [files, dirs];
60
60
  }
61
61
 
62
- /** ํ•œ ์ค„์ด ์ฝ๋Š” ๊ฒฝ๋กœ. ์ฝ๊ธฐ ํ•จ์ˆ˜, ์ฝ๊ธฐ ๋ชจ๋“œ์˜ open, SQL ์˜ FROM ์ฐจ๋ก€๋‹ค. @param {string} code */
62
+ /** ํ•œ ์ค„์ด ์ฝ๋Š” ๊ฒฝ๋กœ. ์ฝ๊ธฐ ํ•จ์ˆ˜, ์ฝ๊ธฐ ๋ชจ๋“œ์˜ open, SQL์˜ FROM ์ฐจ๋ก€๋‹ค. @param {string} code */
63
63
  export function readsIn(code) {
64
64
  const reads = all(READS, code, 1);
65
65
  for (const match of code.matchAll(OPENS)) if (!isWriteMode(match[2])) reads.push(match[1]);
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** ์‚ฌ์ „๋“ค์„ ํ•œ ๋ฒˆ ์ปดํŒŒ์ผํ•˜๊ณ  ๋ฌธ์žฅ์—์„œ ๋งž๋Š” ์ž๋ฆฌ๋ฅผ ์ฐพ๋Š”๋‹ค. ์„ค์ •์˜ dictionary ํ•ญ๋ชฉ์„ ๋”ํ•œ๋‹ค. */
2
+ /** ์‚ฌ์ „๋“ค์„ ํ•œ ๋ฒˆ ์ปดํŒŒ์ผํ•˜๊ณ  ๋ฌธ์žฅ์—์„œ ๋งž๋Š” ๋ถ€๋ถ„์„ ์ฐพ๋Š”๋‹ค. ์„ค์ •์˜ dictionary ํ•ญ๋ชฉ์„ ๋”ํ•œ๋‹ค. */
3
3
  import { loadEntries } from "../data/load.js";
4
4
  import { compile } from "../regex.js";
5
5
 
@@ -20,11 +20,11 @@ export const DICTIONARY_FILES = {
20
20
  };
21
21
  const GROUP_REF = /\$(\d)/g;
22
22
  const FINALS = { ใ„ด: 4, ใ„น: 8 };
23
- // {์กฐ์‚ฌ} ์ž๋ฆฌํ‘œ์‹œ์ž. ๋‚ฑ๋ง ๋’ค์— ์กฐ์‚ฌ๊ฐ€ ๋ถ™์—ˆ๊ฑฐ๋‚˜ ๋‚ฑ๋ง์ด ๋๋‚˜๋Š” ์ž๋ฆฌ. ํŒŒ์ด์ฌ dictionaries.py ์™€ ๊ฐ™์€ ๊ธ€์ž๋‹ค.
23
+ // {์กฐ์‚ฌ} ์ž๋ฆฌํ‘œ์‹œ์ž. ๋‹จ์–ด ๋’ค์— ์กฐ์‚ฌ๊ฐ€ ๋ถ™์—ˆ๊ฑฐ๋‚˜ ๋‹จ์–ด๊ฐ€ ๋๋‚˜๋Š” ๊ณณ. ํŒŒ์ด์ฌ dictionaries.py์™€ ๊ฐ™์€ ๊ธ€์ž๋‹ค.
24
24
  const JOSA_TAIL = "(?=(?:์—์„œ๋Š”|์œผ๋กœ๋Š”|์—์„œ|์—๊ฒŒ|๊นŒ์ง€|๋ถ€ํ„ฐ|๋ณด๋‹ค|์ฒ˜๋Ÿผ|์œผ๋กœ|์ด๋‚˜|์€|๋Š”|์ด|๊ฐ€|์„|๋ฅผ|์˜|์—|๋กœ|์™€|๊ณผ|๋„|๋งŒ)?(?![๊ฐ€-ํžฃ]))";
25
25
  const PLACEHOLDER = /\{(ใ„ด|ใ„น|์กฐ์‚ฌ)\}/g;
26
26
 
27
- /** ๋ฐ›์นจ์œผ๋กœ ๋๋‚˜๋Š” ์Œ์ ˆ 399๊ฐœ์˜ ๋ฌธ์ž ๋ถ€๋ฅ˜. @param {"ใ„ด" | "ใ„น"} final */
27
+ /** ๋ฐ›์นจ์œผ๋กœ ๋๋‚˜๋Š” ์Œ์ ˆ 399๊ฐœ์˜ ๊ธ€์ž ์ง‘ํ•ฉ. @param {"ใ„ด" | "ใ„น"} final */
28
28
  function syllableClass(final) {
29
29
  let chars = "";
30
30
  for (let initial = 0; initial < 19; initial++) {
@@ -46,8 +46,8 @@ export function expandClasses(pattern) {
46
46
  * @property {string} source
47
47
  * @property {string | null} fix
48
48
  * @property {{ pattern: import("../regex.js").Pattern, into: string }[]} to ๋ฌธ์žฅ ์ „์ฒด๋ฅผ ๋‹ค์‹œ ์“ฐ๋Š” ๊ทœ์น™. ์•ž์˜ ๊ฒƒ๋ถ€ํ„ฐ ์‹œ๋„ํ•œ๋‹ค
49
- * @property {string} raw pattern ์˜ ์›๋ฌธ. ๋‚ด์žฅ ํ•ญ๋ชฉ๋งŒ ๊ฐ–๊ณ  ์„ค์ • ํ•ญ๋ชฉ์€ ๋นˆ ๊ธ€์ž๋ผ ๊ด€์šฉ์œผ๋กœ ์ ‘ํžˆ์ง€ ์•Š๋Š”๋‹ค
50
- * @property {import("../regex.js").Pattern | null} unless ๋ฌธ์žฅ ์ „์ฒด์—์„œ ์ด๊ฒƒ์ด ๋งž์œผ๋ฉด ๊ทธ ๋ฌธ์žฅ์—์„œ๋Š” ํ•ญ๋ชฉ์ด ๋งž์ง€ ์•Š๋Š”๋‹ค. ํŒŒ์ด์ฌ Entry.unless ์™€ ๊ฐ™๋‹ค
49
+ * @property {string} raw pattern์˜ ์›๋ฌธ. ๋‚ด์žฅ ํ•ญ๋ชฉ๋งŒ ๊ฐ–๊ณ  ์„ค์ • ํ•ญ๋ชฉ์€ ๋นˆ ๊ธ€์ž๋ผ ๊ด€์šฉ์œผ๋กœ ์ ‘ํžˆ์ง€ ์•Š๋Š”๋‹ค
50
+ * @property {import("../regex.js").Pattern | null} unless ๋ฌธ์žฅ ์ „์ฒด์—์„œ ์ด๊ฒƒ์ด ๋งž์œผ๋ฉด ๊ทธ ๋ฌธ์žฅ์—์„œ๋Š” ํ•ญ๋ชฉ์ด ๋งž์ง€ ์•Š๋Š”๋‹ค. ํŒŒ์ด์ฌ Entry.unless์™€ ๊ฐ™๋‹ค
51
51
  */
52
52
 
53
53
  /**
@@ -96,7 +96,7 @@ export function entriesFor(config) {
96
96
  const extra = [];
97
97
  for (const [dictionary, items] of Object.entries(config.dictionary)) {
98
98
  if (!(dictionary in DICTIONARY_FILES)) {
99
- throw new Error(`๋ชจ๋ฅด๋Š” ์‚ฌ์ „: ${dictionary}. ${Object.keys(DICTIONARY_FILES).join(", ")} ๊ฐ€์šด๋ฐ ํ•˜๋‚˜๋‹ค`);
99
+ throw new Error(`๋ชจ๋ฅด๋Š” ์‚ฌ์ „: ${dictionary}. ์“ธ ์ˆ˜ ์žˆ๋Š” ์ด๋ฆ„: ${Object.keys(DICTIONARY_FILES).join(", ")}`);
100
100
  }
101
101
  for (const raw of items) extra.push(entryFrom(dictionary, /** @type {Record<string, unknown> | string} */ (raw)));
102
102
  }
@@ -110,7 +110,7 @@ export function applyFix(match, fix) {
110
110
 
111
111
  /**
112
112
  * to ๊ทœ์น™์œผ๋กœ ๋ฌธ์žฅ์„ ๋‹ค์‹œ ์“ด๋‹ค. ๋นˆ ๊ทธ๋ฃน์ด ๋‚จ๊ธด ๊ฒน ๊ณต๋ฐฑ์€ ํ•˜๋‚˜๋กœ ์ค„์ด๊ณ  ์–‘๋์„ ๋‹ค๋“ฌ๋Š”๋‹ค. ์›๋ฌธ๊ณผ ๊ฐ™์œผ๋ฉด null.
113
- * ๋œป์€ ํŒŒ์ด์ฌ fingerprint/dictionaries.py ์˜ rewriteBy ๊ฐ€ ์†Œ์œ ํ•œ๋‹ค.
113
+ * ๋œป์€ ํŒŒ์ด์ฌ fingerprint/dictionaries.py์˜ rewriteBy๊ฐ€ ์ •ํ•œ๋‹ค.
114
114
  * @param {string} text @param {Entry["to"]} rules
115
115
  */
116
116
  export function rewriteBy(text, rules) {
@@ -1,14 +1,14 @@
1
1
  // @ts-check
2
2
  /**
3
- * ๋ฌธ์žฅ์—์„œ ํ‘œ์ง€๋ฅผ ์„ผ๋‹ค. ์ข…๊ฒฐ์–ด๋ฏธ ๋ถ€๋ฅ˜, ์„œ๋ฒ•, ์ ‘์†๋ถ€์‚ฌ, ์ธ๊ณผ, ์ง€์‹œ์–ด, ํ—ค์ง€, ์•ฝ์†๊ณผ ํšŒ์ˆ˜, ๋…์ž ํ˜ธ์ถœ, ์ˆ˜ ์•ฝ์†.
4
- * ๋‚ฑ๋ง ๋ชฉ๋ก์€ ์ „๋ถ€ data/ ๊ฐ€ ์ •๋ณธ์ด๋‹ค. ํŒŒ์ด์ฌ fingerprint/markers.py ์™€ ๊ฐ™๋‹ค.
3
+ * ๋ฌธ์žฅ์—์„œ ์ •ํ•ด ๋‘” ๋ง์„ ์„ผ๋‹ค. ์ข…๊ฒฐ์–ด๋ฏธ ๋ฌถ์Œ, ์„œ๋ฒ•, ์ ‘์†๋ถ€์‚ฌ, ์ธ๊ณผ ์ ‘์†์‚ฌ, ์ง€์‹œ์–ด, ์–ผ๋ฒ„๋ฌด๋ฆฌ๋Š” ๋ง, ์•ฝ์†ํ•˜๋Š” ๋ง๊ณผ ๋‹ค์‹œ ๋‹ค๋ฃจ๋Š” ๋ง, ๋…์ž ํ˜ธ์ถœ, ์ˆ˜ ์•ฝ์†.
4
+ * ๋‹จ์–ด ๋ชฉ๋ก์€ ๋ชจ๋‘ data/์— ์žˆ๋‹ค. ํŒŒ์ด์ฌ fingerprint/markers.py์™€ ๊ฐ™๋‹ค.
5
5
  */
6
6
  import { loadLines, loadPatterns } from "../data/load.js";
7
7
  import { compile, escape } from "../regex.js";
8
8
 
9
9
  const TRAILING = /[\s.?!"'โ€โ€™)\]]+$/;
10
10
  const NUMBER = /\d+(?:[.,]\d+)*/g;
11
- /** ๊ฐ’์œผ๋กœ ๊ฒฌ์ฃผ๋Š” ์ˆ˜. NUMBER ๋Š” ์ˆ˜์˜ ๊ฐœ์ˆ˜๋ฅผ ์„ธ๊ณ  ์ด๊ฒƒ์€ ์ˆ˜์˜ ์ •์ฒด๋ฅผ ์„ผ๋‹ค. ์ฒœ ๋‹จ์œ„ ์‰ผํ‘œ๊นŒ์ง€ ํ•œ ์ˆ˜๋กœ ์ฝ๋Š”๋‹ค. */
11
+ /** ๊ฐ’์œผ๋กœ ๋น„๊ตํ•˜๋Š” ์ˆ˜. NUMBER๋Š” ์ˆ˜์˜ ๊ฐœ์ˆ˜๋ฅผ ์„ธ๊ณ  ์ด๊ฒƒ์€ ์ˆ˜์˜ ์ •์ฒด๋ฅผ ์„ผ๋‹ค. ์ฒœ ๋‹จ์œ„ ์‰ผํ‘œ๊นŒ์ง€ ํ•œ ์ˆ˜๋กœ ์ฝ๋Š”๋‹ค. */
12
12
  const NUMERAL = /\d[\d,]*(?:\.\d+)?/g;
13
13
  const COMMA = /,/g;
14
14
  // ๋”ฐ์˜ดํ‘œ ์Œ. ์•ˆ์€ ์‚ฌ์šฉ์ด ์•„๋‹ˆ๋ผ ์ธ์šฉ์ด๋‹ค. ์ž‘์€๋”ฐ์˜ดํ‘œ๋Š” ์•ž์ด ๋ฌธ์žฅ ์ฒซ๋จธ๋ฆฌ๋‚˜ ๊ณต๋ฐฑ์ด๋‚˜ ์—ฌ๋Š” ๊ด„ํ˜ธ์ผ ๋•Œ๋งŒ.
@@ -27,7 +27,7 @@ const OPTIONAL_SPACE = /\s?/.source;
27
27
 
28
28
  /** @type {Record<string, number> | null} */
29
29
  let numberCache = null;
30
- /** ์ˆ˜์‚ฌ โ†’ ๊ฐ’. ์ •๋ณธ์€ data/koreanNumbers.txt. */
30
+ /** ์ˆ˜์‚ฌ โ†’ ๊ฐ’. ๋ชฉ๋ก์€ data/koreanNumbers.txt์— ์žˆ๋‹ค. */
31
31
  export function koreanNumbers() {
32
32
  if (!numberCache) {
33
33
  numberCache = {};
@@ -148,7 +148,7 @@ export function quoteSpans(text) {
148
148
  }
149
149
 
150
150
  /**
151
- * ์„ค์ •์˜ protectedTerms ๊ฐ€ ๊ธ€์— ๋‚˜์˜จ [์‹œ์ž‘, ๋] ์ „๋ถ€. ๊ฒน์ณ ๋‚˜์˜จ ์ž๋ฆฌ๋„ ๋”ฐ๋กœ ์„ผ๋‹ค. ํŒŒ์ด์ฌ termSpans ์™€ ๊ฐ™๋‹ค.
151
+ * ์„ค์ •์˜ protectedTerms๊ฐ€ ๊ธ€์— ๋‚˜์˜จ [์‹œ์ž‘, ๋] ์ „๋ถ€. ๊ฒน์ณ ๋‚˜์˜จ ๊ฒƒ๋„ ๋”ฐ๋กœ ์„ผ๋‹ค. ํŒŒ์ด์ฌ termSpans์™€ ๊ฐ™๋‹ค.
152
152
  * @param {string} text @param {string[]} terms @returns {[number, number][]}
153
153
  */
154
154
  export function termSpans(text, terms) {
@@ -164,7 +164,7 @@ export function termSpans(text, terms) {
164
164
  return found.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
165
165
  }
166
166
 
167
- /** ๋‘ ๊ตฌ๊ฐ„์ด ํ•œ ๊ธ€์ž๋ผ๋„ ๊ฒน์น˜๋Š”๊ฐ€. ํŒŒ์ด์ฌ overlapsAny ์™€ ๊ฐ™๋‹ค. @param {number} start @param {number} end @param {[number, number][]} spans */
167
+ /** ๋‘ ๊ตฌ๊ฐ„์ด ํ•œ ๊ธ€์ž๋ผ๋„ ๊ฒน์น˜๋Š”๊ฐ€. ํŒŒ์ด์ฌ overlapsAny์™€ ๊ฐ™๋‹ค. @param {number} start @param {number} end @param {[number, number][]} spans */
168
168
  export function overlapsAny(start, end, spans) {
169
169
  return spans.some(([spanStart, spanEnd]) => spanStart < end && start < spanEnd);
170
170
  }
@@ -189,7 +189,7 @@ export function countPromisesIn(text) {
189
189
  }
190
190
 
191
191
  /** @param {string} text */
192
- /** ๊ธ€์— ๋‚˜์˜จ ์ˆ˜์˜ ์ •์ฒด (์ฒœ ๋‹จ์œ„ ์‰ผํ‘œ๋ฅผ ๋—€ ๊ผด). ๋…์ž ์ƒํƒœ๊ฐ€ ์Œ“๊ณ  numberOrphan ์ด ๊ฒฌ์ค€๋‹ค. @param {string} text @returns {Set<string>} */
192
+ /** ๊ธ€์— ๋‚˜์˜จ ์ˆ˜์˜ ์ •์ฒด (์ฒœ ๋‹จ์œ„ ์‰ผํ‘œ๋ฅผ ๋—€ ๊ผด). ๋…์ž ์ƒํƒœ๊ฐ€ ์Œ“๊ณ  numberOrphan์ด ๋น„๊ตํ•œ๋‹ค. @param {string} text @returns {Set<string>} */
193
193
  export function numeralsIn(text) {
194
194
  const found = new Set();
195
195
  for (const match of text.matchAll(NUMERAL)) found.add(match[0].replaceAll(",", ""));
@@ -1,28 +1,28 @@
1
1
  // @ts-check
2
2
  /**
3
- * ๋…์ž ์ƒํƒœ. ๊ธ€์„ ์œ„์—์„œ ์•„๋ž˜๋กœ ์ฝ๋Š” ๋…์ž๊ฐ€ ์–ด๋А ์ž๋ฆฌ์—์„œ ๋ฌด์—‡์„ ์†์— ๋“ค๊ณ  ๋ฌด์—‡์„ ์ด๋ฏธ ๋ณด์•˜๋Š”๊ฐ€.
4
- * ํŒŒ์ด์ฌ fingerprint/readerState.py ์™€ ๊ฐ™๋‹ค. reader ๊ธฐ์ œ์˜ ๊ทœ์น™์€ ์–ด๋А ์ž๋ฆฌ๊ฐ€ ์š”๊ตฌํ•˜๋Š” ๊ฒƒ์„ ๊ทธ ์ž๋ฆฌ์˜ ์ƒํƒœ์—
5
- * ๋Œ€ ๋ณธ๋‹ค. ์ƒํƒœ๋Š” ๋ธ”๋ก๊ณผ ๋ฌธ์žฅ ์ˆœ์„œ๋กœ ์Œ“์ด๊ณ  ํ•œ ๋ฒˆ ์Œ“์€ ๊ฒƒ์€ ๋ฐ”๋€Œ์ง€ ์•Š๋Š”๋‹ค. ์ง‘ํ•ฉ์€ ๊ณ ์น˜์ง€ ์•Š๋Š”๋‹ค.
3
+ * ๋…์ž ์ƒํƒœ. ๊ธ€์„ ์œ„์—์„œ ์•„๋ž˜๋กœ ์ฝ๋Š” ๋…์ž๊ฐ€ ์–ด๋А ์œ„์น˜์—์„œ ๋ฌด์—‡์„ ์ด๋ฏธ ์•Œ๊ณ  ๋ฌด์—‡์„ ์ด๋ฏธ ๋ณด์•˜๋Š”๊ฐ€.
4
+ * ํŒŒ์ด์ฌ fingerprint/readerState.py์™€ ๊ฐ™๋‹ค. ๋…์ž ์ƒํƒœ๋ฅผ ๋ณด๋Š” ๊ทœ์น™(reader)์€ ํ•œ ์œ„์น˜๊ฐ€ ํ•„์š”๋กœ ํ•˜๋Š” ๊ฒƒ์„ ๊ทธ ์œ„์น˜์˜
5
+ * ์ƒํƒœ์™€ ๋Œ€์กฐํ•œ๋‹ค. ์ƒํƒœ๋Š” ๋ธ”๋ก๊ณผ ๋ฌธ์žฅ ์ˆœ์„œ๋กœ ์Œ“์ด๊ณ  ํ•œ ๋ฒˆ ์Œ“์€ ๊ฒƒ์€ ๋ฐ”๋€Œ์ง€ ์•Š๋Š”๋‹ค. ์ง‘ํ•ฉ์€ ๊ณ ์น˜์ง€ ์•Š๋Š”๋‹ค.
6
6
  */
7
7
  import { CODE, PROSE } from "../document/model.js";
8
8
  import { createdIn } from "./codeMarkers.js";
9
9
  import { numeralsIn } from "./markers.js";
10
10
 
11
11
  /**
12
- * ํ•œ ์ž๋ฆฌ (๋ฌธ์žฅ ํ•˜๋‚˜ ๋˜๋Š” ๋ธ”๋ก ํ•˜๋‚˜) ๋ฅผ ์ฝ๊ธฐ ์ง์ „์˜ ๋…์ž.
12
+ * ํ•œ ์œ„์น˜(๋ฌธ์žฅ ํ•˜๋‚˜ ๋˜๋Š” ๋ธ”๋ก ํ•˜๋‚˜)๋ฅผ ์ฝ๊ธฐ ์ง์ „์˜ ๋…์ž.
13
13
  * @typedef {object} ReaderState
14
14
  * @property {import("./build.js").SentencePrint | null} previous ๋ฐ”๋กœ ์•ž์— ์ฝ์€ ์‚ฐ๋ฌธ ๋ฌธ์žฅ
15
15
  * @property {Set<string>} recent ์†์— ๋“  ํ™”์ œ์–ด. ๋ฐ”๋กœ ์•ž ๋ฌธ์žฅ์˜ ๊ฒƒ์ด๊ณ  ์•ž ๋ฌธ์žฅ์ด ์—†์œผ๋ฉด ๋นˆ ์ง‘ํ•ฉ
16
- * @property {Set<string>} known ์ด ์ž๋ฆฌ ์•ž๊นŒ์ง€ ์‚ฐ๋ฌธ์— ๋‚˜์˜จ ํ™”์ œ์–ด ์ „๋ถ€
16
+ * @property {Set<string>} known ์ด ์œ„์น˜ ์•ž๊นŒ์ง€ ์‚ฐ๋ฌธ์— ๋‚˜์˜จ ํ™”์ œ์–ด ์ „๋ถ€
17
17
  * @property {Set<string>} numerals ์ง€๊ธˆ๊นŒ์ง€ ์‚ฐ๋ฌธ๊ณผ ๋ธ”๋ก์— ๋‚˜์˜จ ์ˆ˜ (์ฒœ ๋‹จ์œ„ ์‰ผํ‘œ๋ฅผ ๋—€ ๊ผด)
18
18
  * @property {Set<string>} files ์•ž์„  ์ฝ”๋“œ ๋ธ”๋ก์ด ๋งŒ๋“  ํŒŒ์ผ ์ด๋ฆ„๊ณผ ํด๋”
19
19
  * @property {number} sentencesRead ์ง€๊ธˆ๊นŒ์ง€ ์ฝ์€ ์‚ฐ๋ฌธ ๋ฌธ์žฅ ์ˆ˜
20
- * @property {[number, string][]} promises ์ง€๊ธˆ๊นŒ์ง€ ๋’ค๋กœ ๋ฏธ๋ฃฌ ํ‘œ์ง€ (์ค„, ์›๋ฌธ)
21
- * @property {[number, string][]} recalls ์ง€๊ธˆ๊นŒ์ง€ ์•ž์„ ํšŒ์ˆ˜ํ•œ ํ‘œ์ง€ (์ค„, ์›๋ฌธ)
20
+ * @property {[number, string][]} promises ์ง€๊ธˆ๊นŒ์ง€ ๋’ค๋กœ ๋ฏธ๋ฃฌ ๋ง(์ค„, ์›๋ฌธ)
21
+ * @property {[number, string][]} recalls ์ง€๊ธˆ๊นŒ์ง€ ์•ž์˜ ์ด์•ผ๊ธฐ๋ฅผ ๋‹ค์‹œ ๋‹ค๋ฃฌ ๋ง(์ค„, ์›๋ฌธ)
22
22
  */
23
23
 
24
24
  /**
25
- * ์ž๋ฆฌ๋งˆ๋‹ค์˜ ๋…์ž ์ƒํƒœ. ๋ฌธ์žฅ์€ index ๋กœ, ๋ธ”๋ก์€ index ๋กœ ์ฐพ๋Š”๋‹ค.
25
+ * ์œ„์น˜๋งˆ๋‹ค์˜ ๋…์ž ์ƒํƒœ. ๋ฌธ์žฅ์€ index๋กœ, ๋ธ”๋ก์€ index๋กœ ์ฐพ๋Š”๋‹ค.
26
26
  * @typedef {object} ReaderTrail
27
27
  * @property {ReaderState[]} beforeSentence
28
28
  * @property {ReaderState[]} beforeBlock
@@ -84,7 +84,7 @@ function afterBlock(state, block, code) {
84
84
  }
85
85
 
86
86
  /**
87
- * ๋ธ”๋ก ์ˆœ์„œ๋กœ ํ•œ ๋ฒˆ ์ง€๋‚˜๋ฉฐ ์ž๋ฆฌ๋งˆ๋‹ค์˜ ์ƒํƒœ๋ฅผ ์ ๋Š”๋‹ค. ์‚ฐ๋ฌธ ๋ธ”๋ก์€ ๋ฌธ์žฅ ํ•˜๋‚˜์”ฉ, ๋‚˜๋จธ์ง€๋Š” ๋ธ”๋ก์งธ ์ฝ๋Š”๋‹ค.
87
+ * ๋ธ”๋ก ์ˆœ์„œ๋กœ ํ•œ ๋ฒˆ ์ง€๋‚˜๋ฉฐ ์œ„์น˜๋งˆ๋‹ค์˜ ์ƒํƒœ๋ฅผ ์ ๋Š”๋‹ค. ์‚ฐ๋ฌธ ๋ธ”๋ก์€ ๋ฌธ์žฅ ํ•˜๋‚˜์”ฉ, ๋‚˜๋จธ์ง€๋Š” ๋ธ”๋ก์งธ ์ฝ๋Š”๋‹ค.
88
88
  * @param {import("../document/model.js").Block[]} blocks
89
89
  * @param {import("./codeBlocks.js").CodeBlock[]} codeBlocks
90
90
  * @param {import("./build.js").SentencePrint[]} sentences
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** ํ‰๋ฌธ ์ง€๋ฌธ์˜ ๋ฌธ์žฅ์„ ๋งˆํฌ๋‹ค์šด ํ‘œ์‹์„ ๋ณด์กดํ•œ ์›๋ฌธ ๋ฌธ์žฅ์— ๋‹ค์‹œ ๋งž์ถ˜๋‹ค. */
2
+ /** ํ‰๋ฌธ ๋ถ„์„ ๊ฒฐ๊ณผ์˜ ๋ฌธ์žฅ์„ ๋งˆํฌ๋‹ค์šด ํ‘œ์‹์„ ๋ณด์กดํ•œ ์›๋ฌธ ๋ฌธ์žฅ์— ๋‹ค์‹œ ๋งž์ถ˜๋‹ค. */
3
3
  import { splitSentences } from "../analysis/splitSentences.js";
4
4
  import { plainText } from "../document/plainText.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** ํ™”์ œ์–ด ์ง‘ํ•ฉ. ์กฐ์‚ฌ๋ฅผ ๋—€ ๋ช…์‚ฌ ์–ด์ ˆ์˜ ๊ทผ์‚ฌ. ํŒŒ์ด์ฌ fingerprint/topics.py ์™€ ๊ฐ™๋‹ค. */
2
+ /** ํ™”์ œ์–ด ์ง‘ํ•ฉ. ์กฐ์‚ฌ๋ฅผ ๋—€ ๋ช…์‚ฌ ์–ด์ ˆ์˜ ์–ด๋ฆผ. ํŒŒ์ด์ฌ fingerprint/topics.py์™€ ๊ฐ™๋‹ค. */
3
3
  import { stripJosa, tailOf, words } from "../analysis/tokenize.js";
4
4
  import { loadLines } from "../data/load.js";
5
5
 
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** Reader Contract ๊ฒ€์‚ฌ์™€ ์ด์œ ๊ฐ€ ๋ถ™์€ ๊ตญ์†Œ Patch ๊ฒ€์ฆ. */
2
+ /** Reader Contract ๊ฒ€์‚ฌ์™€, ์ด์œ ๋ฅผ ๋ถ™์—ฌ ํ•œ ๊ณณ๋งŒ ๋ฐ”๊พธ๋Š” Patch์˜ ๊ฒ€์ฆ. */
3
3
  import { sha256 } from "../digest.js";
4
4
 
5
5
  import { Patch } from "../config/patch.js";
@@ -19,7 +19,7 @@ function digest(text) {
19
19
  return sha256(text);
20
20
  }
21
21
 
22
- /** ์›๋ฌธ์˜ ๋ณดํ˜ธ ํ‘œ๋ฉด์„ ๋ชจ๋‘ ๋ฎ๋Š” version 1 Contract ์ดˆ์•ˆ์„ ๋งŒ๋“ ๋‹ค. @param {string} text @param {string} reader @param {string} goal */
22
+ /** ์›๋ฌธ์˜ ์ง€์ผœ์•ผ ํ•  ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ๋ฅผ ๋ชจ๋‘ ๋‹ด๋Š” version 1 Contract ์ดˆ์•ˆ์„ ๋งŒ๋“ ๋‹ค. @param {string} text @param {string} reader @param {string} goal */
23
23
  export function contractFromText(text, reader, goal) {
24
24
  const contract = new Contract(reader, goal, factLines(text));
25
25
  const result = surfaceDiff(contract.text, text);
@@ -27,15 +27,15 @@ export function contractFromText(text, reader, goal) {
27
27
  for (const kind of ["missingNumbers", "missingUrls", "missingCode", "missingLinks"]) {
28
28
  for (const value of result[/** @type {keyof typeof result} */ (kind)]) missing.push(`${kind}=${value}`);
29
29
  }
30
- if (missing.length) throw new Error(`reader ๋˜๋Š” goal์ด ์›๋ฌธ์— ์—†๋Š” ๋ณดํ˜ธ ์›์ž๋ฅผ ๋„ฃ์—ˆ๋‹ค: ${missing.join(", ")}`);
30
+ if (missing.length) throw new Error(`reader๋‚˜ goal์— ์›๋ฌธ์— ์—†๋Š” ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ๊ฐ€ ๋“ค์—ˆ๋‹ค: ${missing.join(", ")}`);
31
31
  if (surfaceViolationCount(result)) {
32
32
  const issues = Object.entries(result).flatMap(([kind, values]) => values.map((value) => `${kind}=${value}`));
33
- throw new Error(`๊ณ„์•ฝ ์ดˆ์•ˆ์ด ์›๋ฌธ์˜ ๋ณดํ˜ธ ํ‘œ๋ฉด์„ ๋ชจ๋‘ ๋‹ด์ง€ ๋ชปํ–ˆ๋‹ค: ${issues.join(", ")}`);
33
+ throw new Error(`๊ณ„์•ฝ ์ดˆ์•ˆ์ด ์›๋ฌธ์˜ ์ง€์ผœ์•ผ ํ•  ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ๋ฅผ ๋ชจ๋‘ ๋‹ด์ง€ ๋ชปํ–ˆ๋‹ค: ${issues.join(", ")}`);
34
34
  }
35
35
  return contract;
36
36
  }
37
37
 
38
- /** ์›๋ฌธ์˜ ์ž๋™ ํ‘œ๋ฉด๊ณผ ํ•œ ์ˆ˜์ค€์˜ ์ œ๋ชฉ์„ ๋ถ„๋ฆฌํ•œ version 2 Contract ์ดˆ์•ˆ์„ ๋งŒ๋“ ๋‹ค. @param {string} text @param {string} reader @param {string} goal @param {number} [outlineLevel] @param {string[]} [facts] */
38
+ /** ์›๋ฌธ์—์„œ ์ž๋™์œผ๋กœ ์ฐพ์€ ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ์™€ ํ•œ ์ˆ˜์ค€์˜ ์ œ๋ชฉ์„ ๋”ฐ๋กœ ๋‹ด์€ version 2 Contract ์ดˆ์•ˆ์„ ๋งŒ๋“ ๋‹ค. @param {string} text @param {string} reader @param {string} goal @param {number} [outlineLevel] @param {string[]} [facts] */
39
39
  export function contractFromTextV2(text, reader, goal, outlineLevel = 2, facts = []) {
40
40
  const doc = parseMarkdown(text);
41
41
  const headings = headingsOf(doc, outlineLevel).map((heading) => heading.text);
@@ -50,7 +50,7 @@ export function contractFromTextV2(text, reader, goal, outlineLevel = 2, facts =
50
50
  const result = surfaceDiff(contract.text, text);
51
51
  if (surfaceViolationCount(result)) {
52
52
  const issues = Object.entries(result).flatMap(([kind, values]) => values.map((value) => `${kind}=${value}`));
53
- throw new Error(`reader, goal ๋˜๋Š” facts๊ฐ€ ์›๋ฌธ์— ์—†๋Š” ๋ณดํ˜ธ ์›์ž๋ฅผ ๋„ฃ์—ˆ๋‹ค: ${issues.join(", ")}`);
53
+ throw new Error(`reader, goal, facts์— ์›๋ฌธ์— ์—†๋Š” ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ๊ฐ€ ๋“ค์—ˆ๋‹ค: ${issues.join(", ")}`);
54
54
  }
55
55
  return contract;
56
56
  }
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** ์„ ํƒํ•œ ๊ทœ์น™์˜ Finding ์ค„๊ณผ ์›๋ฌธ ๋ณ€๊ฒฝ ์ฐฝ์„ ๋Œ€์กฐํ•œ๋‹ค. */
2
+ /** ๊ณ ๋ฅธ ๊ทœ์น™์˜ ์ง€์ ์ด ์žˆ๋Š” ์ค„๊ณผ ์›๋ฌธ์—์„œ ๋ฐ”๋€ ๋ฒ”์œ„๋ฅผ ๋Œ€์กฐํ•œ๋‹ค. */
3
3
  export function editIssues(text, patch, findings, policy) {
4
4
  if (!Object.keys(policy).length) return [];
5
5
  const limits = policy[patch.reason];
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** Reader Contract๊ฐ€ ์ž ๊ทผ ์ œ๋ชฉ ์ˆœ์„œ์™€ ๊ธ€ ์ง€๋ฌธ์˜ ๊ตฌ์กฐ ์š”์•ฝ. */
2
+ /** Reader Contract๊ฐ€ ๊ณ ์ •ํ•œ ์ œ๋ชฉ ์ˆœ์„œ์™€, ๊ธ€ ๋ถ„์„ ๊ฒฐ๊ณผ์—์„œ ๋ฝ‘์€ ๊ตฌ์กฐ ์š”์•ฝ. */
3
3
 
4
4
  /** @typedef {{position: number, expected: string | null, actual: string | null}} OutlineMismatch */
5
5
  /** @typedef {{matches: boolean, level: number, expected: string[], actual: string[], mismatches: OutlineMismatch[]}} OutlineDiff */
@@ -1,14 +1,14 @@
1
1
  // @ts-check
2
- /** Reader Contract ๊ฒ€์‚ฌ์™€ Patch ๊ฒ€์ฆ์˜ ๊ฒฐ์ •์  ์˜์ˆ˜์ฆ. */
2
+ /** Reader Contract ๊ฒ€์‚ฌ์™€ Patch ๊ฒ€์ฆ์˜ ๊ฒฐ๊ณผ ๊ธฐ๋ก. ๊ฐ™์€ ์ž…๋ ฅ์ด๋ฉด ๋Š˜ ๊ฐ™์€ ๊ฒฐ๊ณผ๋‹ค. */
3
3
 
4
4
  import { findingAsDict } from "../rules/finding.js";
5
5
  import { readerDebts } from "../rules/readerDebt.js";
6
6
  import { compareText, surfaceViolationCount } from "./surface.js";
7
7
 
8
8
  export const CHECK_MEANING = "violationCount๋Š” ์„ ์–ธํ•œ ๋ณดํ˜ธ ์›์ž์™€ hanlint error์˜ ์ˆ˜๋‹ค. facts์˜ ๊ด€๊ณ„์™€ ์ง„์‹ค, ๋น ์ง„ ์˜๋ฏธ, ๋…์ž ํšจ์šฉ๊ณผ ์ž์—ฐ์Šค๋Ÿฌ์›€์€ ๊ฒ€์ฆํ•˜์ง€ ์•Š๋Š”๋‹ค";
9
- export const CHECK_MEANING_V2 = "violationCount๋Š” ์„ ์–ธํ•œ ๋ณดํ˜ธ ์›์ž, ์ œ๋ชฉ ๊ตฌ์กฐ, ์ž ๊ธˆ ๋ฌธ๊ตฌ ๋ˆ„๋ฝ๊ณผ hanlint error์˜ ์ˆ˜๋‹ค. facts์˜ ๊ด€๊ณ„์™€ ์ง„์‹ค, ๋น ์ง„ ์˜๋ฏธ, ๋…์ž ํšจ์šฉ๊ณผ ์ž์—ฐ์Šค๋Ÿฌ์›€์€ ๊ฒ€์ฆํ•˜์ง€ ์•Š๋Š”๋‹ค";
9
+ export const CHECK_MEANING_V2 = "violationCount๋Š” ๊ณ„์•ฝ์— ์ ์€ ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ์˜ ์–ด๊ธ‹๋‚จ, ์ œ๋ชฉ ๊ตฌ์กฐ์˜ ์–ด๊ธ‹๋‚จ, ๋น ์ง„ ๊ณ ์ • ๋ฌธ๊ตฌ, hanlint ์˜ค๋ฅ˜๋ฅผ ๋”ํ•œ ์ˆ˜๋‹ค. facts ์‚ฌ์ด์˜ ๊ด€๊ณ„์™€ ์‚ฌ์‹ค ์—ฌ๋ถ€, ๋น ์ง„ ๋œป, ๋…์ž์—๊ฒŒ ์“ธ๋ชจ ์žˆ๋Š”์ง€์™€ ์ž์—ฐ์Šค๋Ÿฌ์šด์ง€๋Š” ๊ฒ€์‚ฌํ•˜์ง€ ์•Š๋Š”๋‹ค";
10
10
  export const PATCH_MEANING = "verified๋Š” ์ •ํ™•ํžˆ ํ•œ ์ž๋ฆฌ๋ฅผ ๋ฐ”๊พธ๊ณ  ๋ช…์‹œํ•œ ๊ธฐ์กด ์œ„๋ฐ˜์„ ์ค„์ด๋ฉฐ ์ƒˆ ๋ณดํ˜ธ ์›์ž ์œ„๋ฐ˜๊ณผ ์ƒˆ error๋ฅผ ๋งŒ๋“ค์ง€ ์•Š์•˜๋‹ค๋Š” ๋œป๋ฟ์ด๋‹ค. ์ˆ˜์ •๋ฌธ์˜ ์˜๋ฏธ์™€ ์ง„์‹ค, ์ž์—ฐ์Šค๋Ÿฌ์›€์€ ์Šน์ธํ•˜์ง€ ์•Š๋Š”๋‹ค";
11
- export const PATCH_MEANING_V2 = "verified๋Š” ์ •ํ™•ํžˆ ํ•œ ์ž๋ฆฌ๋ฅผ ๋ฐ”๊พธ๊ณ  ๋ช…์‹œํ•œ ๊ธฐ์กด ์œ„๋ฐ˜์„ ์ค„์ด๋ฉฐ ์ƒˆ ๊ณ„์•ฝ ์œ„๋ฐ˜๊ณผ ์ƒˆ error๋ฅผ ๋งŒ๋“ค์ง€ ์•Š๊ณ  ์„ ํƒํ•œ ์ˆ˜์ • ์˜ˆ์‚ฐ์„ ์ง€์ผฐ๋‹ค๋Š” ๋œป๋ฟ์ด๋‹ค. ์ˆ˜์ •๋ฌธ์˜ ์˜๋ฏธ์™€ ์ง„์‹ค, ์ž์—ฐ์Šค๋Ÿฌ์›€์€ ์Šน์ธํ•˜์ง€ ์•Š๋Š”๋‹ค";
11
+ export const PATCH_MEANING_V2 = "verified๋Š” ์ •ํ™•ํžˆ ํ•œ ๊ณณ์„ ๋ฐ”๊พธ๊ณ , ์ ์–ด ๋‘” ๊ธฐ์กด ์œ„๋ฐ˜์„ ์ค„์ด๊ณ , ์ƒˆ ๊ณ„์•ฝ ์œ„๋ฐ˜๊ณผ ์ƒˆ ์˜ค๋ฅ˜๋ฅผ ๋งŒ๋“ค์ง€ ์•Š๊ณ , ๊ณ ๋ฅธ ์ˆ˜์ • ์˜ˆ์‚ฐ์„ ์ง€์ผฐ๋‹ค๋Š” ๋œป๋ฟ์ด๋‹ค. ๊ณ ์นœ ๋ฌธ์žฅ์˜ ๋œป์ด ๋งž๋Š”์ง€, ์‚ฌ์‹ค์ธ์ง€, ์ž์—ฐ์Šค๋Ÿฌ์šด์ง€๋Š” ๋ณด์ฆํ•˜์ง€ ์•Š๋Š”๋‹ค";
12
12
 
13
13
  /** @param {import("../rules/finding.js").Finding[]} findings */
14
14
  function errorRules(findings) {
@@ -32,7 +32,7 @@ export class CheckResult {
32
32
  this.document = document;
33
33
  this.missingFacts = missingFacts;
34
34
  if (![1, 2].includes(contractVersion)) {
35
- throw new Error(`check result contractVersion ์€ 1 ๋˜๋Š” 2๋‹ค: ${contractVersion}`);
35
+ throw new Error(`check result์˜ contractVersion์€ 1์ด๋‚˜ 2์—ฌ์•ผ ํ•œ๋‹ค. ๋ฐ›์€ ๊ฐ’: ${contractVersion}`);
36
36
  }
37
37
  const hasStructure = outline !== null && document !== null;
38
38
  if (hasStructure !== (contractVersion === 2)) {
@@ -89,7 +89,7 @@ export class PatchResult {
89
89
  this.resultText = values.resultText;
90
90
  this.contractVersion = values.contractVersion;
91
91
  if (![1, 2].includes(values.contractVersion)) {
92
- throw new Error(`patch result contractVersion ์€ 1 ๋˜๋Š” 2๋‹ค: ${values.contractVersion}`);
92
+ throw new Error(`patch result์˜ contractVersion์€ 1์ด๋‚˜ 2์—ฌ์•ผ ํ•œ๋‹ค. ๋ฐ›์€ ๊ฐ’: ${values.contractVersion}`);
93
93
  }
94
94
  }
95
95
 
@@ -137,7 +137,7 @@ export class PatchResult {
137
137
  }
138
138
  }
139
139
 
140
- /** ์‚ฌ๋žŒ์ด ๊ฒฐ๋ก , ๊ทผ๊ฑฐ, ๋‹ค์Œ ํ–‰๋™ ์ˆœ์„œ๋กœ ์ฝ๋Š” ๊ฒ€์‚ฌ ์˜์ˆ˜์ฆ. @param {CheckResult} result */
140
+ /** ์‚ฌ๋žŒ์ด ๊ฒฐ๋ก , ๊ทผ๊ฑฐ, ๋‹ค์Œ ํ•  ์ผ์˜ ์ˆœ์„œ๋กœ ์ฝ๋Š” ๊ฒ€์‚ฌ ๊ฒฐ๊ณผ. @param {CheckResult} result */
141
141
  export function renderCheck(result) {
142
142
  const lines = [result.violationCount === 0 ? "๊ณ„์•ฝ ์œ„๋ฐ˜ ์—†์Œ" : `๊ณ„์•ฝ ์œ„๋ฐ˜ ${result.violationCount}๊ฑด`];
143
143
  const labels = [
@@ -162,19 +162,19 @@ export function renderCheck(result) {
162
162
  if (result.document) {
163
163
  lines.push(`- ๊ธ€: ๋ฌธ์žฅ ${result.document.sentenceCount}, ๋ฌธ๋‹จ ${result.document.paragraphCount}, ์ ˆ ${result.document.sectionCount}`);
164
164
  result.document.sections.forEach((section, index) => {
165
- lines.push(` ${index + 1}. ${section.heading} (${section.line}ํ–‰, ๋ฌธ๋‹จ ${section.paragraphCount}, ์ฝ”๋“œ ${section.codeBlockCount})`);
165
+ lines.push(` ${index + 1}. ${section.heading} (${section.line}์ค„, ๋ฌธ๋‹จ ${section.paragraphCount}, ์ฝ”๋“œ ${section.codeBlockCount})`);
166
166
  });
167
167
  }
168
- lines.push(`- lint: error ${result.errorCount}, notice ${result.noticeCount}`);
168
+ lines.push(`- lint: ์˜ค๋ฅ˜ ${result.errorCount}๊ฑด, ๊ฒฝ๊ณ  ${result.noticeCount}๊ฑด`);
169
169
  if (result.errorCount) {
170
170
  lines.push(` ${Object.entries(errorRules(result.findings)).map(([rule, count]) => `${rule} ${count}`).join(", ")}`);
171
171
  }
172
172
  const debts = readerDebts(result.findings);
173
- lines.push(debts.length ? `- ๋…์ž ๋ถ€์ฑ„: ${debts.length}๊ฑด` : "- ๋…์ž ๋ถ€์ฑ„: ์—†์Œ");
174
- for (const debt of debts) lines.push(` ${debt.line}ํ–‰ [${debt.rule}] ${debt.why}`);
175
- if (result.violationCount) lines.push("\n๋‹ค์Œ: ๊ณ„์•ฝ๊ณผ ๊ธ€ ๊ฐ€์šด๋ฐ ํ‹€๋ฆฐ ์ชฝ์„ ๋ฐ”๋กœ์žก๊ณ  ๊ฐ™์€ check๋ฅผ ๋‹ค์‹œ ์‹คํ–‰ํ•œ๋‹ค");
176
- else if (result.noticeCount) lines.push("\n๋‹ค์Œ: notice๋ฅผ ์ฝ๊ณ  ๊ณ ์น ์ง€ ์œ ์ง€ํ• ์ง€ ํŒ๋‹จํ•œ ๋’ค ์‚ฌ๋žŒ๊ณผ LLM ํ‰๊ฐ€๋กœ ๋„˜์–ด๊ฐ„๋‹ค");
177
- else lines.push("\n๋‹ค์Œ: ์„ธ์–ด์„œ ์žกํžˆ๋Š” ๊ณ„์•ฝ ์œ„๋ฐ˜์ด ์—†๋‹ค. ์‚ฌ๋žŒ๊ณผ LLM ํ‰๊ฐ€๋กœ ๋„˜์–ด๊ฐ„๋‹ค");
173
+ lines.push(debts.length ? `- ๋…์ž๊ฐ€ ๋ง‰ํž ๊ณณ: ${debts.length}๊ฑด` : "- ๋…์ž๊ฐ€ ๋ง‰ํž ๊ณณ: ์—†์Œ");
174
+ for (const debt of debts) lines.push(` ${debt.line}์ค„ [${debt.rule}] ${debt.why}`);
175
+ if (result.violationCount) lines.push("\n๋‹ค์Œ: ๊ณ„์•ฝ๊ณผ ๊ธ€ ๊ฐ€์šด๋ฐ ํ‹€๋ฆฐ ์ชฝ์„ ๊ณ ์น˜๊ณ  ๊ฐ™์€ check๋ฅผ ๋‹ค์‹œ ๋Œ๋ฆฐ๋‹ค");
176
+ else if (result.noticeCount) lines.push("\n๋‹ค์Œ: ๊ฒฝ๊ณ ๋ฅผ ์ฝ๊ณ  ๊ณ ์น ์ง€ ๊ทธ๋Œ€๋กœ ๋‘˜์ง€ ์ •ํ•œ๋‹ค");
177
+ else lines.push("\n๋‹ค์Œ: ๊ทœ์น™์œผ๋กœ ์…€ ์ˆ˜ ์žˆ๋Š” ๊ณ„์•ฝ ์œ„๋ฐ˜์€ ์—†๋‹ค. ๋œป๊ณผ ์ž์—ฐ์Šค๋Ÿฌ์›€์€ ์‚ฌ๋žŒ์ด ์ฝ๊ณ  ํŒ๋‹จํ•œ๋‹ค");
178
178
  lines.push("", result.contractVersion === 1 ? CHECK_MEANING : CHECK_MEANING_V2);
179
179
  return lines.join("\n");
180
180
  }
@@ -1,5 +1,5 @@
1
1
  // @ts-check
2
- /** ๊ณ„์•ฝ ๋ณธ๋ฌธ๊ณผ ๊ฒฐ๊ณผ ๊ธ€ ์‚ฌ์ด์˜ ๋ณดํ˜ธ ์›์ž ์ฐจ์ด. */
2
+ /** ๊ณ„์•ฝ ๋ณธ๋ฌธ๊ณผ ๊ฒฐ๊ณผ ๊ธ€ ์‚ฌ์ด์—์„œ ์ง€์ผœ์•ผ ํ•  ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ์˜ ์ฐจ์ด. */
3
3
 
4
4
  /**
5
5
  * @typedef {object} SurfaceDiff
@@ -107,7 +107,7 @@ export function surfaceViolationCount(diff) {
107
107
  return Object.values(diff).reduce((total, values) => total + values.length, 0);
108
108
  }
109
109
 
110
- /** ์›๋ฌธ์˜ ๋ณดํ˜ธ ์›์ž๋ฅผ ๋œป ์—†๋Š” ์ •๋ ฌ ์ง‘ํ•ฉ์œผ๋กœ ๋ถ„๋ฆฌํ•œ๋‹ค. @param {string} text */
110
+ /** ์›๋ฌธ์˜ ์ง€์ผœ์•ผ ํ•  ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ๋ฅผ ๋œป๊ณผ ์ƒ๊ด€์—†์ด ์ •๋ ฌํ•œ ์ง‘ํ•ฉ์œผ๋กœ ๋‚˜๋ˆˆ๋‹ค. @param {string} text */
111
111
  export function protectedSurface(text) {
112
112
  const surfaceText = text.normalize("NFC");
113
113
  return {
@@ -118,7 +118,7 @@ export function protectedSurface(text) {
118
118
  };
119
119
  }
120
120
 
121
- /** ์›๋ฌธ์˜ ๋ณดํ˜ธ ํ‘œ๋ฉด์„ ๋ชจ๋‘ ๋ฎ๋Š” Contract ์‚ฌ์‹ค ํ›„๋ณด ์ค„. @param {string} text */
121
+ /** ์›๋ฌธ์˜ ์ง€์ผœ์•ผ ํ•  ์ˆซ์žยท๋งํฌยท์ฝ”๋“œ๋ฅผ ๋ชจ๋‘ ๋‹ด๋Š” Contract ์‚ฌ์‹ค ํ›„๋ณด ์ค„. @param {string} text */
122
122
  export function factLines(text) {
123
123
  const surfaceText = text.normalize("NFC");
124
124
  const seen = new Set();
@@ -144,7 +144,7 @@ export function factLines(text) {
144
144
  ),
145
145
  );
146
146
  if (!uncovered.size) {
147
- throw new Error("์›๋ฌธ์— ์ž๋™์œผ๋กœ ๋ณดํ˜ธํ•  ์ˆซ์ž, URL, ์ธ๋ผ์ธ ์ฝ”๋“œ, ๋งํฌ ๋ชฉ์ ์ง€๊ฐ€ ์—†๋‹ค. facts๋ฅผ ์ง์ ‘ ์ž‘์„ฑํ•œ๋‹ค");
147
+ throw new Error("์›๋ฌธ์— ์ž๋™์œผ๋กœ ์ง€ํ‚ฌ ์ˆซ์ž, URL, ์ธ๋ผ์ธ ์ฝ”๋“œ, ๋งํฌ ๋ชฉ์ ์ง€๊ฐ€ ์—†๋‹ค. facts๋ฅผ ์ง์ ‘ ์ž‘์„ฑํ•œ๋‹ค");
148
148
  }
149
149
 
150
150
  const selected = new Set();