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.
- package/CHANGELOG.md +11 -0
- package/README.en.md +24 -21
- package/README.md +66 -73
- package/data/config/lookup_tables.toml +9 -4
- package/dist/analyzer/config.js +1 -3
- package/dist/analyzer/connect.d.ts +1 -1
- package/dist/analyzer/connect.js +2 -1
- package/dist/analyzer/dictionary-provider.d.ts +2 -0
- package/dist/analyzer/dictionary-provider.js +3 -0
- package/dist/analyzer/haru-dictionary-provider.js +17 -6
- package/dist/analyzer/node-dictionary-provider.d.ts +19 -8
- package/dist/analyzer/node-dictionary-provider.js +109 -48
- package/dist/analyzer/node-helpers.js +12 -18
- package/dist/analyzer/page-cached-source.d.ts +59 -0
- package/dist/analyzer/page-cached-source.js +157 -0
- package/dist/analyzer-lexicon.js +6 -1
- package/dist/default-provider.d.ts +1 -1
- package/dist/default-provider.js +14 -6
- package/dist/dictionary/derivation.d.ts +0 -1
- package/dist/dictionary/morpheme.js +13 -7
- package/dist/dictionary/pattern.js +1 -1
- package/dist/dictionary/sense-normalization.js +3 -3
- package/dist/generator/aux-map.d.ts +1 -0
- package/dist/generator/aux-map.js +1 -1
- package/dist/generator/conjugator.d.ts +0 -1
- package/dist/generator/conjugator.js +0 -3
- package/dist/generator/numerals.d.ts +0 -1
- package/dist/generator/numerals.js +0 -3
- package/dist/pipeline/assembler/affix-helpers.d.ts +14 -0
- package/dist/pipeline/assembler/affix-helpers.js +154 -0
- package/dist/pipeline/assembler/content-override.d.ts +3 -0
- package/dist/pipeline/assembler/content-override.js +79 -0
- package/dist/pipeline/assembler/copula-focus-plan.d.ts +10 -0
- package/dist/pipeline/assembler/copula-focus-plan.js +32 -0
- package/dist/pipeline/assembler/copula-helpers.d.ts +31 -0
- package/dist/pipeline/assembler/copula-helpers.js +192 -0
- package/dist/pipeline/assembler/lexical-layout-hypothesis.d.ts +59 -0
- package/dist/pipeline/assembler/lexical-layout-hypothesis.js +357 -0
- package/dist/pipeline/assembler/light-verb-projection.d.ts +21 -0
- package/dist/pipeline/assembler/light-verb-projection.js +43 -0
- package/dist/pipeline/assembler/nande-reason.d.ts +4 -0
- package/dist/pipeline/assembler/nande-reason.js +162 -0
- package/dist/pipeline/assembler/particle-helpers.d.ts +10 -0
- package/dist/pipeline/assembler/particle-helpers.js +57 -0
- package/dist/pipeline/assembler/quantity-spans.d.ts +24 -0
- package/dist/pipeline/assembler/quantity-spans.js +58 -0
- package/dist/pipeline/assembler/question-plan.d.ts +5 -0
- package/dist/pipeline/assembler/question-plan.js +121 -0
- package/dist/pipeline/assembler/quote-helpers.d.ts +11 -0
- package/dist/pipeline/assembler/quote-helpers.js +67 -0
- package/dist/pipeline/assembler.d.ts +47 -31
- package/dist/pipeline/assembler.js +1219 -3234
- package/dist/pipeline/assembly-content-span.d.ts +59 -0
- package/dist/pipeline/assembly-content-span.js +149 -0
- package/dist/pipeline/attributive.d.ts +2 -2
- package/dist/pipeline/attributive.js +2 -5
- package/dist/pipeline/candidate-runtime.d.ts +2 -30
- package/dist/pipeline/candidate-runtime.js +4 -125
- package/dist/pipeline/clause-layout/adverbial-predicate.d.ts +22 -0
- package/dist/pipeline/clause-layout/adverbial-predicate.js +180 -0
- package/dist/pipeline/clause-layout/attributive-boundaries.d.ts +12 -0
- package/dist/pipeline/clause-layout/attributive-boundaries.js +325 -0
- package/dist/pipeline/clause-layout/boundary-detection.d.ts +100 -0
- package/dist/pipeline/clause-layout/boundary-detection.js +729 -0
- package/dist/pipeline/clause-layout/boundary-event-common.d.ts +8 -0
- package/dist/pipeline/clause-layout/boundary-event-common.js +50 -0
- package/dist/pipeline/clause-layout/boundary-settlement.d.ts +40 -0
- package/dist/pipeline/clause-layout/boundary-settlement.js +534 -0
- package/dist/pipeline/clause-layout/chuushi-closure.js +1 -2
- package/dist/pipeline/clause-layout/connective-boundaries.d.ts +34 -0
- package/dist/pipeline/clause-layout/connective-boundaries.js +1049 -0
- package/dist/pipeline/clause-layout/final-layout.d.ts +155 -0
- package/dist/pipeline/clause-layout/final-layout.js +544 -0
- package/dist/pipeline/clause-layout/index.d.ts +5 -597
- package/dist/pipeline/clause-layout/index.js +69 -6576
- package/dist/pipeline/clause-layout/juncture-verdict.d.ts +1 -3
- package/dist/pipeline/clause-layout/layout-types.d.ts +142 -0
- package/dist/pipeline/clause-layout/layout-types.js +16 -0
- package/dist/pipeline/clause-layout/lexical-adverbial-affiliation.d.ts +1 -1
- package/dist/pipeline/clause-layout/navigation.d.ts +48 -0
- package/dist/pipeline/clause-layout/navigation.js +264 -0
- package/dist/pipeline/clause-layout/nominal-anchor-evidence.d.ts +57 -0
- package/dist/pipeline/clause-layout/nominal-anchor-evidence.js +180 -0
- package/dist/pipeline/clause-layout/nominal-anchors.d.ts +9 -0
- package/dist/pipeline/clause-layout/nominal-anchors.js +318 -0
- package/dist/pipeline/clause-layout/nominal-binding.d.ts +1 -1
- package/dist/pipeline/clause-layout/nominal-binding.js +1 -1
- package/dist/pipeline/clause-layout/nominal-frame-reach.d.ts +7 -0
- package/dist/pipeline/clause-layout/nominal-frame-reach.js +77 -0
- package/dist/pipeline/clause-layout/particle-phrase-copula.d.ts +1 -1
- package/dist/pipeline/clause-layout/phrase-enumeration.d.ts +1 -1
- package/dist/pipeline/clause-layout/phrase-enumeration.js +2 -1
- package/dist/pipeline/clause-layout/predicate-ownership.d.ts +22 -0
- package/dist/pipeline/clause-layout/predicate-ownership.js +323 -0
- package/dist/pipeline/clause-layout/predicate-parallel.d.ts +2 -1
- package/dist/pipeline/clause-layout/predicate-parallel.js +16 -1
- package/dist/pipeline/clause-layout/predicate-shape.d.ts +49 -0
- package/dist/pipeline/clause-layout/predicate-shape.js +369 -0
- package/dist/pipeline/clause-layout/predicate-token-shape.d.ts +15 -0
- package/dist/pipeline/clause-layout/predicate-token-shape.js +142 -0
- package/dist/pipeline/clause-layout/prenominal-head-reach.d.ts +29 -0
- package/dist/pipeline/clause-layout/prenominal-head-reach.js +349 -0
- package/dist/pipeline/clause-layout/proto-layout.d.ts +144 -0
- package/dist/pipeline/clause-layout/proto-layout.js +327 -0
- package/dist/pipeline/clause-layout/proto-state.d.ts +2 -1
- package/dist/pipeline/clause-layout/punctuated-copula.d.ts +1 -1
- package/dist/pipeline/clause-layout/punctuation.d.ts +8 -0
- package/dist/pipeline/clause-layout/punctuation.js +33 -0
- package/dist/pipeline/clause-layout/quote-classification.d.ts +48 -0
- package/dist/pipeline/clause-layout/quote-classification.js +430 -0
- package/dist/pipeline/clause-layout/quote-delimiters.d.ts +2 -0
- package/dist/pipeline/clause-layout/quote-delimiters.js +16 -0
- package/dist/pipeline/clause-layout/renyou-verb-reading.d.ts +1 -1
- package/dist/pipeline/clause-layout/speech-act.js +1 -1
- package/dist/pipeline/clause-layout/token-evidence.d.ts +11 -0
- package/dist/pipeline/clause-layout/token-evidence.js +41 -0
- package/dist/pipeline/clause-layout/trivia.d.ts +5 -0
- package/dist/pipeline/clause-layout/trivia.js +18 -1
- package/dist/pipeline/clause-layout/utterance-boundaries.d.ts +41 -0
- package/dist/pipeline/clause-layout/utterance-boundaries.js +627 -0
- package/dist/pipeline/clause-layout/vocative.d.ts +5 -0
- package/dist/pipeline/clause-layout/vocative.js +91 -0
- package/dist/pipeline/clause-layout/whitespace-attributive-reading.d.ts +1 -1
- package/dist/pipeline/clause-layout/whitespace-attributive-reading.js +4 -1
- package/dist/pipeline/commitment/adverbial-adjunct-routing.d.ts +3 -0
- package/dist/pipeline/commitment/adverbial-adjunct-routing.js +109 -0
- package/dist/pipeline/commitment/benefactive-span-hydration.d.ts +5 -0
- package/dist/pipeline/commitment/benefactive-span-hydration.js +49 -0
- package/dist/pipeline/commitment/candidate-projection.d.ts +29 -0
- package/dist/pipeline/commitment/candidate-projection.js +512 -0
- package/dist/pipeline/commitment/connective-refinement.d.ts +8 -0
- package/dist/pipeline/commitment/connective-refinement.js +152 -0
- package/dist/pipeline/commitment/deferred-reanalysis.d.ts +1 -1
- package/dist/pipeline/commitment/final-sense-sync.d.ts +8 -0
- package/dist/pipeline/commitment/final-sense-sync.js +264 -0
- package/dist/pipeline/commitment/head-owner-candidate-selection.d.ts +15 -0
- package/dist/pipeline/commitment/head-owner-candidate-selection.js +158 -0
- package/dist/pipeline/commitment/particle-roles.d.ts +1 -1
- package/dist/pipeline/commitment/particle-roles.js +546 -398
- package/dist/pipeline/commitment/passive-class.d.ts +1 -1
- package/dist/pipeline/commitment/passive-class.js +2 -3
- package/dist/pipeline/commitment/quantity-span-commitment.d.ts +4 -0
- package/dist/pipeline/commitment/quantity-span-commitment.js +37 -0
- package/dist/pipeline/commitment/quote-refinement.d.ts +6 -0
- package/dist/pipeline/commitment/quote-refinement.js +130 -0
- package/dist/pipeline/commitment/role-case-shadow.d.ts +0 -4
- package/dist/pipeline/commitment/role-case-shadow.js +0 -3
- package/dist/pipeline/commitment/semantic-frame.d.ts +1 -1
- package/dist/pipeline/commitment/semantic-frame.js +2 -3
- package/dist/pipeline/commitment/span-evidence.d.ts +2 -3
- package/dist/pipeline/commitment/span-evidence.js +7 -18
- package/dist/pipeline/commitment/stem-candidate-selection.d.ts +24 -0
- package/dist/pipeline/commitment/stem-candidate-selection.js +663 -0
- package/dist/pipeline/commitment/te-connective-resolution.d.ts +1 -1
- package/dist/pipeline/commitment/te-connective-resolution.js +0 -1
- package/dist/pipeline/commitment/types.d.ts +1 -1
- package/dist/pipeline/commitment/types.js +1 -1
- package/dist/pipeline/commitment/voice-reading-resolution.d.ts +1 -1
- package/dist/pipeline/commitment/voice-reading-resolution.js +117 -34
- package/dist/pipeline/compounds/compound-tail-tokens.d.ts +12 -0
- package/dist/pipeline/compounds/compound-tail-tokens.js +37 -0
- package/dist/pipeline/compounds/compound-translation-candidates.d.ts +49 -0
- package/dist/pipeline/compounds/compound-translation-candidates.js +154 -0
- package/dist/pipeline/compounds/compound-verbs.js +4 -9
- package/dist/pipeline/compounds/index.d.ts +24 -29
- package/dist/pipeline/compounds/index.js +361 -383
- package/dist/pipeline/content-resolver/postaux-pattern-rendering.d.ts +0 -2
- package/dist/pipeline/content-resolver/postaux-pattern-rendering.js +1 -5
- package/dist/pipeline/content-resolver/types.d.ts +0 -4
- package/dist/pipeline/content-resolver.js +641 -492
- package/dist/pipeline/context.d.ts +2 -1
- package/dist/pipeline/context.js +4 -3
- package/dist/pipeline/core.d.ts +8 -95
- package/dist/pipeline/core.js +1339 -7183
- package/dist/pipeline/deferred-commitment.d.ts +2 -17
- package/dist/pipeline/deferred-commitment.js +406 -2353
- package/dist/pipeline/demo-discourse.d.ts +1 -1
- package/dist/pipeline/fallback/index.d.ts +0 -1
- package/dist/pipeline/fallback/index.js +3 -7
- package/dist/pipeline/fallback/orphan-unit-absorption.d.ts +4 -0
- package/dist/pipeline/fallback/orphan-unit-absorption.js +57 -0
- package/dist/pipeline/fallback/unsupported-raw.d.ts +0 -2
- package/dist/pipeline/fallback/unsupported-raw.js +0 -10
- package/dist/pipeline/head-tail/boundary/clause-start.js +1 -10
- package/dist/pipeline/head-tail/boundary/ka-ownership.d.ts +3 -2
- package/dist/pipeline/head-tail/boundary/ka-ownership.js +16 -9
- package/dist/pipeline/head-tail/boundary/marker.js +1 -1
- package/dist/pipeline/head-tail/boundary/punctuation.d.ts +0 -1
- package/dist/pipeline/head-tail/boundary/punctuation.js +1 -6
- package/dist/pipeline/head-tail/boundary/quote-marker.js +1 -1
- package/dist/pipeline/head-tail/candidate/collect.d.ts +3 -3
- package/dist/pipeline/head-tail/candidate/context.d.ts +1 -1
- package/dist/pipeline/head-tail/candidate/context.js +1 -1
- package/dist/pipeline/head-tail/candidate/evidence.d.ts +0 -2
- package/dist/pipeline/head-tail/candidate/evidence.js +0 -22
- package/dist/pipeline/head-tail/candidate/owner-payload.d.ts +1 -1
- package/dist/pipeline/head-tail/candidate/semantic-classifiers.d.ts +2 -1
- package/dist/pipeline/head-tail/data/honorific-formulaic-arm-table.d.ts +0 -1
- package/dist/pipeline/head-tail/data/honorific-formulaic-arm-table.js +0 -3
- package/dist/pipeline/head-tail/data/quoted-reporting-sets.d.ts +2 -0
- package/dist/pipeline/head-tail/data/quoted-reporting-sets.js +4 -0
- package/dist/pipeline/head-tail/grammar.d.ts +0 -1
- package/dist/pipeline/head-tail/head/adapters/nominal/commit.js +3 -2
- package/dist/pipeline/head-tail/head/adapters/nominal/grammar.d.ts +2 -1
- package/dist/pipeline/head-tail/head/adapters/nominal/integration.d.ts +2 -2
- package/dist/pipeline/head-tail/head/adapters/nominal/integration.js +6 -6
- package/dist/pipeline/head-tail/head/adapters/nominal/owner-arbitration.d.ts +1 -1
- package/dist/pipeline/head-tail/head/adapters/nominal/parser.d.ts +1 -2
- package/dist/pipeline/head-tail/head/adapters/nominal/parser.js +20 -24
- package/dist/pipeline/head-tail/head/adapters/nominal/plan-lifecycle.d.ts +1 -1
- package/dist/pipeline/head-tail/head/adapters/nominal/renyou-nominal-head.js +2 -2
- package/dist/pipeline/head-tail/integration/content-head-dispatch.d.ts +5 -6
- package/dist/pipeline/head-tail/integration/content-head-dispatch.js +2 -5
- package/dist/pipeline/head-tail/integration/copula-focus-adjunct.js +1 -1
- package/dist/pipeline/head-tail/integration/copula-host-chain.js +1 -1
- package/dist/pipeline/head-tail/integration/honorific-formulaic-host.d.ts +25 -0
- package/dist/pipeline/head-tail/integration/honorific-formulaic-host.js +142 -0
- package/dist/pipeline/head-tail/integration/nominal-assembly.d.ts +2 -2
- package/dist/pipeline/head-tail/integration/nominal-assembly.js +1 -1
- package/dist/pipeline/head-tail/integration/particle-phrase-copula.d.ts +1 -1
- package/dist/pipeline/head-tail/integration/semantic-carrier-predicate.js +3 -20
- package/dist/pipeline/head-tail/integration/tail-assembly.d.ts +2 -3
- package/dist/pipeline/head-tail/integration/tail-assembly.js +20 -145
- package/dist/pipeline/head-tail/lifecycle/commit-context.d.ts +1 -1
- package/dist/pipeline/head-tail/lifecycle/head-tail-render-plan.d.ts +1 -1
- package/dist/pipeline/head-tail/lifecycle/hooks.d.ts +2 -3
- package/dist/pipeline/head-tail/lifecycle/hooks.js +0 -9
- package/dist/pipeline/head-tail/lifecycle/plan-context.d.ts +1 -1
- package/dist/pipeline/head-tail/lifecycle/plan-context.js +1 -1
- package/dist/pipeline/head-tail/lifecycle/registry.d.ts +3 -4
- package/dist/pipeline/head-tail/lifecycle/registry.js +1 -4
- package/dist/pipeline/head-tail/lifecycle/render.js +2 -2
- package/dist/pipeline/head-tail/line-memo.d.ts +1 -1
- package/dist/pipeline/head-tail/line-memo.js +25 -6
- package/dist/pipeline/head-tail/tail/chain.d.ts +3 -3
- package/dist/pipeline/head-tail/tail/families/tokoro-semantics.d.ts +0 -1
- package/dist/pipeline/head-tail/tail/families/tokoro-semantics.js +2 -1
- package/dist/pipeline/head-tail/tail/families/youda-semantics.js +1 -4
- package/dist/pipeline/head-tail/tail/postverb-events.d.ts +0 -180
- package/dist/pipeline/head-tail/tail/postverb-events.js +2 -2249
- package/dist/pipeline/head-tail/tail/postverb-tail-classifier.js +3 -4
- package/dist/pipeline/head-tail/tail/predicate-root/aspect-semantics.d.ts +10 -8
- package/dist/pipeline/head-tail/tail/predicate-root/aspect-semantics.js +2 -55
- package/dist/pipeline/head-tail/tail/predicate-root/benefactive-hydration.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/benefactive-hydration.js +1 -18
- package/dist/pipeline/head-tail/tail/predicate-root/boundary-semantics.js +4 -2
- package/dist/pipeline/head-tail/tail/predicate-root/classifiers/causative-aux.d.ts +4 -0
- package/dist/pipeline/head-tail/tail/predicate-root/classifiers/causative-aux.js +11 -0
- package/dist/pipeline/head-tail/tail/predicate-root/classifiers/copula-concessive.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/classifiers/copula-concessive.js +14 -3
- package/dist/pipeline/head-tail/tail/predicate-root/classifiers/tokens.d.ts +0 -2
- package/dist/pipeline/head-tail/tail/predicate-root/classifiers/tokens.js +3 -12
- package/dist/pipeline/head-tail/tail/predicate-root/commit.d.ts +2 -1
- package/dist/pipeline/head-tail/tail/predicate-root/commit.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/commitment-bridge.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/connective-ops.d.ts +9 -0
- package/dist/pipeline/head-tail/tail/predicate-root/connective-ops.js +69 -0
- package/dist/pipeline/head-tail/tail/predicate-root/connective-render.d.ts +7 -0
- package/dist/pipeline/head-tail/tail/predicate-root/connective-render.js +52 -0
- package/dist/pipeline/head-tail/tail/predicate-root/connective-surface-lookup.d.ts +11 -0
- package/dist/pipeline/head-tail/tail/predicate-root/connective-surface-lookup.js +114 -0
- package/dist/pipeline/head-tail/tail/predicate-root/derivational-host-base.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/grammar.d.ts +2 -14
- package/dist/pipeline/head-tail/tail/predicate-root/grammar.js +19 -128
- package/dist/pipeline/head-tail/tail/predicate-root/head-contract-table.d.ts +2 -1
- package/dist/pipeline/head-tail/tail/predicate-root/head-contract-table.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/head-hydration.js +2 -17
- package/dist/pipeline/head-tail/tail/predicate-root/inspect.d.ts +2 -8
- package/dist/pipeline/head-tail/tail/predicate-root/inspect.js +12 -16
- package/dist/pipeline/head-tail/tail/predicate-root/integration/attributive-boundary.d.ts +35 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/attributive-boundary.js +1079 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/clause-boundaries.d.ts +69 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/clause-boundaries.js +2972 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/contracts.d.ts +118 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/end-boundary-inference.d.ts +22 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/end-boundary-inference.js +698 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/head-admission.d.ts +39 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/head-admission.js +689 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/head-profiles.d.ts +13 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/head-profiles.js +138 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/parse-clause.d.ts +60 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/parse-clause.js +2013 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-evidence.d.ts +15 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-evidence.js +109 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-start-evidence.d.ts +48 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/predicate-start-evidence.js +608 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/readiness.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/integration/readiness.js +3 -2
- package/dist/pipeline/head-tail/tail/predicate-root/integration/stem-candidates.d.ts +177 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/stem-candidates.js +1885 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-arbitration.d.ts +13 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-arbitration.js +283 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-chunk-scan-end.d.ts +8 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/tail-chunk-scan-end.js +389 -0
- package/dist/pipeline/head-tail/tail/predicate-root/integration/zero-head.js +3 -2
- package/dist/pipeline/head-tail/tail/predicate-root/integration.d.ts +9 -166
- package/dist/pipeline/head-tail/tail/predicate-root/integration.js +254 -10644
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective-tail.d.ts +51 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective-tail.js +808 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/connective.js +5 -3
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula-tail.d.ts +22 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula-tail.js +156 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula.d.ts +8 -2
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/copula.js +177 -51
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/lexical-idioms.d.ts +37 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/lexical-idioms.js +959 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/likeness-modal.d.ts +15 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/likeness-modal.js +327 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/modal-tail.d.ts +44 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/modal-tail.js +998 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation-tail.d.ts +20 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation-tail.js +424 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/obligation.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/postverb-operator.d.ts +25 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/postverb-operator.js +722 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/predicate-projection-connective.js +143 -9
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/predicate-quote.d.ts +44 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/predicate-quote.js +856 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/projection-tail.d.ts +45 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/projection-tail.js +573 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/quantity-extent.d.ts +2 -1
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/quantity-extent.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-aspect.d.ts +23 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-aspect.js +598 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-host.d.ts +11 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/te-host.js +52 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/terminal-sfp.d.ts +24 -0
- package/dist/pipeline/head-tail/tail/predicate-root/matchers/terminal-sfp.js +873 -0
- package/dist/pipeline/head-tail/tail/predicate-root/mid-chain-connective-license.js +2 -1
- package/dist/pipeline/head-tail/tail/predicate-root/nominal-host-phrase.d.ts +0 -1
- package/dist/pipeline/head-tail/tail/predicate-root/nominal-host-phrase.js +0 -3
- package/dist/pipeline/head-tail/tail/predicate-root/op-builders.d.ts +5 -1
- package/dist/pipeline/head-tail/tail/predicate-root/op-builders.js +21 -0
- package/dist/pipeline/head-tail/tail/predicate-root/operator-head.d.ts +1 -3
- package/dist/pipeline/head-tail/tail/predicate-root/operator-head.js +0 -16
- package/dist/pipeline/head-tail/tail/predicate-root/parse-boundary-hint.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/parse-closure.d.ts +15 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parse-closure.js +158 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parse-coordinates.d.ts +10 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parse-coordinates.js +29 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parse-stem.d.ts +14 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parse-stem.js +150 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parse-tail.d.ts +40 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parse-tail.js +1625 -0
- package/dist/pipeline/head-tail/tail/predicate-root/parser.d.ts +26 -137
- package/dist/pipeline/head-tail/tail/predicate-root/parser.js +153 -9225
- package/dist/pipeline/head-tail/tail/predicate-root/plan-lifecycle.d.ts +2 -2
- package/dist/pipeline/head-tail/tail/predicate-root/postverb-host-attachment.d.ts +8 -0
- package/dist/pipeline/head-tail/tail/predicate-root/postverb-host-attachment.js +105 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-admission-contract.js +261 -215
- package/dist/pipeline/head-tail/tail/predicate-root/production-claim-access.d.ts +0 -1
- package/dist/pipeline/head-tail/tail/predicate-root/production-claim-access.js +0 -3
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive-change.d.ts +3 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive-change.js +327 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive.d.ts +54 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/attributive.js +1212 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/chain-patterns.d.ts +191 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/chain-patterns.js +127 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/clause-chain.d.ts +17 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/clause-chain.js +1071 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/conditional-carriers.d.ts +4 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/conditional-carriers.js +366 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/confirmation.d.ts +3 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/confirmation.js +289 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/copula.d.ts +8 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/copula.js +868 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/desiderative.d.ts +4 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/desiderative.js +414 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/exemplification.d.ts +2 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/exemplification.js +290 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/imperative.d.ts +6 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/imperative.js +468 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/mid-chain-quote.d.ts +4 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/mid-chain-quote.js +558 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalization.d.ts +6 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalization.js +332 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalized-quote.d.ts +3 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/nominalized-quote.js +393 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/normalization.d.ts +7 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/normalization.js +334 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/potential.d.ts +3 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/potential.js +304 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/reason-and-sequence.d.ts +6 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/reason-and-sequence.js +687 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/request.d.ts +4 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/request.js +1013 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/shared.d.ts +25 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/shared.js +53 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/subordination.d.ts +5 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/subordination.js +318 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/terminal.d.ts +14 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/terminal.js +976 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/volitional.d.ts +10 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families/volitional.js +677 -0
- package/dist/pipeline/head-tail/tail/predicate-root/production-families.d.ts +1 -8
- package/dist/pipeline/head-tail/tail/predicate-root/production-families.js +19 -11025
- package/dist/pipeline/head-tail/tail/predicate-root/production-lowering-bindings.js +9 -3
- package/dist/pipeline/head-tail/tail/predicate-root/production-registry.d.ts +2 -3
- package/dist/pipeline/head-tail/tail/predicate-root/production-registry.js +15 -19
- package/dist/pipeline/head-tail/tail/predicate-root/quote-tail-context.d.ts +8 -0
- package/dist/pipeline/head-tail/tail/predicate-root/quote-tail-context.js +66 -0
- package/dist/pipeline/head-tail/tail/predicate-root/render-derivational-host-projection.d.ts +11 -0
- package/dist/pipeline/head-tail/tail/predicate-root/render-derivational-host-projection.js +67 -0
- package/dist/pipeline/head-tail/tail/predicate-root/render-root.d.ts +10 -0
- package/dist/pipeline/head-tail/tail/predicate-root/render-root.js +203 -0
- package/dist/pipeline/head-tail/tail/predicate-root/render-sfp-terminal.d.ts +3 -0
- package/dist/pipeline/head-tail/tail/predicate-root/render-sfp-terminal.js +647 -0
- package/dist/pipeline/head-tail/tail/predicate-root/render.d.ts +9 -25
- package/dist/pipeline/head-tail/tail/predicate-root/render.js +715 -5879
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/aspect-bases.d.ts +23 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/aspect-bases.js +523 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/aspect-benefactive.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/attributive-tail-forms.d.ts +71 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/attributive-tail-forms.js +907 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/aux-layer-context.d.ts +48 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/aux-layer-context.js +1 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-model.d.ts +3 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-model.js +35 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-support.d.ts +8 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/base-support.js +90 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-render.d.ts +1 -13
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-render.js +3 -10
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-tail.d.ts +17 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/command-tail.js +439 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/conjecture-compose.d.ts +34 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/conjecture-compose.js +358 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-compose.d.ts +2 -120
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-compose.js +90 -1670
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-ending.d.ts +7 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/connective-ending.js +36 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/continuative-copula.d.ts +7 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/continuative-copula.js +61 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/desire-bases.d.ts +9 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/desire-bases.js +69 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/hostless-conditional-quote.d.ts +12 -2
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/hostless-conditional-quote.js +19 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/idiom-bases.d.ts +119 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/idiom-bases.js +393 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/modal-bases.d.ts +77 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/modal-bases.js +1243 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/non-chain-tail.d.ts +3 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/non-chain-tail.js +1045 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-attributive-forms.d.ts +38 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-attributive-forms.js +507 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-conjecture-compose.d.ts +5 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-conjecture-compose.js +108 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-tail-forms.d.ts +72 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula-tail-forms.js +1343 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/noun-copula.js +9 -3
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/op-chain.js +1229 -1107
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/operator-chain-tail.d.ts +23 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/operator-chain-tail.js +443 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/postverb-auxiliary-bases.d.ts +12 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/postverb-auxiliary-bases.js +1193 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-base-projection.d.ts +18 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-base-projection.js +284 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-bases.d.ts +3 -271
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-bases.js +438 -5062
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-terminal-compose.d.ts +10 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/predicate-terminal-compose.js +167 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/purpose-manner-compose.d.ts +9 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/purpose-manner-compose.js +92 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/quote-complement-compose.d.ts +53 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/quote-complement-compose.js +534 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/reason-quote-carrier.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/scope-bridge-bases.d.ts +5 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/scope-bridge-bases.js +571 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/sequence-after-copula.js +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/sfp-question.d.ts +2 -1
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/sfp-question.js +9 -12
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/tail-host-trace.d.ts +15 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/tail-host-trace.js +134 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-bases.d.ts +41 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-bases.js +648 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-tail.d.ts +12 -0
- package/dist/pipeline/head-tail/tail/predicate-root/renderers/voice-benefactive-tail.js +306 -0
- package/dist/pipeline/head-tail/tail/predicate-root/span-provenance.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/suffix-handoff.d.ts +0 -1
- package/dist/pipeline/head-tail/tail/predicate-root/suffix-handoff.js +0 -13
- package/dist/pipeline/head-tail/tail/predicate-root/tail-evidence-decision.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/tail-evidence-decision.js +5 -45
- package/dist/pipeline/head-tail/tail/predicate-root/tame-reason-evidence.d.ts +8 -1
- package/dist/pipeline/head-tail/tail/predicate-root/tame-reason-evidence.js +15 -0
- package/dist/pipeline/head-tail/tail/predicate-root/trace.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/predicate-root/trace.js +2 -1
- package/dist/pipeline/head-tail/tail/segments/nominal-frame.d.ts +1 -1
- package/dist/pipeline/head-tail/tail/te-tail-continuation-table.js +1 -3
- package/dist/pipeline/index.d.ts +0 -4
- package/dist/pipeline/lexical-nominal-head-claims.d.ts +1 -1
- package/dist/pipeline/lexical-particle-boundary-claims.d.ts +1 -1
- package/dist/pipeline/lexical-renyou-head-claims.d.ts +1 -1
- package/dist/pipeline/lexical-renyou-head-claims.js +1 -1
- package/dist/pipeline/lookup-tables.d.ts +1 -0
- package/dist/pipeline/lookup-tables.js +1 -0
- package/dist/pipeline/matchers.d.ts +0 -3
- package/dist/pipeline/matchers.js +1 -8
- package/dist/pipeline/particle-head-dispatch.d.ts +1 -1
- package/dist/pipeline/particle-head-dispatch.js +472 -442
- package/dist/pipeline/particles/index.d.ts +3 -3
- package/dist/pipeline/particles/secondary-particle.d.ts +1 -0
- package/dist/pipeline/particles/secondary-particle.js +4 -0
- package/dist/pipeline/pattern-runtime.d.ts +0 -61
- package/dist/pipeline/pattern-runtime.js +3 -684
- package/dist/pipeline/preprocess/analyzer-input-offsets.d.ts +5 -0
- package/dist/pipeline/preprocess/analyzer-input-offsets.js +23 -0
- package/dist/pipeline/preprocess/auxiliary-variant-retag.d.ts +7 -0
- package/dist/pipeline/preprocess/auxiliary-variant-retag.js +178 -0
- package/dist/pipeline/preprocess/bungo-nasal-n-retag.d.ts +9 -0
- package/dist/pipeline/preprocess/bungo-nasal-n-retag.js +318 -0
- package/dist/pipeline/preprocess/cat-meow.d.ts +4 -0
- package/dist/pipeline/preprocess/cat-meow.js +46 -0
- package/dist/pipeline/preprocess/causative-aux-lemma.d.ts +2 -0
- package/dist/pipeline/preprocess/causative-aux-lemma.js +10 -0
- package/dist/pipeline/preprocess/collapsed-aspect-aux.d.ts +3 -0
- package/dist/pipeline/preprocess/collapsed-aspect-aux.js +217 -0
- package/dist/pipeline/preprocess/collapsed-te-oku.d.ts +3 -0
- package/dist/pipeline/preprocess/collapsed-te-oku.js +210 -0
- package/dist/pipeline/preprocess/collocation-emission.d.ts +14 -0
- package/dist/pipeline/preprocess/collocation-emission.js +148 -0
- package/dist/pipeline/preprocess/colloquial-vowel-fusion.d.ts +4 -0
- package/dist/pipeline/preprocess/colloquial-vowel-fusion.js +164 -0
- package/dist/{transform → pipeline/preprocess}/compound-particle-merge.d.ts +2 -2
- package/dist/{transform → pipeline/preprocess}/compound-particle-merge.js +5 -5
- package/dist/pipeline/preprocess/copula-focus-negative-state-change.d.ts +3 -0
- package/dist/pipeline/preprocess/copula-focus-negative-state-change.js +79 -0
- package/dist/pipeline/preprocess/copula-renyou-retag.d.ts +3 -0
- package/dist/pipeline/preprocess/copula-renyou-retag.js +56 -0
- package/dist/pipeline/preprocess/emphasis-sokuon.d.ts +10 -0
- package/dist/pipeline/preprocess/emphasis-sokuon.js +182 -0
- package/dist/{transform → pipeline/preprocess}/explanatory-mon-sfp-retag.d.ts +1 -1
- package/dist/{transform → pipeline/preprocess}/explanatory-mon-sfp-retag.js +2 -2
- package/dist/pipeline/preprocess/follower-context.d.ts +7 -0
- package/dist/pipeline/preprocess/follower-context.js +33 -0
- package/dist/pipeline/preprocess/fused-conditional.d.ts +3 -0
- package/dist/pipeline/preprocess/fused-conditional.js +97 -0
- package/dist/pipeline/preprocess/imperative-mistag-recovery.d.ts +7 -0
- package/dist/pipeline/preprocess/imperative-mistag-recovery.js +135 -0
- package/dist/pipeline/preprocess/input-text-normalization.d.ts +3 -0
- package/dist/pipeline/preprocess/input-text-normalization.js +39 -0
- package/dist/pipeline/preprocess/kansai-dialect.d.ts +9 -0
- package/dist/pipeline/preprocess/kansai-dialect.js +501 -0
- package/dist/{transform → pipeline/preprocess}/keijouji-copula-de-retag.d.ts +1 -1
- package/dist/{transform → pipeline/preprocess}/keijouji-copula-de-retag.js +2 -2
- package/dist/{transform → pipeline/preprocess}/ni-complement-matrix-flip.d.ts +1 -1
- package/dist/{transform → pipeline/preprocess}/ni-complement-matrix-flip.js +2 -2
- package/dist/pipeline/preprocess/past-quotative-tte-resplit.d.ts +3 -0
- package/dist/pipeline/preprocess/past-quotative-tte-resplit.js +55 -0
- package/dist/pipeline/preprocess/prolonged-orthography.d.ts +5 -0
- package/dist/pipeline/preprocess/prolonged-orthography.js +79 -0
- package/dist/pipeline/preprocess/prolonged-surface-canonicalization.d.ts +5 -0
- package/dist/pipeline/preprocess/prolonged-surface-canonicalization.js +161 -0
- package/dist/pipeline/preprocess/punctuation-canonicalization.d.ts +5 -0
- package/dist/pipeline/preprocess/punctuation-canonicalization.js +160 -0
- package/dist/{transform → pipeline/preprocess}/quotative-manner-noun-flip.d.ts +2 -2
- package/dist/{transform → pipeline/preprocess}/quotative-manner-noun-flip.js +10 -10
- package/dist/{transform → pipeline/preprocess}/reduplicated-mimetic.d.ts +1 -1
- package/dist/{transform → pipeline/preprocess}/reduplicated-mimetic.js +3 -3
- package/dist/{transform → pipeline/preprocess}/rentaishi-no-nominalizer-retag.d.ts +1 -1
- package/dist/{transform → pipeline/preprocess}/rentaishi-no-nominalizer-retag.js +2 -2
- package/dist/pipeline/preprocess/runtime-token-from-analyzer.d.ts +5 -0
- package/dist/pipeline/preprocess/runtime-token-from-analyzer.js +77 -0
- package/dist/pipeline/preprocess/runtime-token-from-preprocess.d.ts +13 -0
- package/dist/pipeline/preprocess/runtime-token-from-preprocess.js +15 -0
- package/dist/pipeline/preprocess/standalone-voice-mark.d.ts +9 -0
- package/dist/pipeline/preprocess/standalone-voice-mark.js +73 -0
- package/dist/pipeline/preprocess/synthetic-token.d.ts +10 -0
- package/dist/pipeline/preprocess/synthetic-token.js +26 -0
- package/dist/pipeline/preprocess/te-contraction.d.ts +4 -0
- package/dist/pipeline/preprocess/te-contraction.js +150 -0
- package/dist/pipeline/preprocess/terminal-role-tail.d.ts +5 -0
- package/dist/pipeline/preprocess/terminal-role-tail.js +148 -0
- package/dist/{transform → pipeline/preprocess}/terminal-sfp-retag-closure.d.ts +2 -2
- package/dist/{transform → pipeline/preprocess}/terminal-sfp-retag-closure.js +4 -4
- package/dist/pipeline/preprocess/to-iu-contraction.d.ts +2 -0
- package/dist/pipeline/preprocess/to-iu-contraction.js +65 -0
- package/dist/{transform → pipeline/preprocess}/volitional-resolution-sfp-retag.d.ts +1 -1
- package/dist/{transform → pipeline/preprocess}/volitional-resolution-sfp-retag.js +2 -2
- package/dist/{transform → pipeline/preprocess}/youon-remerge.d.ts +1 -1
- package/dist/{transform → pipeline/preprocess}/youon-remerge.js +3 -3
- package/dist/pipeline/projection/narou-ruby-input.d.ts +17 -0
- package/dist/pipeline/projection/narou-ruby-input.js +149 -0
- package/dist/pipeline/projection/parenthetical-delimiter-annotation.d.ts +6 -0
- package/dist/pipeline/projection/parenthetical-delimiter-annotation.js +117 -0
- package/dist/pipeline/projection/parenthetical-ruby-absorption.d.ts +6 -0
- package/dist/pipeline/projection/parenthetical-ruby-absorption.js +198 -0
- package/dist/pipeline/projection/parenthetical-source-boundary.d.ts +12 -0
- package/dist/pipeline/projection/parenthetical-source-boundary.js +117 -0
- package/dist/pipeline/projection/parenthetical-source-identity.d.ts +14 -0
- package/dist/pipeline/projection/parenthetical-source-identity.js +443 -0
- package/dist/pipeline/projection/parenthetical-target-insertion.d.ts +22 -0
- package/dist/pipeline/projection/parenthetical-target-insertion.js +584 -0
- package/dist/pipeline/projection/prepared-translation.d.ts +52 -0
- package/dist/pipeline/projection/prepared-translation.js +1 -0
- package/dist/pipeline/projection/prepared-tree.d.ts +6 -0
- package/dist/pipeline/projection/prepared-tree.js +66 -0
- package/dist/pipeline/projection/raw-parenthetical-split.d.ts +15 -0
- package/dist/pipeline/projection/raw-parenthetical-split.js +78 -0
- package/dist/pipeline/projection/ruby-annotation.d.ts +5 -0
- package/dist/pipeline/projection/ruby-annotation.js +161 -0
- package/dist/pipeline/projection/text-offset-projection.d.ts +7 -0
- package/dist/pipeline/projection/text-offset-projection.js +111 -0
- package/dist/pipeline/projection/transparent-pause-island.d.ts +8 -0
- package/dist/pipeline/projection/transparent-pause-island.js +188 -0
- package/dist/pipeline/pronominal-no-dispatch.js +1 -1
- package/dist/pipeline/quote/host-runtime.js +3 -2
- package/dist/pipeline/quote/host-taxonomy.d.ts +1 -0
- package/dist/pipeline/quote/host-taxonomy.js +2 -2
- package/dist/pipeline/quote/question-taking-enumeration.d.ts +1 -1
- package/dist/pipeline/quote/question-taking-enumeration.js +0 -4
- package/dist/pipeline/reason-source-evidence.d.ts +1 -0
- package/dist/pipeline/reason-source-evidence.js +1 -1
- package/dist/pipeline/rendering/functional-chain.d.ts +2 -0
- package/dist/pipeline/rendering/functional-chain.js +14 -0
- package/dist/pipeline/rendering/nominal-head-tail-plan-trace.d.ts +10 -0
- package/dist/pipeline/rendering/nominal-head-tail-plan-trace.js +336 -0
- package/dist/pipeline/rendering/render-plan-inspect.d.ts +9 -0
- package/dist/pipeline/rendering/render-plan-inspect.js +121 -0
- package/dist/pipeline/rendering/render-plan-payloads.d.ts +28 -0
- package/dist/pipeline/rendering/render-plan-payloads.js +125 -0
- package/dist/pipeline/rendering/render-plan-rewrite.d.ts +32 -0
- package/dist/pipeline/rendering/render-plan-rewrite.js +540 -0
- package/dist/pipeline/rendering/render-plan-segments.d.ts +42 -0
- package/dist/pipeline/rendering/render-plan-segments.js +263 -0
- package/dist/pipeline/rendering/render-plan.d.ts +4 -57
- package/dist/pipeline/rendering/render-plan.js +52 -1433
- package/dist/pipeline/rendering/request-normalization.d.ts +0 -1
- package/dist/pipeline/rendering/request-normalization.js +0 -3
- package/dist/pipeline/rendering/segment-allomorph.d.ts +17 -0
- package/dist/pipeline/rendering/segment-allomorph.js +152 -0
- package/dist/pipeline/rendering/segment-annotation-keys.d.ts +6 -0
- package/dist/pipeline/rendering/segment-annotation-keys.js +137 -0
- package/dist/pipeline/rendering/stem-derivation.js +1 -1
- package/dist/pipeline/rendering/target-segment-build.d.ts +13 -0
- package/dist/pipeline/rendering/target-segment-build.js +167 -0
- package/dist/pipeline/rendering/terminal-unit-punctuation.d.ts +16 -0
- package/dist/pipeline/rendering/terminal-unit-punctuation.js +96 -0
- package/dist/pipeline/rendering/unit-surface.d.ts +9 -0
- package/dist/pipeline/rendering/unit-surface.js +35 -0
- package/dist/pipeline/resource-cache.d.ts +19 -0
- package/dist/pipeline/resource-cache.js +164 -0
- package/dist/pipeline/rules/common.d.ts +0 -1
- package/dist/pipeline/rules/common.js +0 -1
- package/dist/pipeline/rules/entry-aux.d.ts +0 -2
- package/dist/pipeline/rules/entry-aux.js +0 -4
- package/dist/pipeline/rules/postaux-unsupported.js +1 -5
- package/dist/pipeline/rules/pre-entry.d.ts +0 -1
- package/dist/pipeline/rules/pre-entry.js +0 -1
- package/dist/pipeline/rules/tail-finalization.js +4 -5
- package/dist/pipeline/semantics/conditional.d.ts +2 -1
- package/dist/pipeline/semantics/conditional.js +3 -2
- package/dist/pipeline/semantics/copula-tail-runtime.js +2 -2
- package/dist/pipeline/semantics/explanatory-mon-reading.d.ts +1 -1
- package/dist/pipeline/semantics/explanatory-mon-reading.js +2 -2
- package/dist/pipeline/semantics/extent-phrase.js +1 -1
- package/dist/pipeline/semantics/frame.d.ts +3 -3
- package/dist/pipeline/semantics/frame.js +4 -4
- package/dist/pipeline/semantics/gano-conversion.d.ts +1 -2
- package/dist/pipeline/semantics/gano-conversion.js +1 -9
- package/dist/pipeline/semantics/grammar-runtime.d.ts +0 -7
- package/dist/pipeline/semantics/grammar-runtime.js +0 -92
- package/dist/pipeline/semantics/honorific.d.ts +1 -2
- package/dist/pipeline/semantics/honorific.js +0 -3
- package/dist/pipeline/semantics/mono-modal.d.ts +1 -1
- package/dist/pipeline/semantics/numeric.js +1 -3
- package/dist/pipeline/semantics/sfp-surface.js +8 -0
- package/dist/pipeline/source-candidate-set.d.ts +1 -2
- package/dist/pipeline/source-candidate-set.js +0 -3
- package/dist/pipeline/source-coordinate.d.ts +20 -0
- package/dist/pipeline/source-coordinate.js +42 -0
- package/dist/pipeline/structural-relation/clause-connective-relations.d.ts +12 -0
- package/dist/pipeline/structural-relation/clause-connective-relations.js +327 -0
- package/dist/pipeline/structural-relation/collect.d.ts +1 -12
- package/dist/pipeline/structural-relation/collect.js +11 -3105
- package/dist/pipeline/structural-relation/connective-relation-match.d.ts +17 -0
- package/dist/pipeline/structural-relation/connective-relation-match.js +39 -0
- package/dist/pipeline/structural-relation/diagnostics.d.ts +0 -2
- package/dist/pipeline/structural-relation/diagnostics.js +0 -7
- package/dist/pipeline/structural-relation/ka-parallel-relations.d.ts +3 -0
- package/dist/pipeline/structural-relation/ka-parallel-relations.js +695 -0
- package/dist/pipeline/structural-relation/nari-relations.d.ts +3 -0
- package/dist/pipeline/structural-relation/nari-relations.js +367 -0
- package/dist/pipeline/structural-relation/parallel-item-evidence.d.ts +12 -0
- package/dist/pipeline/structural-relation/parallel-item-evidence.js +73 -0
- package/dist/pipeline/structural-relation/punctuated-attributive-relations.d.ts +2 -0
- package/dist/pipeline/structural-relation/punctuated-attributive-relations.js +224 -0
- package/dist/pipeline/structural-relation/purpose-relations.d.ts +7 -0
- package/dist/pipeline/structural-relation/purpose-relations.js +306 -0
- package/dist/pipeline/structural-relation/quote-clause-boundary.d.ts +47 -0
- package/dist/pipeline/structural-relation/quote-clause-boundary.js +216 -0
- package/dist/pipeline/structural-relation/quote-closed-toka.d.ts +22 -0
- package/dist/pipeline/structural-relation/quote-closed-toka.js +158 -0
- package/dist/pipeline/structural-relation/quote-content-endings.d.ts +20 -0
- package/dist/pipeline/structural-relation/quote-content-endings.js +163 -0
- package/dist/pipeline/structural-relation/quote-content-span.d.ts +23 -0
- package/dist/pipeline/structural-relation/quote-content-span.js +270 -0
- package/dist/pipeline/structural-relation/quote-nominal-and-passive.d.ts +22 -0
- package/dist/pipeline/structural-relation/quote-nominal-and-passive.js +724 -0
- package/dist/pipeline/structural-relation/quote-payload.d.ts +33 -0
- package/dist/pipeline/structural-relation/quote-payload.js +137 -0
- package/dist/pipeline/structural-relation/quote-question-content.d.ts +18 -0
- package/dist/pipeline/structural-relation/quote-question-content.js +588 -0
- package/dist/pipeline/structural-relation/quote-reason-copula.d.ts +18 -0
- package/dist/pipeline/structural-relation/quote-reason-copula.js +84 -0
- package/dist/pipeline/structural-relation/quote-relation-enrichment.d.ts +4 -0
- package/dist/pipeline/structural-relation/quote-relation-enrichment.js +174 -0
- package/dist/pipeline/structural-relation/quote-request.d.ts +16 -0
- package/dist/pipeline/structural-relation/quote-request.js +249 -0
- package/dist/pipeline/structural-relation/quote.d.ts +4 -130
- package/dist/pipeline/structural-relation/quote.js +105 -2627
- package/dist/pipeline/structural-relation/reason-relations.d.ts +6 -0
- package/dist/pipeline/structural-relation/reason-relations.js +328 -0
- package/dist/pipeline/structural-relation/relation-coordinates.d.ts +21 -0
- package/dist/pipeline/structural-relation/relation-coordinates.js +110 -0
- package/dist/pipeline/structural-relation/render-attributive.d.ts +25 -0
- package/dist/pipeline/structural-relation/render-attributive.js +195 -0
- package/dist/pipeline/structural-relation/render-clause-connective.d.ts +29 -0
- package/dist/pipeline/structural-relation/render-clause-connective.js +114 -0
- package/dist/pipeline/structural-relation/render-connective-plan.d.ts +28 -0
- package/dist/pipeline/structural-relation/render-connective-plan.js +164 -0
- package/dist/pipeline/structural-relation/render-parallel.d.ts +60 -0
- package/dist/pipeline/structural-relation/render-parallel.js +1088 -0
- package/dist/pipeline/structural-relation/render-quote.d.ts +75 -0
- package/dist/pipeline/structural-relation/render-quote.js +968 -0
- package/dist/pipeline/structural-relation/render-reason-copula.d.ts +24 -0
- package/dist/pipeline/structural-relation/render-reason-copula.js +324 -0
- package/dist/pipeline/structural-relation/render-source-sequence.d.ts +11 -0
- package/dist/pipeline/structural-relation/render-source-sequence.js +154 -0
- package/dist/pipeline/structural-relation/render-unit-spans.d.ts +35 -0
- package/dist/pipeline/structural-relation/render-unit-spans.js +71 -0
- package/dist/pipeline/structural-relation/render.d.ts +2 -25
- package/dist/pipeline/structural-relation/render.js +10 -3043
- package/dist/pipeline/structural-relation/source-predicate-operator.d.ts +2 -1
- package/dist/pipeline/structural-relation/tari-listing-relations.d.ts +5 -0
- package/dist/pipeline/structural-relation/tari-listing-relations.js +354 -0
- package/dist/pipeline/structural-relation/toka-nominal-listing-relations.d.ts +2 -0
- package/dist/pipeline/structural-relation/toka-nominal-listing-relations.js +154 -0
- package/dist/pipeline/structural-relation/toka-nominal-listing-run.d.ts +11 -1
- package/dist/pipeline/structural-relation/toka-nominal-listing-run.js +16 -4
- package/dist/pipeline/structural-relation/types.d.ts +10 -1
- package/dist/pipeline/translation/access.d.ts +0 -3
- package/dist/pipeline/translation/unit.d.ts +4 -1
- package/dist/pipeline/translation/unit.js +29 -9
- package/dist/pipeline/translation/warnings.d.ts +9 -0
- package/dist/pipeline/translation/warnings.js +251 -0
- package/dist/pipeline-factory.js +2 -1
- package/dist/scripts/diagnose.js +3 -2
- package/dist/types/pos.d.ts +3 -0
- package/dist/types/pos.js +8 -0
- package/dist/types/reanalysis.d.ts +0 -1
- package/dist/types/reanalysis.js +0 -1
- package/dist/types/render-plan.d.ts +1 -2
- package/dist/utils/char-class.d.ts +2 -0
- package/dist/utils/char-class.js +6 -0
- package/dist/utils/record.d.ts +1 -0
- package/dist/utils/record.js +3 -0
- package/dist/webext-provider.d.ts +7 -0
- package/dist/webext-provider.js +56 -16
- package/package.json +1 -1
- package/dist/pipeline/head-tail/audit/types.d.ts +0 -7
- /package/dist/pipeline/head-tail/{audit/types.js → tail/predicate-root/integration/contracts.js} +0 -0
|
@@ -6,15 +6,23 @@ import {} from "../../../../../types/warning.js";
|
|
|
6
6
|
import {} from "../../../../lookup-tables.js";
|
|
7
7
|
import {} from "../grammar.js";
|
|
8
8
|
import { isChainableAspectOpKind, isChainableHeadOp, isHeadOp, isOperatorWrapBoundaryHeadOp, isSimpleAspectOpKind, multiAspectPathCanUseOperatorFold, operatorCreatesPotentialPredicate, operatorCreatesSourceVerbalPredicate, sourceVerbalPredicateAfterAuxOp } from "../operator-head.js";
|
|
9
|
-
import { isRequestCommandBaseOp } from "../inspect.js";
|
|
9
|
+
import { isRequestCommandBaseOp, isBenefactiveAspectKind } from "../inspect.js";
|
|
10
10
|
import { applyNegationChainToLemmaBase, hostProjectionSourceTrace, policyWithPrependedHostPrefix, projectedHostTraceSegment, scopeTopicTraceCarrierContraction, stemFusionSourceTrace, tracePrefixContractionForTarget, predicateBasePolicyAllomorphHost } from "./base-model.js";
|
|
11
11
|
export { scopeTopicTraceCarrierContraction };
|
|
12
12
|
export { isChainableHeadOp, isHeadOp, isOperatorWrapBoundaryHeadOp, isSimpleAspectOpKind, multiAspectPathCanUseOperatorFold };
|
|
13
|
-
import { applyNonLastPrefixContractions, finalNegationLoweringForcesPast, lowerFinalNegationForCommittedBase, nounSubjectPart, obligationBase, prohibitionPredicateBase, scopeCarrierCopulaBase, simpleStemBaseResult } from "./base-support.js";
|
|
14
|
-
import { conjectureBase
|
|
13
|
+
import { applyNonLastPrefixContractions, finalNegationLoweringForcesPast, lowerFinalNegationForCommittedBase, nounSubjectPart, obligationBase, prohibitionPredicateBase, scopeCarrierCopulaBase, simpleStemBaseResult, copulaCarrierBaseForInterOp, stateChangeBase } from "./base-support.js";
|
|
14
|
+
import { conjectureBase } from "./conjecture-compose.js";
|
|
15
|
+
import { nounCopulaObligationBase } from "./connective-compose.js";
|
|
15
16
|
import { pastNegStemAttributive } from "./final-forms.js";
|
|
16
17
|
import { stemAllowsSahenShortNegationSplit } from "../short-negation-policy.js";
|
|
17
|
-
import { aspectBaseResult,
|
|
18
|
+
import { aspectBaseResult, completionTeIruNegativeAspectForComposedInput, miseruBase, negativeTeAdverbialAspectBaseResult, normalizeSimpleAspectForComposedInput, potentialDirectionalAspectBaseResult, simpleAspectWithDropAuxSemantic, simpleAspectWithoutSemantic, sourceVerbAdjectivalDirectionalAspectBaseResult, sourceVerbAdjectivalEllipticTeIruNegativeBaseResult, sourceVerbAdjectivalTeShimauBaseResult, sourceVerbAdjectivalTsutsuAruBaseResult, teIruAuxiliaryNegationFocusParticle } from "./aspect-bases.js";
|
|
19
|
+
import { benefactiveBaseFromInput, benefactiveDesiderativeRequestBase, potentialBase, potentialObjectBaseFromAttributive, voiceBase } from "./voice-benefactive-bases.js";
|
|
20
|
+
import { cannotRefrainNegativeDewaIrarenaiBase, decisionKotoNiSuruBase, experienceBase, forbiddenBase, inevitableZaruOEnaiBase, madeMoNaiBase, methodYouGaNaiBase, negativeNecessityKotoWaBase, negativeNecessitySumuBase, onlyOptionBase, outcomeKotoNiNaruBase, permissionBase, sufficiencyConditionalBase, teEvaluationBase } from "./idiom-bases.js";
|
|
21
|
+
import { copulaCarrierConjectureBase, limitNegationBaseFromPredicateBase, maiScopeCarrierBase, monoHostPredicateBase, modalBase, modalFinalChainPolicy, nominalHostEvidentialLikenessBase, nodaCarrierAbsorbedByHostBoundNoun, nodaCarrierConjectureBase, nodaCarrierLikenessBase, nodaCarrierKamoBase, quotedPropositionLikenessBase, soudaHearsayBaseFromPredicateBase, tokoroBaseFromPredicateBase, wakeCarrierConjectureBase, wakeExplanatoryCitationBase, wakeImpossibleBase } from "./modal-bases.js";
|
|
22
|
+
import { degreeIntensifierBase, postverbAuxiliaryBaseResult } from "./postverb-auxiliary-bases.js";
|
|
23
|
+
import { desiderativeBaseFromPredicateBase, desireBaseResult, teHoshiiSourceTrace } from "./desire-bases.js";
|
|
24
|
+
import { predicateProjectionCarrierBase, predicateQuoteCarrierBase, predicateSuffixBaseResult } from "./predicate-bases.js";
|
|
25
|
+
import { scopeBridgeBase } from "./scope-bridge-bases.js";
|
|
18
26
|
export function operatorChainSlotForWrapOp(wrapOp, layer, opChain) {
|
|
19
27
|
if (wrapOp === null)
|
|
20
28
|
return null;
|
|
@@ -200,66 +208,63 @@ export function chainStemTraceFields(stem) {
|
|
|
200
208
|
...(stem.projectedHost === undefined ? {} : { stemProjectedHost: stem.projectedHost })
|
|
201
209
|
};
|
|
202
210
|
}
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
const
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
return policy;
|
|
227
|
-
};
|
|
228
|
-
const prependInputPrefix = (base, options = {}) => {
|
|
229
|
-
const policy = prependInputPolicy(base, options);
|
|
230
|
-
if (policy === undefined && base.policy?.kind === "te_iru_attributive_contraction") {
|
|
231
|
-
return {
|
|
232
|
-
prefix: `${inputBase.prefix}${base.prefix}`,
|
|
233
|
-
final: base.final,
|
|
234
|
-
...(base.capabilities === undefined ? {} : { capabilities: base.capabilities })
|
|
235
|
-
};
|
|
236
|
-
}
|
|
237
|
-
const shiftedPolicy = policy !== undefined && policy === base.policy
|
|
238
|
-
? policyWithPrependedHostPrefix(policy, inputBase.prefix)
|
|
239
|
-
: policy;
|
|
211
|
+
function prependInputPolicy(inputBase, base, options = {}) {
|
|
212
|
+
if (inputBase.policy?.kind === "noun_copula_interop") {
|
|
213
|
+
return base.policy;
|
|
214
|
+
}
|
|
215
|
+
const policy = base.policy ?? (options.carryInputPolicy === false ? undefined : inputBase.policy);
|
|
216
|
+
if (policy?.kind === "te_iru_negative" && inputBase.prefix.length > 0) {
|
|
217
|
+
return {
|
|
218
|
+
...policy,
|
|
219
|
+
stemPrefix: `${inputBase.prefix}${policy.stemPrefix ?? ""}`
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
if (policy?.kind === "te_iru_attributive_contraction") {
|
|
223
|
+
if (inputBase.prefix.length > 0)
|
|
224
|
+
return undefined;
|
|
225
|
+
if (inputBase.policy !== undefined)
|
|
226
|
+
return inputBase.policy;
|
|
227
|
+
}
|
|
228
|
+
return policy;
|
|
229
|
+
}
|
|
230
|
+
function prependInputPrefix(inputBase, base, options = {}) {
|
|
231
|
+
const policy = prependInputPolicy(inputBase, base, options);
|
|
232
|
+
if (policy === undefined && base.policy?.kind === "te_iru_attributive_contraction") {
|
|
240
233
|
return {
|
|
241
|
-
...base,
|
|
242
234
|
prefix: `${inputBase.prefix}${base.prefix}`,
|
|
243
235
|
final: base.final,
|
|
244
|
-
...(
|
|
236
|
+
...(base.capabilities === undefined ? {} : { capabilities: base.capabilities })
|
|
245
237
|
};
|
|
238
|
+
}
|
|
239
|
+
const shiftedPolicy = policy !== undefined && policy === base.policy
|
|
240
|
+
? policyWithPrependedHostPrefix(policy, inputBase.prefix)
|
|
241
|
+
: policy;
|
|
242
|
+
return {
|
|
243
|
+
...base,
|
|
244
|
+
prefix: `${inputBase.prefix}${base.prefix}`,
|
|
245
|
+
final: base.final,
|
|
246
|
+
...(shiftedPolicy === undefined ? {} : { policy: shiftedPolicy })
|
|
246
247
|
};
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
return
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
}
|
|
261
|
-
|
|
248
|
+
}
|
|
249
|
+
function withInputPrefix(inputBase, res, options = {}) {
|
|
250
|
+
if (!res.ok)
|
|
251
|
+
return res;
|
|
252
|
+
return {
|
|
253
|
+
...res,
|
|
254
|
+
base: prependInputPrefix(inputBase, res.base, options),
|
|
255
|
+
...(res.connectiveBaseOverride === undefined
|
|
256
|
+
? {}
|
|
257
|
+
: {
|
|
258
|
+
connectiveBaseOverride: {
|
|
259
|
+
...res.connectiveBaseOverride,
|
|
260
|
+
base: prependInputPrefix(inputBase, res.connectiveBaseOverride.base, options)
|
|
261
|
+
}
|
|
262
|
+
})
|
|
262
263
|
};
|
|
264
|
+
}
|
|
265
|
+
export function opToBase(op, inputBase, ctx) {
|
|
266
|
+
const opPreNeg = ctx.preModalNeg;
|
|
267
|
+
const opPast = ctx.past;
|
|
263
268
|
switch (op.kind) {
|
|
264
269
|
case "postverbAuxiliary":
|
|
265
270
|
return postverbAuxiliaryBaseResult(op, inputBase, ctx);
|
|
@@ -283,814 +288,903 @@ export function opToBase(op, inputBase, ctx) {
|
|
|
283
288
|
});
|
|
284
289
|
case "predicateSuffix":
|
|
285
290
|
return predicateSuffixBaseResult(op, inputBase, ctx);
|
|
286
|
-
case "aspect":
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
? simpleAspectWithDropAuxSemantic(simpleAspect)
|
|
297
|
-
: simpleAspect;
|
|
298
|
-
if (simpleAspect !== null &&
|
|
299
|
-
simpleAspect.aspect === "te_iru" &&
|
|
300
|
-
simpleAspect.auxiliaryHonorific === "respect" &&
|
|
301
|
-
(!isVerb || simpleAspectForDropAux?.semantic?.renderStrategy === "drop_aux") &&
|
|
302
|
-
opPreNeg === null &&
|
|
303
|
-
!opPast &&
|
|
304
|
-
inputBase.final.kind === "lemma") {
|
|
305
|
-
return {
|
|
306
|
-
ok: true,
|
|
307
|
-
base: {
|
|
308
|
-
...inputBase,
|
|
309
|
-
final: {
|
|
310
|
-
kind: "lemma",
|
|
311
|
-
lemma: `${conjugate(inputBase.final.lemma, inputBase.final.irregular, "(으)시")}다`,
|
|
312
|
-
irregular: null,
|
|
313
|
-
isVerb: inputBase.final.isVerb
|
|
314
|
-
}
|
|
315
|
-
},
|
|
316
|
-
chainOnFinalSupported: true
|
|
317
|
-
};
|
|
318
|
-
}
|
|
319
|
-
if (op.aspect === "te_iru" &&
|
|
320
|
-
inputBase.final.lemma === "있다" &&
|
|
321
|
-
!inputBase.final.isVerb &&
|
|
322
|
-
opPreNeg === null) {
|
|
323
|
-
const focusParticle = simpleAspect === null
|
|
324
|
-
? undefined
|
|
325
|
-
: teIruAuxiliaryNegationFocusParticle(simpleAspect);
|
|
326
|
-
return {
|
|
327
|
-
ok: true,
|
|
328
|
-
base: inputBase,
|
|
329
|
-
chainOnFinalSupported: inputBase.policy?.kind === "benefactive" && inputBase.policy.potential
|
|
330
|
-
? false
|
|
331
|
-
: true,
|
|
332
|
-
...(focusParticle === undefined
|
|
333
|
-
? {}
|
|
334
|
-
: { finalNegationOptions: { firstNegationFocusParticle: focusParticle } }),
|
|
335
|
-
...(inputBase.policy?.kind === "benefactive" && inputBase.policy.potential
|
|
336
|
-
? { finalNegationLoweringPolicy: "potential_idiom" }
|
|
337
|
-
: {})
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
if (op.aspect === "te_iru" &&
|
|
341
|
-
simpleAspectForDropAux?.semantic?.renderStrategy === "drop_aux") {
|
|
342
|
-
const focusParticle = teIruAuxiliaryNegationFocusParticle(simpleAspectForDropAux);
|
|
343
|
-
return {
|
|
344
|
-
ok: true,
|
|
345
|
-
base: inputBase,
|
|
346
|
-
chainOnFinalSupported: true,
|
|
347
|
-
...(focusParticle === undefined
|
|
348
|
-
? {}
|
|
349
|
-
: { finalNegationOptions: { firstNegationFocusParticle: focusParticle } }),
|
|
350
|
-
};
|
|
351
|
-
}
|
|
352
|
-
if (inputBase.policy?.kind === "accustomed_aspect_projection" &&
|
|
353
|
-
isSimpleAspectOpKind(op.aspect)) {
|
|
354
|
-
if (opPreNeg !== null)
|
|
355
|
-
return { ok: false, reason: "stative postverb neg + aspect 영역 외" };
|
|
356
|
-
if (opPast)
|
|
357
|
-
return { ok: false, reason: "stative postverb past + aspect 영역 외" };
|
|
358
|
-
const changedBase = stateChangeBase(inputBase, "adjectival");
|
|
359
|
-
if (!changedBase.final.isVerb) {
|
|
360
|
-
return { ok: false, reason: "stative postverb aspect change-base 영역 외" };
|
|
361
|
-
}
|
|
362
|
-
const aspectResult = aspectBaseResult(simpleAspectWithoutSemantic(op), changedBase.final.lemma, changedBase.final.irregular, ctx.lookups);
|
|
363
|
-
if (!aspectResult.ok)
|
|
364
|
-
return aspectResult;
|
|
365
|
-
const stativePrefix = `${changedBase.prefix}${aspectResult.base.prefix}`;
|
|
366
|
-
const stativeTrace = hostProjectionSourceTrace({
|
|
367
|
-
hostText: stativePrefix.trimEnd(),
|
|
368
|
-
inputPrefix: inputBase.prefix,
|
|
369
|
-
basePrefix: stativePrefix,
|
|
370
|
-
sourceTokens: op.source.tokens,
|
|
371
|
-
splitFinal: "none"
|
|
372
|
-
});
|
|
373
|
-
const { sourceTrace: _stativeCarried, ...stativeRest } = aspectResult;
|
|
374
|
-
void _stativeCarried;
|
|
375
|
-
return {
|
|
376
|
-
...stativeRest,
|
|
377
|
-
base: {
|
|
378
|
-
...aspectResult.base,
|
|
379
|
-
prefix: stativePrefix
|
|
380
|
-
},
|
|
381
|
-
...(stativeTrace === undefined ? {} : { sourceTrace: stativeTrace })
|
|
382
|
-
};
|
|
383
|
-
}
|
|
384
|
-
if (opPreNeg === null && !opPast) {
|
|
385
|
-
const potentialDirection = potentialDirectionalAspectBaseResult(op, inputBase);
|
|
386
|
-
if (potentialDirection !== null) {
|
|
387
|
-
return potentialDirection;
|
|
388
|
-
}
|
|
389
|
-
}
|
|
390
|
-
if (op.aspect === "te_shimau" &&
|
|
391
|
-
simpleAspect !== null &&
|
|
392
|
-
ctx.sourceStemIsVerb === true &&
|
|
393
|
-
!ctx.hasPriorChainOp &&
|
|
394
|
-
!isVerb &&
|
|
395
|
-
opPreNeg === null &&
|
|
396
|
-
!opPast) {
|
|
397
|
-
const bridged = sourceVerbAdjectivalTeShimauBaseResult(simpleAspect, inputBase);
|
|
398
|
-
if (bridged !== null)
|
|
399
|
-
return bridged;
|
|
400
|
-
}
|
|
401
|
-
if (op.aspect === "te_iru" &&
|
|
402
|
-
ctx.sourceStemIsSahenPredicate === true &&
|
|
403
|
-
!isVerb &&
|
|
404
|
-
opPreNeg === null &&
|
|
405
|
-
!opPast) {
|
|
406
|
-
return {
|
|
407
|
-
ok: true,
|
|
408
|
-
base: inputBase,
|
|
409
|
-
chainOnFinalSupported: true
|
|
410
|
-
};
|
|
411
|
-
}
|
|
412
|
-
if (simpleAspect !== null &&
|
|
413
|
-
(ctx.sourceStemIsVerb === true || simpleAspect.ellipticTeIruSourceHost === "verbal_predicate") &&
|
|
414
|
-
!isVerb &&
|
|
415
|
-
opPreNeg === null &&
|
|
416
|
-
!opPast) {
|
|
417
|
-
const ellipticNegative = sourceVerbAdjectivalEllipticTeIruNegativeBaseResult(simpleAspect, inputBase, ctx.lookups);
|
|
418
|
-
if (ellipticNegative !== null)
|
|
419
|
-
return withInputPrefix(ellipticNegative);
|
|
420
|
-
if (!ctx.hasPriorChainOp) {
|
|
421
|
-
const directional = sourceVerbAdjectivalDirectionalAspectBaseResult(simpleAspect, inputBase);
|
|
422
|
-
if (directional !== null)
|
|
423
|
-
return directional;
|
|
424
|
-
}
|
|
425
|
-
}
|
|
426
|
-
const compositeInput = ctx.hasPriorChainOp === true;
|
|
427
|
-
if (op.aspect === "te_iru" &&
|
|
428
|
-
op.collapsed === "honorific" &&
|
|
429
|
-
!isVerb &&
|
|
430
|
-
opPreNeg === null &&
|
|
431
|
-
!opPast) {
|
|
432
|
-
return { ok: true, base: inputBase, chainOnFinalSupported: true };
|
|
433
|
-
}
|
|
434
|
-
if (simpleAspect !== null &&
|
|
435
|
-
ctx.sourceStemIsVerb === true &&
|
|
436
|
-
!ctx.hasPriorChainOp &&
|
|
437
|
-
!isVerb &&
|
|
438
|
-
opPreNeg === null &&
|
|
439
|
-
!opPast) {
|
|
440
|
-
const inchoative = sourceVerbAdjectivalTsutsuAruBaseResult(simpleAspect, inputBase);
|
|
441
|
-
if (inchoative !== null)
|
|
442
|
-
return inchoative;
|
|
443
|
-
}
|
|
444
|
-
if (!isVerb && !compositeInput)
|
|
445
|
-
return { ok: false, reason: "te-aspect on adj 영역 외" };
|
|
446
|
-
if (opPreNeg !== null) {
|
|
447
|
-
const teComplementHostIsVerbal = isVerb || ctx.sourceStemIsVerb === true;
|
|
448
|
-
if (opPreNeg.chainDepth !== 1 ||
|
|
449
|
-
opPreNeg.chainPast ||
|
|
450
|
-
!teComplementHostIsVerbal) {
|
|
451
|
-
return { ok: false, reason: "V neg + aspect 영역 외" };
|
|
452
|
-
}
|
|
453
|
-
if (simpleAspect !== null) {
|
|
454
|
-
return negativeTeAdverbialAspectBaseResult(simpleAspect, inputBase, ctx.lookups);
|
|
455
|
-
}
|
|
456
|
-
if (isBenefactiveAspectKind(op.aspect)) {
|
|
457
|
-
const benefactive = op;
|
|
458
|
-
const prohibitionRequest = benefactive.terminalMood === "imperative" ||
|
|
459
|
-
benefactive.requestEvidence === "terminal_question";
|
|
460
|
-
if (prohibitionRequest) {
|
|
461
|
-
return benefactiveBaseFromInput(benefactive, prohibitionPredicateBase(inputBase));
|
|
462
|
-
}
|
|
463
|
-
const negativeInput = applyNegationChainToLemmaBase(inputBase, opPreNeg);
|
|
464
|
-
if (negativeInput === null) {
|
|
465
|
-
return { ok: false, reason: "negative benefactive host lowering 영역 외" };
|
|
466
|
-
}
|
|
467
|
-
return benefactiveBaseFromInput(benefactive, negativeInput);
|
|
468
|
-
}
|
|
469
|
-
return { ok: false, reason: "V neg + aspect 영역 외" };
|
|
470
|
-
}
|
|
471
|
-
if (opPast)
|
|
472
|
-
return { ok: false, reason: "V past + aspect 영역 외" };
|
|
473
|
-
if (isSimpleAspectOpKind(op.aspect)) {
|
|
474
|
-
if (op.aspect === "te_shimau" &&
|
|
475
|
-
op.semantic?.renderStrategy === "passive_completion" &&
|
|
476
|
-
inputBase.policy?.kind === "voice" &&
|
|
477
|
-
inputBase.policy.voice === "passive" &&
|
|
478
|
-
inputBase.policy.adversativePassive === true &&
|
|
479
|
-
inputBase.final.lemma === "버리다") {
|
|
480
|
-
return {
|
|
481
|
-
ok: true,
|
|
482
|
-
base: inputBase,
|
|
483
|
-
chainOnFinalSupported: true
|
|
484
|
-
};
|
|
485
|
-
}
|
|
486
|
-
const simpleAspect = normalizeSimpleAspectForComposedInput(completionTeIruNegativeAspectForComposedInput(op, inputBase), inputBase);
|
|
487
|
-
const shouldDropInputCompletionPolicy = simpleAspect.aspect === "te_iru" &&
|
|
488
|
-
inputBase.policy?.kind === "completion" &&
|
|
489
|
-
inputBase.policy.teIruNegativeStrategy === "preserve_aspect";
|
|
490
|
-
return withInputPrefix(aspectBaseResult(simpleAspect, stemLemma, stemIrregular, ctx.lookups), { carryInputPolicy: !shouldDropInputCompletionPolicy });
|
|
491
|
-
}
|
|
492
|
-
if (op.aspect === "te_hoshii") {
|
|
493
|
-
const desireBase = desiderativeBaseFromPredicateBase(inputBase, ctx.desiredPredicateNegation);
|
|
494
|
-
if (desireBase === null) {
|
|
495
|
-
return { ok: false, reason: "desired predicate negation + desiderative lowering 영역 외" };
|
|
496
|
-
}
|
|
497
|
-
const sourceTrace = teHoshiiSourceTrace(desireBase, op.source.tokens, ctx.desiredPredicateNegation);
|
|
498
|
-
return {
|
|
499
|
-
ok: true,
|
|
500
|
-
base: desireBase,
|
|
501
|
-
chainOnFinalSupported: true,
|
|
502
|
-
interOpPastProjection: "committed",
|
|
503
|
-
...(sourceTrace === undefined ? {} : { sourceTrace })
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
if (op.aspect === "te_miseru") {
|
|
507
|
-
const base = miseruBase(op, stemLemma, stemIrregular);
|
|
508
|
-
const sourceTrace = stemFusionSourceTrace(base.prefix, op.source.tokens, { splitFinal: "last_token" });
|
|
509
|
-
return withInputPrefix({
|
|
510
|
-
ok: true,
|
|
511
|
-
base,
|
|
512
|
-
chainOnFinalSupported: true,
|
|
513
|
-
...(sourceTrace === undefined ? {} : { sourceTrace })
|
|
514
|
-
});
|
|
515
|
-
}
|
|
516
|
-
if (isBenefactiveAspectKind(op.aspect)) {
|
|
517
|
-
return benefactiveBaseFromInput(op, inputBase);
|
|
518
|
-
}
|
|
519
|
-
return { ok: false, reason: `aspect kind '${op.aspect}' base 변환 미작성` };
|
|
291
|
+
case "aspect":
|
|
292
|
+
return aspectOpBase(op, inputBase, ctx);
|
|
293
|
+
case "desire":
|
|
294
|
+
return desireOpBase(op, inputBase, ctx);
|
|
295
|
+
case "voice":
|
|
296
|
+
return voiceOpBase(op, inputBase, ctx);
|
|
297
|
+
case "idiom":
|
|
298
|
+
return idiomOpBase(op, inputBase, ctx);
|
|
299
|
+
case "scopeBridge": {
|
|
300
|
+
return scopeBridgeBase(op, inputBase, ctx);
|
|
520
301
|
}
|
|
521
|
-
case "
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
302
|
+
case "modal":
|
|
303
|
+
return modalOpBase(op, inputBase, ctx);
|
|
304
|
+
case "conjecture":
|
|
305
|
+
return conjectureOpBase(op, inputBase, ctx);
|
|
306
|
+
default:
|
|
307
|
+
return { ok: false, reason: `op kind not in chain dispatcher` };
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
function aspectOpBase(op, inputBase, ctx) {
|
|
311
|
+
const isVerb = inputBase.final.isVerb;
|
|
312
|
+
const opPreNeg = ctx.preModalNeg;
|
|
313
|
+
const opPast = ctx.past;
|
|
314
|
+
if (!isChainableAspectOpKind(op.aspect)) {
|
|
315
|
+
return { ok: false, reason: `aspect kind '${op.aspect}' not chainable — invariant violation` };
|
|
316
|
+
}
|
|
317
|
+
const simpleAspect = isSimpleAspectOpKind(op.aspect)
|
|
318
|
+
? op
|
|
319
|
+
: null;
|
|
320
|
+
const absorbed = aspectAbsorbedIntoHostBase(op, simpleAspect, inputBase, ctx);
|
|
321
|
+
if (absorbed !== null)
|
|
322
|
+
return absorbed;
|
|
323
|
+
const bridged = aspectHostBridgeBase(op, simpleAspect, inputBase, ctx);
|
|
324
|
+
if (bridged !== null)
|
|
325
|
+
return bridged;
|
|
326
|
+
const compositeInput = ctx.hasPriorChainOp === true;
|
|
327
|
+
if (!isVerb && !compositeInput)
|
|
328
|
+
return { ok: false, reason: "te-aspect on adj 영역 외" };
|
|
329
|
+
if (opPreNeg !== null) {
|
|
330
|
+
return negativeHostAspectBase(op, simpleAspect, opPreNeg, inputBase, ctx);
|
|
331
|
+
}
|
|
332
|
+
if (opPast)
|
|
333
|
+
return { ok: false, reason: "V past + aspect 영역 외" };
|
|
334
|
+
return composedAspectBase(op, inputBase, ctx);
|
|
335
|
+
}
|
|
336
|
+
function aspectAbsorbedIntoHostBase(op, simpleAspect, inputBase, ctx) {
|
|
337
|
+
const isVerb = inputBase.final.isVerb;
|
|
338
|
+
const opPreNeg = ctx.preModalNeg;
|
|
339
|
+
const opPast = ctx.past;
|
|
340
|
+
const simpleAspectForDropAux = simpleAspect !== null &&
|
|
341
|
+
simpleAspect.aspect === "te_iru" &&
|
|
342
|
+
inputBase.policy?.kind === "accustomed_aspect_projection"
|
|
343
|
+
? simpleAspectWithDropAuxSemantic(simpleAspect)
|
|
344
|
+
: simpleAspect;
|
|
345
|
+
if (simpleAspect !== null &&
|
|
346
|
+
simpleAspect.aspect === "te_iru" &&
|
|
347
|
+
simpleAspect.auxiliaryHonorific === "respect" &&
|
|
348
|
+
(!isVerb || simpleAspectForDropAux?.semantic?.renderStrategy === "drop_aux") &&
|
|
349
|
+
opPreNeg === null &&
|
|
350
|
+
!opPast &&
|
|
351
|
+
inputBase.final.kind === "lemma") {
|
|
352
|
+
return {
|
|
353
|
+
ok: true,
|
|
354
|
+
base: {
|
|
355
|
+
...inputBase,
|
|
356
|
+
final: {
|
|
357
|
+
kind: "lemma",
|
|
358
|
+
lemma: `${conjugate(inputBase.final.lemma, inputBase.final.irregular, "(으)시")}다`,
|
|
359
|
+
irregular: null,
|
|
360
|
+
isVerb: inputBase.final.isVerb
|
|
569
361
|
}
|
|
570
|
-
}
|
|
362
|
+
},
|
|
363
|
+
chainOnFinalSupported: true
|
|
364
|
+
};
|
|
365
|
+
}
|
|
366
|
+
if (op.aspect === "te_iru" &&
|
|
367
|
+
inputBase.final.lemma === "있다" &&
|
|
368
|
+
!inputBase.final.isVerb &&
|
|
369
|
+
opPreNeg === null) {
|
|
370
|
+
const focusParticle = simpleAspect === null
|
|
371
|
+
? undefined
|
|
372
|
+
: teIruAuxiliaryNegationFocusParticle(simpleAspect);
|
|
373
|
+
return {
|
|
374
|
+
ok: true,
|
|
375
|
+
base: inputBase,
|
|
376
|
+
chainOnFinalSupported: inputBase.policy?.kind === "benefactive" && inputBase.policy.potential
|
|
377
|
+
? false
|
|
378
|
+
: true,
|
|
379
|
+
...(focusParticle === undefined
|
|
380
|
+
? {}
|
|
381
|
+
: { finalNegationOptions: { firstNegationFocusParticle: focusParticle } }),
|
|
382
|
+
...(inputBase.policy?.kind === "benefactive" && inputBase.policy.potential
|
|
383
|
+
? { finalNegationLoweringPolicy: "potential_idiom" }
|
|
384
|
+
: {})
|
|
385
|
+
};
|
|
386
|
+
}
|
|
387
|
+
if (op.aspect === "te_iru" &&
|
|
388
|
+
simpleAspectForDropAux?.semantic?.renderStrategy === "drop_aux") {
|
|
389
|
+
const focusParticle = teIruAuxiliaryNegationFocusParticle(simpleAspectForDropAux);
|
|
390
|
+
return {
|
|
391
|
+
ok: true,
|
|
392
|
+
base: inputBase,
|
|
393
|
+
chainOnFinalSupported: true,
|
|
394
|
+
...(focusParticle === undefined
|
|
395
|
+
? {}
|
|
396
|
+
: { finalNegationOptions: { firstNegationFocusParticle: focusParticle } }),
|
|
397
|
+
};
|
|
398
|
+
}
|
|
399
|
+
if (inputBase.policy?.kind === "accustomed_aspect_projection" &&
|
|
400
|
+
isSimpleAspectOpKind(op.aspect)) {
|
|
401
|
+
if (opPreNeg !== null)
|
|
402
|
+
return { ok: false, reason: "stative postverb neg + aspect 영역 외" };
|
|
403
|
+
if (opPast)
|
|
404
|
+
return { ok: false, reason: "stative postverb past + aspect 영역 외" };
|
|
405
|
+
const changedBase = stateChangeBase(inputBase, "adjectival");
|
|
406
|
+
if (!changedBase.final.isVerb) {
|
|
407
|
+
return { ok: false, reason: "stative postverb aspect change-base 영역 외" };
|
|
571
408
|
}
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
chainOnFinalSupported: true
|
|
605
|
-
};
|
|
606
|
-
}
|
|
607
|
-
if (op.voice === "passive" && inputBase.policy?.kind === "causative") {
|
|
608
|
-
const passiveCausative = voiceBase({
|
|
609
|
-
voice: {
|
|
610
|
-
...op,
|
|
611
|
-
voice: "causative_passive"
|
|
612
|
-
},
|
|
613
|
-
stemLemma: inputBase.policy.sourceLemma,
|
|
614
|
-
stemIrregular: inputBase.policy.sourceIrregular,
|
|
615
|
-
sahenShortNegationSplit: ctx.sahenShortNegationSplit,
|
|
616
|
-
isVerb: true,
|
|
617
|
-
passiveStemOptions: ctx.passiveStemOptions,
|
|
618
|
-
lookups: ctx.lookups
|
|
619
|
-
});
|
|
620
|
-
return passiveCausative.ok
|
|
621
|
-
? { ...passiveCausative, chainOnFinalSupported: true }
|
|
622
|
-
: passiveCausative;
|
|
623
|
-
}
|
|
624
|
-
if (op.voice === "passive" &&
|
|
625
|
-
inputBase.policy?.kind === "completion" &&
|
|
626
|
-
inputBase.policy.followingPassiveStrategy === "completion_causative") {
|
|
627
|
-
return {
|
|
628
|
-
ok: true,
|
|
629
|
-
base: {
|
|
630
|
-
prefix: `${inputBase.policy.stemPrefix ?? ""}${conjugate(inputBase.policy.stemLemma, inputBase.policy.stemIrregular, op.passiveClass === "causative_coercive" ? "아/어야" : "게")}${op.passiveClass === "causative_coercive" ? "만" : ""} `,
|
|
631
|
-
final: op.passiveClass === "causative_coercive"
|
|
632
|
-
? { kind: "lemma", lemma: "하다", irregular: "여", isVerb: true }
|
|
633
|
-
: { kind: "lemma", lemma: "되다", irregular: null, isVerb: true },
|
|
634
|
-
policy: {
|
|
635
|
-
kind: "voice",
|
|
636
|
-
voice: "causative_passive",
|
|
637
|
-
...(op.passiveClass === undefined ? {} : { passiveClass: op.passiveClass })
|
|
638
|
-
}
|
|
639
|
-
},
|
|
640
|
-
chainOnFinalSupported: true
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
const res = voiceBase({
|
|
644
|
-
voice: op,
|
|
645
|
-
stemLemma,
|
|
646
|
-
stemIrregular,
|
|
647
|
-
isVerb,
|
|
648
|
-
passiveStemOptions: ctx.passiveStemOptions,
|
|
649
|
-
lookups: ctx.lookups,
|
|
650
|
-
sahenShortNegationSplit: ctx.sahenShortNegationSplit,
|
|
651
|
-
sourceTokens: op.source.tokens
|
|
652
|
-
});
|
|
653
|
-
if (!res.ok)
|
|
654
|
-
return res;
|
|
655
|
-
return withInputPrefix(res);
|
|
409
|
+
const aspectResult = aspectBaseResult(simpleAspectWithoutSemantic(op), changedBase.final.lemma, changedBase.final.irregular, ctx.lookups);
|
|
410
|
+
if (!aspectResult.ok)
|
|
411
|
+
return aspectResult;
|
|
412
|
+
const stativePrefix = `${changedBase.prefix}${aspectResult.base.prefix}`;
|
|
413
|
+
const stativeTrace = hostProjectionSourceTrace({
|
|
414
|
+
hostText: stativePrefix.trimEnd(),
|
|
415
|
+
inputPrefix: inputBase.prefix,
|
|
416
|
+
basePrefix: stativePrefix,
|
|
417
|
+
sourceTokens: op.source.tokens,
|
|
418
|
+
splitFinal: "none"
|
|
419
|
+
});
|
|
420
|
+
const { sourceTrace: _stativeCarried, ...stativeRest } = aspectResult;
|
|
421
|
+
void _stativeCarried;
|
|
422
|
+
return {
|
|
423
|
+
...stativeRest,
|
|
424
|
+
base: {
|
|
425
|
+
...aspectResult.base,
|
|
426
|
+
prefix: stativePrefix
|
|
427
|
+
},
|
|
428
|
+
...(stativeTrace === undefined ? {} : { sourceTrace: stativeTrace })
|
|
429
|
+
};
|
|
430
|
+
}
|
|
431
|
+
return null;
|
|
432
|
+
}
|
|
433
|
+
function aspectHostBridgeBase(op, simpleAspect, inputBase, ctx) {
|
|
434
|
+
const isVerb = inputBase.final.isVerb;
|
|
435
|
+
const opPreNeg = ctx.preModalNeg;
|
|
436
|
+
const opPast = ctx.past;
|
|
437
|
+
if (opPreNeg === null && !opPast) {
|
|
438
|
+
const potentialDirection = potentialDirectionalAspectBaseResult(op, inputBase);
|
|
439
|
+
if (potentialDirection !== null) {
|
|
440
|
+
return potentialDirection;
|
|
656
441
|
}
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
}
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
}
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
return permissionBase({
|
|
816
|
-
op,
|
|
817
|
-
inputBase,
|
|
818
|
-
preStemNeg: opPreNeg,
|
|
819
|
-
stemPast: opPast,
|
|
820
|
-
formal: ctx.formal,
|
|
821
|
-
lookups: ctx.lookups
|
|
822
|
-
});
|
|
823
|
-
}
|
|
824
|
-
if (op.idiom === "sufficiency_conditional") {
|
|
825
|
-
return sufficiencyConditionalBase({
|
|
826
|
-
op,
|
|
827
|
-
inputBase,
|
|
828
|
-
preStemNeg: opPreNeg,
|
|
829
|
-
stemPast: opPast,
|
|
830
|
-
formal: ctx.formal,
|
|
831
|
-
lookups: ctx.lookups
|
|
832
|
-
});
|
|
833
|
-
}
|
|
834
|
-
if (op.idiom === "te_evaluation") {
|
|
835
|
-
return teEvaluationBase({
|
|
836
|
-
op,
|
|
837
|
-
inputBase,
|
|
838
|
-
preStemNeg: opPreNeg,
|
|
839
|
-
stemPast: opPast,
|
|
840
|
-
formal: ctx.formal,
|
|
841
|
-
lookups: ctx.lookups
|
|
842
|
-
});
|
|
843
|
-
}
|
|
844
|
-
if (op.idiom === "negative_necessity_sumu") {
|
|
845
|
-
return negativeNecessitySumuBase({
|
|
846
|
-
op,
|
|
847
|
-
inputBase,
|
|
848
|
-
preStemNeg: opPreNeg,
|
|
849
|
-
stemPast: opPast,
|
|
850
|
-
formal: ctx.formal,
|
|
851
|
-
lookups: ctx.lookups
|
|
852
|
-
});
|
|
853
|
-
}
|
|
854
|
-
if (op.idiom === "only_option_shika_nai") {
|
|
855
|
-
return onlyOptionBase({
|
|
856
|
-
inputBase,
|
|
857
|
-
preStemNeg: opPreNeg,
|
|
858
|
-
stemPast: opPast,
|
|
859
|
-
formal: ctx.formal,
|
|
860
|
-
pastProjection: ctx.pastProjection,
|
|
861
|
-
lookups: ctx.lookups,
|
|
862
|
-
sourceTokens: op.source.tokens
|
|
863
|
-
});
|
|
864
|
-
}
|
|
865
|
-
if (op.idiom === "experience_koto_ga_aru") {
|
|
866
|
-
return experienceBase({
|
|
867
|
-
op,
|
|
868
|
-
inputBase,
|
|
869
|
-
preStemNeg: opPreNeg,
|
|
870
|
-
stemPast: opPast,
|
|
871
|
-
formal: ctx.formal,
|
|
872
|
-
pastProjection: ctx.pastProjection
|
|
873
|
-
});
|
|
874
|
-
}
|
|
875
|
-
if (op.idiom === "outcome_koto_ni_naru") {
|
|
876
|
-
return outcomeKotoNiNaruBase({
|
|
877
|
-
op,
|
|
878
|
-
inputBase,
|
|
879
|
-
preStemNeg: opPreNeg,
|
|
880
|
-
stemPast: opPast,
|
|
881
|
-
formal: ctx.formal,
|
|
882
|
-
pastProjection: ctx.pastProjection
|
|
883
|
-
});
|
|
884
|
-
}
|
|
885
|
-
return decisionKotoNiSuruBase({
|
|
886
|
-
inputBase,
|
|
887
|
-
preStemNeg: opPreNeg,
|
|
888
|
-
stemPast: opPast,
|
|
889
|
-
formal: ctx.formal,
|
|
890
|
-
sourceTokens: op.source.tokens
|
|
442
|
+
}
|
|
443
|
+
if (op.aspect === "te_shimau" &&
|
|
444
|
+
simpleAspect !== null &&
|
|
445
|
+
ctx.sourceStemIsVerb === true &&
|
|
446
|
+
!ctx.hasPriorChainOp &&
|
|
447
|
+
!isVerb &&
|
|
448
|
+
opPreNeg === null &&
|
|
449
|
+
!opPast) {
|
|
450
|
+
const bridged = sourceVerbAdjectivalTeShimauBaseResult(simpleAspect, inputBase);
|
|
451
|
+
if (bridged !== null)
|
|
452
|
+
return bridged;
|
|
453
|
+
}
|
|
454
|
+
if (op.aspect === "te_iru" &&
|
|
455
|
+
ctx.sourceStemIsSahenPredicate === true &&
|
|
456
|
+
!isVerb &&
|
|
457
|
+
opPreNeg === null &&
|
|
458
|
+
!opPast) {
|
|
459
|
+
return {
|
|
460
|
+
ok: true,
|
|
461
|
+
base: inputBase,
|
|
462
|
+
chainOnFinalSupported: true
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
if (simpleAspect !== null &&
|
|
466
|
+
(ctx.sourceStemIsVerb === true || simpleAspect.ellipticTeIruSourceHost === "verbal_predicate") &&
|
|
467
|
+
!isVerb &&
|
|
468
|
+
opPreNeg === null &&
|
|
469
|
+
!opPast) {
|
|
470
|
+
const ellipticNegative = sourceVerbAdjectivalEllipticTeIruNegativeBaseResult(simpleAspect, inputBase, ctx.lookups);
|
|
471
|
+
if (ellipticNegative !== null)
|
|
472
|
+
return withInputPrefix(inputBase, ellipticNegative);
|
|
473
|
+
if (!ctx.hasPriorChainOp) {
|
|
474
|
+
const directional = sourceVerbAdjectivalDirectionalAspectBaseResult(simpleAspect, inputBase);
|
|
475
|
+
if (directional !== null)
|
|
476
|
+
return directional;
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
if (op.aspect === "te_iru" &&
|
|
480
|
+
op.collapsed === "honorific" &&
|
|
481
|
+
!isVerb &&
|
|
482
|
+
opPreNeg === null &&
|
|
483
|
+
!opPast) {
|
|
484
|
+
return { ok: true, base: inputBase, chainOnFinalSupported: true };
|
|
485
|
+
}
|
|
486
|
+
if (simpleAspect !== null &&
|
|
487
|
+
ctx.sourceStemIsVerb === true &&
|
|
488
|
+
!ctx.hasPriorChainOp &&
|
|
489
|
+
!isVerb &&
|
|
490
|
+
opPreNeg === null &&
|
|
491
|
+
!opPast) {
|
|
492
|
+
const inchoative = sourceVerbAdjectivalTsutsuAruBaseResult(simpleAspect, inputBase);
|
|
493
|
+
if (inchoative !== null)
|
|
494
|
+
return inchoative;
|
|
495
|
+
}
|
|
496
|
+
return null;
|
|
497
|
+
}
|
|
498
|
+
function negativeHostAspectBase(op, simpleAspect, opPreNeg, inputBase, ctx) {
|
|
499
|
+
const isVerb = inputBase.final.isVerb;
|
|
500
|
+
const teComplementHostIsVerbal = isVerb || ctx.sourceStemIsVerb === true;
|
|
501
|
+
if (opPreNeg.chainDepth !== 1 ||
|
|
502
|
+
opPreNeg.chainPast ||
|
|
503
|
+
!teComplementHostIsVerbal) {
|
|
504
|
+
return { ok: false, reason: "V neg + aspect 영역 외" };
|
|
505
|
+
}
|
|
506
|
+
if (simpleAspect !== null) {
|
|
507
|
+
return negativeTeAdverbialAspectBaseResult(simpleAspect, inputBase, ctx.lookups);
|
|
508
|
+
}
|
|
509
|
+
if (isBenefactiveAspectKind(op.aspect)) {
|
|
510
|
+
const benefactive = op;
|
|
511
|
+
const prohibitionRequest = benefactive.terminalMood === "imperative" ||
|
|
512
|
+
benefactive.requestEvidence === "terminal_question";
|
|
513
|
+
if (prohibitionRequest) {
|
|
514
|
+
return benefactiveBaseFromInput(benefactive, prohibitionPredicateBase(inputBase));
|
|
515
|
+
}
|
|
516
|
+
const negativeInput = applyNegationChainToLemmaBase(inputBase, opPreNeg);
|
|
517
|
+
if (negativeInput === null) {
|
|
518
|
+
return { ok: false, reason: "negative benefactive host lowering 영역 외" };
|
|
519
|
+
}
|
|
520
|
+
return benefactiveBaseFromInput(benefactive, negativeInput);
|
|
521
|
+
}
|
|
522
|
+
return { ok: false, reason: "V neg + aspect 영역 외" };
|
|
523
|
+
}
|
|
524
|
+
function composedAspectBase(op, inputBase, ctx) {
|
|
525
|
+
const stemLemma = inputBase.final.lemma;
|
|
526
|
+
const stemIrregular = inputBase.final.irregular;
|
|
527
|
+
if (isSimpleAspectOpKind(op.aspect)) {
|
|
528
|
+
if (op.aspect === "te_shimau" &&
|
|
529
|
+
op.semantic?.renderStrategy === "passive_completion" &&
|
|
530
|
+
inputBase.policy?.kind === "voice" &&
|
|
531
|
+
inputBase.policy.voice === "passive" &&
|
|
532
|
+
inputBase.policy.adversativePassive === true &&
|
|
533
|
+
inputBase.final.lemma === "버리다") {
|
|
534
|
+
return {
|
|
535
|
+
ok: true,
|
|
536
|
+
base: inputBase,
|
|
537
|
+
chainOnFinalSupported: true
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
const simpleAspect = normalizeSimpleAspectForComposedInput(completionTeIruNegativeAspectForComposedInput(op, inputBase), inputBase);
|
|
541
|
+
const shouldDropInputCompletionPolicy = simpleAspect.aspect === "te_iru" &&
|
|
542
|
+
inputBase.policy?.kind === "completion" &&
|
|
543
|
+
inputBase.policy.teIruNegativeStrategy === "preserve_aspect";
|
|
544
|
+
return withInputPrefix(inputBase, aspectBaseResult(simpleAspect, stemLemma, stemIrregular, ctx.lookups), { carryInputPolicy: !shouldDropInputCompletionPolicy });
|
|
545
|
+
}
|
|
546
|
+
if (op.aspect === "te_hoshii") {
|
|
547
|
+
const desireBase = desiderativeBaseFromPredicateBase(inputBase, ctx.desiredPredicateNegation);
|
|
548
|
+
if (desireBase === null) {
|
|
549
|
+
return { ok: false, reason: "desired predicate negation + desiderative lowering 영역 외" };
|
|
550
|
+
}
|
|
551
|
+
const sourceTrace = teHoshiiSourceTrace(desireBase, op.source.tokens, ctx.desiredPredicateNegation);
|
|
552
|
+
return {
|
|
553
|
+
ok: true,
|
|
554
|
+
base: desireBase,
|
|
555
|
+
chainOnFinalSupported: true,
|
|
556
|
+
interOpPastProjection: "committed",
|
|
557
|
+
...(sourceTrace === undefined ? {} : { sourceTrace })
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
if (op.aspect === "te_miseru") {
|
|
561
|
+
const base = miseruBase(op, stemLemma, stemIrregular);
|
|
562
|
+
const sourceTrace = stemFusionSourceTrace(base.prefix, op.source.tokens, { splitFinal: "last_token" });
|
|
563
|
+
return withInputPrefix(inputBase, {
|
|
564
|
+
ok: true,
|
|
565
|
+
base,
|
|
566
|
+
chainOnFinalSupported: true,
|
|
567
|
+
...(sourceTrace === undefined ? {} : { sourceTrace })
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
if (isBenefactiveAspectKind(op.aspect)) {
|
|
571
|
+
return benefactiveBaseFromInput(op, inputBase);
|
|
572
|
+
}
|
|
573
|
+
return { ok: false, reason: `aspect kind '${op.aspect}' base 변환 미작성` };
|
|
574
|
+
}
|
|
575
|
+
function desireOpBase(op, inputBase, ctx) {
|
|
576
|
+
const stemLemma = inputBase.final.lemma;
|
|
577
|
+
const stemIrregular = inputBase.final.irregular;
|
|
578
|
+
const isVerb = inputBase.final.isVerb;
|
|
579
|
+
const opPreNeg = ctx.preModalNeg;
|
|
580
|
+
if (!isVerb && inputBase.prefix.length === 0) {
|
|
581
|
+
return { ok: false, reason: "desire on adj 영역 외 (タイ는 V 만)" };
|
|
582
|
+
}
|
|
583
|
+
if (opPreNeg !== null)
|
|
584
|
+
return { ok: false, reason: "V neg + desire 비표준" };
|
|
585
|
+
if (inputBase.policy?.kind === "benefactive") {
|
|
586
|
+
if (inputBase.policy.potential || inputBase.policy.desireMode === "unsupported") {
|
|
587
|
+
return { ok: false, reason: "benefactive + desire policy 영역 외" };
|
|
588
|
+
}
|
|
589
|
+
if (inputBase.policy.desireMode === "request") {
|
|
590
|
+
const requested = benefactiveDesiderativeRequestBase(inputBase);
|
|
591
|
+
const requestBase = op.form === "tagaru"
|
|
592
|
+
? { ...requested, policy: { kind: "desire", nodaConnectiveFlatten: true } }
|
|
593
|
+
: requested;
|
|
594
|
+
const sourceTrace = hostProjectionSourceTrace({
|
|
595
|
+
hostText: requestBase.prefix.trimEnd(),
|
|
596
|
+
inputPrefix: inputBase.prefix,
|
|
597
|
+
basePrefix: requestBase.prefix,
|
|
598
|
+
sourceTokens: op.source.tokens,
|
|
599
|
+
splitFinal: "none"
|
|
891
600
|
});
|
|
601
|
+
return {
|
|
602
|
+
ok: true,
|
|
603
|
+
base: requestBase,
|
|
604
|
+
chainOnFinalSupported: true,
|
|
605
|
+
interOpPastProjection: "committed",
|
|
606
|
+
...(sourceTrace === undefined ? {} : { sourceTrace })
|
|
607
|
+
};
|
|
892
608
|
}
|
|
893
|
-
|
|
894
|
-
|
|
609
|
+
}
|
|
610
|
+
const desireResult = desireBaseResult(stemLemma, stemIrregular);
|
|
611
|
+
if (!desireResult.ok) {
|
|
612
|
+
return desireResult;
|
|
613
|
+
}
|
|
614
|
+
return withInputPrefix(inputBase, {
|
|
615
|
+
...desireResult,
|
|
616
|
+
...(op.form === "tagaru" ? {
|
|
617
|
+
base: {
|
|
618
|
+
...desireResult.base,
|
|
619
|
+
final: { kind: "lemma", lemma: "싶어하다", irregular: "여", isVerb: true }
|
|
620
|
+
}
|
|
621
|
+
} : {}),
|
|
622
|
+
sourceTrace: {
|
|
623
|
+
inputProjectionText: desireResult.base.prefix,
|
|
624
|
+
carrierPrefixSegments: [],
|
|
625
|
+
finalSourceTokens: op.source.tokens,
|
|
626
|
+
finalKind: "modal"
|
|
895
627
|
}
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
if (absorbed !== null) {
|
|
969
|
-
return { ...absorbed, ...modalFinalChainPolicy(absorbed.base), interOpPastProjection: "committed" };
|
|
970
|
-
}
|
|
971
|
-
}
|
|
972
|
-
if (op.modal === "kamo" && opPreNeg === null) {
|
|
973
|
-
const carrierKamo = nodaCarrierKamoBase(inputBase, ctx.formal, opPast, op.bare);
|
|
974
|
-
if (carrierKamo !== null) {
|
|
975
|
-
return {
|
|
976
|
-
...carrierKamo,
|
|
977
|
-
...modalFinalChainPolicy(carrierKamo.base),
|
|
978
|
-
interOpPastProjection: "committed"
|
|
979
|
-
};
|
|
980
|
-
}
|
|
981
|
-
}
|
|
982
|
-
if (op.modal === "wake") {
|
|
983
|
-
const wakeCitation = wakeExplanatoryCitationBase({
|
|
984
|
-
op, inputBase, preStemNeg: opPreNeg, stemPast: opPast, formal: ctx.formal
|
|
985
|
-
});
|
|
986
|
-
if (wakeCitation !== null) {
|
|
987
|
-
if (!wakeCitation.ok)
|
|
988
|
-
return wakeCitation;
|
|
989
|
-
return {
|
|
990
|
-
...wakeCitation,
|
|
991
|
-
...modalFinalChainPolicy(wakeCitation.base),
|
|
992
|
-
interOpPastProjection: "committed"
|
|
993
|
-
};
|
|
994
|
-
}
|
|
995
|
-
}
|
|
996
|
-
if ((op.modal === "rashii" || op.modal === "youda") && opPreNeg === null && !opPast) {
|
|
997
|
-
const carrierLikeness = nodaCarrierLikenessBase(inputBase);
|
|
998
|
-
if (carrierLikeness !== null) {
|
|
999
|
-
return {
|
|
1000
|
-
...carrierLikeness,
|
|
1001
|
-
...modalFinalChainPolicy(carrierLikeness.base),
|
|
1002
|
-
interOpPastProjection: "committed"
|
|
1003
|
-
};
|
|
1004
|
-
}
|
|
1005
|
-
const quotedLikeness = quotedPropositionLikenessBase(inputBase, op, ctx.formal, ctx.pastProjection);
|
|
1006
|
-
if (quotedLikeness !== null) {
|
|
1007
|
-
return {
|
|
1008
|
-
...quotedLikeness,
|
|
1009
|
-
...modalFinalChainPolicy(quotedLikeness.base),
|
|
1010
|
-
interOpPastProjection: "committed"
|
|
1011
|
-
};
|
|
1012
|
-
}
|
|
1013
|
-
}
|
|
1014
|
-
if (op.modal === "rashii" &&
|
|
1015
|
-
opPreNeg === null &&
|
|
1016
|
-
!opPast &&
|
|
1017
|
-
!ctx.hasPriorChainOp &&
|
|
1018
|
-
inputBase.policy?.kind === "noun_copula_interop" &&
|
|
1019
|
-
inputBase.policy.zeroCopula === true) {
|
|
1020
|
-
const res = nominalHostEvidentialLikenessBase(inputBase.policy.nounSurface, op);
|
|
1021
|
-
if (!res.ok)
|
|
1022
|
-
return res;
|
|
1023
|
-
return { ...res, ...modalFinalChainPolicy(res.base), interOpPastProjection: "committed" };
|
|
1024
|
-
}
|
|
1025
|
-
if (op.modal === "mai" && opPreNeg === null && !opPast) {
|
|
1026
|
-
const scopeMai = maiScopeCarrierBase(op, inputBase);
|
|
1027
|
-
if (scopeMai !== null) {
|
|
1028
|
-
if (!scopeMai.ok)
|
|
1029
|
-
return scopeMai;
|
|
1030
|
-
return { ...scopeMai, ...modalFinalChainPolicy(scopeMai.base) };
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
function voiceOpBase(op, inputBase, ctx) {
|
|
631
|
+
const stemLemma = inputBase.final.lemma;
|
|
632
|
+
const stemIrregular = inputBase.final.irregular;
|
|
633
|
+
const isVerb = inputBase.final.isVerb;
|
|
634
|
+
const opPreNeg = ctx.preModalNeg;
|
|
635
|
+
if (opPreNeg !== null)
|
|
636
|
+
return { ok: false, reason: "V neg + voice 비표준" };
|
|
637
|
+
const reportingStateBase = reportingPassiveStateBase(op, inputBase, ctx.nextOp);
|
|
638
|
+
if (reportingStateBase !== null) {
|
|
639
|
+
return reportingStateBase;
|
|
640
|
+
}
|
|
641
|
+
const reportingLabelBase = reportingPassiveLabelBase(op, inputBase);
|
|
642
|
+
if (reportingLabelBase !== null) {
|
|
643
|
+
return reportingLabelBase;
|
|
644
|
+
}
|
|
645
|
+
if (op.voice === "passive" &&
|
|
646
|
+
inputBase.policy?.kind === "quoted_proposition" &&
|
|
647
|
+
inputBase.final.lemma === "하다") {
|
|
648
|
+
return {
|
|
649
|
+
ok: true,
|
|
650
|
+
base: {
|
|
651
|
+
prefix: inputBase.prefix,
|
|
652
|
+
final: { kind: "lemma", lemma: "여겨지다", irregular: null, isVerb: true },
|
|
653
|
+
policy: { kind: "voice", voice: "passive", reportingPassive: true }
|
|
654
|
+
},
|
|
655
|
+
chainOnFinalSupported: true
|
|
656
|
+
};
|
|
657
|
+
}
|
|
658
|
+
if (op.voice === "passive" && inputBase.policy?.kind === "make_state_change") {
|
|
659
|
+
return {
|
|
660
|
+
ok: true,
|
|
661
|
+
base: {
|
|
662
|
+
prefix: inputBase.prefix,
|
|
663
|
+
final: { kind: "lemma", lemma: "되다", irregular: null, isVerb: true },
|
|
664
|
+
policy: { kind: "voice", voice: "passive", ...(op.passiveClass === undefined ? {} : { passiveClass: op.passiveClass }) }
|
|
665
|
+
},
|
|
666
|
+
chainOnFinalSupported: true
|
|
667
|
+
};
|
|
668
|
+
}
|
|
669
|
+
if (op.voice === "passive" && inputBase.policy?.kind === "causative") {
|
|
670
|
+
const passiveCausative = voiceBase({
|
|
671
|
+
voice: {
|
|
672
|
+
...op,
|
|
673
|
+
voice: "causative_passive"
|
|
674
|
+
},
|
|
675
|
+
stemLemma: inputBase.policy.sourceLemma,
|
|
676
|
+
stemIrregular: inputBase.policy.sourceIrregular,
|
|
677
|
+
sahenShortNegationSplit: ctx.sahenShortNegationSplit,
|
|
678
|
+
isVerb: true,
|
|
679
|
+
passiveStemOptions: ctx.passiveStemOptions,
|
|
680
|
+
lookups: ctx.lookups
|
|
681
|
+
});
|
|
682
|
+
return passiveCausative.ok
|
|
683
|
+
? { ...passiveCausative, chainOnFinalSupported: true }
|
|
684
|
+
: passiveCausative;
|
|
685
|
+
}
|
|
686
|
+
if (op.voice === "passive" &&
|
|
687
|
+
inputBase.policy?.kind === "completion" &&
|
|
688
|
+
inputBase.policy.followingPassiveStrategy === "completion_causative") {
|
|
689
|
+
return {
|
|
690
|
+
ok: true,
|
|
691
|
+
base: {
|
|
692
|
+
prefix: `${inputBase.policy.stemPrefix ?? ""}${conjugate(inputBase.policy.stemLemma, inputBase.policy.stemIrregular, op.passiveClass === "causative_coercive" ? "아/어야" : "게")}${op.passiveClass === "causative_coercive" ? "만" : ""} `,
|
|
693
|
+
final: op.passiveClass === "causative_coercive"
|
|
694
|
+
? { kind: "lemma", lemma: "하다", irregular: "여", isVerb: true }
|
|
695
|
+
: { kind: "lemma", lemma: "되다", irregular: null, isVerb: true },
|
|
696
|
+
policy: {
|
|
697
|
+
kind: "voice",
|
|
698
|
+
voice: "causative_passive",
|
|
699
|
+
...(op.passiveClass === undefined ? {} : { passiveClass: op.passiveClass })
|
|
1031
700
|
}
|
|
1032
|
-
}
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
701
|
+
},
|
|
702
|
+
chainOnFinalSupported: true
|
|
703
|
+
};
|
|
704
|
+
}
|
|
705
|
+
const res = voiceBase({
|
|
706
|
+
voice: op,
|
|
707
|
+
stemLemma,
|
|
708
|
+
stemIrregular,
|
|
709
|
+
isVerb,
|
|
710
|
+
passiveStemOptions: ctx.passiveStemOptions,
|
|
711
|
+
lookups: ctx.lookups,
|
|
712
|
+
sahenShortNegationSplit: ctx.sahenShortNegationSplit,
|
|
713
|
+
sourceTokens: op.source.tokens
|
|
714
|
+
});
|
|
715
|
+
if (!res.ok)
|
|
716
|
+
return res;
|
|
717
|
+
return withInputPrefix(inputBase, res);
|
|
718
|
+
}
|
|
719
|
+
function idiomOpBase(op, inputBase, ctx) {
|
|
720
|
+
const stemLemma = inputBase.final.lemma;
|
|
721
|
+
const stemIrregular = inputBase.final.irregular;
|
|
722
|
+
const isVerb = inputBase.final.isVerb;
|
|
723
|
+
const opPreNeg = ctx.preModalNeg;
|
|
724
|
+
const opPast = ctx.past;
|
|
725
|
+
if (op.idiom === "wake_impossible") {
|
|
726
|
+
return wakeImpossibleBase({
|
|
727
|
+
op,
|
|
728
|
+
inputBase,
|
|
729
|
+
preStemNeg: opPreNeg,
|
|
730
|
+
stemPast: opPast,
|
|
731
|
+
formal: ctx.formal,
|
|
732
|
+
pastProjection: ctx.pastProjection
|
|
733
|
+
});
|
|
734
|
+
}
|
|
735
|
+
if (op.idiom === "obligation") {
|
|
736
|
+
if (inputBase.policy?.kind === "noun_copula_interop" ||
|
|
737
|
+
inputBase.policy?.kind === "negative_noun_copula_interop") {
|
|
738
|
+
return {
|
|
739
|
+
ok: true,
|
|
740
|
+
base: nounCopulaObligationBase(inputBase.policy.nounSurface, predicateBasePolicyAllomorphHost(inputBase)),
|
|
741
|
+
chainOnFinalSupported: true
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
const res = obligationBase({ obligation: op, stemLemma, stemIrregular, isVerb });
|
|
745
|
+
if (!res.ok)
|
|
746
|
+
return res;
|
|
747
|
+
return withInputPrefix(inputBase, { ...res, chainOnFinalSupported: true });
|
|
748
|
+
}
|
|
749
|
+
if (op.idiom === "forbidden") {
|
|
750
|
+
const res = forbiddenBase({ stemLemma, stemIrregular, isVerb, sourceTokens: op.source.tokens });
|
|
751
|
+
if (!res.ok)
|
|
752
|
+
return res;
|
|
753
|
+
return withInputPrefix(inputBase, { ...res, chainOnFinalSupported: true });
|
|
754
|
+
}
|
|
755
|
+
if (op.idiom === "degree_intensifier") {
|
|
756
|
+
return degreeIntensifierBase({
|
|
757
|
+
op,
|
|
758
|
+
inputBase,
|
|
759
|
+
preStemNeg: opPreNeg,
|
|
760
|
+
stemPast: opPast,
|
|
761
|
+
formal: ctx.formal,
|
|
762
|
+
lookups: ctx.lookups
|
|
763
|
+
});
|
|
764
|
+
}
|
|
765
|
+
if (op.idiom === "potential_koto_ga_dekiru") {
|
|
766
|
+
return potentialKotoGaDekiruIdiomBase(op, inputBase, ctx);
|
|
767
|
+
}
|
|
768
|
+
if (op.idiom === "negative_necessity_koto_wa") {
|
|
769
|
+
return negativeNecessityKotoWaBase({
|
|
770
|
+
op,
|
|
771
|
+
inputBase,
|
|
772
|
+
preStemNeg: opPreNeg,
|
|
773
|
+
stemPast: opPast,
|
|
774
|
+
formal: ctx.formal,
|
|
775
|
+
pastProjection: ctx.pastProjection
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
if (op.idiom === "inevitable_zaru_o_enai") {
|
|
779
|
+
return inevitableZaruOEnaiBase({
|
|
780
|
+
inputBase,
|
|
781
|
+
preStemNeg: opPreNeg,
|
|
782
|
+
stemPast: opPast,
|
|
783
|
+
formal: ctx.formal,
|
|
784
|
+
pastProjection: ctx.pastProjection,
|
|
785
|
+
sourceTokens: op.source.tokens
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
if (op.idiom === "cannot_refrain_negative_dewa_irarenai") {
|
|
789
|
+
return cannotRefrainNegativeDewaIrarenaiBase({
|
|
790
|
+
inputBase,
|
|
791
|
+
preStemNeg: opPreNeg,
|
|
792
|
+
stemPast: opPast,
|
|
793
|
+
formal: ctx.formal,
|
|
794
|
+
pastProjection: ctx.pastProjection,
|
|
795
|
+
sourceTokens: op.source.tokens
|
|
796
|
+
});
|
|
797
|
+
}
|
|
798
|
+
if (op.idiom === "method_you_ga_nai") {
|
|
799
|
+
return methodYouGaNaiBase({
|
|
800
|
+
op,
|
|
801
|
+
inputBase,
|
|
802
|
+
preStemNeg: opPreNeg,
|
|
803
|
+
stemPast: opPast,
|
|
804
|
+
formal: ctx.formal,
|
|
805
|
+
pastProjection: ctx.pastProjection,
|
|
806
|
+
sourceTokens: op.source.tokens
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
if (op.idiom === "negative_necessity_made_mo") {
|
|
810
|
+
return madeMoNaiBase({
|
|
811
|
+
inputBase,
|
|
812
|
+
preStemNeg: opPreNeg,
|
|
813
|
+
stemPast: opPast,
|
|
814
|
+
formal: ctx.formal,
|
|
815
|
+
pastProjection: ctx.pastProjection,
|
|
816
|
+
sourceTokens: op.source.tokens
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
if (op.idiom === "permission") {
|
|
820
|
+
return permissionBase({
|
|
821
|
+
op,
|
|
822
|
+
inputBase,
|
|
823
|
+
preStemNeg: opPreNeg,
|
|
824
|
+
stemPast: opPast,
|
|
825
|
+
formal: ctx.formal,
|
|
826
|
+
lookups: ctx.lookups
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
if (op.idiom === "sufficiency_conditional") {
|
|
830
|
+
return sufficiencyConditionalBase({
|
|
831
|
+
op,
|
|
832
|
+
inputBase,
|
|
833
|
+
preStemNeg: opPreNeg,
|
|
834
|
+
stemPast: opPast,
|
|
835
|
+
formal: ctx.formal,
|
|
836
|
+
lookups: ctx.lookups
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
if (op.idiom === "te_evaluation") {
|
|
840
|
+
return teEvaluationBase({
|
|
841
|
+
op,
|
|
842
|
+
inputBase,
|
|
843
|
+
preStemNeg: opPreNeg,
|
|
844
|
+
stemPast: opPast,
|
|
845
|
+
formal: ctx.formal,
|
|
846
|
+
lookups: ctx.lookups
|
|
847
|
+
});
|
|
848
|
+
}
|
|
849
|
+
if (op.idiom === "negative_necessity_sumu") {
|
|
850
|
+
return negativeNecessitySumuBase({
|
|
851
|
+
op,
|
|
852
|
+
inputBase,
|
|
853
|
+
preStemNeg: opPreNeg,
|
|
854
|
+
stemPast: opPast,
|
|
855
|
+
formal: ctx.formal,
|
|
856
|
+
lookups: ctx.lookups
|
|
857
|
+
});
|
|
858
|
+
}
|
|
859
|
+
if (op.idiom === "only_option_shika_nai") {
|
|
860
|
+
return onlyOptionBase({
|
|
861
|
+
inputBase,
|
|
862
|
+
preStemNeg: opPreNeg,
|
|
863
|
+
stemPast: opPast,
|
|
864
|
+
formal: ctx.formal,
|
|
865
|
+
pastProjection: ctx.pastProjection,
|
|
866
|
+
lookups: ctx.lookups,
|
|
867
|
+
sourceTokens: op.source.tokens
|
|
868
|
+
});
|
|
869
|
+
}
|
|
870
|
+
if (op.idiom === "experience_koto_ga_aru") {
|
|
871
|
+
return experienceBase({
|
|
872
|
+
op,
|
|
873
|
+
inputBase,
|
|
874
|
+
preStemNeg: opPreNeg,
|
|
875
|
+
stemPast: opPast,
|
|
876
|
+
formal: ctx.formal,
|
|
877
|
+
pastProjection: ctx.pastProjection
|
|
878
|
+
});
|
|
879
|
+
}
|
|
880
|
+
if (op.idiom === "outcome_koto_ni_naru") {
|
|
881
|
+
return outcomeKotoNiNaruBase({
|
|
882
|
+
op,
|
|
883
|
+
inputBase,
|
|
884
|
+
preStemNeg: opPreNeg,
|
|
885
|
+
stemPast: opPast,
|
|
886
|
+
formal: ctx.formal,
|
|
887
|
+
pastProjection: ctx.pastProjection
|
|
888
|
+
});
|
|
889
|
+
}
|
|
890
|
+
return decisionKotoNiSuruBase({
|
|
891
|
+
inputBase,
|
|
892
|
+
preStemNeg: opPreNeg,
|
|
893
|
+
stemPast: opPast,
|
|
894
|
+
formal: ctx.formal,
|
|
895
|
+
sourceTokens: op.source.tokens
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
function potentialKotoGaDekiruIdiomBase(op, inputBase, ctx) {
|
|
899
|
+
const stemLemma = inputBase.final.lemma;
|
|
900
|
+
const stemIrregular = inputBase.final.irregular;
|
|
901
|
+
const isVerb = inputBase.final.isVerb;
|
|
902
|
+
const opPreNeg = ctx.preModalNeg;
|
|
903
|
+
const opPast = ctx.past;
|
|
904
|
+
if (inputBase.policy?.kind === "potential") {
|
|
905
|
+
return {
|
|
906
|
+
ok: true,
|
|
907
|
+
base: inputBase,
|
|
908
|
+
chainOnFinalSupported: false,
|
|
909
|
+
finalNegationLoweringPolicy: "potential_idiom"
|
|
910
|
+
};
|
|
911
|
+
}
|
|
912
|
+
if (inputBase.policy?.kind === "likeness" &&
|
|
913
|
+
inputBase.policy.potentialObjectAttributive !== undefined) {
|
|
914
|
+
const host = inputBase.policy.potentialObjectAttributive;
|
|
915
|
+
const stemAttr = `${conjugate(host.stemLemma, host.stemIrregular, "ㄹ/을")} 만한`;
|
|
916
|
+
return potentialObjectBaseFromAttributive({
|
|
917
|
+
stemAttr,
|
|
918
|
+
postIdiomChainDepth: 0,
|
|
919
|
+
particleKind: op.particleKind,
|
|
920
|
+
focusParticle: op.focusParticle,
|
|
921
|
+
stemLemma: host.stemLemma,
|
|
922
|
+
stemIrregular: host.stemIrregular
|
|
923
|
+
});
|
|
924
|
+
}
|
|
925
|
+
const sourceProjectionIsVerbalPredicate = (ctx.sourceStemIsVerb ?? isVerb) ||
|
|
926
|
+
ctx.sourceStemIsSahenPredicate === true;
|
|
927
|
+
if (!isVerb && ctx.sourceStemIsSahenPredicate !== true) {
|
|
928
|
+
const stemAttr = pastNegStemAttributive({
|
|
929
|
+
stemLemma,
|
|
930
|
+
stemIrregular,
|
|
931
|
+
stemKind: "adj",
|
|
932
|
+
past: opPast,
|
|
933
|
+
preModalNeg: opPreNeg,
|
|
934
|
+
attrPolicy: "present",
|
|
935
|
+
useShortHint: false,
|
|
936
|
+
lookups: ctx.lookups,
|
|
937
|
+
sahenShortNegationSplit: ctx.sahenShortNegationSplit
|
|
938
|
+
});
|
|
939
|
+
return potentialObjectBaseFromAttributive({
|
|
940
|
+
stemAttr,
|
|
941
|
+
postIdiomChainDepth: 0,
|
|
942
|
+
particleKind: op.particleKind,
|
|
943
|
+
focusParticle: op.focusParticle,
|
|
944
|
+
stemLemma,
|
|
945
|
+
stemIrregular
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
const res = potentialBase({
|
|
949
|
+
stemLemma, stemIrregular, isVerb,
|
|
950
|
+
sourceStemIsVerb: sourceProjectionIsVerbalPredicate,
|
|
951
|
+
preStemNeg: opPreNeg,
|
|
952
|
+
stemPast: opPast,
|
|
953
|
+
postIdiomChainDepth: 0,
|
|
954
|
+
particleKind: op.particleKind,
|
|
955
|
+
focusParticle: op.focusParticle,
|
|
956
|
+
sourceTokens: op.source.tokens,
|
|
957
|
+
lookups: ctx.lookups,
|
|
958
|
+
sahenShortNegationSplit: ctx.sahenShortNegationSplit
|
|
959
|
+
});
|
|
960
|
+
if (!res.ok)
|
|
961
|
+
return res;
|
|
962
|
+
return withInputPrefix(inputBase, {
|
|
963
|
+
...res,
|
|
964
|
+
chainOnFinalSupported: false,
|
|
965
|
+
finalNegationLoweringPolicy: "potential_idiom"
|
|
966
|
+
});
|
|
967
|
+
}
|
|
968
|
+
function modalOpBase(op, inputBase, ctx) {
|
|
969
|
+
const stemLemma = inputBase.final.lemma;
|
|
970
|
+
const stemIrregular = inputBase.final.irregular;
|
|
971
|
+
const isVerb = inputBase.final.isVerb;
|
|
972
|
+
const opPreNeg = ctx.preModalNeg;
|
|
973
|
+
const opPast = ctx.past;
|
|
974
|
+
const hostLowered = modalHostLoweringBase(op, inputBase, ctx);
|
|
975
|
+
if (hostLowered !== null)
|
|
976
|
+
return hostLowered;
|
|
977
|
+
const carrierLikeness = modalCarrierLikenessBase(op, inputBase, ctx);
|
|
978
|
+
if (carrierLikeness !== null)
|
|
979
|
+
return carrierLikeness;
|
|
980
|
+
const res = modalBase({
|
|
981
|
+
modal: op, stemLemma, stemIrregular,
|
|
982
|
+
stemKind: op.modal === "mai" ? (inputBase.final.isVerb ? "verb" : "adj") : (isVerb ? "verb" : "adj"),
|
|
983
|
+
preModalNeg: opPreNeg,
|
|
984
|
+
past: opPast,
|
|
985
|
+
pastProjection: ctx.pastProjection,
|
|
986
|
+
formal: ctx.formal,
|
|
987
|
+
...(inputBase.policy === undefined ? {} : { inputPolicy: inputBase.policy }),
|
|
988
|
+
...(ctx.sourceStemIsVerb === undefined ? {} : { sourceStemIsVerb: ctx.sourceStemIsVerb }),
|
|
989
|
+
sourceHostHasTeIruAspect: ctx.sourceHostHasTeIruAspect === true,
|
|
990
|
+
forbidShortNegation: ctx.forbidShortNegation,
|
|
991
|
+
preferShortLikenessNegation: ctx.preferShortLikenessNegation === true || opPreNeg !== null,
|
|
992
|
+
lookups: ctx.lookups,
|
|
993
|
+
sahenShortNegationSplit: ctx.sahenShortNegationSplit
|
|
994
|
+
});
|
|
995
|
+
if (!res.ok)
|
|
996
|
+
return res;
|
|
997
|
+
return withInputPrefix(inputBase, {
|
|
998
|
+
...res,
|
|
999
|
+
...modalFinalChainPolicy(res.base),
|
|
1000
|
+
interOpPastProjection: "committed"
|
|
1001
|
+
});
|
|
1002
|
+
}
|
|
1003
|
+
function modalHostLoweringBase(op, inputBase, ctx) {
|
|
1004
|
+
const opPreNeg = ctx.preModalNeg;
|
|
1005
|
+
const opPast = ctx.past;
|
|
1006
|
+
if (op.modal === "mai" &&
|
|
1007
|
+
(inputBase.policy?.kind === "noun_copula_interop" ||
|
|
1008
|
+
inputBase.policy?.kind === "negative_noun_copula_interop") &&
|
|
1009
|
+
opPreNeg === null &&
|
|
1010
|
+
!opPast) {
|
|
1011
|
+
const noun = inputBase.policy.nounSurface;
|
|
1012
|
+
const base = scopeCarrierCopulaBase("mai", "거", `${nounSubjectPart(noun, predicateBasePolicyAllomorphHost(inputBase))} 아닐 `);
|
|
1013
|
+
return {
|
|
1014
|
+
ok: true,
|
|
1015
|
+
base,
|
|
1016
|
+
...modalFinalChainPolicy(base),
|
|
1017
|
+
interOpPastProjection: "committed"
|
|
1018
|
+
};
|
|
1019
|
+
}
|
|
1020
|
+
if (op.modal === "noda" &&
|
|
1021
|
+
inputBase.policy?.kind === "negative_noun_copula_interop" &&
|
|
1022
|
+
ctx.nextOp?.kind === "conjecture" &&
|
|
1023
|
+
opPreNeg === null &&
|
|
1024
|
+
!opPast) {
|
|
1025
|
+
return {
|
|
1026
|
+
ok: true,
|
|
1027
|
+
base: inputBase,
|
|
1028
|
+
chainOnFinalSupported: true
|
|
1029
|
+
};
|
|
1030
|
+
}
|
|
1031
|
+
if (op.modal === "tokoro") {
|
|
1032
|
+
const tokoroProjectedBase = tokoroBaseFromPredicateBase({
|
|
1033
|
+
modal: op,
|
|
1034
|
+
base: inputBase,
|
|
1035
|
+
preModalNeg: opPreNeg,
|
|
1036
|
+
past: opPast,
|
|
1037
|
+
formal: ctx.formal,
|
|
1038
|
+
pastProjection: ctx.pastProjection
|
|
1039
|
+
});
|
|
1040
|
+
if (tokoroProjectedBase !== null) {
|
|
1041
|
+
if (!tokoroProjectedBase.ok)
|
|
1042
|
+
return tokoroProjectedBase;
|
|
1043
|
+
return {
|
|
1044
|
+
...tokoroProjectedBase,
|
|
1045
|
+
...modalFinalChainPolicy(tokoroProjectedBase.base),
|
|
1053
1046
|
interOpPastProjection: "committed"
|
|
1054
|
-
}
|
|
1047
|
+
};
|
|
1055
1048
|
}
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1049
|
+
}
|
|
1050
|
+
if (op.modal === "limit_negation") {
|
|
1051
|
+
const res = limitNegationBaseFromPredicateBase({
|
|
1052
|
+
modal: op,
|
|
1053
|
+
base: inputBase,
|
|
1054
|
+
preNeg: opPreNeg,
|
|
1055
|
+
past: opPast,
|
|
1056
|
+
formal: ctx.formal,
|
|
1057
|
+
lookups: ctx.lookups
|
|
1058
|
+
});
|
|
1059
|
+
if (!res.ok)
|
|
1060
|
+
return res;
|
|
1061
|
+
return { ...res, ...modalFinalChainPolicy(res.base), interOpPastProjection: "committed" };
|
|
1062
|
+
}
|
|
1063
|
+
if (op.modal === "mono" && (op.reading === "admirative" || op.reading === "habitual")) {
|
|
1064
|
+
const res = monoHostPredicateBase(op, inputBase, opPreNeg);
|
|
1065
|
+
if (!res.ok)
|
|
1066
|
+
return res;
|
|
1067
|
+
return { ...res, ...modalFinalChainPolicy(res.base), interOpPastProjection: "committed" };
|
|
1068
|
+
}
|
|
1069
|
+
if (op.modal === "souda_hearsay" && op.reading === "hearsay") {
|
|
1070
|
+
const res = soudaHearsayBaseFromPredicateBase(inputBase, opPreNeg, opPast, ctx.lookups, op);
|
|
1071
|
+
if (!res.ok)
|
|
1072
|
+
return res;
|
|
1073
|
+
return { ...res, ...modalFinalChainPolicy(res.base), interOpPastProjection: "committed" };
|
|
1074
|
+
}
|
|
1075
|
+
if (op.modal === "noda" && opPreNeg === null && !opPast) {
|
|
1076
|
+
const absorbed = nodaCarrierAbsorbedByHostBoundNoun(inputBase, op);
|
|
1077
|
+
if (absorbed !== null) {
|
|
1078
|
+
return { ...absorbed, ...modalFinalChainPolicy(absorbed.base), interOpPastProjection: "committed" };
|
|
1079
|
+
}
|
|
1080
|
+
}
|
|
1081
|
+
if (op.modal === "kamo" && opPreNeg === null) {
|
|
1082
|
+
const carrierKamo = nodaCarrierKamoBase(inputBase, ctx.formal, opPast, op.bare);
|
|
1083
|
+
if (carrierKamo !== null) {
|
|
1084
|
+
return {
|
|
1085
|
+
...carrierKamo,
|
|
1086
|
+
...modalFinalChainPolicy(carrierKamo.base),
|
|
1087
|
+
interOpPastProjection: "committed"
|
|
1088
|
+
};
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
return null;
|
|
1092
|
+
}
|
|
1093
|
+
function modalCarrierLikenessBase(op, inputBase, ctx) {
|
|
1094
|
+
const opPreNeg = ctx.preModalNeg;
|
|
1095
|
+
const opPast = ctx.past;
|
|
1096
|
+
if (op.modal === "wake") {
|
|
1097
|
+
const wakeCitation = wakeExplanatoryCitationBase({
|
|
1098
|
+
op, inputBase, preStemNeg: opPreNeg, stemPast: opPast, formal: ctx.formal
|
|
1099
|
+
});
|
|
1100
|
+
if (wakeCitation !== null) {
|
|
1101
|
+
if (!wakeCitation.ok)
|
|
1102
|
+
return wakeCitation;
|
|
1103
|
+
return {
|
|
1104
|
+
...wakeCitation,
|
|
1105
|
+
...modalFinalChainPolicy(wakeCitation.base),
|
|
1106
|
+
interOpPastProjection: "committed"
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
}
|
|
1110
|
+
if ((op.modal === "rashii" || op.modal === "youda") && opPreNeg === null && !opPast) {
|
|
1111
|
+
const carrierLikeness = nodaCarrierLikenessBase(inputBase);
|
|
1112
|
+
if (carrierLikeness !== null) {
|
|
1113
|
+
return {
|
|
1114
|
+
...carrierLikeness,
|
|
1115
|
+
...modalFinalChainPolicy(carrierLikeness.base),
|
|
1116
|
+
interOpPastProjection: "committed"
|
|
1117
|
+
};
|
|
1118
|
+
}
|
|
1119
|
+
const quotedLikeness = quotedPropositionLikenessBase(inputBase, op, ctx.formal, ctx.pastProjection);
|
|
1120
|
+
if (quotedLikeness !== null) {
|
|
1121
|
+
return {
|
|
1122
|
+
...quotedLikeness,
|
|
1123
|
+
...modalFinalChainPolicy(quotedLikeness.base),
|
|
1124
|
+
interOpPastProjection: "committed"
|
|
1125
|
+
};
|
|
1126
|
+
}
|
|
1127
|
+
}
|
|
1128
|
+
if (op.modal === "rashii" &&
|
|
1129
|
+
opPreNeg === null &&
|
|
1130
|
+
!opPast &&
|
|
1131
|
+
!ctx.hasPriorChainOp &&
|
|
1132
|
+
inputBase.policy?.kind === "noun_copula_interop" &&
|
|
1133
|
+
inputBase.policy.zeroCopula === true) {
|
|
1134
|
+
const res = nominalHostEvidentialLikenessBase(inputBase.policy.nounSurface, op);
|
|
1135
|
+
if (!res.ok)
|
|
1136
|
+
return res;
|
|
1137
|
+
return { ...res, ...modalFinalChainPolicy(res.base), interOpPastProjection: "committed" };
|
|
1138
|
+
}
|
|
1139
|
+
if (op.modal === "mai" && opPreNeg === null && !opPast) {
|
|
1140
|
+
const scopeMai = maiScopeCarrierBase(op, inputBase);
|
|
1141
|
+
if (scopeMai !== null) {
|
|
1142
|
+
if (!scopeMai.ok)
|
|
1143
|
+
return scopeMai;
|
|
1144
|
+
return { ...scopeMai, ...modalFinalChainPolicy(scopeMai.base) };
|
|
1145
|
+
}
|
|
1146
|
+
}
|
|
1147
|
+
return null;
|
|
1148
|
+
}
|
|
1149
|
+
function conjectureOpBase(op, inputBase, ctx) {
|
|
1150
|
+
const stemLemma = inputBase.final.lemma;
|
|
1151
|
+
const stemIrregular = inputBase.final.irregular;
|
|
1152
|
+
const isVerb = inputBase.final.isVerb;
|
|
1153
|
+
const opPreNeg = ctx.preModalNeg;
|
|
1154
|
+
const opPast = ctx.past;
|
|
1155
|
+
const copulaCarrierConjecture = opPreNeg === null
|
|
1156
|
+
? ((!opPast ? (nodaCarrierConjectureBase(inputBase, op) ?? wakeCarrierConjectureBase(inputBase, op)) : null) ??
|
|
1157
|
+
copulaCarrierConjectureBase(inputBase, op, opPast))
|
|
1158
|
+
: null;
|
|
1159
|
+
if (copulaCarrierConjecture !== null) {
|
|
1160
|
+
if (ctx.hasFollowingOp) {
|
|
1161
|
+
if (ctx.nextOp?.kind === "predicateQuoteCarrier") {
|
|
1162
|
+
return { ...copulaCarrierConjecture, chainOnFinalSupported: true };
|
|
1088
1163
|
}
|
|
1089
|
-
return
|
|
1164
|
+
return { ok: true, base: inputBase, chainOnFinalSupported: false };
|
|
1090
1165
|
}
|
|
1091
|
-
|
|
1092
|
-
|
|
1166
|
+
return { ...copulaCarrierConjecture, chainOnFinalSupported: false };
|
|
1167
|
+
}
|
|
1168
|
+
const res = conjectureBase({
|
|
1169
|
+
conjecture: op, stemLemma, stemIrregular, isVerb,
|
|
1170
|
+
preModalNeg: opPreNeg, past: opPast,
|
|
1171
|
+
shortNegationPolicy: ctx.shortNegationPolicy,
|
|
1172
|
+
pastProjection: ctx.pastProjection
|
|
1173
|
+
});
|
|
1174
|
+
if (!res.ok)
|
|
1175
|
+
return res;
|
|
1176
|
+
const prefixed = withInputPrefix(inputBase, { ...res, chainOnFinalSupported: false });
|
|
1177
|
+
if (prefixed.ok &&
|
|
1178
|
+
prefixed.base.policy?.kind === "negative_noun_copula_interop") {
|
|
1179
|
+
return {
|
|
1180
|
+
...prefixed,
|
|
1181
|
+
base: {
|
|
1182
|
+
...prefixed.base,
|
|
1183
|
+
policy: { ...prefixed.base.policy, conjectureHostPast: opPast }
|
|
1184
|
+
}
|
|
1185
|
+
};
|
|
1093
1186
|
}
|
|
1187
|
+
return prefixed;
|
|
1094
1188
|
}
|
|
1095
1189
|
function reportingPassiveLabelBase(op, inputBase) {
|
|
1096
1190
|
if (op.voice !== "passive" ||
|
|
@@ -1176,286 +1270,314 @@ export function chainBases(ops, stemLemma, stemIrregular, isVerb, ctx) {
|
|
|
1176
1270
|
let activeFinalKind = initialTraceMatches
|
|
1177
1271
|
? initialTrace.finalKind
|
|
1178
1272
|
: "lexeme";
|
|
1179
|
-
const
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1273
|
+
const trace = { tracePrefixSegments, tracedPrefixText, activeFinalSourceTokens, activeFinalKind };
|
|
1274
|
+
const fold = {
|
|
1275
|
+
currentBase,
|
|
1276
|
+
currentPreNeg: ctx.preModalNeg,
|
|
1277
|
+
currentPast: ctx.stemPast,
|
|
1278
|
+
currentPastProjection: "lexical",
|
|
1279
|
+
pendingDesiredPredicateNegation: null,
|
|
1280
|
+
finalBase: null,
|
|
1281
|
+
lastChainOnFinalSupported: true,
|
|
1282
|
+
lastFinalNegationOptions: undefined,
|
|
1283
|
+
lastFinalNegationLoweringPolicy: undefined,
|
|
1284
|
+
lastTerminalPrefixContraction: undefined,
|
|
1285
|
+
lastTerminalRealization: undefined,
|
|
1286
|
+
lastConnectivePrefixContraction: undefined,
|
|
1287
|
+
pendingConnectivePrefixContraction: undefined,
|
|
1288
|
+
lastConnectiveBaseOverride: undefined,
|
|
1289
|
+
lastInterOpPastProjection: undefined,
|
|
1290
|
+
lastProjectsAsStativePerfect: false,
|
|
1291
|
+
currentSourceProjectionIsVerbalPredicate: (ctx.sourceStemIsVerb ?? isVerb) ||
|
|
1292
|
+
ctx.sourceStemIsSahenPredicate === true,
|
|
1293
|
+
preNegLoweredOnHostBase: new Set()
|
|
1294
|
+
};
|
|
1295
|
+
const initialNegationFailure = applyChainInitialPreNegation(fold, ops, ctx, initialBaseRes);
|
|
1296
|
+
if (initialNegationFailure !== null) {
|
|
1297
|
+
return initialNegationFailure;
|
|
1298
|
+
}
|
|
1299
|
+
for (let i = 0; i < ops.length; i++) {
|
|
1300
|
+
const opFailure = foldChainOp(fold, trace, ops, i, ctx, sahenShortNegationSplit);
|
|
1301
|
+
if (opFailure !== null) {
|
|
1302
|
+
return opFailure;
|
|
1204
1303
|
}
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1304
|
+
}
|
|
1305
|
+
const finalPastOp = ctx.pastAfterChainIdx.get(ops.length - 1) ?? null;
|
|
1306
|
+
const finalPast = finalPastOp !== null ||
|
|
1307
|
+
opCarriesIntrinsicPast(ops[ops.length - 1]) ||
|
|
1308
|
+
fold.lastProjectsAsStativePerfect;
|
|
1309
|
+
const finalNeg = ctx.negAfterChainIdx.get(ops.length - 1) ?? null;
|
|
1310
|
+
const finalTraceSourceTokens = [
|
|
1311
|
+
...trace.activeFinalSourceTokens,
|
|
1312
|
+
...(finalPastOp?.source.tokens ?? []),
|
|
1313
|
+
...(finalNeg?.source.tokens ?? [])
|
|
1314
|
+
];
|
|
1315
|
+
const result = {
|
|
1316
|
+
ok: true,
|
|
1317
|
+
base: fold.finalBase,
|
|
1318
|
+
finalPast,
|
|
1319
|
+
finalNeg,
|
|
1320
|
+
chainOnFinalSupported: fold.lastChainOnFinalSupported,
|
|
1321
|
+
chainSourceTrace: {
|
|
1322
|
+
prefixSegments: trace.tracePrefixSegments,
|
|
1323
|
+
finalSourceTokens: finalTraceSourceTokens,
|
|
1324
|
+
finalKind: trace.activeFinalKind
|
|
1208
1325
|
}
|
|
1209
|
-
tracedPrefixText = targetPrefix;
|
|
1210
1326
|
};
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
|
|
1327
|
+
return {
|
|
1328
|
+
...result,
|
|
1329
|
+
...(fold.lastFinalNegationOptions === undefined ? {} : { finalNegationOptions: fold.lastFinalNegationOptions }),
|
|
1330
|
+
...(fold.lastFinalNegationLoweringPolicy === undefined ? {} : { finalNegationLoweringPolicy: fold.lastFinalNegationLoweringPolicy }),
|
|
1331
|
+
...(fold.lastTerminalPrefixContraction === undefined ? {} : { terminalPrefixContraction: fold.lastTerminalPrefixContraction }),
|
|
1332
|
+
...(fold.lastTerminalRealization === undefined ? {} : { terminalRealization: fold.lastTerminalRealization }),
|
|
1333
|
+
...(fold.lastConnectivePrefixContraction === undefined ? {} : { connectivePrefixContraction: fold.lastConnectivePrefixContraction }),
|
|
1334
|
+
...(fold.lastConnectiveBaseOverride === undefined ? {} : { connectiveBaseOverride: fold.lastConnectiveBaseOverride }),
|
|
1335
|
+
...(fold.lastInterOpPastProjection === undefined ? {} : { finalPastProjection: fold.lastInterOpPastProjection })
|
|
1217
1336
|
};
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1337
|
+
}
|
|
1338
|
+
function appendChainTracePrefix(trace, targetPrefix, sourceTokens, kind, projectionConfidence = "semantic") {
|
|
1339
|
+
if (!targetPrefix.startsWith(trace.tracedPrefixText)) {
|
|
1340
|
+
const contracted = tracePrefixContractionForTarget(trace.tracePrefixSegments, targetPrefix);
|
|
1341
|
+
if (contracted !== null) {
|
|
1342
|
+
trace.tracePrefixSegments.length = 0;
|
|
1343
|
+
trace.tracePrefixSegments.push(...contracted);
|
|
1344
|
+
trace.tracedPrefixText = trace.tracePrefixSegments.map((segment) => segment.text).join("");
|
|
1345
|
+
}
|
|
1346
|
+
}
|
|
1347
|
+
if (targetPrefix === trace.tracedPrefixText) {
|
|
1348
|
+
return;
|
|
1349
|
+
}
|
|
1350
|
+
if (trace.tracedPrefixText.startsWith(targetPrefix)) {
|
|
1351
|
+
return;
|
|
1352
|
+
}
|
|
1353
|
+
if (!targetPrefix.startsWith(trace.tracedPrefixText)) {
|
|
1354
|
+
trace.tracedPrefixText = targetPrefix;
|
|
1355
|
+
trace.tracePrefixSegments.length = 0;
|
|
1356
|
+
trace.tracePrefixSegments.push({
|
|
1357
|
+
text: targetPrefix,
|
|
1358
|
+
sourceTokens,
|
|
1359
|
+
kind,
|
|
1360
|
+
projectionConfidence: "fallback"
|
|
1361
|
+
});
|
|
1362
|
+
return;
|
|
1363
|
+
}
|
|
1364
|
+
const text = targetPrefix.slice(trace.tracedPrefixText.length);
|
|
1365
|
+
if (text.length > 0) {
|
|
1366
|
+
trace.tracePrefixSegments.push({ text, sourceTokens, kind, projectionConfidence });
|
|
1367
|
+
}
|
|
1368
|
+
trace.tracedPrefixText = targetPrefix;
|
|
1369
|
+
}
|
|
1370
|
+
function appendChainTraceSegment(trace, segment) {
|
|
1371
|
+
if (segment.text.length === 0) {
|
|
1372
|
+
return;
|
|
1373
|
+
}
|
|
1374
|
+
trace.tracePrefixSegments.push(segment);
|
|
1375
|
+
trace.tracedPrefixText += segment.text;
|
|
1376
|
+
}
|
|
1377
|
+
function applyChainInitialPreNegation(fold, ops, ctx, initialBaseRes) {
|
|
1378
|
+
if (fold.currentPreNeg !== null && negationFeedsNaideHoshii(fold.currentPreNeg, ops[0])) {
|
|
1379
|
+
if (fold.currentPreNeg.chainDepth !== 1 || fold.currentPreNeg.chainPast) {
|
|
1224
1380
|
return { ok: false, reason: "desired predicate negation before te_hoshii supports only single non-past negative" };
|
|
1225
1381
|
}
|
|
1226
|
-
pendingDesiredPredicateNegation = currentPreNeg;
|
|
1227
|
-
currentPreNeg = null;
|
|
1382
|
+
fold.pendingDesiredPredicateNegation = fold.currentPreNeg;
|
|
1383
|
+
fold.currentPreNeg = null;
|
|
1228
1384
|
}
|
|
1229
1385
|
const firstOpOwnsPreNegation = ops[0]?.kind === "scopeBridge" &&
|
|
1230
1386
|
(ops[0].head === "koto" || ops[0].head === "implicit");
|
|
1231
|
-
if (currentPreNeg !== null &&
|
|
1387
|
+
if (fold.currentPreNeg !== null &&
|
|
1232
1388
|
initialBaseRes.finalNegationLoweringPolicy !== undefined &&
|
|
1233
1389
|
!firstOpOwnsPreNegation) {
|
|
1234
|
-
const lowered = lowerFinalNegationForCommittedBase(initialBaseRes, currentPreNeg, ctx.formal, ctx.lookups);
|
|
1390
|
+
const lowered = lowerFinalNegationForCommittedBase(initialBaseRes, fold.currentPreNeg, ctx.formal, ctx.lookups);
|
|
1235
1391
|
if (lowered === null) {
|
|
1236
1392
|
return { ok: false, reason: "stem final negation lowering before op 영역 외" };
|
|
1237
1393
|
}
|
|
1238
|
-
currentBase = lowered;
|
|
1239
|
-
const loweredForcesPast = finalNegationLoweringForcesPast(initialBaseRes, currentPreNeg.chainDepth);
|
|
1240
|
-
currentPast = ctx.stemPast || currentPreNeg.chainPast || loweredForcesPast;
|
|
1241
|
-
currentPastProjection = currentPast
|
|
1394
|
+
fold.currentBase = lowered;
|
|
1395
|
+
const loweredForcesPast = finalNegationLoweringForcesPast(initialBaseRes, fold.currentPreNeg.chainDepth);
|
|
1396
|
+
fold.currentPast = ctx.stemPast || fold.currentPreNeg.chainPast || loweredForcesPast;
|
|
1397
|
+
fold.currentPastProjection = fold.currentPast
|
|
1242
1398
|
? (ops[0]?.kind === "conjecture" ? "committed" : "lexical")
|
|
1243
1399
|
: "lexical";
|
|
1244
|
-
currentPreNeg = null;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
let lastInterOpPastProjection;
|
|
1256
|
-
let lastProjectsAsStativePerfect = false;
|
|
1257
|
-
let currentSourceProjectionIsVerbalPredicate = (ctx.sourceStemIsVerb ?? isVerb) ||
|
|
1258
|
-
ctx.sourceStemIsSahenPredicate === true;
|
|
1259
|
-
const preNegLoweredOnHostBase = new Set();
|
|
1260
|
-
for (let i = 0; i < ops.length; i++) {
|
|
1261
|
-
const op = ops[i];
|
|
1262
|
-
const isLast = i === ops.length - 1;
|
|
1263
|
-
const ownedPreNeg = ctx.negBeforeChainIdx?.get(i) ?? null;
|
|
1264
|
-
if (ownedPreNeg !== null && !preNegLoweredOnHostBase.has(ownedPreNeg)) {
|
|
1265
|
-
if (currentPreNeg !== null) {
|
|
1266
|
-
return { ok: false, reason: "multiple pre-reference NegationOps in same chain slot not supported" };
|
|
1267
|
-
}
|
|
1268
|
-
currentPreNeg = ownedPreNeg;
|
|
1400
|
+
fold.currentPreNeg = null;
|
|
1401
|
+
}
|
|
1402
|
+
return null;
|
|
1403
|
+
}
|
|
1404
|
+
function foldChainOp(fold, trace, ops, i, ctx, sahenShortNegationSplit) {
|
|
1405
|
+
const op = ops[i];
|
|
1406
|
+
const isLast = i === ops.length - 1;
|
|
1407
|
+
const ownedPreNeg = ctx.negBeforeChainIdx?.get(i) ?? null;
|
|
1408
|
+
if (ownedPreNeg !== null && !fold.preNegLoweredOnHostBase.has(ownedPreNeg)) {
|
|
1409
|
+
if (fold.currentPreNeg !== null) {
|
|
1410
|
+
return { ok: false, reason: "multiple pre-reference NegationOps in same chain slot not supported" };
|
|
1269
1411
|
}
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1412
|
+
fold.currentPreNeg = ownedPreNeg;
|
|
1413
|
+
}
|
|
1414
|
+
const negAfterCurrentOp = ctx.negAfterChainIdx.get(i) ?? null;
|
|
1415
|
+
const desiredPredicateNegation = fold.pendingDesiredPredicateNegation;
|
|
1416
|
+
fold.pendingDesiredPredicateNegation = null;
|
|
1417
|
+
const previousOp = i > 0 ? ops[i - 1] : undefined;
|
|
1418
|
+
const opCtx = {
|
|
1419
|
+
lookups: ctx.lookups,
|
|
1420
|
+
chainIndex: i,
|
|
1421
|
+
hasPriorChainOp: i > 0,
|
|
1422
|
+
sourceStemIsVerb: fold.currentSourceProjectionIsVerbalPredicate,
|
|
1423
|
+
sourceStemIsVolitional: i === 0 && ctx.sourceStemIsVolitional === true,
|
|
1424
|
+
sourceHostHasTeIruAspect: previousOp?.kind === "aspect" && previousOp.aspect === "te_iru",
|
|
1425
|
+
...(ctx.sourceStemIsSahenPredicate === undefined
|
|
1426
|
+
? {}
|
|
1427
|
+
: { sourceStemIsSahenPredicate: ctx.sourceStemIsSahenPredicate }),
|
|
1428
|
+
...(ctx.adverbialStemLemma === undefined ? {} : { adverbialStemLemma: ctx.adverbialStemLemma }),
|
|
1429
|
+
preModalNeg: fold.currentPreNeg,
|
|
1430
|
+
past: fold.currentPast,
|
|
1431
|
+
pastProjection: fold.currentPastProjection,
|
|
1432
|
+
formal: ctx.formal,
|
|
1433
|
+
hasFollowingOp: !isLast,
|
|
1434
|
+
nextOp: ops[i + 1],
|
|
1435
|
+
shortNegationPolicy: i === 0 ? ctx.shortNegationPolicy : undefined,
|
|
1436
|
+
sahenShortNegationSplit,
|
|
1437
|
+
...(ctx.preferShortLikenessNegation === undefined
|
|
1438
|
+
? {}
|
|
1439
|
+
: { preferShortLikenessNegation: ctx.preferShortLikenessNegation }),
|
|
1440
|
+
passiveStemOptions: i === 0 ? ctx.passiveStemOptions : {},
|
|
1441
|
+
forbidShortNegation: i > 0 && fold.currentPreNeg !== null,
|
|
1442
|
+
desiredPredicateNegation
|
|
1443
|
+
};
|
|
1444
|
+
const baseRes = opToBase(op, fold.currentBase, opCtx);
|
|
1445
|
+
if (!baseRes.ok)
|
|
1446
|
+
return baseRes;
|
|
1447
|
+
fold.currentSourceProjectionIsVerbalPredicate = sourceVerbalPredicateAfterAuxOp(fold.currentSourceProjectionIsVerbalPredicate, op);
|
|
1448
|
+
const sourceTrace = sourceTraceWithFinalNegationStem(baseRes, negAfterCurrentOp);
|
|
1449
|
+
appendChainOpSourceTrace(fold, trace, op, i, ctx, baseRes, sourceTrace);
|
|
1450
|
+
if (isLast) {
|
|
1451
|
+
fold.finalBase = baseRes.base;
|
|
1452
|
+
fold.lastChainOnFinalSupported = baseRes.chainOnFinalSupported ?? true;
|
|
1453
|
+
fold.lastFinalNegationOptions = baseRes.finalNegationOptions;
|
|
1454
|
+
fold.lastFinalNegationLoweringPolicy = baseRes.finalNegationLoweringPolicy;
|
|
1455
|
+
fold.lastTerminalPrefixContraction = baseRes.terminalPrefixContraction;
|
|
1456
|
+
fold.lastTerminalRealization = baseRes.terminalRealization;
|
|
1457
|
+
fold.lastConnectivePrefixContraction = baseRes.connectivePrefixContraction ?? fold.pendingConnectivePrefixContraction;
|
|
1458
|
+
fold.lastConnectiveBaseOverride = baseRes.connectiveBaseOverride;
|
|
1459
|
+
fold.lastInterOpPastProjection = finalAttributivePastProjectionForChainOp(op, baseRes, ctx.pastAfterChainIdx.has(i) || opCarriesIntrinsicPast(op));
|
|
1460
|
+
fold.lastProjectsAsStativePerfect = baseRes.interOpProjectionPolicy === "stative_perfect";
|
|
1461
|
+
}
|
|
1462
|
+
else {
|
|
1463
|
+
const carryFailure = carryChainBaseToNextOp(fold, trace, ops, op, i, ctx, baseRes);
|
|
1464
|
+
if (carryFailure !== null) {
|
|
1465
|
+
return carryFailure;
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
return null;
|
|
1469
|
+
}
|
|
1470
|
+
function appendChainOpSourceTrace(fold, trace, op, i, ctx, baseRes, sourceTrace) {
|
|
1471
|
+
if (sourceTrace !== undefined) {
|
|
1472
|
+
const inputProjectionTargetPrefix = `${fold.currentBase.prefix}${sourceTrace.inputProjectionText}`;
|
|
1473
|
+
const inputProjectionSourceTokens = i === 0
|
|
1474
|
+
? [
|
|
1475
|
+
...trace.activeFinalSourceTokens,
|
|
1476
|
+
...(fold.currentPreNeg?.source.tokens ?? []),
|
|
1477
|
+
...(ctx.stemPastSourceTokens ?? []),
|
|
1478
|
+
...(sourceTrace.inputProjectionExtraSourceTokens ?? [])
|
|
1479
|
+
]
|
|
1480
|
+
: [
|
|
1481
|
+
...trace.activeFinalSourceTokens,
|
|
1482
|
+
...(fold.currentPreNeg?.source.tokens ?? []),
|
|
1483
|
+
...(sourceTrace.inputProjectionExtraSourceTokens ?? [])
|
|
1484
|
+
];
|
|
1485
|
+
const inputProjectionSegments = i === 0
|
|
1486
|
+
? splitInitialLongNegationInputProjection(sourceTrace.inputProjectionText, fold.currentBase, trace.activeFinalSourceTokens, fold.currentPreNeg, ctx.stemPastSourceTokens, trace.activeFinalKind)
|
|
1487
|
+
: null;
|
|
1488
|
+
const inputProjectionSegmentText = inputProjectionSegments
|
|
1489
|
+
?.map((segment) => segment.text)
|
|
1490
|
+
.join("");
|
|
1491
|
+
if (inputProjectionSegments !== null &&
|
|
1492
|
+
inputProjectionTargetPrefix.startsWith(trace.tracedPrefixText) &&
|
|
1493
|
+
inputProjectionTargetPrefix.slice(trace.tracedPrefixText.length) === inputProjectionSegmentText) {
|
|
1494
|
+
for (const segment of inputProjectionSegments) {
|
|
1495
|
+
appendChainTraceSegment(trace, segment);
|
|
1337
1496
|
}
|
|
1338
|
-
appendTracePrefix(baseRes.base.prefix, sourceTrace.finalSourceTokens, sourceTrace.finalKind ?? "modal");
|
|
1339
|
-
activeFinalSourceTokens = sourceTrace.finalSourceTokens;
|
|
1340
|
-
activeFinalKind = sourceTrace.finalKind ?? "modal";
|
|
1341
1497
|
}
|
|
1342
1498
|
else {
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1499
|
+
appendChainTracePrefix(trace, inputProjectionTargetPrefix, inputProjectionSourceTokens, trace.activeFinalKind);
|
|
1500
|
+
}
|
|
1501
|
+
for (const segment of sourceTrace.carrierPrefixSegments) {
|
|
1502
|
+
appendChainTraceSegment(trace, segment);
|
|
1347
1503
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1504
|
+
appendChainTracePrefix(trace, baseRes.base.prefix, sourceTrace.finalSourceTokens, sourceTrace.finalKind ?? "modal");
|
|
1505
|
+
trace.activeFinalSourceTokens = sourceTrace.finalSourceTokens;
|
|
1506
|
+
trace.activeFinalKind = sourceTrace.finalKind ?? "modal";
|
|
1507
|
+
}
|
|
1508
|
+
else {
|
|
1509
|
+
const genericSourceTokens = [...trace.activeFinalSourceTokens, ...op.source.tokens];
|
|
1510
|
+
appendChainTracePrefix(trace, baseRes.base.prefix, genericSourceTokens, op.kind === "aspect" ? "aux" : "modal");
|
|
1511
|
+
trace.activeFinalSourceTokens = genericSourceTokens;
|
|
1512
|
+
trace.activeFinalKind = op.kind === "aspect" ? "aux" : "modal";
|
|
1513
|
+
}
|
|
1514
|
+
}
|
|
1515
|
+
function carryChainBaseToNextOp(fold, trace, ops, op, i, ctx, baseRes) {
|
|
1516
|
+
const admittedPreNegOfNextOp = baseRes.finalNegationLoweringPolicy !== undefined &&
|
|
1517
|
+
!operatorChainOpConsumesPrecedingNegation(ops[i + 1])
|
|
1518
|
+
? ctx.negBeforeChainIdx?.get(i + 1) ?? null
|
|
1519
|
+
: null;
|
|
1520
|
+
const negCarry = ctx.negAfterChainIdx.get(i) ?? admittedPreNegOfNextOp;
|
|
1521
|
+
if (admittedPreNegOfNextOp !== null && negCarry === admittedPreNegOfNextOp) {
|
|
1522
|
+
fold.preNegLoweredOnHostBase.add(admittedPreNegOfNextOp);
|
|
1523
|
+
}
|
|
1524
|
+
fold.pendingConnectivePrefixContraction =
|
|
1525
|
+
baseRes.connectivePrefixContraction ?? fold.pendingConnectivePrefixContraction;
|
|
1526
|
+
if (negCarry !== null) {
|
|
1527
|
+
if (negationFeedsNaideHoshii(negCarry, ops[i + 1])) {
|
|
1528
|
+
if (negCarry.chainDepth !== 1 || negCarry.chainPast) {
|
|
1529
|
+
return { ok: false, reason: "desired predicate negation before te_hoshii supports only single non-past negative" };
|
|
1530
|
+
}
|
|
1531
|
+
const interOpBase = copulaCarrierBaseForInterOp(baseRes.base, ctx.formal);
|
|
1532
|
+
if (interOpBase === null) {
|
|
1533
|
+
return { ok: false, reason: "desired predicate negation base projection 영역 외" };
|
|
1534
|
+
}
|
|
1535
|
+
fold.currentBase = applyNonLastPrefixContractions(interOpBase, baseRes, ctx.formal);
|
|
1536
|
+
appendChainTracePrefix(trace, fold.currentBase.prefix, trace.activeFinalSourceTokens, trace.activeFinalKind);
|
|
1537
|
+
fold.pendingDesiredPredicateNegation = negCarry;
|
|
1359
1538
|
}
|
|
1360
1539
|
else {
|
|
1361
|
-
const
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
pendingConnectivePrefixContraction =
|
|
1370
|
-
baseRes.connectivePrefixContraction ?? pendingConnectivePrefixContraction;
|
|
1371
|
-
if (negCarry !== null) {
|
|
1372
|
-
if (negationFeedsNaideHoshii(negCarry, ops[i + 1])) {
|
|
1373
|
-
if (negCarry.chainDepth !== 1 || negCarry.chainPast) {
|
|
1374
|
-
return { ok: false, reason: "desired predicate negation before te_hoshii supports only single non-past negative" };
|
|
1375
|
-
}
|
|
1376
|
-
const interOpBase = copulaCarrierBaseForInterOp(baseRes.base, ctx.formal);
|
|
1377
|
-
if (interOpBase === null) {
|
|
1378
|
-
return { ok: false, reason: "desired predicate negation base projection 영역 외" };
|
|
1379
|
-
}
|
|
1380
|
-
currentBase = applyNonLastPrefixContractions(interOpBase, baseRes, ctx.formal);
|
|
1381
|
-
appendTracePrefix(currentBase.prefix, activeFinalSourceTokens, activeFinalKind);
|
|
1382
|
-
pendingDesiredPredicateNegation = negCarry;
|
|
1383
|
-
}
|
|
1384
|
-
else {
|
|
1385
|
-
const lowered = lowerFinalNegationForCommittedBase(baseRes, negCarry, ctx.formal, ctx.lookups);
|
|
1386
|
-
if (lowered === null) {
|
|
1387
|
-
return { ok: false, reason: "chain mid final negation lowering 영역 외" };
|
|
1388
|
-
}
|
|
1389
|
-
currentBase = applyNonLastPrefixContractions(lowered, baseRes, ctx.formal);
|
|
1390
|
-
activeFinalSourceTokens = [...activeFinalSourceTokens, ...negCarry.source.tokens];
|
|
1391
|
-
activeFinalKind = "aux";
|
|
1392
|
-
appendTracePrefix(currentBase.prefix, activeFinalSourceTokens, activeFinalKind);
|
|
1393
|
-
}
|
|
1394
|
-
currentPreNeg = null;
|
|
1395
|
-
}
|
|
1396
|
-
else {
|
|
1397
|
-
const interOpBase = copulaCarrierBaseForInterOp(baseRes.base, ctx.formal);
|
|
1398
|
-
if (interOpBase === null) {
|
|
1399
|
-
return { ok: false, reason: "chain 중간 predicate base projection 영역 외" };
|
|
1400
|
-
}
|
|
1401
|
-
currentBase = applyNonLastPrefixContractions(interOpBase, baseRes, ctx.formal);
|
|
1402
|
-
appendTracePrefix(currentBase.prefix, activeFinalSourceTokens, activeFinalKind);
|
|
1403
|
-
currentPreNeg = null;
|
|
1404
|
-
}
|
|
1405
|
-
const projectsAsStativePerfect = baseRes.interOpProjectionPolicy === "stative_perfect";
|
|
1406
|
-
const intrinsicPast = opCarriesIntrinsicPast(op);
|
|
1407
|
-
const postOpTense = ctx.pastAfterChainIdx.get(i) ?? null;
|
|
1408
|
-
const loweredForcesPast = negCarry === null
|
|
1409
|
-
? false
|
|
1410
|
-
: finalNegationLoweringForcesPast(baseRes, negCarry.chainDepth);
|
|
1411
|
-
currentPast = postOpTense !== null ||
|
|
1412
|
-
(negCarry?.chainPast ?? false) ||
|
|
1413
|
-
loweredForcesPast ||
|
|
1414
|
-
intrinsicPast ||
|
|
1415
|
-
projectsAsStativePerfect;
|
|
1416
|
-
if (postOpTense !== null) {
|
|
1417
|
-
activeFinalSourceTokens = [
|
|
1418
|
-
...activeFinalSourceTokens,
|
|
1419
|
-
...postOpTense.source.tokens
|
|
1420
|
-
];
|
|
1421
|
-
}
|
|
1422
|
-
currentPastProjection = currentPast
|
|
1423
|
-
? (ops[i + 1]?.kind === "conjecture" ? "committed" : (baseRes.interOpPastProjection ?? "lexical"))
|
|
1424
|
-
: "lexical";
|
|
1540
|
+
const lowered = lowerFinalNegationForCommittedBase(baseRes, negCarry, ctx.formal, ctx.lookups);
|
|
1541
|
+
if (lowered === null) {
|
|
1542
|
+
return { ok: false, reason: "chain mid final negation lowering 영역 외" };
|
|
1543
|
+
}
|
|
1544
|
+
fold.currentBase = applyNonLastPrefixContractions(lowered, baseRes, ctx.formal);
|
|
1545
|
+
trace.activeFinalSourceTokens = [...trace.activeFinalSourceTokens, ...negCarry.source.tokens];
|
|
1546
|
+
trace.activeFinalKind = "aux";
|
|
1547
|
+
appendChainTracePrefix(trace, fold.currentBase.prefix, trace.activeFinalSourceTokens, trace.activeFinalKind);
|
|
1425
1548
|
}
|
|
1549
|
+
fold.currentPreNeg = null;
|
|
1426
1550
|
}
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
const finalNeg = ctx.negAfterChainIdx.get(ops.length - 1) ?? null;
|
|
1432
|
-
const finalTraceSourceTokens = [
|
|
1433
|
-
...activeFinalSourceTokens,
|
|
1434
|
-
...(finalPastOp?.source.tokens ?? []),
|
|
1435
|
-
...(finalNeg?.source.tokens ?? [])
|
|
1436
|
-
];
|
|
1437
|
-
const result = {
|
|
1438
|
-
ok: true,
|
|
1439
|
-
base: finalBase,
|
|
1440
|
-
finalPast,
|
|
1441
|
-
finalNeg,
|
|
1442
|
-
chainOnFinalSupported: lastChainOnFinalSupported,
|
|
1443
|
-
chainSourceTrace: {
|
|
1444
|
-
prefixSegments: tracePrefixSegments,
|
|
1445
|
-
finalSourceTokens: finalTraceSourceTokens,
|
|
1446
|
-
finalKind: activeFinalKind
|
|
1551
|
+
else {
|
|
1552
|
+
const interOpBase = copulaCarrierBaseForInterOp(baseRes.base, ctx.formal);
|
|
1553
|
+
if (interOpBase === null) {
|
|
1554
|
+
return { ok: false, reason: "chain 중간 predicate base projection 영역 외" };
|
|
1447
1555
|
}
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1556
|
+
fold.currentBase = applyNonLastPrefixContractions(interOpBase, baseRes, ctx.formal);
|
|
1557
|
+
appendChainTracePrefix(trace, fold.currentBase.prefix, trace.activeFinalSourceTokens, trace.activeFinalKind);
|
|
1558
|
+
fold.currentPreNeg = null;
|
|
1559
|
+
}
|
|
1560
|
+
const projectsAsStativePerfect = baseRes.interOpProjectionPolicy === "stative_perfect";
|
|
1561
|
+
const intrinsicPast = opCarriesIntrinsicPast(op);
|
|
1562
|
+
const postOpTense = ctx.pastAfterChainIdx.get(i) ?? null;
|
|
1563
|
+
const loweredForcesPast = negCarry === null
|
|
1564
|
+
? false
|
|
1565
|
+
: finalNegationLoweringForcesPast(baseRes, negCarry.chainDepth);
|
|
1566
|
+
fold.currentPast = postOpTense !== null ||
|
|
1567
|
+
(negCarry?.chainPast ?? false) ||
|
|
1568
|
+
loweredForcesPast ||
|
|
1569
|
+
intrinsicPast ||
|
|
1570
|
+
projectsAsStativePerfect;
|
|
1571
|
+
if (postOpTense !== null) {
|
|
1572
|
+
trace.activeFinalSourceTokens = [
|
|
1573
|
+
...trace.activeFinalSourceTokens,
|
|
1574
|
+
...postOpTense.source.tokens
|
|
1575
|
+
];
|
|
1576
|
+
}
|
|
1577
|
+
fold.currentPastProjection = fold.currentPast
|
|
1578
|
+
? (ops[i + 1]?.kind === "conjecture" ? "committed" : (baseRes.interOpPastProjection ?? "lexical"))
|
|
1579
|
+
: "lexical";
|
|
1580
|
+
return null;
|
|
1459
1581
|
}
|
|
1460
1582
|
function absorbedPassivePolicy(ctx, stemLemma) {
|
|
1461
1583
|
const passiveClass = ctx.absorbedPassiveClass ?? absorbedPassiveClassFromMaterializedLemma(stemLemma);
|