harumt 0.1.0 → 0.1.1

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 (762) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/README.en.md +24 -21
  3. package/README.md +66 -73
  4. package/data/config/lookup_tables.toml +9 -4
  5. package/dist/analyzer/config.js +1 -3
  6. package/dist/analyzer/connect.d.ts +1 -1
  7. package/dist/analyzer/connect.js +2 -1
  8. package/dist/analyzer/dictionary-provider.d.ts +2 -0
  9. package/dist/analyzer/dictionary-provider.js +3 -0
  10. package/dist/analyzer/haru-dictionary-provider.js +17 -6
  11. package/dist/analyzer/node-dictionary-provider.d.ts +19 -8
  12. package/dist/analyzer/node-dictionary-provider.js +109 -48
  13. package/dist/analyzer/node-helpers.js +12 -18
  14. package/dist/analyzer/page-cached-source.d.ts +59 -0
  15. package/dist/analyzer/page-cached-source.js +157 -0
  16. package/dist/analyzer-lexicon.js +6 -1
  17. package/dist/default-provider.d.ts +1 -1
  18. package/dist/default-provider.js +14 -6
  19. package/dist/dictionary/derivation.d.ts +0 -1
  20. package/dist/dictionary/morpheme.js +13 -7
  21. package/dist/dictionary/pattern.js +1 -1
  22. package/dist/dictionary/sense-normalization.js +3 -3
  23. package/dist/generator/aux-map.d.ts +1 -0
  24. package/dist/generator/aux-map.js +1 -1
  25. package/dist/generator/conjugator.d.ts +0 -1
  26. package/dist/generator/conjugator.js +0 -3
  27. package/dist/generator/numerals.d.ts +0 -1
  28. package/dist/generator/numerals.js +0 -3
  29. package/dist/pipeline/assembler/affix-helpers.d.ts +14 -0
  30. package/dist/pipeline/assembler/affix-helpers.js +154 -0
  31. package/dist/pipeline/assembler/content-override.d.ts +3 -0
  32. package/dist/pipeline/assembler/content-override.js +79 -0
  33. package/dist/pipeline/assembler/copula-focus-plan.d.ts +10 -0
  34. package/dist/pipeline/assembler/copula-focus-plan.js +32 -0
  35. package/dist/pipeline/assembler/copula-helpers.d.ts +31 -0
  36. package/dist/pipeline/assembler/copula-helpers.js +192 -0
  37. package/dist/pipeline/assembler/lexical-layout-hypothesis.d.ts +59 -0
  38. package/dist/pipeline/assembler/lexical-layout-hypothesis.js +357 -0
  39. package/dist/pipeline/assembler/light-verb-projection.d.ts +21 -0
  40. package/dist/pipeline/assembler/light-verb-projection.js +43 -0
  41. package/dist/pipeline/assembler/nande-reason.d.ts +4 -0
  42. package/dist/pipeline/assembler/nande-reason.js +162 -0
  43. package/dist/pipeline/assembler/particle-helpers.d.ts +10 -0
  44. package/dist/pipeline/assembler/particle-helpers.js +57 -0
  45. package/dist/pipeline/assembler/quantity-spans.d.ts +24 -0
  46. package/dist/pipeline/assembler/quantity-spans.js +58 -0
  47. package/dist/pipeline/assembler/question-plan.d.ts +5 -0
  48. package/dist/pipeline/assembler/question-plan.js +121 -0
  49. package/dist/pipeline/assembler/quote-helpers.d.ts +11 -0
  50. package/dist/pipeline/assembler/quote-helpers.js +67 -0
  51. package/dist/pipeline/assembler.d.ts +47 -31
  52. package/dist/pipeline/assembler.js +1219 -3234
  53. package/dist/pipeline/assembly-content-span.d.ts +59 -0
  54. package/dist/pipeline/assembly-content-span.js +149 -0
  55. package/dist/pipeline/attributive.d.ts +2 -2
  56. package/dist/pipeline/attributive.js +2 -5
  57. package/dist/pipeline/candidate-runtime.d.ts +2 -30
  58. package/dist/pipeline/candidate-runtime.js +4 -125
  59. package/dist/pipeline/clause-layout/adverbial-predicate.d.ts +22 -0
  60. package/dist/pipeline/clause-layout/adverbial-predicate.js +180 -0
  61. package/dist/pipeline/clause-layout/attributive-boundaries.d.ts +12 -0
  62. package/dist/pipeline/clause-layout/attributive-boundaries.js +325 -0
  63. package/dist/pipeline/clause-layout/boundary-detection.d.ts +100 -0
  64. package/dist/pipeline/clause-layout/boundary-detection.js +729 -0
  65. package/dist/pipeline/clause-layout/boundary-event-common.d.ts +8 -0
  66. package/dist/pipeline/clause-layout/boundary-event-common.js +50 -0
  67. package/dist/pipeline/clause-layout/boundary-settlement.d.ts +40 -0
  68. package/dist/pipeline/clause-layout/boundary-settlement.js +534 -0
  69. package/dist/pipeline/clause-layout/chuushi-closure.js +1 -2
  70. package/dist/pipeline/clause-layout/connective-boundaries.d.ts +34 -0
  71. package/dist/pipeline/clause-layout/connective-boundaries.js +1049 -0
  72. package/dist/pipeline/clause-layout/final-layout.d.ts +155 -0
  73. package/dist/pipeline/clause-layout/final-layout.js +544 -0
  74. package/dist/pipeline/clause-layout/index.d.ts +5 -597
  75. package/dist/pipeline/clause-layout/index.js +69 -6576
  76. package/dist/pipeline/clause-layout/juncture-verdict.d.ts +1 -3
  77. package/dist/pipeline/clause-layout/layout-types.d.ts +142 -0
  78. package/dist/pipeline/clause-layout/layout-types.js +16 -0
  79. package/dist/pipeline/clause-layout/lexical-adverbial-affiliation.d.ts +1 -1
  80. package/dist/pipeline/clause-layout/navigation.d.ts +48 -0
  81. package/dist/pipeline/clause-layout/navigation.js +264 -0
  82. package/dist/pipeline/clause-layout/nominal-anchor-evidence.d.ts +57 -0
  83. package/dist/pipeline/clause-layout/nominal-anchor-evidence.js +180 -0
  84. package/dist/pipeline/clause-layout/nominal-anchors.d.ts +9 -0
  85. package/dist/pipeline/clause-layout/nominal-anchors.js +318 -0
  86. package/dist/pipeline/clause-layout/nominal-binding.d.ts +1 -1
  87. package/dist/pipeline/clause-layout/nominal-binding.js +1 -1
  88. package/dist/pipeline/clause-layout/nominal-frame-reach.d.ts +7 -0
  89. package/dist/pipeline/clause-layout/nominal-frame-reach.js +77 -0
  90. package/dist/pipeline/clause-layout/particle-phrase-copula.d.ts +1 -1
  91. package/dist/pipeline/clause-layout/phrase-enumeration.d.ts +1 -1
  92. package/dist/pipeline/clause-layout/phrase-enumeration.js +2 -1
  93. package/dist/pipeline/clause-layout/predicate-ownership.d.ts +22 -0
  94. package/dist/pipeline/clause-layout/predicate-ownership.js +323 -0
  95. package/dist/pipeline/clause-layout/predicate-parallel.d.ts +2 -1
  96. package/dist/pipeline/clause-layout/predicate-parallel.js +16 -1
  97. package/dist/pipeline/clause-layout/predicate-shape.d.ts +49 -0
  98. package/dist/pipeline/clause-layout/predicate-shape.js +369 -0
  99. package/dist/pipeline/clause-layout/predicate-token-shape.d.ts +15 -0
  100. package/dist/pipeline/clause-layout/predicate-token-shape.js +142 -0
  101. package/dist/pipeline/clause-layout/prenominal-head-reach.d.ts +29 -0
  102. package/dist/pipeline/clause-layout/prenominal-head-reach.js +349 -0
  103. package/dist/pipeline/clause-layout/proto-layout.d.ts +144 -0
  104. package/dist/pipeline/clause-layout/proto-layout.js +327 -0
  105. package/dist/pipeline/clause-layout/proto-state.d.ts +2 -1
  106. package/dist/pipeline/clause-layout/punctuated-copula.d.ts +1 -1
  107. package/dist/pipeline/clause-layout/punctuation.d.ts +8 -0
  108. package/dist/pipeline/clause-layout/punctuation.js +33 -0
  109. package/dist/pipeline/clause-layout/quote-classification.d.ts +48 -0
  110. package/dist/pipeline/clause-layout/quote-classification.js +430 -0
  111. package/dist/pipeline/clause-layout/quote-delimiters.d.ts +2 -0
  112. package/dist/pipeline/clause-layout/quote-delimiters.js +16 -0
  113. package/dist/pipeline/clause-layout/renyou-verb-reading.d.ts +1 -1
  114. package/dist/pipeline/clause-layout/speech-act.js +1 -1
  115. package/dist/pipeline/clause-layout/token-evidence.d.ts +11 -0
  116. package/dist/pipeline/clause-layout/token-evidence.js +41 -0
  117. package/dist/pipeline/clause-layout/trivia.d.ts +5 -0
  118. package/dist/pipeline/clause-layout/trivia.js +18 -1
  119. package/dist/pipeline/clause-layout/utterance-boundaries.d.ts +41 -0
  120. package/dist/pipeline/clause-layout/utterance-boundaries.js +627 -0
  121. package/dist/pipeline/clause-layout/vocative.d.ts +5 -0
  122. package/dist/pipeline/clause-layout/vocative.js +91 -0
  123. package/dist/pipeline/clause-layout/whitespace-attributive-reading.d.ts +1 -1
  124. package/dist/pipeline/clause-layout/whitespace-attributive-reading.js +4 -1
  125. package/dist/pipeline/commitment/adverbial-adjunct-routing.d.ts +3 -0
  126. package/dist/pipeline/commitment/adverbial-adjunct-routing.js +109 -0
  127. package/dist/pipeline/commitment/benefactive-span-hydration.d.ts +5 -0
  128. package/dist/pipeline/commitment/benefactive-span-hydration.js +49 -0
  129. package/dist/pipeline/commitment/candidate-projection.d.ts +29 -0
  130. package/dist/pipeline/commitment/candidate-projection.js +512 -0
  131. package/dist/pipeline/commitment/connective-refinement.d.ts +8 -0
  132. package/dist/pipeline/commitment/connective-refinement.js +152 -0
  133. package/dist/pipeline/commitment/deferred-reanalysis.d.ts +1 -1
  134. package/dist/pipeline/commitment/final-sense-sync.d.ts +8 -0
  135. package/dist/pipeline/commitment/final-sense-sync.js +264 -0
  136. package/dist/pipeline/commitment/head-owner-candidate-selection.d.ts +15 -0
  137. package/dist/pipeline/commitment/head-owner-candidate-selection.js +158 -0
  138. package/dist/pipeline/commitment/particle-roles.d.ts +1 -1
  139. package/dist/pipeline/commitment/particle-roles.js +546 -398
  140. package/dist/pipeline/commitment/passive-class.d.ts +1 -1
  141. package/dist/pipeline/commitment/passive-class.js +2 -3
  142. package/dist/pipeline/commitment/quantity-span-commitment.d.ts +4 -0
  143. package/dist/pipeline/commitment/quantity-span-commitment.js +37 -0
  144. package/dist/pipeline/commitment/quote-refinement.d.ts +6 -0
  145. package/dist/pipeline/commitment/quote-refinement.js +130 -0
  146. package/dist/pipeline/commitment/role-case-shadow.d.ts +0 -4
  147. package/dist/pipeline/commitment/role-case-shadow.js +0 -3
  148. package/dist/pipeline/commitment/semantic-frame.d.ts +1 -1
  149. package/dist/pipeline/commitment/semantic-frame.js +2 -3
  150. package/dist/pipeline/commitment/span-evidence.d.ts +2 -3
  151. package/dist/pipeline/commitment/span-evidence.js +7 -18
  152. package/dist/pipeline/commitment/stem-candidate-selection.d.ts +24 -0
  153. package/dist/pipeline/commitment/stem-candidate-selection.js +663 -0
  154. package/dist/pipeline/commitment/te-connective-resolution.d.ts +1 -1
  155. package/dist/pipeline/commitment/te-connective-resolution.js +0 -1
  156. package/dist/pipeline/commitment/types.d.ts +1 -1
  157. package/dist/pipeline/commitment/types.js +1 -1
  158. package/dist/pipeline/commitment/voice-reading-resolution.d.ts +1 -1
  159. package/dist/pipeline/commitment/voice-reading-resolution.js +117 -34
  160. package/dist/pipeline/compounds/compound-tail-tokens.d.ts +12 -0
  161. package/dist/pipeline/compounds/compound-tail-tokens.js +37 -0
  162. package/dist/pipeline/compounds/compound-translation-candidates.d.ts +49 -0
  163. package/dist/pipeline/compounds/compound-translation-candidates.js +154 -0
  164. package/dist/pipeline/compounds/compound-verbs.js +4 -9
  165. package/dist/pipeline/compounds/index.d.ts +24 -29
  166. package/dist/pipeline/compounds/index.js +361 -383
  167. package/dist/pipeline/content-resolver/postaux-pattern-rendering.d.ts +0 -2
  168. package/dist/pipeline/content-resolver/postaux-pattern-rendering.js +1 -5
  169. package/dist/pipeline/content-resolver/types.d.ts +0 -4
  170. package/dist/pipeline/content-resolver.js +641 -492
  171. package/dist/pipeline/context.d.ts +2 -1
  172. package/dist/pipeline/context.js +4 -3
  173. package/dist/pipeline/core.d.ts +8 -95
  174. package/dist/pipeline/core.js +1339 -7183
  175. package/dist/pipeline/deferred-commitment.d.ts +2 -17
  176. package/dist/pipeline/deferred-commitment.js +406 -2353
  177. package/dist/pipeline/demo-discourse.d.ts +1 -1
  178. package/dist/pipeline/fallback/index.d.ts +0 -1
  179. package/dist/pipeline/fallback/index.js +3 -7
  180. package/dist/pipeline/fallback/orphan-unit-absorption.d.ts +4 -0
  181. package/dist/pipeline/fallback/orphan-unit-absorption.js +57 -0
  182. package/dist/pipeline/fallback/unsupported-raw.d.ts +0 -2
  183. package/dist/pipeline/fallback/unsupported-raw.js +0 -10
  184. package/dist/pipeline/head-tail/boundary/clause-start.js +1 -10
  185. package/dist/pipeline/head-tail/boundary/ka-ownership.d.ts +3 -2
  186. package/dist/pipeline/head-tail/boundary/ka-ownership.js +16 -9
  187. package/dist/pipeline/head-tail/boundary/marker.js +1 -1
  188. package/dist/pipeline/head-tail/boundary/punctuation.d.ts +0 -1
  189. package/dist/pipeline/head-tail/boundary/punctuation.js +1 -6
  190. package/dist/pipeline/head-tail/boundary/quote-marker.js +1 -1
  191. package/dist/pipeline/head-tail/candidate/collect.d.ts +3 -3
  192. package/dist/pipeline/head-tail/candidate/context.d.ts +1 -1
  193. package/dist/pipeline/head-tail/candidate/context.js +1 -1
  194. package/dist/pipeline/head-tail/candidate/evidence.d.ts +0 -2
  195. package/dist/pipeline/head-tail/candidate/evidence.js +0 -22
  196. package/dist/pipeline/head-tail/candidate/owner-payload.d.ts +1 -1
  197. package/dist/pipeline/head-tail/candidate/semantic-classifiers.d.ts +2 -1
  198. package/dist/pipeline/head-tail/data/honorific-formulaic-arm-table.d.ts +0 -1
  199. package/dist/pipeline/head-tail/data/honorific-formulaic-arm-table.js +0 -3
  200. package/dist/pipeline/head-tail/data/quoted-reporting-sets.d.ts +2 -0
  201. package/dist/pipeline/head-tail/data/quoted-reporting-sets.js +4 -0
  202. package/dist/pipeline/head-tail/grammar.d.ts +0 -1
  203. package/dist/pipeline/head-tail/head/adapters/nominal/commit.js +3 -2
  204. package/dist/pipeline/head-tail/head/adapters/nominal/grammar.d.ts +2 -1
  205. package/dist/pipeline/head-tail/head/adapters/nominal/integration.d.ts +2 -2
  206. package/dist/pipeline/head-tail/head/adapters/nominal/integration.js +6 -6
  207. package/dist/pipeline/head-tail/head/adapters/nominal/owner-arbitration.d.ts +1 -1
  208. package/dist/pipeline/head-tail/head/adapters/nominal/parser.d.ts +1 -2
  209. package/dist/pipeline/head-tail/head/adapters/nominal/parser.js +20 -24
  210. package/dist/pipeline/head-tail/head/adapters/nominal/plan-lifecycle.d.ts +1 -1
  211. package/dist/pipeline/head-tail/head/adapters/nominal/renyou-nominal-head.js +2 -2
  212. package/dist/pipeline/head-tail/integration/content-head-dispatch.d.ts +5 -6
  213. package/dist/pipeline/head-tail/integration/content-head-dispatch.js +2 -5
  214. package/dist/pipeline/head-tail/integration/copula-focus-adjunct.js +1 -1
  215. package/dist/pipeline/head-tail/integration/copula-host-chain.js +1 -1
  216. package/dist/pipeline/head-tail/integration/honorific-formulaic-host.d.ts +25 -0
  217. package/dist/pipeline/head-tail/integration/honorific-formulaic-host.js +142 -0
  218. package/dist/pipeline/head-tail/integration/nominal-assembly.d.ts +2 -2
  219. package/dist/pipeline/head-tail/integration/nominal-assembly.js +1 -1
  220. package/dist/pipeline/head-tail/integration/particle-phrase-copula.d.ts +1 -1
  221. package/dist/pipeline/head-tail/integration/semantic-carrier-predicate.js +3 -20
  222. package/dist/pipeline/head-tail/integration/tail-assembly.d.ts +2 -3
  223. package/dist/pipeline/head-tail/integration/tail-assembly.js +20 -145
  224. package/dist/pipeline/head-tail/lifecycle/commit-context.d.ts +1 -1
  225. package/dist/pipeline/head-tail/lifecycle/head-tail-render-plan.d.ts +1 -1
  226. package/dist/pipeline/head-tail/lifecycle/hooks.d.ts +2 -3
  227. package/dist/pipeline/head-tail/lifecycle/hooks.js +0 -9
  228. package/dist/pipeline/head-tail/lifecycle/plan-context.d.ts +1 -1
  229. package/dist/pipeline/head-tail/lifecycle/plan-context.js +1 -1
  230. package/dist/pipeline/head-tail/lifecycle/registry.d.ts +3 -4
  231. package/dist/pipeline/head-tail/lifecycle/registry.js +1 -4
  232. package/dist/pipeline/head-tail/lifecycle/render.js +2 -2
  233. package/dist/pipeline/head-tail/line-memo.d.ts +1 -1
  234. package/dist/pipeline/head-tail/line-memo.js +25 -6
  235. package/dist/pipeline/head-tail/tail/chain.d.ts +3 -3
  236. package/dist/pipeline/head-tail/tail/families/tokoro-semantics.d.ts +0 -1
  237. package/dist/pipeline/head-tail/tail/families/tokoro-semantics.js +2 -1
  238. package/dist/pipeline/head-tail/tail/families/youda-semantics.js +1 -4
  239. package/dist/pipeline/head-tail/tail/postverb-events.d.ts +0 -180
  240. package/dist/pipeline/head-tail/tail/postverb-events.js +2 -2249
  241. package/dist/pipeline/head-tail/tail/postverb-tail-classifier.js +3 -4
  242. package/dist/pipeline/head-tail/tail/predicate-root/aspect-semantics.d.ts +10 -8
  243. package/dist/pipeline/head-tail/tail/predicate-root/aspect-semantics.js +2 -55
  244. package/dist/pipeline/head-tail/tail/predicate-root/benefactive-hydration.d.ts +1 -1
  245. package/dist/pipeline/head-tail/tail/predicate-root/benefactive-hydration.js +1 -18
  246. package/dist/pipeline/head-tail/tail/predicate-root/boundary-semantics.js +4 -2
  247. package/dist/pipeline/head-tail/tail/predicate-root/classifiers/causative-aux.d.ts +4 -0
  248. package/dist/pipeline/head-tail/tail/predicate-root/classifiers/causative-aux.js +11 -0
  249. package/dist/pipeline/head-tail/tail/predicate-root/classifiers/copula-concessive.d.ts +1 -1
  250. package/dist/pipeline/head-tail/tail/predicate-root/classifiers/copula-concessive.js +14 -3
  251. package/dist/pipeline/head-tail/tail/predicate-root/classifiers/tokens.d.ts +0 -2
  252. package/dist/pipeline/head-tail/tail/predicate-root/classifiers/tokens.js +3 -12
  253. package/dist/pipeline/head-tail/tail/predicate-root/commit.d.ts +2 -1
  254. package/dist/pipeline/head-tail/tail/predicate-root/commit.js +1 -1
  255. package/dist/pipeline/head-tail/tail/predicate-root/commitment-bridge.d.ts +1 -1
  256. package/dist/pipeline/head-tail/tail/predicate-root/connective-ops.d.ts +9 -0
  257. package/dist/pipeline/head-tail/tail/predicate-root/connective-ops.js +69 -0
  258. package/dist/pipeline/head-tail/tail/predicate-root/connective-render.d.ts +7 -0
  259. package/dist/pipeline/head-tail/tail/predicate-root/connective-render.js +52 -0
  260. package/dist/pipeline/head-tail/tail/predicate-root/connective-surface-lookup.d.ts +11 -0
  261. package/dist/pipeline/head-tail/tail/predicate-root/connective-surface-lookup.js +114 -0
  262. package/dist/pipeline/head-tail/tail/predicate-root/derivational-host-base.js +1 -1
  263. package/dist/pipeline/head-tail/tail/predicate-root/grammar.d.ts +2 -14
  264. package/dist/pipeline/head-tail/tail/predicate-root/grammar.js +19 -128
  265. package/dist/pipeline/head-tail/tail/predicate-root/head-contract-table.d.ts +2 -1
  266. package/dist/pipeline/head-tail/tail/predicate-root/head-contract-table.js +1 -1
  267. package/dist/pipeline/head-tail/tail/predicate-root/head-hydration.js +2 -17
  268. package/dist/pipeline/head-tail/tail/predicate-root/inspect.d.ts +2 -8
  269. package/dist/pipeline/head-tail/tail/predicate-root/inspect.js +12 -16
  270. package/dist/pipeline/head-tail/tail/predicate-root/integration/attributive-boundary.d.ts +35 -0
  271. package/dist/pipeline/head-tail/tail/predicate-root/integration/attributive-boundary.js +1079 -0
  272. package/dist/pipeline/head-tail/tail/predicate-root/integration/clause-boundaries.d.ts +69 -0
  273. package/dist/pipeline/head-tail/tail/predicate-root/integration/clause-boundaries.js +2972 -0
  274. package/dist/pipeline/head-tail/tail/predicate-root/integration/contracts.d.ts +118 -0
  275. package/dist/pipeline/head-tail/tail/predicate-root/integration/end-boundary-inference.d.ts +22 -0
  276. package/dist/pipeline/head-tail/tail/predicate-root/integration/end-boundary-inference.js +698 -0
  277. package/dist/pipeline/head-tail/tail/predicate-root/integration/head-admission.d.ts +39 -0
  278. package/dist/pipeline/head-tail/tail/predicate-root/integration/head-admission.js +689 -0
  279. package/dist/pipeline/head-tail/tail/predicate-root/integration/head-profiles.d.ts +13 -0
  280. package/dist/pipeline/head-tail/tail/predicate-root/integration/head-profiles.js +138 -0
  281. package/dist/pipeline/head-tail/tail/predicate-root/integration/parse-clause.d.ts +60 -0
  282. package/dist/pipeline/head-tail/tail/predicate-root/integration/parse-clause.js +2013 -0
  283. package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-evidence.d.ts +15 -0
  284. package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-evidence.js +109 -0
  285. package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-start-evidence.d.ts +48 -0
  286. package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-start-evidence.js +608 -0
  287. package/dist/pipeline/head-tail/tail/predicate-root/integration/readiness.d.ts +1 -1
  288. package/dist/pipeline/head-tail/tail/predicate-root/integration/readiness.js +3 -2
  289. package/dist/pipeline/head-tail/tail/predicate-root/integration/stem-candidates.d.ts +177 -0
  290. package/dist/pipeline/head-tail/tail/predicate-root/integration/stem-candidates.js +1885 -0
  291. package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-arbitration.d.ts +13 -0
  292. package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-arbitration.js +283 -0
  293. package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-chunk-scan-end.d.ts +8 -0
  294. package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-chunk-scan-end.js +389 -0
  295. package/dist/pipeline/head-tail/tail/predicate-root/integration/zero-head.js +3 -2
  296. package/dist/pipeline/head-tail/tail/predicate-root/integration.d.ts +9 -166
  297. package/dist/pipeline/head-tail/tail/predicate-root/integration.js +254 -10644
  298. package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective-tail.d.ts +51 -0
  299. package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective-tail.js +808 -0
  300. package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective.d.ts +1 -1
  301. package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective.js +5 -3
  302. package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula-tail.d.ts +22 -0
  303. package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula-tail.js +156 -0
  304. package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula.d.ts +8 -2
  305. package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula.js +177 -51
  306. package/dist/pipeline/head-tail/tail/predicate-root/matchers/lexical-idioms.d.ts +37 -0
  307. package/dist/pipeline/head-tail/tail/predicate-root/matchers/lexical-idioms.js +959 -0
  308. package/dist/pipeline/head-tail/tail/predicate-root/matchers/likeness-modal.d.ts +15 -0
  309. package/dist/pipeline/head-tail/tail/predicate-root/matchers/likeness-modal.js +327 -0
  310. package/dist/pipeline/head-tail/tail/predicate-root/matchers/modal-tail.d.ts +44 -0
  311. package/dist/pipeline/head-tail/tail/predicate-root/matchers/modal-tail.js +998 -0
  312. package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation-tail.d.ts +20 -0
  313. package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation-tail.js +424 -0
  314. package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation.d.ts +1 -1
  315. package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation.js +1 -1
  316. package/dist/pipeline/head-tail/tail/predicate-root/matchers/postverb-operator.d.ts +25 -0
  317. package/dist/pipeline/head-tail/tail/predicate-root/matchers/postverb-operator.js +722 -0
  318. package/dist/pipeline/head-tail/tail/predicate-root/matchers/predicate-projection-connective.js +143 -9
  319. package/dist/pipeline/head-tail/tail/predicate-root/matchers/predicate-quote.d.ts +44 -0
  320. package/dist/pipeline/head-tail/tail/predicate-root/matchers/predicate-quote.js +856 -0
  321. package/dist/pipeline/head-tail/tail/predicate-root/matchers/projection-tail.d.ts +45 -0
  322. package/dist/pipeline/head-tail/tail/predicate-root/matchers/projection-tail.js +573 -0
  323. package/dist/pipeline/head-tail/tail/predicate-root/matchers/quantity-extent.d.ts +2 -1
  324. package/dist/pipeline/head-tail/tail/predicate-root/matchers/quantity-extent.js +1 -1
  325. package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-aspect.d.ts +23 -0
  326. package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-aspect.js +598 -0
  327. package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-host.d.ts +11 -0
  328. package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-host.js +52 -0
  329. package/dist/pipeline/head-tail/tail/predicate-root/matchers/terminal-sfp.d.ts +24 -0
  330. package/dist/pipeline/head-tail/tail/predicate-root/matchers/terminal-sfp.js +873 -0
  331. package/dist/pipeline/head-tail/tail/predicate-root/mid-chain-connective-license.js +2 -1
  332. package/dist/pipeline/head-tail/tail/predicate-root/nominal-host-phrase.d.ts +0 -1
  333. package/dist/pipeline/head-tail/tail/predicate-root/nominal-host-phrase.js +0 -3
  334. package/dist/pipeline/head-tail/tail/predicate-root/op-builders.d.ts +5 -1
  335. package/dist/pipeline/head-tail/tail/predicate-root/op-builders.js +21 -0
  336. package/dist/pipeline/head-tail/tail/predicate-root/operator-head.d.ts +1 -3
  337. package/dist/pipeline/head-tail/tail/predicate-root/operator-head.js +0 -16
  338. package/dist/pipeline/head-tail/tail/predicate-root/parse-boundary-hint.d.ts +1 -1
  339. package/dist/pipeline/head-tail/tail/predicate-root/parse-closure.d.ts +15 -0
  340. package/dist/pipeline/head-tail/tail/predicate-root/parse-closure.js +158 -0
  341. package/dist/pipeline/head-tail/tail/predicate-root/parse-coordinates.d.ts +10 -0
  342. package/dist/pipeline/head-tail/tail/predicate-root/parse-coordinates.js +29 -0
  343. package/dist/pipeline/head-tail/tail/predicate-root/parse-stem.d.ts +14 -0
  344. package/dist/pipeline/head-tail/tail/predicate-root/parse-stem.js +150 -0
  345. package/dist/pipeline/head-tail/tail/predicate-root/parse-tail.d.ts +40 -0
  346. package/dist/pipeline/head-tail/tail/predicate-root/parse-tail.js +1625 -0
  347. package/dist/pipeline/head-tail/tail/predicate-root/parser.d.ts +26 -137
  348. package/dist/pipeline/head-tail/tail/predicate-root/parser.js +153 -9225
  349. package/dist/pipeline/head-tail/tail/predicate-root/plan-lifecycle.d.ts +2 -2
  350. package/dist/pipeline/head-tail/tail/predicate-root/postverb-host-attachment.d.ts +8 -0
  351. package/dist/pipeline/head-tail/tail/predicate-root/postverb-host-attachment.js +105 -0
  352. package/dist/pipeline/head-tail/tail/predicate-root/production-admission-contract.js +261 -215
  353. package/dist/pipeline/head-tail/tail/predicate-root/production-claim-access.d.ts +0 -1
  354. package/dist/pipeline/head-tail/tail/predicate-root/production-claim-access.js +0 -3
  355. package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive-change.d.ts +3 -0
  356. package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive-change.js +327 -0
  357. package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive.d.ts +54 -0
  358. package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive.js +1212 -0
  359. package/dist/pipeline/head-tail/tail/predicate-root/production-families/chain-patterns.d.ts +191 -0
  360. package/dist/pipeline/head-tail/tail/predicate-root/production-families/chain-patterns.js +127 -0
  361. package/dist/pipeline/head-tail/tail/predicate-root/production-families/clause-chain.d.ts +17 -0
  362. package/dist/pipeline/head-tail/tail/predicate-root/production-families/clause-chain.js +1071 -0
  363. package/dist/pipeline/head-tail/tail/predicate-root/production-families/conditional-carriers.d.ts +4 -0
  364. package/dist/pipeline/head-tail/tail/predicate-root/production-families/conditional-carriers.js +366 -0
  365. package/dist/pipeline/head-tail/tail/predicate-root/production-families/confirmation.d.ts +3 -0
  366. package/dist/pipeline/head-tail/tail/predicate-root/production-families/confirmation.js +289 -0
  367. package/dist/pipeline/head-tail/tail/predicate-root/production-families/copula.d.ts +8 -0
  368. package/dist/pipeline/head-tail/tail/predicate-root/production-families/copula.js +868 -0
  369. package/dist/pipeline/head-tail/tail/predicate-root/production-families/desiderative.d.ts +4 -0
  370. package/dist/pipeline/head-tail/tail/predicate-root/production-families/desiderative.js +414 -0
  371. package/dist/pipeline/head-tail/tail/predicate-root/production-families/exemplification.d.ts +2 -0
  372. package/dist/pipeline/head-tail/tail/predicate-root/production-families/exemplification.js +290 -0
  373. package/dist/pipeline/head-tail/tail/predicate-root/production-families/imperative.d.ts +6 -0
  374. package/dist/pipeline/head-tail/tail/predicate-root/production-families/imperative.js +468 -0
  375. package/dist/pipeline/head-tail/tail/predicate-root/production-families/mid-chain-quote.d.ts +4 -0
  376. package/dist/pipeline/head-tail/tail/predicate-root/production-families/mid-chain-quote.js +558 -0
  377. package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalization.d.ts +6 -0
  378. package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalization.js +332 -0
  379. package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalized-quote.d.ts +3 -0
  380. package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalized-quote.js +393 -0
  381. package/dist/pipeline/head-tail/tail/predicate-root/production-families/normalization.d.ts +7 -0
  382. package/dist/pipeline/head-tail/tail/predicate-root/production-families/normalization.js +334 -0
  383. package/dist/pipeline/head-tail/tail/predicate-root/production-families/potential.d.ts +3 -0
  384. package/dist/pipeline/head-tail/tail/predicate-root/production-families/potential.js +304 -0
  385. package/dist/pipeline/head-tail/tail/predicate-root/production-families/reason-and-sequence.d.ts +6 -0
  386. package/dist/pipeline/head-tail/tail/predicate-root/production-families/reason-and-sequence.js +687 -0
  387. package/dist/pipeline/head-tail/tail/predicate-root/production-families/request.d.ts +4 -0
  388. package/dist/pipeline/head-tail/tail/predicate-root/production-families/request.js +1013 -0
  389. package/dist/pipeline/head-tail/tail/predicate-root/production-families/shared.d.ts +25 -0
  390. package/dist/pipeline/head-tail/tail/predicate-root/production-families/shared.js +53 -0
  391. package/dist/pipeline/head-tail/tail/predicate-root/production-families/subordination.d.ts +5 -0
  392. package/dist/pipeline/head-tail/tail/predicate-root/production-families/subordination.js +318 -0
  393. package/dist/pipeline/head-tail/tail/predicate-root/production-families/terminal.d.ts +14 -0
  394. package/dist/pipeline/head-tail/tail/predicate-root/production-families/terminal.js +976 -0
  395. package/dist/pipeline/head-tail/tail/predicate-root/production-families/volitional.d.ts +10 -0
  396. package/dist/pipeline/head-tail/tail/predicate-root/production-families/volitional.js +677 -0
  397. package/dist/pipeline/head-tail/tail/predicate-root/production-families.d.ts +1 -8
  398. package/dist/pipeline/head-tail/tail/predicate-root/production-families.js +19 -11025
  399. package/dist/pipeline/head-tail/tail/predicate-root/production-lowering-bindings.js +9 -3
  400. package/dist/pipeline/head-tail/tail/predicate-root/production-registry.d.ts +2 -3
  401. package/dist/pipeline/head-tail/tail/predicate-root/production-registry.js +15 -19
  402. package/dist/pipeline/head-tail/tail/predicate-root/quote-tail-context.d.ts +8 -0
  403. package/dist/pipeline/head-tail/tail/predicate-root/quote-tail-context.js +66 -0
  404. package/dist/pipeline/head-tail/tail/predicate-root/render-derivational-host-projection.d.ts +11 -0
  405. package/dist/pipeline/head-tail/tail/predicate-root/render-derivational-host-projection.js +67 -0
  406. package/dist/pipeline/head-tail/tail/predicate-root/render-root.d.ts +10 -0
  407. package/dist/pipeline/head-tail/tail/predicate-root/render-root.js +203 -0
  408. package/dist/pipeline/head-tail/tail/predicate-root/render-sfp-terminal.d.ts +3 -0
  409. package/dist/pipeline/head-tail/tail/predicate-root/render-sfp-terminal.js +647 -0
  410. package/dist/pipeline/head-tail/tail/predicate-root/render.d.ts +9 -25
  411. package/dist/pipeline/head-tail/tail/predicate-root/render.js +715 -5879
  412. package/dist/pipeline/head-tail/tail/predicate-root/renderers/aspect-bases.d.ts +23 -0
  413. package/dist/pipeline/head-tail/tail/predicate-root/renderers/aspect-bases.js +523 -0
  414. package/dist/pipeline/head-tail/tail/predicate-root/renderers/aspect-benefactive.js +1 -1
  415. package/dist/pipeline/head-tail/tail/predicate-root/renderers/attributive-tail-forms.d.ts +71 -0
  416. package/dist/pipeline/head-tail/tail/predicate-root/renderers/attributive-tail-forms.js +907 -0
  417. package/dist/pipeline/head-tail/tail/predicate-root/renderers/aux-layer-context.d.ts +48 -0
  418. package/dist/pipeline/head-tail/tail/predicate-root/renderers/aux-layer-context.js +1 -0
  419. package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-model.d.ts +3 -1
  420. package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-model.js +35 -1
  421. package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-support.d.ts +8 -1
  422. package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-support.js +90 -0
  423. package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-render.d.ts +1 -13
  424. package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-render.js +3 -10
  425. package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-tail.d.ts +17 -0
  426. package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-tail.js +439 -0
  427. package/dist/pipeline/head-tail/tail/predicate-root/renderers/conjecture-compose.d.ts +34 -0
  428. package/dist/pipeline/head-tail/tail/predicate-root/renderers/conjecture-compose.js +358 -0
  429. package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-compose.d.ts +2 -120
  430. package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-compose.js +90 -1670
  431. package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-ending.d.ts +7 -0
  432. package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-ending.js +36 -0
  433. package/dist/pipeline/head-tail/tail/predicate-root/renderers/continuative-copula.d.ts +7 -0
  434. package/dist/pipeline/head-tail/tail/predicate-root/renderers/continuative-copula.js +61 -0
  435. package/dist/pipeline/head-tail/tail/predicate-root/renderers/desire-bases.d.ts +9 -0
  436. package/dist/pipeline/head-tail/tail/predicate-root/renderers/desire-bases.js +69 -0
  437. package/dist/pipeline/head-tail/tail/predicate-root/renderers/hostless-conditional-quote.d.ts +12 -2
  438. package/dist/pipeline/head-tail/tail/predicate-root/renderers/hostless-conditional-quote.js +19 -1
  439. package/dist/pipeline/head-tail/tail/predicate-root/renderers/idiom-bases.d.ts +119 -0
  440. package/dist/pipeline/head-tail/tail/predicate-root/renderers/idiom-bases.js +393 -0
  441. package/dist/pipeline/head-tail/tail/predicate-root/renderers/modal-bases.d.ts +77 -0
  442. package/dist/pipeline/head-tail/tail/predicate-root/renderers/modal-bases.js +1243 -0
  443. package/dist/pipeline/head-tail/tail/predicate-root/renderers/non-chain-tail.d.ts +3 -0
  444. package/dist/pipeline/head-tail/tail/predicate-root/renderers/non-chain-tail.js +1045 -0
  445. package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-attributive-forms.d.ts +38 -0
  446. package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-attributive-forms.js +507 -0
  447. package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-conjecture-compose.d.ts +5 -0
  448. package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-conjecture-compose.js +108 -0
  449. package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-tail-forms.d.ts +72 -0
  450. package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-tail-forms.js +1343 -0
  451. package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula.js +9 -3
  452. package/dist/pipeline/head-tail/tail/predicate-root/renderers/op-chain.js +1229 -1107
  453. package/dist/pipeline/head-tail/tail/predicate-root/renderers/operator-chain-tail.d.ts +23 -0
  454. package/dist/pipeline/head-tail/tail/predicate-root/renderers/operator-chain-tail.js +443 -0
  455. package/dist/pipeline/head-tail/tail/predicate-root/renderers/postverb-auxiliary-bases.d.ts +12 -0
  456. package/dist/pipeline/head-tail/tail/predicate-root/renderers/postverb-auxiliary-bases.js +1193 -0
  457. package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-base-projection.d.ts +18 -0
  458. package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-base-projection.js +284 -0
  459. package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-bases.d.ts +3 -271
  460. package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-bases.js +438 -5062
  461. package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-terminal-compose.d.ts +10 -0
  462. package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-terminal-compose.js +167 -0
  463. package/dist/pipeline/head-tail/tail/predicate-root/renderers/purpose-manner-compose.d.ts +9 -0
  464. package/dist/pipeline/head-tail/tail/predicate-root/renderers/purpose-manner-compose.js +92 -0
  465. package/dist/pipeline/head-tail/tail/predicate-root/renderers/quote-complement-compose.d.ts +53 -0
  466. package/dist/pipeline/head-tail/tail/predicate-root/renderers/quote-complement-compose.js +534 -0
  467. package/dist/pipeline/head-tail/tail/predicate-root/renderers/reason-quote-carrier.js +1 -1
  468. package/dist/pipeline/head-tail/tail/predicate-root/renderers/scope-bridge-bases.d.ts +5 -0
  469. package/dist/pipeline/head-tail/tail/predicate-root/renderers/scope-bridge-bases.js +571 -0
  470. package/dist/pipeline/head-tail/tail/predicate-root/renderers/sequence-after-copula.js +1 -1
  471. package/dist/pipeline/head-tail/tail/predicate-root/renderers/sfp-question.d.ts +2 -1
  472. package/dist/pipeline/head-tail/tail/predicate-root/renderers/sfp-question.js +9 -12
  473. package/dist/pipeline/head-tail/tail/predicate-root/renderers/tail-host-trace.d.ts +15 -0
  474. package/dist/pipeline/head-tail/tail/predicate-root/renderers/tail-host-trace.js +134 -0
  475. package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-bases.d.ts +41 -0
  476. package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-bases.js +648 -0
  477. package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-tail.d.ts +12 -0
  478. package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-tail.js +306 -0
  479. package/dist/pipeline/head-tail/tail/predicate-root/span-provenance.d.ts +1 -1
  480. package/dist/pipeline/head-tail/tail/predicate-root/suffix-handoff.d.ts +0 -1
  481. package/dist/pipeline/head-tail/tail/predicate-root/suffix-handoff.js +0 -13
  482. package/dist/pipeline/head-tail/tail/predicate-root/tail-evidence-decision.d.ts +1 -1
  483. package/dist/pipeline/head-tail/tail/predicate-root/tail-evidence-decision.js +5 -45
  484. package/dist/pipeline/head-tail/tail/predicate-root/tame-reason-evidence.d.ts +8 -1
  485. package/dist/pipeline/head-tail/tail/predicate-root/tame-reason-evidence.js +15 -0
  486. package/dist/pipeline/head-tail/tail/predicate-root/trace.d.ts +1 -1
  487. package/dist/pipeline/head-tail/tail/predicate-root/trace.js +2 -1
  488. package/dist/pipeline/head-tail/tail/segments/nominal-frame.d.ts +1 -1
  489. package/dist/pipeline/head-tail/tail/te-tail-continuation-table.js +1 -3
  490. package/dist/pipeline/index.d.ts +0 -4
  491. package/dist/pipeline/lexical-nominal-head-claims.d.ts +1 -1
  492. package/dist/pipeline/lexical-particle-boundary-claims.d.ts +1 -1
  493. package/dist/pipeline/lexical-renyou-head-claims.d.ts +1 -1
  494. package/dist/pipeline/lexical-renyou-head-claims.js +1 -1
  495. package/dist/pipeline/lookup-tables.d.ts +1 -0
  496. package/dist/pipeline/lookup-tables.js +1 -0
  497. package/dist/pipeline/matchers.d.ts +0 -3
  498. package/dist/pipeline/matchers.js +1 -8
  499. package/dist/pipeline/particle-head-dispatch.d.ts +1 -1
  500. package/dist/pipeline/particle-head-dispatch.js +472 -442
  501. package/dist/pipeline/particles/index.d.ts +3 -3
  502. package/dist/pipeline/particles/secondary-particle.d.ts +1 -0
  503. package/dist/pipeline/particles/secondary-particle.js +4 -0
  504. package/dist/pipeline/pattern-runtime.d.ts +0 -61
  505. package/dist/pipeline/pattern-runtime.js +3 -684
  506. package/dist/pipeline/preprocess/analyzer-input-offsets.d.ts +5 -0
  507. package/dist/pipeline/preprocess/analyzer-input-offsets.js +23 -0
  508. package/dist/pipeline/preprocess/auxiliary-variant-retag.d.ts +7 -0
  509. package/dist/pipeline/preprocess/auxiliary-variant-retag.js +178 -0
  510. package/dist/pipeline/preprocess/bungo-nasal-n-retag.d.ts +9 -0
  511. package/dist/pipeline/preprocess/bungo-nasal-n-retag.js +318 -0
  512. package/dist/pipeline/preprocess/cat-meow.d.ts +4 -0
  513. package/dist/pipeline/preprocess/cat-meow.js +46 -0
  514. package/dist/pipeline/preprocess/causative-aux-lemma.d.ts +2 -0
  515. package/dist/pipeline/preprocess/causative-aux-lemma.js +10 -0
  516. package/dist/pipeline/preprocess/collapsed-aspect-aux.d.ts +3 -0
  517. package/dist/pipeline/preprocess/collapsed-aspect-aux.js +217 -0
  518. package/dist/pipeline/preprocess/collapsed-te-oku.d.ts +3 -0
  519. package/dist/pipeline/preprocess/collapsed-te-oku.js +210 -0
  520. package/dist/pipeline/preprocess/collocation-emission.d.ts +14 -0
  521. package/dist/pipeline/preprocess/collocation-emission.js +148 -0
  522. package/dist/pipeline/preprocess/colloquial-vowel-fusion.d.ts +4 -0
  523. package/dist/pipeline/preprocess/colloquial-vowel-fusion.js +164 -0
  524. package/dist/{transform → pipeline/preprocess}/compound-particle-merge.d.ts +2 -2
  525. package/dist/{transform → pipeline/preprocess}/compound-particle-merge.js +5 -5
  526. package/dist/pipeline/preprocess/copula-focus-negative-state-change.d.ts +3 -0
  527. package/dist/pipeline/preprocess/copula-focus-negative-state-change.js +79 -0
  528. package/dist/pipeline/preprocess/copula-renyou-retag.d.ts +3 -0
  529. package/dist/pipeline/preprocess/copula-renyou-retag.js +56 -0
  530. package/dist/pipeline/preprocess/emphasis-sokuon.d.ts +10 -0
  531. package/dist/pipeline/preprocess/emphasis-sokuon.js +182 -0
  532. package/dist/{transform → pipeline/preprocess}/explanatory-mon-sfp-retag.d.ts +1 -1
  533. package/dist/{transform → pipeline/preprocess}/explanatory-mon-sfp-retag.js +2 -2
  534. package/dist/pipeline/preprocess/follower-context.d.ts +7 -0
  535. package/dist/pipeline/preprocess/follower-context.js +33 -0
  536. package/dist/pipeline/preprocess/fused-conditional.d.ts +3 -0
  537. package/dist/pipeline/preprocess/fused-conditional.js +97 -0
  538. package/dist/pipeline/preprocess/imperative-mistag-recovery.d.ts +7 -0
  539. package/dist/pipeline/preprocess/imperative-mistag-recovery.js +135 -0
  540. package/dist/pipeline/preprocess/input-text-normalization.d.ts +3 -0
  541. package/dist/pipeline/preprocess/input-text-normalization.js +39 -0
  542. package/dist/pipeline/preprocess/kansai-dialect.d.ts +9 -0
  543. package/dist/pipeline/preprocess/kansai-dialect.js +501 -0
  544. package/dist/{transform → pipeline/preprocess}/keijouji-copula-de-retag.d.ts +1 -1
  545. package/dist/{transform → pipeline/preprocess}/keijouji-copula-de-retag.js +2 -2
  546. package/dist/{transform → pipeline/preprocess}/ni-complement-matrix-flip.d.ts +1 -1
  547. package/dist/{transform → pipeline/preprocess}/ni-complement-matrix-flip.js +2 -2
  548. package/dist/pipeline/preprocess/past-quotative-tte-resplit.d.ts +3 -0
  549. package/dist/pipeline/preprocess/past-quotative-tte-resplit.js +55 -0
  550. package/dist/pipeline/preprocess/prolonged-orthography.d.ts +5 -0
  551. package/dist/pipeline/preprocess/prolonged-orthography.js +79 -0
  552. package/dist/pipeline/preprocess/prolonged-surface-canonicalization.d.ts +5 -0
  553. package/dist/pipeline/preprocess/prolonged-surface-canonicalization.js +161 -0
  554. package/dist/pipeline/preprocess/punctuation-canonicalization.d.ts +5 -0
  555. package/dist/pipeline/preprocess/punctuation-canonicalization.js +160 -0
  556. package/dist/{transform → pipeline/preprocess}/quotative-manner-noun-flip.d.ts +2 -2
  557. package/dist/{transform → pipeline/preprocess}/quotative-manner-noun-flip.js +10 -10
  558. package/dist/{transform → pipeline/preprocess}/reduplicated-mimetic.d.ts +1 -1
  559. package/dist/{transform → pipeline/preprocess}/reduplicated-mimetic.js +3 -3
  560. package/dist/{transform → pipeline/preprocess}/rentaishi-no-nominalizer-retag.d.ts +1 -1
  561. package/dist/{transform → pipeline/preprocess}/rentaishi-no-nominalizer-retag.js +2 -2
  562. package/dist/pipeline/preprocess/runtime-token-from-analyzer.d.ts +5 -0
  563. package/dist/pipeline/preprocess/runtime-token-from-analyzer.js +77 -0
  564. package/dist/pipeline/preprocess/runtime-token-from-preprocess.d.ts +13 -0
  565. package/dist/pipeline/preprocess/runtime-token-from-preprocess.js +15 -0
  566. package/dist/pipeline/preprocess/standalone-voice-mark.d.ts +9 -0
  567. package/dist/pipeline/preprocess/standalone-voice-mark.js +73 -0
  568. package/dist/pipeline/preprocess/synthetic-token.d.ts +10 -0
  569. package/dist/pipeline/preprocess/synthetic-token.js +26 -0
  570. package/dist/pipeline/preprocess/te-contraction.d.ts +4 -0
  571. package/dist/pipeline/preprocess/te-contraction.js +150 -0
  572. package/dist/pipeline/preprocess/terminal-role-tail.d.ts +5 -0
  573. package/dist/pipeline/preprocess/terminal-role-tail.js +148 -0
  574. package/dist/{transform → pipeline/preprocess}/terminal-sfp-retag-closure.d.ts +2 -2
  575. package/dist/{transform → pipeline/preprocess}/terminal-sfp-retag-closure.js +4 -4
  576. package/dist/pipeline/preprocess/to-iu-contraction.d.ts +2 -0
  577. package/dist/pipeline/preprocess/to-iu-contraction.js +65 -0
  578. package/dist/{transform → pipeline/preprocess}/volitional-resolution-sfp-retag.d.ts +1 -1
  579. package/dist/{transform → pipeline/preprocess}/volitional-resolution-sfp-retag.js +2 -2
  580. package/dist/{transform → pipeline/preprocess}/youon-remerge.d.ts +1 -1
  581. package/dist/{transform → pipeline/preprocess}/youon-remerge.js +3 -3
  582. package/dist/pipeline/projection/narou-ruby-input.d.ts +17 -0
  583. package/dist/pipeline/projection/narou-ruby-input.js +149 -0
  584. package/dist/pipeline/projection/parenthetical-delimiter-annotation.d.ts +6 -0
  585. package/dist/pipeline/projection/parenthetical-delimiter-annotation.js +117 -0
  586. package/dist/pipeline/projection/parenthetical-ruby-absorption.d.ts +6 -0
  587. package/dist/pipeline/projection/parenthetical-ruby-absorption.js +198 -0
  588. package/dist/pipeline/projection/parenthetical-source-boundary.d.ts +12 -0
  589. package/dist/pipeline/projection/parenthetical-source-boundary.js +117 -0
  590. package/dist/pipeline/projection/parenthetical-source-identity.d.ts +14 -0
  591. package/dist/pipeline/projection/parenthetical-source-identity.js +443 -0
  592. package/dist/pipeline/projection/parenthetical-target-insertion.d.ts +22 -0
  593. package/dist/pipeline/projection/parenthetical-target-insertion.js +584 -0
  594. package/dist/pipeline/projection/prepared-translation.d.ts +52 -0
  595. package/dist/pipeline/projection/prepared-translation.js +1 -0
  596. package/dist/pipeline/projection/prepared-tree.d.ts +6 -0
  597. package/dist/pipeline/projection/prepared-tree.js +66 -0
  598. package/dist/pipeline/projection/raw-parenthetical-split.d.ts +15 -0
  599. package/dist/pipeline/projection/raw-parenthetical-split.js +78 -0
  600. package/dist/pipeline/projection/ruby-annotation.d.ts +5 -0
  601. package/dist/pipeline/projection/ruby-annotation.js +161 -0
  602. package/dist/pipeline/projection/text-offset-projection.d.ts +7 -0
  603. package/dist/pipeline/projection/text-offset-projection.js +111 -0
  604. package/dist/pipeline/projection/transparent-pause-island.d.ts +8 -0
  605. package/dist/pipeline/projection/transparent-pause-island.js +188 -0
  606. package/dist/pipeline/pronominal-no-dispatch.js +1 -1
  607. package/dist/pipeline/quote/host-runtime.js +3 -2
  608. package/dist/pipeline/quote/host-taxonomy.d.ts +1 -0
  609. package/dist/pipeline/quote/host-taxonomy.js +2 -2
  610. package/dist/pipeline/quote/question-taking-enumeration.d.ts +1 -1
  611. package/dist/pipeline/quote/question-taking-enumeration.js +0 -4
  612. package/dist/pipeline/reason-source-evidence.d.ts +1 -0
  613. package/dist/pipeline/reason-source-evidence.js +1 -1
  614. package/dist/pipeline/rendering/functional-chain.d.ts +2 -0
  615. package/dist/pipeline/rendering/functional-chain.js +14 -0
  616. package/dist/pipeline/rendering/nominal-head-tail-plan-trace.d.ts +10 -0
  617. package/dist/pipeline/rendering/nominal-head-tail-plan-trace.js +336 -0
  618. package/dist/pipeline/rendering/render-plan-inspect.d.ts +9 -0
  619. package/dist/pipeline/rendering/render-plan-inspect.js +121 -0
  620. package/dist/pipeline/rendering/render-plan-payloads.d.ts +28 -0
  621. package/dist/pipeline/rendering/render-plan-payloads.js +125 -0
  622. package/dist/pipeline/rendering/render-plan-rewrite.d.ts +32 -0
  623. package/dist/pipeline/rendering/render-plan-rewrite.js +540 -0
  624. package/dist/pipeline/rendering/render-plan-segments.d.ts +42 -0
  625. package/dist/pipeline/rendering/render-plan-segments.js +263 -0
  626. package/dist/pipeline/rendering/render-plan.d.ts +4 -57
  627. package/dist/pipeline/rendering/render-plan.js +52 -1433
  628. package/dist/pipeline/rendering/request-normalization.d.ts +0 -1
  629. package/dist/pipeline/rendering/request-normalization.js +0 -3
  630. package/dist/pipeline/rendering/segment-allomorph.d.ts +17 -0
  631. package/dist/pipeline/rendering/segment-allomorph.js +152 -0
  632. package/dist/pipeline/rendering/segment-annotation-keys.d.ts +6 -0
  633. package/dist/pipeline/rendering/segment-annotation-keys.js +137 -0
  634. package/dist/pipeline/rendering/stem-derivation.js +1 -1
  635. package/dist/pipeline/rendering/target-segment-build.d.ts +13 -0
  636. package/dist/pipeline/rendering/target-segment-build.js +167 -0
  637. package/dist/pipeline/rendering/terminal-unit-punctuation.d.ts +16 -0
  638. package/dist/pipeline/rendering/terminal-unit-punctuation.js +96 -0
  639. package/dist/pipeline/rendering/unit-surface.d.ts +9 -0
  640. package/dist/pipeline/rendering/unit-surface.js +35 -0
  641. package/dist/pipeline/resource-cache.d.ts +19 -0
  642. package/dist/pipeline/resource-cache.js +164 -0
  643. package/dist/pipeline/rules/common.d.ts +0 -1
  644. package/dist/pipeline/rules/common.js +0 -1
  645. package/dist/pipeline/rules/entry-aux.d.ts +0 -2
  646. package/dist/pipeline/rules/entry-aux.js +0 -4
  647. package/dist/pipeline/rules/postaux-unsupported.js +1 -5
  648. package/dist/pipeline/rules/pre-entry.d.ts +0 -1
  649. package/dist/pipeline/rules/pre-entry.js +0 -1
  650. package/dist/pipeline/rules/tail-finalization.js +4 -5
  651. package/dist/pipeline/semantics/conditional.d.ts +2 -1
  652. package/dist/pipeline/semantics/conditional.js +3 -2
  653. package/dist/pipeline/semantics/copula-tail-runtime.js +2 -2
  654. package/dist/pipeline/semantics/explanatory-mon-reading.d.ts +1 -1
  655. package/dist/pipeline/semantics/explanatory-mon-reading.js +2 -2
  656. package/dist/pipeline/semantics/extent-phrase.js +1 -1
  657. package/dist/pipeline/semantics/frame.d.ts +3 -3
  658. package/dist/pipeline/semantics/frame.js +4 -4
  659. package/dist/pipeline/semantics/gano-conversion.d.ts +1 -2
  660. package/dist/pipeline/semantics/gano-conversion.js +1 -9
  661. package/dist/pipeline/semantics/grammar-runtime.d.ts +0 -7
  662. package/dist/pipeline/semantics/grammar-runtime.js +0 -92
  663. package/dist/pipeline/semantics/honorific.d.ts +1 -2
  664. package/dist/pipeline/semantics/honorific.js +0 -3
  665. package/dist/pipeline/semantics/mono-modal.d.ts +1 -1
  666. package/dist/pipeline/semantics/numeric.js +1 -3
  667. package/dist/pipeline/semantics/sfp-surface.js +8 -0
  668. package/dist/pipeline/source-candidate-set.d.ts +1 -2
  669. package/dist/pipeline/source-candidate-set.js +0 -3
  670. package/dist/pipeline/source-coordinate.d.ts +20 -0
  671. package/dist/pipeline/source-coordinate.js +42 -0
  672. package/dist/pipeline/structural-relation/clause-connective-relations.d.ts +12 -0
  673. package/dist/pipeline/structural-relation/clause-connective-relations.js +327 -0
  674. package/dist/pipeline/structural-relation/collect.d.ts +1 -12
  675. package/dist/pipeline/structural-relation/collect.js +11 -3105
  676. package/dist/pipeline/structural-relation/connective-relation-match.d.ts +17 -0
  677. package/dist/pipeline/structural-relation/connective-relation-match.js +39 -0
  678. package/dist/pipeline/structural-relation/diagnostics.d.ts +0 -2
  679. package/dist/pipeline/structural-relation/diagnostics.js +0 -7
  680. package/dist/pipeline/structural-relation/ka-parallel-relations.d.ts +3 -0
  681. package/dist/pipeline/structural-relation/ka-parallel-relations.js +695 -0
  682. package/dist/pipeline/structural-relation/nari-relations.d.ts +3 -0
  683. package/dist/pipeline/structural-relation/nari-relations.js +367 -0
  684. package/dist/pipeline/structural-relation/parallel-item-evidence.d.ts +12 -0
  685. package/dist/pipeline/structural-relation/parallel-item-evidence.js +73 -0
  686. package/dist/pipeline/structural-relation/punctuated-attributive-relations.d.ts +2 -0
  687. package/dist/pipeline/structural-relation/punctuated-attributive-relations.js +224 -0
  688. package/dist/pipeline/structural-relation/purpose-relations.d.ts +7 -0
  689. package/dist/pipeline/structural-relation/purpose-relations.js +306 -0
  690. package/dist/pipeline/structural-relation/quote-clause-boundary.d.ts +47 -0
  691. package/dist/pipeline/structural-relation/quote-clause-boundary.js +216 -0
  692. package/dist/pipeline/structural-relation/quote-closed-toka.d.ts +22 -0
  693. package/dist/pipeline/structural-relation/quote-closed-toka.js +158 -0
  694. package/dist/pipeline/structural-relation/quote-content-endings.d.ts +20 -0
  695. package/dist/pipeline/structural-relation/quote-content-endings.js +163 -0
  696. package/dist/pipeline/structural-relation/quote-content-span.d.ts +23 -0
  697. package/dist/pipeline/structural-relation/quote-content-span.js +270 -0
  698. package/dist/pipeline/structural-relation/quote-nominal-and-passive.d.ts +22 -0
  699. package/dist/pipeline/structural-relation/quote-nominal-and-passive.js +724 -0
  700. package/dist/pipeline/structural-relation/quote-payload.d.ts +33 -0
  701. package/dist/pipeline/structural-relation/quote-payload.js +137 -0
  702. package/dist/pipeline/structural-relation/quote-question-content.d.ts +18 -0
  703. package/dist/pipeline/structural-relation/quote-question-content.js +588 -0
  704. package/dist/pipeline/structural-relation/quote-reason-copula.d.ts +18 -0
  705. package/dist/pipeline/structural-relation/quote-reason-copula.js +84 -0
  706. package/dist/pipeline/structural-relation/quote-relation-enrichment.d.ts +4 -0
  707. package/dist/pipeline/structural-relation/quote-relation-enrichment.js +174 -0
  708. package/dist/pipeline/structural-relation/quote-request.d.ts +16 -0
  709. package/dist/pipeline/structural-relation/quote-request.js +249 -0
  710. package/dist/pipeline/structural-relation/quote.d.ts +4 -130
  711. package/dist/pipeline/structural-relation/quote.js +105 -2627
  712. package/dist/pipeline/structural-relation/reason-relations.d.ts +6 -0
  713. package/dist/pipeline/structural-relation/reason-relations.js +328 -0
  714. package/dist/pipeline/structural-relation/relation-coordinates.d.ts +21 -0
  715. package/dist/pipeline/structural-relation/relation-coordinates.js +110 -0
  716. package/dist/pipeline/structural-relation/render-attributive.d.ts +25 -0
  717. package/dist/pipeline/structural-relation/render-attributive.js +195 -0
  718. package/dist/pipeline/structural-relation/render-clause-connective.d.ts +29 -0
  719. package/dist/pipeline/structural-relation/render-clause-connective.js +114 -0
  720. package/dist/pipeline/structural-relation/render-connective-plan.d.ts +28 -0
  721. package/dist/pipeline/structural-relation/render-connective-plan.js +164 -0
  722. package/dist/pipeline/structural-relation/render-parallel.d.ts +60 -0
  723. package/dist/pipeline/structural-relation/render-parallel.js +1088 -0
  724. package/dist/pipeline/structural-relation/render-quote.d.ts +75 -0
  725. package/dist/pipeline/structural-relation/render-quote.js +968 -0
  726. package/dist/pipeline/structural-relation/render-reason-copula.d.ts +24 -0
  727. package/dist/pipeline/structural-relation/render-reason-copula.js +324 -0
  728. package/dist/pipeline/structural-relation/render-source-sequence.d.ts +11 -0
  729. package/dist/pipeline/structural-relation/render-source-sequence.js +154 -0
  730. package/dist/pipeline/structural-relation/render-unit-spans.d.ts +35 -0
  731. package/dist/pipeline/structural-relation/render-unit-spans.js +71 -0
  732. package/dist/pipeline/structural-relation/render.d.ts +2 -25
  733. package/dist/pipeline/structural-relation/render.js +10 -3043
  734. package/dist/pipeline/structural-relation/source-predicate-operator.d.ts +2 -1
  735. package/dist/pipeline/structural-relation/tari-listing-relations.d.ts +5 -0
  736. package/dist/pipeline/structural-relation/tari-listing-relations.js +354 -0
  737. package/dist/pipeline/structural-relation/toka-nominal-listing-relations.d.ts +2 -0
  738. package/dist/pipeline/structural-relation/toka-nominal-listing-relations.js +154 -0
  739. package/dist/pipeline/structural-relation/toka-nominal-listing-run.d.ts +11 -1
  740. package/dist/pipeline/structural-relation/toka-nominal-listing-run.js +16 -4
  741. package/dist/pipeline/structural-relation/types.d.ts +10 -1
  742. package/dist/pipeline/translation/access.d.ts +0 -3
  743. package/dist/pipeline/translation/unit.d.ts +4 -1
  744. package/dist/pipeline/translation/unit.js +29 -9
  745. package/dist/pipeline/translation/warnings.d.ts +9 -0
  746. package/dist/pipeline/translation/warnings.js +251 -0
  747. package/dist/pipeline-factory.js +2 -1
  748. package/dist/scripts/diagnose.js +3 -2
  749. package/dist/types/pos.d.ts +3 -0
  750. package/dist/types/pos.js +8 -0
  751. package/dist/types/reanalysis.d.ts +0 -1
  752. package/dist/types/reanalysis.js +0 -1
  753. package/dist/types/render-plan.d.ts +1 -2
  754. package/dist/utils/char-class.d.ts +2 -0
  755. package/dist/utils/char-class.js +6 -0
  756. package/dist/utils/record.d.ts +1 -0
  757. package/dist/utils/record.js +3 -0
  758. package/dist/webext-provider.d.ts +7 -0
  759. package/dist/webext-provider.js +56 -16
  760. package/package.json +1 -1
  761. package/dist/pipeline/head-tail/audit/types.d.ts +0 -7
  762. /package/dist/pipeline/head-tail/{audit/types.js → tail/predicate-root/integration/contracts.js} +0 -0
@@ -0,0 +1,35 @@
1
+ import { POS01, POS012, 名詞_普通名詞, 名詞_固有名詞 } from "../../types/pos.js";
2
+ import { moraStutterRepeatIndex } from "../disfluency/stutter-prefix.js";
3
+ export function applyMoraStutterPrefixToGeneratedText(unit, text) {
4
+ const stutter = unit.jpHead.stutterPrefix;
5
+ if (stutter === undefined || stutter.repeatCount <= 0) {
6
+ return text;
7
+ }
8
+ const index = moraStutterRepeatIndex(text);
9
+ if (index === null) {
10
+ return text;
11
+ }
12
+ const char = String.fromCodePoint(text.codePointAt(index));
13
+ const prefix = Array.from({ length: stutter.repeatCount }, () => `${char}, `).join("");
14
+ return `${text.slice(0, index)}${prefix}${text.slice(index)}`;
15
+ }
16
+ export const SUFFIX_NOUN_CHARS = new Set(Array.from("図集論伝記書誌表巻編"));
17
+ export function isSuffixNounUnit(unit) {
18
+ const surface = unit.jpHead.surface;
19
+ const pos = unit.jpHead.pos;
20
+ return surface.length === 1 && SUFFIX_NOUN_CHARS.has(surface) && (pos & POS012) === 名詞_普通名詞;
21
+ }
22
+ export function prevIsNominalUnit(unit) {
23
+ const pos = unit?.jpHead.pos ?? 0;
24
+ return (pos & POS01) === 名詞_普通名詞 || (pos & POS01) === 名詞_固有名詞;
25
+ }
26
+ export function continuesReduplication(unit, previous, text, tokens) {
27
+ if (previous === undefined || tokens === undefined || unit.jpIndices.length === 0 || previous[1] !== text) {
28
+ return false;
29
+ }
30
+ const head = tokens[Math.min(...unit.jpIndices)];
31
+ return head?.sourceReduplication === true && previous[0].jpIndices.includes(Math.min(...unit.jpIndices) - 1);
32
+ }
33
+ export function hasUserDictOverride(unit, tokens) {
34
+ return unit.jpIndices.some(i => tokens[i]?.koreanOverride !== undefined);
35
+ }
@@ -0,0 +1,19 @@
1
+ import { CollocationDictionary } from "../dictionary/collocation.js";
2
+ import { type FuzzyLevel, MorphemeDictionary } from "../dictionary/morpheme.js";
3
+ import { PatternDictionary } from "../dictionary/pattern.js";
4
+ import { ReanalysisDictionary } from "../dictionary/reanalysis.js";
5
+ import type { NumericTables } from "../generator/numeric-lookup.js";
6
+ import type { LookupTables } from "./lookup-tables.js";
7
+ type JsonlFingerprint = readonly (readonly [relativePath: string, size: number, mtimeNs: bigint])[];
8
+ export declare function clearPipelineResourceCache(): void;
9
+ export declare function loadCachedMorphemeDictionary(dirPath: string, lookups: LookupTables, numeric: NumericTables, options?: {
10
+ readonly fuzzyLevel?: FuzzyLevel;
11
+ }): Promise<MorphemeDictionary>;
12
+ export declare function loadCachedPatternDictionary(dirPath: string, lookups: LookupTables): Promise<PatternDictionary>;
13
+ export declare function loadCachedCollocationDictionary(dirPath: string, lookups?: LookupTables): Promise<CollocationDictionary>;
14
+ export declare function loadCachedReanalysisDictionary(dirPath: string): Promise<ReanalysisDictionary>;
15
+ export declare function jsonlDirFingerprint(dirPath: string, options?: {
16
+ readonly recursive?: boolean;
17
+ }): Promise<JsonlFingerprint>;
18
+ export declare function tsvDirFingerprint(dirPath: string): Promise<JsonlFingerprint>;
19
+ export {};
@@ -0,0 +1,164 @@
1
+ import { CONJUGATION_TEMPLATES_FILENAME } from "../analyzer-lexicon.js";
2
+ import { getDataLoader } from "../data-loader.js";
3
+ import { CollocationDictionary } from "../dictionary/collocation.js";
4
+ import { MorphemeDictionary } from "../dictionary/morpheme.js";
5
+ import { PatternDictionary } from "../dictionary/pattern.js";
6
+ import { ReanalysisDictionary } from "../dictionary/reanalysis.js";
7
+ const RESOURCE_CACHE_MAX_SIZE = 32;
8
+ const morphemeDictionaryStateCache = new Map();
9
+ const patternDictionaryStateCache = new Map();
10
+ const collocationDictionaryStateCache = new Map();
11
+ const reanalysisDictionaryStateCache = new Map();
12
+ export function clearPipelineResourceCache() {
13
+ morphemeDictionaryStateCache.clear();
14
+ patternDictionaryStateCache.clear();
15
+ collocationDictionaryStateCache.clear();
16
+ reanalysisDictionaryStateCache.clear();
17
+ }
18
+ function resolveResourceDir(dirPath) {
19
+ const loader = getDataLoader();
20
+ if (/^~[^/]/u.test(dirPath)) {
21
+ throw new Error(`unsupported user home expansion in path: ${dirPath}`);
22
+ }
23
+ const expanded = dirPath === "~" || dirPath.startsWith("~/")
24
+ ? loader.joinPath(loader.getHomeDir(), dirPath.slice(2))
25
+ : dirPath;
26
+ return expanded;
27
+ }
28
+ async function cachedMorphemeDictionaryState(dirPath, fingerprint, fuzzyLevel, lookups, numeric) {
29
+ return await rememberCachedStateAsync(morphemeDictionaryStateCache, cacheKey(dirPath, fingerprint, fuzzyLevel, lookupProviderCacheKey(lookups), numericProviderCacheKey(numeric)), async () => {
30
+ const dictionary = new MorphemeDictionary(fuzzyLevel);
31
+ await dictionary.load(getDataLoader(), dirPath, lookups, numeric);
32
+ return dictionary;
33
+ });
34
+ }
35
+ async function cachedPatternDictionaryState(dirPath, fingerprint, lookups) {
36
+ return await rememberCachedStateAsync(patternDictionaryStateCache, cacheKey(dirPath, fingerprint, undefined, lookupProviderCacheKey(lookups)), async () => {
37
+ const patterns = new PatternDictionary();
38
+ await patterns.load(getDataLoader(), dirPath, lookups);
39
+ return patterns;
40
+ });
41
+ }
42
+ async function cachedCollocationDictionaryState(dirPath, fingerprint, lookups) {
43
+ return await rememberCachedStateAsync(collocationDictionaryStateCache, cacheKey(dirPath, fingerprint, undefined, ...(lookups === undefined ? [] : [lookupProviderCacheKey(lookups)])), async () => {
44
+ const collocations = new CollocationDictionary();
45
+ await collocations.load(getDataLoader(), dirPath, lookups);
46
+ return collocations;
47
+ });
48
+ }
49
+ export async function loadCachedMorphemeDictionary(dirPath, lookups, numeric, options = {}) {
50
+ const resolved = resolveResourceDir(dirPath);
51
+ const state = await cachedMorphemeDictionaryState(resolved, await jsonlDirFingerprint(resolved), options.fuzzyLevel ?? "basic", lookups, numeric);
52
+ return state.cloneShallow();
53
+ }
54
+ export async function loadCachedPatternDictionary(dirPath, lookups) {
55
+ const resolved = resolveResourceDir(dirPath);
56
+ const state = await cachedPatternDictionaryState(resolved, await jsonlDirFingerprint(resolved, { recursive: false }), lookups);
57
+ return state.cloneShallow();
58
+ }
59
+ export async function loadCachedCollocationDictionary(dirPath, lookups) {
60
+ const resolved = resolveResourceDir(dirPath);
61
+ const state = await cachedCollocationDictionaryState(resolved, await jsonlDirFingerprint(resolved), lookups);
62
+ return state.cloneShallow();
63
+ }
64
+ async function cachedReanalysisDictionaryState(dirPath, fingerprint) {
65
+ return await rememberCachedStateAsync(reanalysisDictionaryStateCache, cacheKey(dirPath, fingerprint), async () => {
66
+ const reanalysis = new ReanalysisDictionary();
67
+ await reanalysis.load(getDataLoader(), dirPath);
68
+ return reanalysis;
69
+ });
70
+ }
71
+ export async function loadCachedReanalysisDictionary(dirPath) {
72
+ const resolved = resolveResourceDir(dirPath);
73
+ const state = await cachedReanalysisDictionaryState(resolved, await jsonlDirFingerprint(resolved));
74
+ return state.cloneShallow();
75
+ }
76
+ async function rememberCachedStateAsync(cache, key, factory) {
77
+ const cached = cache.get(key);
78
+ if (cached !== undefined) {
79
+ cache.delete(key);
80
+ cache.set(key, cached);
81
+ return cached;
82
+ }
83
+ const value = await factory();
84
+ cache.set(key, value);
85
+ if (cache.size > RESOURCE_CACHE_MAX_SIZE) {
86
+ const firstKey = cache.keys().next().value;
87
+ if (firstKey !== undefined) {
88
+ cache.delete(firstKey);
89
+ }
90
+ }
91
+ return value;
92
+ }
93
+ function lookupProviderCacheKey(lookups) {
94
+ return `lookup:${lookups.providerCacheKey()}`;
95
+ }
96
+ function numericProviderCacheKey(numeric) {
97
+ return `numeric:${numeric.providerCacheKey()}`;
98
+ }
99
+ function cacheKey(dirPath, fingerprint, fuzzyLevel, ...providerKeys) {
100
+ const fingerprintKey = fingerprint
101
+ .map(([relativePath, size, mtimeNs]) => `${relativePath}\u001f${size}\u001f${mtimeNs.toString()}`)
102
+ .join("\u001e");
103
+ return `${dirPath}\0${fuzzyLevel ?? ""}\0${providerKeys.join("\u001d")}\0${fingerprintKey}`;
104
+ }
105
+ export async function jsonlDirFingerprint(dirPath, options = {}) {
106
+ const loader = getDataLoader();
107
+ const files = [];
108
+ await collectJsonlFingerprints(loader, resolveResourceDir(dirPath), "", files, options.recursive ?? true);
109
+ return files.sort(([left], [right]) => left.localeCompare(right));
110
+ }
111
+ async function collectJsonlFingerprints(loader, dirPath, relativePrefix, files, recursive) {
112
+ if (!(await loader.exists(dirPath))) {
113
+ return;
114
+ }
115
+ for (const entry of await loader.readDir(dirPath)) {
116
+ const fullPath = loader.joinPath(dirPath, entry.name);
117
+ const relativePath = relativePrefix.length === 0 ? entry.name : `${relativePrefix}/${entry.name}`;
118
+ if (entry.isDirectory) {
119
+ if (recursive) {
120
+ await collectJsonlFingerprints(loader, fullPath, relativePath, files, recursive);
121
+ }
122
+ continue;
123
+ }
124
+ if (!entry.name.endsWith(".jsonl")) {
125
+ continue;
126
+ }
127
+ try {
128
+ const stat = await loader.stat(fullPath);
129
+ if (!stat.isFile)
130
+ continue;
131
+ files.push([relativePath, stat.size, stat.mtimeNs]);
132
+ }
133
+ catch {
134
+ continue;
135
+ }
136
+ }
137
+ }
138
+ export async function tsvDirFingerprint(dirPath) {
139
+ const loader = getDataLoader();
140
+ const resolved = resolveResourceDir(dirPath);
141
+ const files = [];
142
+ if (!(await loader.exists(resolved))) {
143
+ return files;
144
+ }
145
+ for (const entry of await loader.readDir(resolved)) {
146
+ if (entry.isDirectory) {
147
+ continue;
148
+ }
149
+ if (!(entry.name.endsWith(".tsv") || entry.name === CONJUGATION_TEMPLATES_FILENAME)) {
150
+ continue;
151
+ }
152
+ const fullPath = loader.joinPath(resolved, entry.name);
153
+ try {
154
+ const stat = await loader.stat(fullPath);
155
+ if (!stat.isFile)
156
+ continue;
157
+ files.push([entry.name, stat.size, stat.mtimeNs]);
158
+ }
159
+ catch {
160
+ continue;
161
+ }
162
+ }
163
+ return files.sort(([left], [right]) => left.localeCompare(right));
164
+ }
@@ -1,4 +1,3 @@
1
1
  import { type MatcherToken } from "../matchers.js";
2
2
  import type { TokenCursor } from "../token-cursor.js";
3
- export declare const OUTER_SCOPE_HEADS: Set<string>;
4
3
  export declare function matchScopeDoubleNegationOuter(cursor: TokenCursor<MatcherToken>): readonly [headReading: string, additiveMo: boolean, polite: boolean, past: boolean] | null;
@@ -1,7 +1,6 @@
1
1
  import { auxHasNegativePolite, auxHasPast, auxHasPolite, collectAuxTokens, isVerbLemma } from "../matchers.js";
2
2
  import { matchCopulaNegation } from "./copula.js";
3
3
  import { POS0, 形容詞0, 助詞, 名詞 } from "../../types/pos.js";
4
- export const OUTER_SCOPE_HEADS = new Set(["ワケ", "コト"]);
5
4
  function matchSimpleNegativeTail(cursor) {
6
5
  const token = cursor.current();
7
6
  if (token === undefined) {
@@ -4,6 +4,4 @@ import type { RuleResult } from "../../types/pipeline.js";
4
4
  import type { LookupTables } from "../lookup-tables.js";
5
5
  export type EntryAuxResolver = ModalityResolver;
6
6
  export type EntryAuxRule = (resolver: EntryAuxResolver, ctx: ContentCtx, isPotential: boolean, lookups: LookupTables) => RuleResult | null | Promise<RuleResult | null>;
7
- export type EntryAuxRuleName = "ruleYouda" | "ruleAdverbialAdjective";
8
- export declare const ENTRY_AUX_RULE_NAMES: readonly EntryAuxRuleName[];
9
7
  export declare const ENTRY_AUX_RULES: readonly EntryAuxRule[];
@@ -1,8 +1,4 @@
1
1
  import { ruleAdverbialAdjective, ruleYouda } from "./modality.js";
2
- export const ENTRY_AUX_RULE_NAMES = [
3
- "ruleYouda",
4
- "ruleAdverbialAdjective"
5
- ];
6
2
  export const ENTRY_AUX_RULES = [
7
3
  ruleYouda,
8
4
  ruleAdverbialAdjective
@@ -1,4 +1,4 @@
1
- import { secondaryParticleCanonical } from "../particles/secondary-particle.js";
1
+ import { isDegreeExtentParticle } from "../particles/secondary-particle.js";
2
2
  import { nextNonSpaceIndex } from "../clause-layout/trivia.js";
3
3
  import { isClauseEvidenceTransparentPunctuation, isClausePunctuationToken } from "../clause-layout/punctuation.js";
4
4
  import { isExplicitQuoteClosingToken } from "../clause-layout/quote-delimiters.js";
@@ -422,10 +422,6 @@ function degreeExtentHasPredicateProjectionHost(ctx) {
422
422
  ctx.pos0 === 形容詞0 ||
423
423
  ctx.auxTokens.length > 0;
424
424
  }
425
- function isDegreeExtentParticle(token) {
426
- const canonical = secondaryParticleCanonical(token);
427
- return canonical === "ほど" || canonical === "くらい";
428
- }
429
425
  function isSupportedDegreeExtentContinuation(tokens, idx, lookups) {
430
426
  const token = tokens[idx];
431
427
  if (token === undefined) {
@@ -7,6 +7,5 @@ export interface PreEntryResolver {
7
7
  readonly lookups: LookupTables;
8
8
  }
9
9
  export type PreEntryRuleName = "ruleTokoroHeadDispatch";
10
- export declare const PRE_ENTRY_RULE_NAMES: readonly PreEntryRuleName[];
11
10
  export declare const PRE_ENTRY_RULES: readonly PreEntryRule[];
12
11
  export declare function matchPreEntryKaNoYouFamilyStart(cursor: TokenCursor<MatcherToken>): boolean;
@@ -8,7 +8,6 @@ function isPreEntryKaMarker(tokens, index) {
8
8
  const PRE_ENTRY_RULE_TABLE = [
9
9
  ["ruleTokoroHeadDispatch", ruleTokoroHeadDispatch]
10
10
  ];
11
- export const PRE_ENTRY_RULE_NAMES = PRE_ENTRY_RULE_TABLE.map(([name]) => name);
12
11
  export const PRE_ENTRY_RULES = PRE_ENTRY_RULE_TABLE.map(([, rule]) => rule);
13
12
  export function matchPreEntryKaNoYouFamilyStart(cursor) {
14
13
  if (cursor.current() === undefined || isPreEntryKaMarker(cursor.tokens, cursor.pos) === false) {
@@ -5,16 +5,15 @@ import { SEPARATION_BREAKS_MORPHEME_CHAIN, nextNonSpaceIndex, separatedAs } from
5
5
  import { runtimeAuxTokens, runtimeToken } from "../matchers.js";
6
6
  import { isSahenBoundVerbAfterSahen } from "../predicate-helpers.js";
7
7
  import { copulaNiMarkerRelationForToken, kaMarkerRelationAt } from "../head-tail/boundary/marker.js";
8
- import { voiceFromFlags } from "../rendering/render-plan.js";
8
+ import { voiceFromFlags } from "../rendering/render-plan-rewrite.js";
9
9
  import { hasTerminalSentenceMark, isSentenceFinal } from "../semantics/terminal-runtime.js";
10
10
  import { KEIJOUJI_BARE_RETIRED_OP_KIND } from "../fallback/unsupported-raw.js";
11
11
  import { POS0, POS1, POS4, POS5, 格助詞, 係助詞, 名詞, 助詞, 助動詞, 助動詞_ジャ, 助動詞_タ, 助動詞_ダ, 助動詞_デス, 助動詞_ヤ, 終助詞, 副詞, 命令形_, 連体形_一般, 連用形_一般, 동사, 부사, 형용사, isNaAdjCapableNoun, isPureNaAdjStem } from "../../types/pos.js";
12
12
  import { classifyAttributiveHeadKind } from "../head-tail/tail/predicate-root/structural-attributive-head-table.js";
13
13
  import { DEFAULT_RENYOU_CHUUSHI_ROLE, DEFAULT_TE_FORM_ROLE } from "../head-tail/tail/predicate-root/grammar.js";
14
14
  import { isTeConnectiveToken } from "../head-tail/tail/postverb-tail-classifier.js";
15
- import { activeProtoLayout } from "../clause-layout/proto-state.js";
16
- import { renyouTokenLacksPredicateSense } from "../head-tail/tail/predicate-root/integration.js";
17
- import { buildProtoLayout } from "../clause-layout/index.js";
15
+ import { renyouTokenLacksPredicateSense } from "../head-tail/tail/predicate-root/integration/head-admission.js";
16
+ import { protoLayoutForTokens } from "../clause-layout/index.js";
18
17
  async function sahenInfo(resolver, ctx) {
19
18
  const fromResolver = resolver._sahenInfo;
20
19
  if (fromResolver !== undefined) {
@@ -256,7 +255,7 @@ async function renyouChuushiEndKeepsConnection(resolver, ctx, lookups) {
256
255
  return false;
257
256
  }
258
257
  const splitAt = ctx.start + ctx.consumed;
259
- const juncture = (activeProtoLayout() ?? buildProtoLayout(ctx.tokens, lookups)).renyouJunctureAt(splitAt);
258
+ const juncture = protoLayoutForTokens(ctx.tokens, lookups).renyouJunctureAt(splitAt);
260
259
  if (juncture !== undefined && juncture.cohesion.length > 0) {
261
260
  return false;
262
261
  }
@@ -1,5 +1,6 @@
1
1
  import { type BoundaryToken } from "../head-tail/boundary/punctuation.js";
2
- import { type ClauseProjectionEvidenceWindow, type ProjectionEvidenceLayout } from "../clause-layout/index.js";
2
+ import { type ClauseProjectionEvidenceWindow } from "../clause-layout/navigation.js";
3
+ import type { ProjectionEvidenceLayout } from "../clause-layout/layout-types.js";
3
4
  import type { LookupTables } from "../lookup-tables.js";
4
5
  import type { SeparationEvidence } from "../../types/token.js";
5
6
  export interface ConditionalSemanticToken extends BoundaryToken {
@@ -1,13 +1,14 @@
1
1
  import { hasHardTerminalPunctuationRelation, hasWeakPunctuationClass } from "../head-tail/boundary/punctuation.js";
2
2
  import { quoteMarkerRelationAt } from "../head-tail/boundary/quote-marker.js";
3
- import { buildProtoLayout, clauseProjectionEvidenceWindowForToken } from "../clause-layout/index.js";
3
+ import { buildProtoLayout } from "../clause-layout/index.js";
4
+ import { clauseProjectionEvidenceWindowForToken } from "../clause-layout/navigation.js";
4
5
  import { TokenCursor } from "../token-cursor.js";
5
6
  import { activeProtoLayout } from "../clause-layout/proto-state.js";
6
7
  import { DETACHED_SEPARATIONS, previousNonSpaceIndex, separatedAs } from "../clause-layout/trivia.js";
7
8
  import { quoteStructuralRelationsForHost } from "../structural-relation/quote.js";
8
9
  import { auxHasPast } from "../matchers.js";
9
10
  import { isTeConnectiveToken } from "../head-tail/tail/postverb-tail-classifier.js";
10
- import { NOMINAL_KEIJOU_BITS, POS0, pos0in, POS4, POS5A, isSahenCapableNominal, 記号, 形状詞, 形容詞0, 助詞, 助動詞, 名詞, 代名詞, 助動詞_タ, 助動詞_ダ, 助動詞_ナイ, 助動詞_ヌ, 動詞, 非自立可能, 補助記号, 連用形_, POS01, 助詞_接続助詞 } from "../../types/pos.js";
11
+ import { NOMINAL_KEIJOU_BITS, POS0, pos0in, POS4, POS5A, isSahenCapableNominal, 記号, 形状詞, 形容詞0, 助詞, 助動詞, 名詞, 代名詞, 助動詞_タ, 助動詞_ダ, 助動詞_ナイ, 助動詞_ヌ, 動詞, 非自立可能, 補助記号, 連用形_, POS01 } from "../../types/pos.js";
11
12
  export function conditionalEvidenceWindowForToken(tokens, tokenIdx, lookups, layout = activeProtoLayout()) {
12
13
  return conditionalEvidenceWindowForTokenInternal(tokens, tokenIdx, layout, false, lookups);
13
14
  }
@@ -4,11 +4,11 @@ import { isAffirmativeCopulaSupportVerbToken } from "../head-tail/tail/predicate
4
4
  import { hasHardTerminalPunctuationClass } from "../head-tail/boundary/punctuation.js";
5
5
  import { nextNonSpaceIndex, previousNonSpaceIndex } from "../clause-layout/trivia.js";
6
6
  import { compositeConnectivePatternRelationAt } from "../head-tail/tail/connective-span-scanner.js";
7
- import { lookupConnectiveBySurface } from "../head-tail/tail/predicate-root/grammar.js";
7
+ import { lookupConnectiveBySurface } from "../head-tail/tail/predicate-root/connective-surface-lookup.js";
8
8
  import { hasTerminalSentenceMark } from "./terminal-runtime.js";
9
9
  import { isKanaQuestionNaParticleSurface, isTerminalNeSfpSurface, isTerminalSkipSfpSurface, isTerminalYoSfpSurface } from "./sfp-surface.js";
10
10
  import { TokenCursor } from "../token-cursor.js";
11
- import { POS0, POS01, POS4, POS5A, isNaAdjectiveDerivationalSuffix, isNaAdjCapableNoun, 終助詞, 助詞, 助詞_格助詞, 助詞_係助詞, 助詞_終助詞, 助詞_接続助詞, 助詞_副助詞, 助動詞, 助動詞_ダ, 助動詞_デス, 動詞, 補助記号, 連用形_, 대명사, 동사, 명사, 수사, 접미사, 형용사, 接尾辞_名詞的, } from "../../types/pos.js";
11
+ import { POS0, POS01, POS4, POS5A, isNaAdjectiveDerivationalSuffix, isNaAdjCapableNoun, 終助詞, 助詞, 助詞_格助詞, 助詞_係助詞, 助詞_終助詞, 助詞_接続助詞, 助詞_副助詞, 助動詞, 助動詞_ダ, 補助記号, 連用形_, 대명사, 동사, 명사, 수사, 접미사, 형용사, 接尾辞_名詞的 } from "../../types/pos.js";
12
12
  const TRAILING_COPULA_CONNECTIVE_HOST_POS = new Set([명사, 대명사, 수사]);
13
13
  const TRAILING_COPULA_ADVERBS = new Set([
14
14
  "これから",
@@ -1,5 +1,5 @@
1
1
  import type { RuntimeHaruToken } from "../../types/token.js";
2
- import type { ClauseLayout } from "../clause-layout/index.js";
2
+ import type { ClauseLayout } from "../clause-layout/final-layout.js";
3
3
  import { type UtteranceClosureScope } from "../clause-layout/utterance-closure.js";
4
4
  export type ExplanatoryMonReading = {
5
5
  readonly kind: "explanatory_sfp";
@@ -1,6 +1,6 @@
1
1
  import { POS0, POS01, isBungoAssertiveCopulaAdnominalToken, 名詞, 助詞_終助詞 } from "../../types/pos.js";
2
- import { terminalSfpRunClosureAfter } from "../../transform/terminal-sfp-retag-closure.js";
3
- import { isFinitePredicateBoundaryLeft } from "../clause-layout/index.js";
2
+ import { terminalSfpRunClosureAfter } from "../preprocess/terminal-sfp-retag-closure.js";
3
+ import { isFinitePredicateBoundaryLeft } from "../clause-layout/token-evidence.js";
4
4
  import { DETACHED_SEPARATIONS, separatedAs } from "../clause-layout/trivia.js";
5
5
  import { closesUtteranceAs } from "../clause-layout/utterance-closure.js";
6
6
  import { MONO_EXPLANATORY_SFP_FORMS } from "../head-tail/data/semantic-helper-sets.js";
@@ -1,4 +1,4 @@
1
- import { formatCounterPhrase, parseJapaneseNumber, resolveNumeralTokenValue } from "../../generator/numerals.js";
1
+ import { formatCounterPhrase, resolveNumeralTokenValue } from "../../generator/numerals.js";
2
2
  import { TokenCursor } from "../token-cursor.js";
3
3
  import { formatDegreeRepetition, tryNumeral, trySplitNumeralCounterSurface } from "./numeric.js";
4
4
  export const EXTENT_PHRASE_KINDS = new Set([
@@ -1,8 +1,9 @@
1
1
  import type { Voice } from "../../types/render-plan.js";
2
2
  import type { RuntimeHaruToken } from "../../types/token.js";
3
- import type { ClauseLayout, ProtoClauseLayout } from "../clause-layout/index.js";
3
+ import type { ClauseLayout } from "../clause-layout/final-layout.js";
4
+ import type { ProtoClauseLayout } from "../clause-layout/proto-layout.js";
4
5
  import { type LookupTables } from "../lookup-tables.js";
5
- import { type QuoteStructuralRelation } from "../structural-relation/quote.js";
6
+ import type { QuoteStructuralRelation } from "../structural-relation/quote-payload.js";
6
7
  import type { MatcherToken } from "../matchers.js";
7
8
  export type FrameJsonValue = string | number | boolean | null | readonly FrameJsonValue[] | {
8
9
  readonly [key: string]: FrameJsonValue;
@@ -34,7 +35,6 @@ export declare function isAdnominalBindingSlot(slot: FrameSlotSpec): boolean;
34
35
  export declare const SLOT_TYPE_NOUN = "noun";
35
36
  export declare const SLOT_TYPE_CLAUSE = "clause";
36
37
  export declare const FRAME_SLOT_TYPES: Set<string>;
37
- export declare const FRAME_CLAUSE_SLOT_ROLES: Set<string>;
38
38
  export declare const FRAME_CLAUSE_SLOT_MARKERS: {
39
39
  readonly [role: string]: ReadonlySet<string>;
40
40
  };
@@ -1,12 +1,13 @@
1
1
  import { lookupSetMatches } from "../lookup-tables.js";
2
- import { quoteStructuralRelationsForHost, quoteStructuralRelationLooksBareNominalContent, quoteHostAllowsBareNominalContent } from "../structural-relation/quote.js";
2
+ import { quoteStructuralRelationsForHost } from "../structural-relation/quote.js";
3
+ import { quoteStructuralRelationLooksBareNominalContent, quoteHostAllowsBareNominalContent } from "../structural-relation/quote-nominal-and-passive.js";
3
4
  import { isAdjNai } from "../matchers.js";
4
5
  import { hardTerminalPunctuationSurfaceClassForToken } from "../head-tail/boundary/punctuation.js";
5
6
  import { teMarkerOpensProhibitionPredicateAt } from "../head-tail/tail/postverb-tail-classifier.js";
6
7
  import { TokenCursor } from "../token-cursor.js";
7
8
  import { argumentNounLookupForms, getArgumentNounBeforeParticle, getReferentTokenBeforeParticle, nounArgumentModifierEvidence, PredicateArgumentView, tokenInSemanticCategories } from "./helpers.js";
8
9
  import { enumerateClausePhrasesAfter } from "../clause-layout/phrase-enumeration.js";
9
- import { isCaseParticleToken, isClosingBracketToken, isNominalizerParticleToken, isNominalLike, isNominalScopeParticleToken, isNominalUseBareNaAdjStem, isVerbRenyouPredicateToken, POS0, POS01, POS4, POS5A, 意志推量形_, 記号, 助詞, 助詞_格助詞, 助詞_終助詞, 助動詞_タ, 助動詞_ナイ, 助動詞_ヌ, 補助記号, 命令形_ } from "../../types/pos.js";
10
+ import { isCaseParticleToken, isClosingBracketToken, isNominalizerParticleToken, isNominalLike, isNominalScopeParticleToken, isNominalUseBareNaAdjStem, isVerbRenyouPredicateToken, POS0, POS01, POS4, POS5A, isVolitionalSpeechActInflectionToken, 記号, 助詞, 助詞_終助詞, 助動詞_タ, 助動詞_ナイ, 助動詞_ヌ, 補助記号, 命令形_ } from "../../types/pos.js";
10
11
  import { isCaseParticleNoToken, isGaNoConvertedSubjectParticle } from "./gano-conversion.js";
11
12
  import { adverbialToCapableKeijoujiHost } from "./tari-adverbial-marker.js";
12
13
  export const SEMANTIC_FRAME_CATEGORIES = ["person", "animate", "place", "role", "time", "action_noun"];
@@ -57,7 +58,6 @@ export function isAdnominalBindingSlot(slot) {
57
58
  export const SLOT_TYPE_NOUN = "noun";
58
59
  export const SLOT_TYPE_CLAUSE = "clause";
59
60
  export const FRAME_SLOT_TYPES = new Set([SLOT_TYPE_NOUN, SLOT_TYPE_CLAUSE]);
60
- export const FRAME_CLAUSE_SLOT_ROLES = new Set(["wish_content", "quoted_content", "question_content", "request_content"]);
61
61
  export const FRAME_CLAUSE_SLOT_MARKERS = {
62
62
  wish_content: new Set(["と", "って"]),
63
63
  quoted_content: new Set(["と", "って"]),
@@ -1084,7 +1084,7 @@ function sentenceModalityTags(tokens, tokenIdx, layout, getPredicateGrammar) {
1084
1084
  if (pos5a === 命令形_) {
1085
1085
  tags.add("imperative");
1086
1086
  }
1087
- if (pos5a === 意志推量形_) {
1087
+ if (isVolitionalSpeechActInflectionToken(token)) {
1088
1088
  tags.add("hortative");
1089
1089
  }
1090
1090
  }
@@ -1,5 +1,5 @@
1
1
  import { type LookupTables } from "../lookup-tables.js";
2
- import type { AttributiveStemProjection, ClauseKind } from "../clause-layout/index.js";
2
+ import type { AttributiveStemProjection, ClauseKind } from "../clause-layout/layout-types.js";
3
3
  import type { MatcherToken } from "../matchers.js";
4
4
  export interface GaNoClauseSpan {
5
5
  readonly start: number;
@@ -18,4 +18,3 @@ export declare function noParticleShouldRemainNominalModifier(tokens: readonly M
18
18
  readonly clause?: GaNoClauseSpan | null;
19
19
  readonly lookups: LookupTables;
20
20
  }): boolean;
21
- export declare function gaNoConversionPredicateIsAdjectival(tokens: readonly MatcherToken[], predicateIdx: number): boolean;
@@ -3,7 +3,7 @@ import { isClauseSpaceOrAdverbToken, nextNonSpaceIndex, nextTransparentEvidenceI
3
3
  import { secondaryParticleCanonical } from "../particles/secondary-particle.js";
4
4
  import { isNoArgumentRelationalNominalAt } from "../head-tail/tail/predicate-root/derivational-suffix-table.js";
5
5
  import { getReferentTokenBeforeParticle, isObliqueCaseChain, isQuantityMeasureToken, isTimeExpressionBeforeParticle } from "./helpers.js";
6
- import { POS0, POS1, POS2, POS01, POS5A, isAdjectivalDerivationalSuffix, isBareNaAdjSet, isNominalDerivationalSuffix, isSahenCapableNominal, 形容詞0, 動詞, 助詞, 助詞_格助詞, 助動詞, 数詞, 助数詞, 語幹_, 連体詞, 連用形_ } from "../../types/pos.js";
6
+ import { POS0, POS1, POS2, POS01, POS5A, isAdjectivalDerivationalSuffix, isNominalDerivationalSuffix, isSahenCapableNominal, 形容詞0, 動詞, 助詞, 助詞_格助詞, 助動詞, 数詞, 助数詞, 語幹_, 連体詞, 連用形_ } from "../../types/pos.js";
7
7
  export function isCaseParticleNoToken(token) {
8
8
  return token !== undefined && token.surface === "の" && (token.pos & POS01) === 助詞_格助詞;
9
9
  }
@@ -125,14 +125,6 @@ function effectivePredicate(tokens, predicateIdx) {
125
125
  const token = tokens[categoryIdx];
126
126
  return token === undefined || category === null ? null : { token, category, tokenIdx: categoryIdx };
127
127
  }
128
- export function gaNoConversionPredicateIsAdjectival(tokens, predicateIdx) {
129
- const effective = effectivePredicate(tokens, predicateIdx);
130
- if (effective !== null) {
131
- return effective.category === "adjectival";
132
- }
133
- const token = tokens[predicateIdx];
134
- return token !== undefined && isBareNaAdjSet(token);
135
- }
136
128
  function gaNoConversionAdjectivePredicateAllowed(tokens, particleIdx, predicateIdx, lookups) {
137
129
  const predicate = effectivePredicate(tokens, predicateIdx);
138
130
  if (predicate === null) {
@@ -48,13 +48,6 @@ export declare function sfpNodeYieldsToAuthoredQuestion(node: Pick<SfpNode, "eff
48
48
  export declare function trailingSfpEffectAfterFirst(node: Pick<SfpNode, "source">, contentPos0: number, hasAux: boolean): SfpEffect | null;
49
49
  export declare function isSfpSkipSurface(surface: string | null | undefined): boolean;
50
50
  export declare function isYouToken(token: MatcherToken): boolean;
51
- export interface HearsayFeatures {
52
- readonly desire: boolean;
53
- readonly negative: boolean;
54
- readonly past: boolean;
55
- readonly progressive: boolean;
56
- }
57
- export declare function buildHearsayParts(koreanLemma: string, irregular: IrregularType | null, koreanPos: number, features: HearsayFeatures | null, reporting: string): readonly [stem: string, reportingText: string];
58
51
  export declare function detectNoda(cursor: TokenCursor<MatcherToken>): readonly MatcherToken[] | null;
59
52
  export declare function detectNoCopulaChain(cursor: TokenCursor<MatcherToken>, options?: {
60
53
  readonly consumers?: readonly BoundaryRelationConsumer[];
@@ -573,98 +573,6 @@ function auxExtractFeatures(auxTokens, options) {
573
573
  }
574
574
  return extractAuxFeatures(auxTokens, normalized);
575
575
  }
576
- export function buildHearsayParts(koreanLemma, irregular, koreanPos, features, reporting) {
577
- const f = features;
578
- let stem;
579
- if (koreanPos === 동사) {
580
- if (f?.desire === true) {
581
- const goForm = conjugate(koreanLemma, irregularType(irregular), "고");
582
- if (f.negative && f.past) {
583
- stem = `${goForm} 싶지 않았다고`;
584
- }
585
- else if (f.negative) {
586
- stem = `${goForm} 싶지 않다고`;
587
- }
588
- else if (f.past) {
589
- stem = `${goForm} 싶었다고`;
590
- }
591
- else {
592
- stem = `${goForm} 싶다고`;
593
- }
594
- return [stem, reporting];
595
- }
596
- if (koreanLemma.endsWith(" 수 있다")) {
597
- if (f?.negative === true && f.past) {
598
- stem = `${koreanLemma.slice(0, -"있다".length)}없었다고`;
599
- }
600
- else if (f?.negative === true) {
601
- stem = `${koreanLemma.slice(0, -"있다".length)}없다고`;
602
- }
603
- else if (f?.past === true) {
604
- stem = `${koreanLemma.slice(0, -"다".length)}었다고`;
605
- }
606
- else {
607
- stem = `${koreanLemma}고`;
608
- }
609
- return [stem, reporting];
610
- }
611
- if (f?.progressive === true) {
612
- const goForm = conjugate(koreanLemma, irregularType(irregular), "고");
613
- if (f.negative && f.past) {
614
- stem = `${goForm} 있지 않았다고`;
615
- }
616
- else if (f.negative) {
617
- stem = `${goForm} 있지 않다고`;
618
- }
619
- else if (f.past) {
620
- stem = `${goForm} 있었다고`;
621
- }
622
- else {
623
- stem = `${goForm} 있다고`;
624
- }
625
- return [stem, reporting];
626
- }
627
- if (f?.negative === true && f.past) {
628
- stem = `${conjugate(koreanLemma, irregularType(irregular), "지")} 않았다고`;
629
- }
630
- else if (f?.negative === true) {
631
- stem = `${conjugate(koreanLemma, irregularType(irregular), "지")} 않는다고`;
632
- }
633
- else if (f?.past === true) {
634
- stem = `${conjugate(koreanLemma, irregularType(irregular), "았/었")}다고`;
635
- }
636
- else {
637
- stem = conjugate(koreanLemma, irregularType(irregular), "ㄴ/는다고");
638
- }
639
- }
640
- else if (koreanPos === 형용사) {
641
- if (f?.negative === true && f.past) {
642
- stem = `${conjugate(koreanLemma, irregularType(irregular), "지")} 않았다고`;
643
- }
644
- else if (f?.negative === true) {
645
- stem = `${conjugate(koreanLemma, irregularType(irregular), "지")} 않다고`;
646
- }
647
- else if (f?.past === true) {
648
- stem = `${conjugate(koreanLemma, irregularType(irregular), "았/었")}다고`;
649
- }
650
- else {
651
- stem = conjugate(koreanLemma, irregularType(irregular), "다고");
652
- }
653
- }
654
- else if (koreanPos === 명사 || koreanPos === 대명사) {
655
- const batchim = hasBatchim(koreanLemma) === true;
656
- if (f?.past === true) {
657
- stem = koreanLemma + (batchim ? "이었다고" : "였다고");
658
- }
659
- else {
660
- stem = koreanLemma + (batchim ? "이라고" : "라고");
661
- }
662
- }
663
- else {
664
- stem = `${koreanLemma}라고`;
665
- }
666
- return [stem, reporting];
667
- }
668
576
  const NODA_COPULA_POS4 = new Set([助動詞_ダ, 助動詞_デス, 助動詞_ジャ, 助動詞_ヤ]);
669
577
  export function detectNoda(cursor) {
670
578
  const tokens = cursor.tokens;
@@ -1,7 +1,7 @@
1
1
  import type { IrregularType } from "../../generator/conjugator.js";
2
2
  import type { MatcherToken } from "../matchers.js";
3
3
  import { PredicateArgument } from "./helpers.js";
4
- import type { ClauseLayout } from "../clause-layout/index.js";
4
+ import type { ClauseLayout } from "../clause-layout/final-layout.js";
5
5
  import type { LookupTables } from "../lookup-tables.js";
6
6
  export declare const HonorificLevel: {
7
7
  readonly NONE: "none";
@@ -34,7 +34,6 @@ export declare function hydrateBenefactiveContextFromLayout(tokens: readonly Hon
34
34
  readonly includeBorrowed?: boolean;
35
35
  }): BenefactiveContext;
36
36
  export declare function resolveBenefactiveTail(patternId: string, tailLemma: string | null | undefined, tailIrregular: IrregularType | null | undefined, tailKoreanPos: number, benefactive: BenefactiveContext | null | undefined): readonly [tailLemma: string | null, tailIrregular: IrregularType | null, tailKoreanPos: number];
37
- export declare function isBenefactivePotentialPattern(patternId: string): boolean;
38
37
  export declare function isRespectReferentToken(token: HonorificToken | null, lookups: LookupTables): boolean;
39
38
  export declare function isRespectReferentBeforeParticle(tokens: readonly HonorificToken[], particleIdx: number, lookups: LookupTables): boolean;
40
39
  export declare function hasRespectSubjectSignal(subjects: readonly PredicateArgument[], tokens: readonly HonorificToken[], lookups: LookupTables): boolean;
@@ -109,9 +109,6 @@ export function resolveBenefactiveTail(patternId, tailLemma, tailIrregular, tail
109
109
  }
110
110
  return [tailLemma, tailIrregular ?? null, tailKoreanPos];
111
111
  }
112
- export function isBenefactivePotentialPattern(patternId) {
113
- return BEN_MORAERU.has(patternId) || BEN_ITADAKERU.has(patternId);
114
- }
115
112
  function findBenefactiveAgentParticleIdx(args, tokens, lookups) {
116
113
  const niIdx = findAgentParticleIdxForSurface(args, tokens, "に", lookups);
117
114
  if (niIdx !== null) {
@@ -1,4 +1,4 @@
1
- import type { ClauseLayout } from "../clause-layout/index.js";
1
+ import type { ClauseLayout } from "../clause-layout/final-layout.js";
2
2
  import { type PhraseEnumerationLayout } from "../clause-layout/phrase-enumeration.js";
3
3
  import type { LookupTables } from "../lookup-tables.js";
4
4
  import type { RuntimeHaruToken } from "../../types/token.js";