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
|
@@ -0,0 +1,1243 @@
|
|
|
1
|
+
import { shortNegationPrefix } from "../../../../../generator/aux-map.js";
|
|
2
|
+
import { conjugate } from "../../../../../generator/conjugator.js";
|
|
3
|
+
import { hasBatchim } from "../../../../../generator/hangul.js";
|
|
4
|
+
import { hasAllomorphBatchim, selectParticle } from "../../../../../generator/particles.js";
|
|
5
|
+
import { POS4, POS5A, 助動詞_ジャ, 助動詞_ダ, 助動詞_マス, 意志推量形_ } from "../../../../../types/pos.js";
|
|
6
|
+
import { copulaDeMarkerRelationForToken, kaMarkerRelationForToken } from "../../../boundary/marker.js";
|
|
7
|
+
import { assertNever } from "../grammar.js";
|
|
8
|
+
import { isAffirmativeCopulaSupportVerbToken, isCopulaJaNegativeBridgeToken } from "../classifiers/tokens.js";
|
|
9
|
+
import { likenessAttributiveLexicalizationBase, applyNegationChainToLemmaBase, hostProjectionSourceTrace, isTopicOrJaFusionSurfaceToken, nounCopulaFinalAllomorphHost, predicateBasePolicyAllomorphHost } from "./base-model.js";
|
|
10
|
+
import { isBenefactiveNegativeCarrierPolicy, NODA_CARRIER_BOUND_NOUN, NODA_CARRIER_BOUND_NOUN_CASUAL, nodaCarrierNoun, quotePlainDeclarativeTraceParts, scopeCarrierCopulaBase, simpleStemBase } from "./base-support.js";
|
|
11
|
+
import { copularQuoteOption } from "./quote-complement-compose.js";
|
|
12
|
+
import { composeBaseWithTerminalChain } from "./predicate-terminal-compose.js";
|
|
13
|
+
import { projectBaseAttributive, quotedPropositionAttributiveIsReused, projectBaseFutureAttributive } from "./predicate-base-projection.js";
|
|
14
|
+
import { pastNegStemAttributive } from "./final-forms.js";
|
|
15
|
+
const KAMO_FINAL_NEGATION_OPTIONS = {
|
|
16
|
+
firstNegationFinalIsVerb: false
|
|
17
|
+
};
|
|
18
|
+
function shouldFlattenNodaConnectiveToHost(policy, lemma) {
|
|
19
|
+
if (policy?.kind === "desire") {
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
if (policy?.kind === "likeness" && policy.nodaConnectiveFlatten !== undefined) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
return isBenefactiveNegativeCarrierPolicy(policy, lemma);
|
|
26
|
+
}
|
|
27
|
+
function hazuNegativeScopeNoun(modal) {
|
|
28
|
+
return modal.source.tokens.some(isTopicOrJaFusionSurfaceToken)
|
|
29
|
+
? "리는"
|
|
30
|
+
: "리";
|
|
31
|
+
}
|
|
32
|
+
function modalSourceTrace(modal, inputProjectionText, carrierPrefix, options = {}) {
|
|
33
|
+
const carrierSourceTokens = options.carrierSourceTokens ?? modal.source.tokens;
|
|
34
|
+
const carrierPrefixSegments = [];
|
|
35
|
+
if (carrierPrefix.length > 0) {
|
|
36
|
+
carrierPrefixSegments.push({
|
|
37
|
+
text: carrierPrefix,
|
|
38
|
+
sourceTokens: carrierSourceTokens,
|
|
39
|
+
kind: "modal",
|
|
40
|
+
projectionConfidence: "semantic",
|
|
41
|
+
suppressBoundaryAfter: options.suppressCarrierBoundaryAfter ?? true
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
inputProjectionText,
|
|
46
|
+
carrierPrefixSegments,
|
|
47
|
+
finalSourceTokens: options.finalSourceTokens ?? modal.source.tokens,
|
|
48
|
+
finalKind: options.finalKind ?? "modal"
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function carrierCopulaSourceTrace(modal, inputProjectionText, carrierPrefix) {
|
|
52
|
+
const split = splitCarrierCopulaModalSource(modal.source.tokens);
|
|
53
|
+
return modalSourceTrace(modal, inputProjectionText, carrierPrefix, {
|
|
54
|
+
carrierSourceTokens: split.carrierSourceTokens,
|
|
55
|
+
finalSourceTokens: split.finalSourceTokens,
|
|
56
|
+
suppressCarrierBoundaryAfter: !split.hasInternalBoundary
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
function scopeNounCopulaNegativeSourceTrace(modal, inputProjectionText, nounPrefix, copulaBridgePrefix) {
|
|
60
|
+
const split = splitCarrierCopulaModalSource(modal.source.tokens);
|
|
61
|
+
const carrierPrefixSegments = [];
|
|
62
|
+
if (nounPrefix.length > 0) {
|
|
63
|
+
carrierPrefixSegments.push({
|
|
64
|
+
text: nounPrefix,
|
|
65
|
+
sourceTokens: split.carrierSourceTokens,
|
|
66
|
+
kind: "modal",
|
|
67
|
+
projectionConfidence: "semantic",
|
|
68
|
+
suppressBoundaryAfter: !split.hasInternalBoundary
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (copulaBridgePrefix.length > 0) {
|
|
72
|
+
carrierPrefixSegments.push({
|
|
73
|
+
text: copulaBridgePrefix,
|
|
74
|
+
sourceTokens: split.finalSourceTokens,
|
|
75
|
+
kind: "aux",
|
|
76
|
+
projectionConfidence: "semantic"
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
return {
|
|
80
|
+
inputProjectionText,
|
|
81
|
+
carrierPrefixSegments,
|
|
82
|
+
finalSourceTokens: split.finalSourceTokens,
|
|
83
|
+
finalKind: "modal"
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
export function splitCarrierCopulaModalSource(tokens) {
|
|
87
|
+
const copulaIndex = tokens.findIndex((token, index) => index > 0 && isCopulaCarrierTailToken(token));
|
|
88
|
+
if (copulaIndex <= 0) {
|
|
89
|
+
return {
|
|
90
|
+
carrierSourceTokens: tokens,
|
|
91
|
+
finalSourceTokens: tokens,
|
|
92
|
+
hasInternalBoundary: false
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
carrierSourceTokens: tokens.slice(0, copulaIndex),
|
|
97
|
+
finalSourceTokens: tokens.slice(copulaIndex),
|
|
98
|
+
hasInternalBoundary: true
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
function isCopulaCarrierTailToken(token) {
|
|
102
|
+
const form = token.dictionaryForm || token.normalizedForm || token.surface;
|
|
103
|
+
return form === "だ" || form === "です" || isCopulaJaNegativeBridgeToken(token);
|
|
104
|
+
}
|
|
105
|
+
export function copulaCarrierConjectureBase(inputBase, conjecture, past = false) {
|
|
106
|
+
if (inputBase.final.lemma !== "이다" ||
|
|
107
|
+
inputBase.final.irregular !== null) {
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
if (inputBase.prefix.length === 0) {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
const batchim = hasAllomorphBatchim(predicateBasePolicyAllomorphHost(inputBase));
|
|
114
|
+
const stem = past
|
|
115
|
+
? `${inputBase.prefix}${batchim ? "이었겠" : "였겠"}`
|
|
116
|
+
: `${inputBase.prefix}${batchim ? "이겠" : "겠"}`;
|
|
117
|
+
return {
|
|
118
|
+
ok: true,
|
|
119
|
+
base: {
|
|
120
|
+
prefix: "",
|
|
121
|
+
final: {
|
|
122
|
+
kind: "lemma",
|
|
123
|
+
lemma: `${stem}다`,
|
|
124
|
+
irregular: null,
|
|
125
|
+
isVerb: false,
|
|
126
|
+
idiom: { kind: "conjecture", conjecturePolite: conjecture.polite }
|
|
127
|
+
},
|
|
128
|
+
...(inputBase.policy === undefined
|
|
129
|
+
? {}
|
|
130
|
+
: inputBase.policy.kind === "noun_copula_interop" || inputBase.policy.kind === "negative_noun_copula_interop"
|
|
131
|
+
? { policy: { ...inputBase.policy, conjectureHostPast: past } }
|
|
132
|
+
: { policy: inputBase.policy })
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
function nodaCarrierBoundNounHost(base) {
|
|
137
|
+
const policy = base.policy;
|
|
138
|
+
if (policy?.kind !== "scope_carrier" ||
|
|
139
|
+
policy.carrier !== "noda" ||
|
|
140
|
+
(policy.nounSurface !== NODA_CARRIER_BOUND_NOUN && policy.nounSurface !== NODA_CARRIER_BOUND_NOUN_CASUAL) ||
|
|
141
|
+
base.final.lemma !== "이다" ||
|
|
142
|
+
base.final.irregular !== null ||
|
|
143
|
+
policy.hostPrefix === undefined) {
|
|
144
|
+
return null;
|
|
145
|
+
}
|
|
146
|
+
return { policy, hostPrefix: policy.hostPrefix };
|
|
147
|
+
}
|
|
148
|
+
export function nodaCarrierConjectureBase(inputBase, conjecture) {
|
|
149
|
+
const host = nodaCarrierBoundNounHost(inputBase);
|
|
150
|
+
if (host === null) {
|
|
151
|
+
return null;
|
|
152
|
+
}
|
|
153
|
+
const nominal = `${host.hostPrefix}${NODA_CARRIER_BOUND_NOUN}`;
|
|
154
|
+
return {
|
|
155
|
+
ok: true,
|
|
156
|
+
base: {
|
|
157
|
+
prefix: "",
|
|
158
|
+
final: {
|
|
159
|
+
kind: "lemma",
|
|
160
|
+
lemma: `${nominal}이겠다`,
|
|
161
|
+
irregular: null,
|
|
162
|
+
isVerb: false,
|
|
163
|
+
idiom: {
|
|
164
|
+
kind: "conjecture",
|
|
165
|
+
conjecturePolite: conjecture.polite,
|
|
166
|
+
projection: "nominalized"
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
policy: host.policy
|
|
170
|
+
},
|
|
171
|
+
chainOnFinalSupported: false
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
export function nodaCarrierLikenessBase(inputBase) {
|
|
175
|
+
const host = nodaCarrierBoundNounHost(inputBase);
|
|
176
|
+
if (host === null) {
|
|
177
|
+
return null;
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
ok: true,
|
|
181
|
+
base: {
|
|
182
|
+
prefix: `${host.hostPrefix}${NODA_CARRIER_BOUND_NOUN} `,
|
|
183
|
+
final: { kind: "lemma", lemma: "같다", irregular: null, isVerb: false },
|
|
184
|
+
policy: { kind: "likeness" }
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
export function quotedPropositionLikenessBase(inputBase, modal, formal, pastProjection) {
|
|
189
|
+
if (inputBase.policy?.kind !== "quoted_proposition" ||
|
|
190
|
+
inputBase.policy.attributiveQuote?.realizesInterrogativeMood !== true ||
|
|
191
|
+
!quotedPropositionAttributiveIsReused(inputBase, false, "present")) {
|
|
192
|
+
return null;
|
|
193
|
+
}
|
|
194
|
+
const hostAttr = projectBaseAttributive(inputBase, false, formal, pastProjection, "default", "present");
|
|
195
|
+
if (hostAttr === null) {
|
|
196
|
+
return null;
|
|
197
|
+
}
|
|
198
|
+
const attributiveLexicalization = modal.modal === "youda"
|
|
199
|
+
? likenessAttributiveLexicalizationBase(modal, hostAttr)
|
|
200
|
+
: undefined;
|
|
201
|
+
return {
|
|
202
|
+
ok: true,
|
|
203
|
+
base: {
|
|
204
|
+
prefix: `${hostAttr} 것 `,
|
|
205
|
+
final: { kind: "lemma", lemma: "같다", irregular: null, isVerb: false },
|
|
206
|
+
policy: {
|
|
207
|
+
kind: "likeness",
|
|
208
|
+
...(attributiveLexicalization === undefined ? {} : { attributiveLexicalization })
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
export function wakeCarrierConjectureBase(inputBase, conjecture) {
|
|
214
|
+
if (inputBase.policy?.kind !== "scope_carrier" ||
|
|
215
|
+
inputBase.policy.carrier !== "wake" ||
|
|
216
|
+
inputBase.final.kind !== "boundNounCopula") {
|
|
217
|
+
return null;
|
|
218
|
+
}
|
|
219
|
+
const noun = inputBase.final.nounSurface;
|
|
220
|
+
const stem = hasBatchim(noun) ? `${noun}이겠` : `${noun}겠`;
|
|
221
|
+
return {
|
|
222
|
+
ok: true,
|
|
223
|
+
base: {
|
|
224
|
+
prefix: inputBase.prefix,
|
|
225
|
+
final: {
|
|
226
|
+
kind: "lemma",
|
|
227
|
+
lemma: `${stem}다`,
|
|
228
|
+
irregular: null,
|
|
229
|
+
isVerb: false,
|
|
230
|
+
idiom: { kind: "conjecture", conjecturePolite: conjecture.polite }
|
|
231
|
+
},
|
|
232
|
+
policy: inputBase.policy
|
|
233
|
+
},
|
|
234
|
+
chainOnFinalSupported: false
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
export function nodaCarrierAbsorbedByHostBoundNoun(inputBase, modal) {
|
|
238
|
+
const policy = inputBase.policy;
|
|
239
|
+
if (policy?.kind !== "noun_copula_interop" ||
|
|
240
|
+
policy.nounSurface !== NODA_CARRIER_BOUND_NOUN ||
|
|
241
|
+
inputBase.final.lemma !== "이다" ||
|
|
242
|
+
inputBase.final.irregular !== null) {
|
|
243
|
+
return null;
|
|
244
|
+
}
|
|
245
|
+
const hostPrefix = policy.hostPrefix;
|
|
246
|
+
if (nodaCarrierHasSupportConjecture(modal)) {
|
|
247
|
+
return {
|
|
248
|
+
ok: true,
|
|
249
|
+
base: {
|
|
250
|
+
prefix: "",
|
|
251
|
+
final: {
|
|
252
|
+
kind: "lemma",
|
|
253
|
+
lemma: `${inputBase.prefix}이겠다`,
|
|
254
|
+
irregular: null,
|
|
255
|
+
isVerb: false,
|
|
256
|
+
idiom: {
|
|
257
|
+
kind: "conjecture",
|
|
258
|
+
conjecturePolite: modal.polite,
|
|
259
|
+
projection: "nominalized"
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
policy: {
|
|
263
|
+
kind: "scope_carrier",
|
|
264
|
+
carrier: "noda",
|
|
265
|
+
nounSurface: policy.nounSurface,
|
|
266
|
+
hostPrefix,
|
|
267
|
+
style: "emphasis"
|
|
268
|
+
}
|
|
269
|
+
},
|
|
270
|
+
chainOnFinalSupported: false
|
|
271
|
+
};
|
|
272
|
+
}
|
|
273
|
+
const carrierStyle = nodaCarrierStyle(modal);
|
|
274
|
+
return {
|
|
275
|
+
ok: true,
|
|
276
|
+
base: scopeCarrierCopulaBase("noda", policy.nounSurface, hostPrefix, carrierStyle === undefined
|
|
277
|
+
? {}
|
|
278
|
+
: { style: carrierStyle, connectiveSourcePoliteness: "preserve_when_supported" })
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
export function nodaCarrierKamoBase(inputBase, formal, hostPast, bare) {
|
|
282
|
+
const host = nodaCarrierBoundNounHost(inputBase);
|
|
283
|
+
if (host === null) {
|
|
284
|
+
return null;
|
|
285
|
+
}
|
|
286
|
+
const hostPrefix = host.hostPrefix;
|
|
287
|
+
const emphasis = host.policy.style === "emphasis";
|
|
288
|
+
const contracted = !emphasis && !formal && host.policy.nounSurface === NODA_CARRIER_BOUND_NOUN_CASUAL;
|
|
289
|
+
let nominal;
|
|
290
|
+
if (hostPast) {
|
|
291
|
+
nominal = contracted
|
|
292
|
+
? `${hostPrefix}거였을`
|
|
293
|
+
: `${hostPrefix}것이었을`;
|
|
294
|
+
}
|
|
295
|
+
else if (contracted) {
|
|
296
|
+
nominal = `${hostPrefix}걸`;
|
|
297
|
+
}
|
|
298
|
+
else {
|
|
299
|
+
nominal = `${hostPrefix}것일`;
|
|
300
|
+
}
|
|
301
|
+
return {
|
|
302
|
+
ok: true,
|
|
303
|
+
...(bare ? { terminalRealization: { kind: "elided_carrier" } } : {}),
|
|
304
|
+
base: {
|
|
305
|
+
prefix: `${nominal}지도 `,
|
|
306
|
+
final: { kind: "lemma", lemma: "모르다", irregular: "르", isVerb: true }
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
function scopeCarrierSupportsExternalChain(base) {
|
|
311
|
+
return base.policy?.kind === "scope_carrier" &&
|
|
312
|
+
(base.final.kind === "nounCopula" || base.final.kind === "boundNounCopula");
|
|
313
|
+
}
|
|
314
|
+
export function modalFinalChainPolicy(base) {
|
|
315
|
+
if (scopeCarrierSupportsExternalChain(base)) {
|
|
316
|
+
return { chainOnFinalSupported: true };
|
|
317
|
+
}
|
|
318
|
+
if (base.policy?.kind === "reporting" &&
|
|
319
|
+
base.final.kind === "lemma" &&
|
|
320
|
+
base.final.lemma === "하다") {
|
|
321
|
+
return { chainOnFinalSupported: true };
|
|
322
|
+
}
|
|
323
|
+
if (base.final.kind !== "lemma") {
|
|
324
|
+
return { chainOnFinalSupported: false };
|
|
325
|
+
}
|
|
326
|
+
switch (base.final.lemma) {
|
|
327
|
+
case "모르다":
|
|
328
|
+
return {
|
|
329
|
+
chainOnFinalSupported: true,
|
|
330
|
+
finalNegationOptions: KAMO_FINAL_NEGATION_OPTIONS
|
|
331
|
+
};
|
|
332
|
+
case "없다":
|
|
333
|
+
case "아니다":
|
|
334
|
+
case "같다":
|
|
335
|
+
case "보이다":
|
|
336
|
+
return { chainOnFinalSupported: true };
|
|
337
|
+
default:
|
|
338
|
+
return { chainOnFinalSupported: false };
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
function soudaHearsaySourceTrace(modal, inputProjectionText, carrierPrefix) {
|
|
342
|
+
const split = splitCarrierCopulaModalSource(modal.source.tokens);
|
|
343
|
+
return {
|
|
344
|
+
inputProjectionText,
|
|
345
|
+
carrierPrefixSegments: [
|
|
346
|
+
{
|
|
347
|
+
text: carrierPrefix,
|
|
348
|
+
sourceTokens: split.carrierSourceTokens,
|
|
349
|
+
kind: "modal",
|
|
350
|
+
projectionConfidence: "semantic",
|
|
351
|
+
suppressBoundaryAfter: !split.hasInternalBoundary
|
|
352
|
+
},
|
|
353
|
+
{
|
|
354
|
+
text: " ",
|
|
355
|
+
sourceTokens: [],
|
|
356
|
+
kind: "punctuation",
|
|
357
|
+
projectionConfidence: "semantic"
|
|
358
|
+
}
|
|
359
|
+
],
|
|
360
|
+
finalSourceTokens: split.finalSourceTokens,
|
|
361
|
+
finalKind: "modal"
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
export function soudaHearsayBaseFromPredicateBase(base, finalNeg, past, lookups, modal) {
|
|
365
|
+
if (finalNeg === null && !past && base.final.kind === "nounCopula") {
|
|
366
|
+
const noun = `${base.prefix}${base.final.nounSurface}`;
|
|
367
|
+
const carrierPrefix = hasBatchim(`${base.prefix}${nounCopulaFinalAllomorphHost(base.final)}`) ? "이라고" : "라고";
|
|
368
|
+
return {
|
|
369
|
+
ok: true,
|
|
370
|
+
base: {
|
|
371
|
+
prefix: `${noun}${carrierPrefix} `,
|
|
372
|
+
final: { kind: "lemma", lemma: "하다", irregular: "여", isVerb: true },
|
|
373
|
+
policy: { kind: "reporting", family: "souda_hearsay" }
|
|
374
|
+
},
|
|
375
|
+
...(modal === undefined ? {} : {
|
|
376
|
+
sourceTrace: soudaHearsaySourceTrace(modal, noun, carrierPrefix)
|
|
377
|
+
})
|
|
378
|
+
};
|
|
379
|
+
}
|
|
380
|
+
const rendered = composeBaseWithTerminalChain(base, finalNeg, past, true, false, lookups);
|
|
381
|
+
if (!rendered.ok) {
|
|
382
|
+
return { ok: false, reason: `souda hearsay quote base render failed: ${rendered.reason}` };
|
|
383
|
+
}
|
|
384
|
+
const trace = quotePlainDeclarativeTraceParts(rendered.text, { ...copularQuoteOption(base) });
|
|
385
|
+
return {
|
|
386
|
+
ok: true,
|
|
387
|
+
base: {
|
|
388
|
+
prefix: `${trace.inputProjectionText}${trace.carrierPrefix} `,
|
|
389
|
+
final: { kind: "lemma", lemma: "하다", irregular: "여", isVerb: true },
|
|
390
|
+
policy: { kind: "reporting", family: "souda_hearsay" }
|
|
391
|
+
},
|
|
392
|
+
...(modal === undefined ? {} : {
|
|
393
|
+
sourceTrace: soudaHearsaySourceTrace(modal, trace.inputProjectionText, trace.carrierPrefix)
|
|
394
|
+
})
|
|
395
|
+
};
|
|
396
|
+
}
|
|
397
|
+
function limitNegationPropositionParts(text, formal, options = {}) {
|
|
398
|
+
const quotedCopula = formal ? "라는" : "란";
|
|
399
|
+
if (options.copularLemma !== undefined && text.endsWith(options.copularLemma)) {
|
|
400
|
+
return { inputProjectionText: text.slice(0, -"다".length), carrierPrefix: quotedCopula };
|
|
401
|
+
}
|
|
402
|
+
if (text.endsWith("아니다")) {
|
|
403
|
+
return { inputProjectionText: text.slice(0, -"다".length), carrierPrefix: quotedCopula };
|
|
404
|
+
}
|
|
405
|
+
if (text.endsWith("이다")) {
|
|
406
|
+
const stem = text.slice(0, -"이다".length);
|
|
407
|
+
return { inputProjectionText: stem, carrierPrefix: `${hasBatchim(stem) ? "이" : ""}${quotedCopula}` };
|
|
408
|
+
}
|
|
409
|
+
if (text.endsWith("거다")) {
|
|
410
|
+
return { inputProjectionText: text.slice(0, -"다".length), carrierPrefix: quotedCopula };
|
|
411
|
+
}
|
|
412
|
+
if (text.endsWith("다")) {
|
|
413
|
+
return formal
|
|
414
|
+
? { inputProjectionText: text, carrierPrefix: "는" }
|
|
415
|
+
: { inputProjectionText: text.slice(0, -"다".length), carrierPrefix: "단" };
|
|
416
|
+
}
|
|
417
|
+
return { inputProjectionText: text, carrierPrefix: quotedCopula };
|
|
418
|
+
}
|
|
419
|
+
function limitNegationSourceTrace(modal, proposition, scopeNoun) {
|
|
420
|
+
const [quoteToken, focusToken, ...finalTokens] = modal.source.tokens;
|
|
421
|
+
const scopeTokens = proposition.separableCarrier === null
|
|
422
|
+
? [quoteToken, focusToken].filter((token) => token !== undefined)
|
|
423
|
+
: [focusToken].filter((token) => token !== undefined);
|
|
424
|
+
return {
|
|
425
|
+
inputProjectionText: proposition.inputProjectionText,
|
|
426
|
+
carrierPrefixSegments: [
|
|
427
|
+
...(proposition.separableCarrier === null
|
|
428
|
+
? []
|
|
429
|
+
: [{
|
|
430
|
+
text: proposition.separableCarrier,
|
|
431
|
+
sourceTokens: quoteToken === undefined ? [] : [quoteToken],
|
|
432
|
+
kind: "modal",
|
|
433
|
+
projectionConfidence: "semantic"
|
|
434
|
+
}]),
|
|
435
|
+
{
|
|
436
|
+
text: ` ${scopeNoun}`,
|
|
437
|
+
sourceTokens: scopeTokens,
|
|
438
|
+
kind: "modal",
|
|
439
|
+
projectionConfidence: "semantic"
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
text: " ",
|
|
443
|
+
sourceTokens: [],
|
|
444
|
+
kind: "punctuation",
|
|
445
|
+
projectionConfidence: "semantic"
|
|
446
|
+
}
|
|
447
|
+
],
|
|
448
|
+
finalSourceTokens: finalTokens.length > 0 ? finalTokens : modal.source.tokens,
|
|
449
|
+
finalKind: "modal"
|
|
450
|
+
};
|
|
451
|
+
}
|
|
452
|
+
export function limitNegationBaseFromPredicateBase(opts) {
|
|
453
|
+
const scopeNoun = opts.modal.focus === "mo" ? "법도" : "법은";
|
|
454
|
+
const base = opts.past && opts.base.policy?.kind === "noun_copula_interop"
|
|
455
|
+
? {
|
|
456
|
+
prefix: "",
|
|
457
|
+
final: {
|
|
458
|
+
kind: "nounCopula",
|
|
459
|
+
nounSurface: opts.base.policy.nounSurface,
|
|
460
|
+
isBoundNoun: opts.base.policy.isBoundNoun
|
|
461
|
+
},
|
|
462
|
+
policy: opts.base.policy
|
|
463
|
+
}
|
|
464
|
+
: opts.base;
|
|
465
|
+
const parts = (() => {
|
|
466
|
+
if (opts.preNeg === null && !opts.past && base.final.kind === "nounCopula") {
|
|
467
|
+
const allomorphHost = `${base.prefix}${nounCopulaFinalAllomorphHost(base.final)}`;
|
|
468
|
+
const quotedCopula = opts.formal ? "라는" : "란";
|
|
469
|
+
return {
|
|
470
|
+
ok: true,
|
|
471
|
+
inputProjectionText: `${base.prefix}${base.final.nounSurface}`,
|
|
472
|
+
carrierPrefix: `${hasBatchim(allomorphHost) ? "이" : ""}${quotedCopula}`,
|
|
473
|
+
separable: true
|
|
474
|
+
};
|
|
475
|
+
}
|
|
476
|
+
const rendered = composeBaseWithTerminalChain(base, opts.preNeg, opts.past, true, false, opts.lookups);
|
|
477
|
+
if (!rendered.ok) {
|
|
478
|
+
return { ok: false, reason: `limit negation proposition render failed: ${rendered.reason}` };
|
|
479
|
+
}
|
|
480
|
+
return { ok: true, ...limitNegationPropositionParts(rendered.text, opts.formal, { ...copularQuoteOption(base) }), separable: false };
|
|
481
|
+
})();
|
|
482
|
+
if (!parts.ok) {
|
|
483
|
+
return parts;
|
|
484
|
+
}
|
|
485
|
+
const inputPrefix = opts.base.prefix;
|
|
486
|
+
const projectionText = parts.inputProjectionText.startsWith(inputPrefix)
|
|
487
|
+
? parts.inputProjectionText.slice(inputPrefix.length)
|
|
488
|
+
: parts.inputProjectionText;
|
|
489
|
+
return {
|
|
490
|
+
ok: true,
|
|
491
|
+
base: {
|
|
492
|
+
prefix: `${parts.inputProjectionText}${parts.carrierPrefix} ${scopeNoun} `,
|
|
493
|
+
final: { kind: "lemma", lemma: "없다", irregular: null, isVerb: false }
|
|
494
|
+
},
|
|
495
|
+
sourceTrace: limitNegationSourceTrace(opts.modal, parts.separable
|
|
496
|
+
? { inputProjectionText: projectionText, separableCarrier: parts.carrierPrefix }
|
|
497
|
+
: { inputProjectionText: `${projectionText}${parts.carrierPrefix}`, separableCarrier: null }, scopeNoun)
|
|
498
|
+
};
|
|
499
|
+
}
|
|
500
|
+
function soudaYotaiBaseFromStem(opts) {
|
|
501
|
+
const sourceHostIsVerbal = opts.sourceStemIsVerb ?? (opts.stemKind === "verb");
|
|
502
|
+
const nounCopulaHost = opts.inputPolicy?.kind === "noun_copula_interop" && opts.preModalNeg === null;
|
|
503
|
+
const hostAttributive = (attrPolicy) => modalInputStemAttributive({
|
|
504
|
+
stemLemma: opts.stemLemma,
|
|
505
|
+
stemIrregular: opts.stemIrregular,
|
|
506
|
+
stemKind: opts.stemKind,
|
|
507
|
+
past: opts.past,
|
|
508
|
+
preModalNeg: opts.preModalNeg,
|
|
509
|
+
attrPolicy,
|
|
510
|
+
useShortHint: false,
|
|
511
|
+
pastProjection: opts.pastProjection ?? "lexical",
|
|
512
|
+
lookups: opts.lookups,
|
|
513
|
+
sahenShortNegationSplit: opts.sahenShortNegationSplit,
|
|
514
|
+
...(opts.inputPolicy === undefined ? {} : { inputPolicy: opts.inputPolicy })
|
|
515
|
+
});
|
|
516
|
+
const adverbialLexicalization = {
|
|
517
|
+
prefix: `${hostAttributive(sourceHostIsVerbal ? "future" : "present")} `,
|
|
518
|
+
final: { kind: "lemma", lemma: "듯하다", irregular: null, isVerb: false }
|
|
519
|
+
};
|
|
520
|
+
const yotaiPolicy = { kind: "likeness", adverbialLexicalization };
|
|
521
|
+
const focusNegationOptions = opts.modal.negationFocusParticle === undefined
|
|
522
|
+
? {}
|
|
523
|
+
: { finalNegationOptions: { firstNegationFocusParticle: opts.modal.negationFocusParticle } };
|
|
524
|
+
if (!sourceHostIsVerbal && !nounCopulaHost && opts.preModalNeg === null && !opts.past) {
|
|
525
|
+
const stemForm = conjugate(opts.stemLemma, opts.stemIrregular, "아/어");
|
|
526
|
+
return {
|
|
527
|
+
ok: true,
|
|
528
|
+
base: {
|
|
529
|
+
prefix: `${stemForm} `,
|
|
530
|
+
final: { kind: "lemma", lemma: "보이다", irregular: null, isVerb: true },
|
|
531
|
+
policy: yotaiPolicy
|
|
532
|
+
},
|
|
533
|
+
sourceTrace: modalSourceTrace(opts.modal, stemForm, " "),
|
|
534
|
+
...focusNegationOptions
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
const stemAttr = hostAttributive(nounCopulaHost ? "present" : "future");
|
|
538
|
+
return {
|
|
539
|
+
ok: true,
|
|
540
|
+
base: {
|
|
541
|
+
prefix: `${stemAttr} 것 `,
|
|
542
|
+
final: { kind: "lemma", lemma: "같다", irregular: null, isVerb: false },
|
|
543
|
+
policy: yotaiPolicy
|
|
544
|
+
},
|
|
545
|
+
sourceTrace: modalSourceTrace(opts.modal, stemAttr, " 것 "),
|
|
546
|
+
...focusNegationOptions
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
function tsumoriBaseFromStem(opts) {
|
|
550
|
+
if (opts.stemKind !== "verb" && opts.sourceStemIsVerb !== true) {
|
|
551
|
+
return { ok: false, reason: "tsumori on adjective stem not supported (의도/가정 표현은 V 만)" };
|
|
552
|
+
}
|
|
553
|
+
const assumptionReading = opts.modal.reading === "counterfactual_assumption" ||
|
|
554
|
+
opts.sourceHostHasTeIruAspect === true;
|
|
555
|
+
const noun = opts.modal.reading === "counterfactual_assumption" ? "셈" : "생각";
|
|
556
|
+
const sourceStemKind = opts.sourceStemIsVerb === true ? "verb" : opts.stemKind;
|
|
557
|
+
const stemAttr = pastNegStemAttributive({
|
|
558
|
+
stemLemma: opts.stemLemma,
|
|
559
|
+
stemIrregular: opts.stemIrregular,
|
|
560
|
+
stemKind: sourceStemKind,
|
|
561
|
+
past: opts.past,
|
|
562
|
+
preModalNeg: opts.preModalNeg,
|
|
563
|
+
attrPolicy: assumptionReading ? "present" : "future",
|
|
564
|
+
useShortHint: assumptionReading,
|
|
565
|
+
pastProjection: opts.pastProjection ?? "lexical",
|
|
566
|
+
lookups: opts.lookups,
|
|
567
|
+
sahenShortNegationSplit: opts.sahenShortNegationSplit
|
|
568
|
+
});
|
|
569
|
+
switch (opts.modal.variant) {
|
|
570
|
+
case "affirmative":
|
|
571
|
+
return {
|
|
572
|
+
ok: true,
|
|
573
|
+
base: {
|
|
574
|
+
prefix: `${stemAttr} `,
|
|
575
|
+
final: { kind: "nounCopula", nounSurface: noun, isBoundNoun: false }
|
|
576
|
+
},
|
|
577
|
+
sourceTrace: carrierCopulaSourceTrace(opts.modal, stemAttr, ` ${noun}`)
|
|
578
|
+
};
|
|
579
|
+
case "topic_negative":
|
|
580
|
+
return {
|
|
581
|
+
ok: true,
|
|
582
|
+
base: {
|
|
583
|
+
prefix: `${stemAttr} ${noun}은 `,
|
|
584
|
+
final: { kind: "lemma", lemma: "없다", irregular: null, isVerb: false }
|
|
585
|
+
},
|
|
586
|
+
sourceTrace: modalSourceTrace(opts.modal, stemAttr, ` ${noun}은 `)
|
|
587
|
+
};
|
|
588
|
+
case "copula_negative":
|
|
589
|
+
return {
|
|
590
|
+
ok: true,
|
|
591
|
+
base: {
|
|
592
|
+
prefix: `${stemAttr} ${noun}이 `,
|
|
593
|
+
final: { kind: "lemma", lemma: "아니다", irregular: "아니", isVerb: false }
|
|
594
|
+
},
|
|
595
|
+
sourceTrace: scopeNounCopulaNegativeSourceTrace(opts.modal, stemAttr, ` ${noun}`, "이 ")
|
|
596
|
+
};
|
|
597
|
+
default:
|
|
598
|
+
return assertNever(opts.modal.variant);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
export function wakeImpossibleBase(opts) {
|
|
602
|
+
const hostBase = applyNegationChainToLemmaBase(opts.inputBase, opts.preStemNeg);
|
|
603
|
+
if (hostBase === null) {
|
|
604
|
+
return { ok: false, reason: "wake impossible host negation lowering 영역 외" };
|
|
605
|
+
}
|
|
606
|
+
const hostPast = opts.stemPast || (opts.preStemNeg?.chainPast ?? false);
|
|
607
|
+
if (hostBase.policy?.kind === "quoted_proposition" && !hostPast) {
|
|
608
|
+
const label = opts.op.focus === "mo" ? "것도" : (opts.formal ? "것은" : "건");
|
|
609
|
+
const quotedPrefix = `${hostBase.policy.attributive} ${label} 안 `;
|
|
610
|
+
const quotedTrace = hostProjectionSourceTrace({
|
|
611
|
+
hostText: hostBase.policy.attributive,
|
|
612
|
+
inputPrefix: opts.inputBase.prefix,
|
|
613
|
+
basePrefix: quotedPrefix,
|
|
614
|
+
sourceTokens: opts.op.source.tokens,
|
|
615
|
+
splitFinal: "negative_nai"
|
|
616
|
+
});
|
|
617
|
+
return {
|
|
618
|
+
ok: true,
|
|
619
|
+
base: {
|
|
620
|
+
prefix: quotedPrefix,
|
|
621
|
+
final: { kind: "lemma", lemma: "되다", irregular: null, isVerb: true }
|
|
622
|
+
},
|
|
623
|
+
chainOnFinalSupported: true,
|
|
624
|
+
interOpPastProjection: "committed",
|
|
625
|
+
...(quotedTrace === undefined ? {} : { sourceTrace: quotedTrace })
|
|
626
|
+
};
|
|
627
|
+
}
|
|
628
|
+
const projected = projectBaseFutureAttributive(hostBase, hostPast, opts.formal, opts.pastProjection);
|
|
629
|
+
if (projected === null) {
|
|
630
|
+
return { ok: false, reason: "wake impossible future attributive projection 영역 외" };
|
|
631
|
+
}
|
|
632
|
+
const basePrefix = `${projected} 수 `;
|
|
633
|
+
const sourceTrace = hostProjectionSourceTrace({
|
|
634
|
+
hostText: projected,
|
|
635
|
+
inputPrefix: opts.inputBase.prefix,
|
|
636
|
+
basePrefix,
|
|
637
|
+
sourceTokens: opts.op.source.tokens,
|
|
638
|
+
splitFinal: "negative_nai"
|
|
639
|
+
});
|
|
640
|
+
return {
|
|
641
|
+
ok: true,
|
|
642
|
+
base: {
|
|
643
|
+
prefix: basePrefix,
|
|
644
|
+
final: { kind: "lemma", lemma: "없다", irregular: null, isVerb: false }
|
|
645
|
+
},
|
|
646
|
+
chainOnFinalSupported: true,
|
|
647
|
+
interOpPastProjection: "committed",
|
|
648
|
+
...(sourceTrace === undefined ? {} : { sourceTrace })
|
|
649
|
+
};
|
|
650
|
+
}
|
|
651
|
+
export function wakeExplanatoryCitationBase(opts) {
|
|
652
|
+
if (opts.op.variant !== "explanatory" ||
|
|
653
|
+
opts.op.polarity !== "affirmative" ||
|
|
654
|
+
opts.preStemNeg !== null ||
|
|
655
|
+
opts.stemPast ||
|
|
656
|
+
opts.inputBase.policy?.kind !== "quoted_proposition") {
|
|
657
|
+
return null;
|
|
658
|
+
}
|
|
659
|
+
const attributive = opts.inputBase.policy.attributive;
|
|
660
|
+
const noun = opts.formal ? "것" : "거";
|
|
661
|
+
return {
|
|
662
|
+
ok: true,
|
|
663
|
+
base: scopeCarrierCopulaBase("wake", noun, `${attributive} `),
|
|
664
|
+
sourceTrace: carrierCopulaSourceTrace(opts.op, attributive, ` ${noun}`)
|
|
665
|
+
};
|
|
666
|
+
}
|
|
667
|
+
function modalInputStemAttributive(opts) {
|
|
668
|
+
if (opts.inputPolicy?.kind === "noun_copula_interop" &&
|
|
669
|
+
opts.preModalNeg === null) {
|
|
670
|
+
const noun = opts.inputPolicy.nounSurface;
|
|
671
|
+
if (opts.past) {
|
|
672
|
+
const pastStem = selectParticle(opts.inputPolicy.allomorphHost ?? noun, "이었/였");
|
|
673
|
+
return `${pastStem}${opts.attrPolicy === "future" ? "을" : "던"}`;
|
|
674
|
+
}
|
|
675
|
+
return opts.attrPolicy === "future" ? "일" : "인";
|
|
676
|
+
}
|
|
677
|
+
return pastNegStemAttributive({
|
|
678
|
+
stemLemma: opts.stemLemma,
|
|
679
|
+
stemIrregular: opts.stemIrregular,
|
|
680
|
+
stemKind: opts.stemKind,
|
|
681
|
+
past: opts.past,
|
|
682
|
+
preModalNeg: opts.preModalNeg,
|
|
683
|
+
attrPolicy: opts.attrPolicy,
|
|
684
|
+
useShortHint: opts.useShortHint,
|
|
685
|
+
pastProjection: opts.pastProjection ?? "lexical",
|
|
686
|
+
lookups: opts.lookups,
|
|
687
|
+
sahenShortNegationSplit: opts.sahenShortNegationSplit
|
|
688
|
+
});
|
|
689
|
+
}
|
|
690
|
+
export function nominalHostEvidentialLikenessBase(nounSurface, modal) {
|
|
691
|
+
return {
|
|
692
|
+
ok: true,
|
|
693
|
+
base: {
|
|
694
|
+
prefix: `${nounSurface} `,
|
|
695
|
+
final: { kind: "lemma", lemma: "같다", irregular: null, isVerb: false },
|
|
696
|
+
policy: { kind: "likeness" }
|
|
697
|
+
},
|
|
698
|
+
sourceTrace: modalSourceTrace(modal, "", " ")
|
|
699
|
+
};
|
|
700
|
+
}
|
|
701
|
+
export function modalBase(opts) {
|
|
702
|
+
const { modal, stemLemma, stemIrregular, stemKind, preModalNeg, past, formal, pastProjection = "lexical", inputPolicy, sourceStemIsVerb, sourceHostHasTeIruAspect = false, forbidShortNegation, preferShortLikenessNegation = false, lookups, sahenShortNegationSplit } = opts;
|
|
703
|
+
const useShortFor = (defaultShort) => !forbidShortNegation && defaultShort;
|
|
704
|
+
const stemAttributive = (attrPolicy, useShortHint) => modalInputStemAttributive({
|
|
705
|
+
stemLemma,
|
|
706
|
+
stemIrregular,
|
|
707
|
+
stemKind,
|
|
708
|
+
past,
|
|
709
|
+
preModalNeg,
|
|
710
|
+
attrPolicy,
|
|
711
|
+
useShortHint,
|
|
712
|
+
pastProjection,
|
|
713
|
+
lookups,
|
|
714
|
+
sahenShortNegationSplit,
|
|
715
|
+
...(inputPolicy === undefined ? {} : { inputPolicy })
|
|
716
|
+
});
|
|
717
|
+
const mb = {
|
|
718
|
+
opts,
|
|
719
|
+
stemLemma,
|
|
720
|
+
stemIrregular,
|
|
721
|
+
stemKind,
|
|
722
|
+
preModalNeg,
|
|
723
|
+
past,
|
|
724
|
+
formal,
|
|
725
|
+
pastProjection,
|
|
726
|
+
inputPolicy,
|
|
727
|
+
sourceStemIsVerb,
|
|
728
|
+
sourceHostHasTeIruAspect,
|
|
729
|
+
preferShortLikenessNegation,
|
|
730
|
+
lookups,
|
|
731
|
+
sahenShortNegationSplit,
|
|
732
|
+
useShortFor,
|
|
733
|
+
stemAttributive
|
|
734
|
+
};
|
|
735
|
+
switch (modal.modal) {
|
|
736
|
+
case "kamo":
|
|
737
|
+
return kamoModalBase(mb, modal);
|
|
738
|
+
case "hazu":
|
|
739
|
+
return hazuModalBase(mb, modal);
|
|
740
|
+
case "noda":
|
|
741
|
+
return nodaModalBase(mb, modal);
|
|
742
|
+
case "youda":
|
|
743
|
+
return youdaModalBase(mb, modal);
|
|
744
|
+
case "rashii":
|
|
745
|
+
return rashiiModalBase(mb, modal);
|
|
746
|
+
case "tsumori": {
|
|
747
|
+
return tsumoriBaseFromStem({
|
|
748
|
+
stemLemma,
|
|
749
|
+
stemIrregular,
|
|
750
|
+
stemKind,
|
|
751
|
+
modal,
|
|
752
|
+
preModalNeg,
|
|
753
|
+
past,
|
|
754
|
+
pastProjection,
|
|
755
|
+
...(sourceStemIsVerb === undefined ? {} : { sourceStemIsVerb }),
|
|
756
|
+
sourceHostHasTeIruAspect,
|
|
757
|
+
lookups,
|
|
758
|
+
sahenShortNegationSplit
|
|
759
|
+
});
|
|
760
|
+
}
|
|
761
|
+
case "tokoro":
|
|
762
|
+
return tokoroModalBase(mb, modal);
|
|
763
|
+
case "mai":
|
|
764
|
+
return maiModalBase(mb, modal);
|
|
765
|
+
case "wake": {
|
|
766
|
+
const stemAttr = stemAttributive("present", false);
|
|
767
|
+
switch (modal.variant) {
|
|
768
|
+
case "explanatory":
|
|
769
|
+
return {
|
|
770
|
+
ok: true,
|
|
771
|
+
base: scopeCarrierCopulaBase("wake", "셈", `${stemAttr} `),
|
|
772
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, " 셈")
|
|
773
|
+
};
|
|
774
|
+
case "rhetorical_no_way": {
|
|
775
|
+
const stemAttrFuture = stemAttributive("future", false);
|
|
776
|
+
return {
|
|
777
|
+
ok: true,
|
|
778
|
+
base: {
|
|
779
|
+
prefix: `${stemAttrFuture} 리 `,
|
|
780
|
+
final: { kind: "lemma", lemma: "없다", irregular: null, isVerb: false }
|
|
781
|
+
},
|
|
782
|
+
sourceTrace: modalSourceTrace(modal, stemAttrFuture, " 리 ")
|
|
783
|
+
};
|
|
784
|
+
}
|
|
785
|
+
case "rhetorical_possibility": {
|
|
786
|
+
const stemAttrFuture = stemAttributive("future", false);
|
|
787
|
+
return {
|
|
788
|
+
ok: true,
|
|
789
|
+
base: {
|
|
790
|
+
prefix: `${stemAttrFuture} 리 `,
|
|
791
|
+
final: { kind: "lemma", lemma: "있다", irregular: null, isVerb: false }
|
|
792
|
+
},
|
|
793
|
+
sourceTrace: modalSourceTrace(modal, stemAttrFuture, " 리 ")
|
|
794
|
+
};
|
|
795
|
+
}
|
|
796
|
+
case "partial_negation":
|
|
797
|
+
return {
|
|
798
|
+
ok: true,
|
|
799
|
+
base: {
|
|
800
|
+
prefix: `${stemAttr} 것은 `,
|
|
801
|
+
final: { kind: "lemma", lemma: "아니다", irregular: "아니", isVerb: false }
|
|
802
|
+
},
|
|
803
|
+
terminalPrefixContraction: "scope_topic",
|
|
804
|
+
connectivePrefixContraction: "scope_topic",
|
|
805
|
+
sourceTrace: modalSourceTrace(modal, stemAttr, " 것은 ")
|
|
806
|
+
};
|
|
807
|
+
case "weakened_partial_negation":
|
|
808
|
+
return {
|
|
809
|
+
ok: true,
|
|
810
|
+
base: {
|
|
811
|
+
prefix: `${stemAttr} 것도 `,
|
|
812
|
+
final: { kind: "lemma", lemma: "아니다", irregular: "아니", isVerb: false }
|
|
813
|
+
},
|
|
814
|
+
sourceTrace: modalSourceTrace(modal, stemAttr, " 것도 ")
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
case "souda_hearsay":
|
|
819
|
+
return soudaHearsayModalBase(mb, modal);
|
|
820
|
+
case "limit_negation":
|
|
821
|
+
return { ok: false, reason: "limit negation requires the composed predicate base" };
|
|
822
|
+
case "mono":
|
|
823
|
+
return monoModalBase(mb, modal);
|
|
824
|
+
default:
|
|
825
|
+
assertNever(modal);
|
|
826
|
+
}
|
|
827
|
+
}
|
|
828
|
+
function kamoModalBase(mb, modal) {
|
|
829
|
+
const { useShortFor, stemAttributive } = mb;
|
|
830
|
+
const stemAttr = stemAttributive("future", useShortFor(true));
|
|
831
|
+
return {
|
|
832
|
+
ok: true,
|
|
833
|
+
...(modal.bare ? { terminalRealization: { kind: "elided_carrier" } } : {}),
|
|
834
|
+
base: {
|
|
835
|
+
prefix: `${stemAttr}지도 `,
|
|
836
|
+
final: { kind: "lemma", lemma: "모르다", irregular: "르", isVerb: true }
|
|
837
|
+
},
|
|
838
|
+
sourceTrace: {
|
|
839
|
+
inputProjectionText: stemAttr,
|
|
840
|
+
carrierPrefixSegments: [
|
|
841
|
+
{
|
|
842
|
+
text: "지도",
|
|
843
|
+
sourceTokens: modal.source.tokens.slice(0, 2),
|
|
844
|
+
kind: "modal",
|
|
845
|
+
projectionConfidence: "semantic"
|
|
846
|
+
},
|
|
847
|
+
{
|
|
848
|
+
text: " ",
|
|
849
|
+
sourceTokens: [],
|
|
850
|
+
kind: "punctuation",
|
|
851
|
+
projectionConfidence: "semantic"
|
|
852
|
+
}
|
|
853
|
+
],
|
|
854
|
+
finalSourceTokens: modal.source.tokens.length > 2 ? modal.source.tokens.slice(2) : modal.source.tokens,
|
|
855
|
+
finalKind: "modal"
|
|
856
|
+
}
|
|
857
|
+
};
|
|
858
|
+
}
|
|
859
|
+
function hazuModalBase(mb, modal) {
|
|
860
|
+
const { stemAttributive } = mb;
|
|
861
|
+
if (modal.polarity === "negative") {
|
|
862
|
+
const stemAttr = stemAttributive("future", false);
|
|
863
|
+
const scopeNoun = hazuNegativeScopeNoun(modal);
|
|
864
|
+
const hasTopic = scopeNoun === "리는";
|
|
865
|
+
return {
|
|
866
|
+
ok: true,
|
|
867
|
+
base: {
|
|
868
|
+
prefix: `${stemAttr} ${scopeNoun} `,
|
|
869
|
+
final: { kind: "lemma", lemma: "없다", irregular: null, isVerb: false }
|
|
870
|
+
},
|
|
871
|
+
sourceTrace: {
|
|
872
|
+
inputProjectionText: stemAttr,
|
|
873
|
+
carrierPrefixSegments: [
|
|
874
|
+
{
|
|
875
|
+
text: " 리",
|
|
876
|
+
sourceTokens: modal.source.tokens.slice(0, 1),
|
|
877
|
+
kind: "modal",
|
|
878
|
+
projectionConfidence: "semantic",
|
|
879
|
+
suppressBoundaryAfter: false
|
|
880
|
+
},
|
|
881
|
+
...(hasTopic
|
|
882
|
+
? [{
|
|
883
|
+
text: "는",
|
|
884
|
+
sourceTokens: modal.source.tokens.slice(1, -1),
|
|
885
|
+
kind: "modal",
|
|
886
|
+
projectionConfidence: "semantic"
|
|
887
|
+
}]
|
|
888
|
+
: []),
|
|
889
|
+
{
|
|
890
|
+
text: " ",
|
|
891
|
+
sourceTokens: [],
|
|
892
|
+
kind: "punctuation",
|
|
893
|
+
projectionConfidence: "semantic"
|
|
894
|
+
}
|
|
895
|
+
],
|
|
896
|
+
finalSourceTokens: hasTopic
|
|
897
|
+
? modal.source.tokens.slice(-1)
|
|
898
|
+
: modal.source.tokens.slice(1),
|
|
899
|
+
finalKind: "modal"
|
|
900
|
+
}
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
const stemAttr = stemAttributive("future", false);
|
|
904
|
+
return {
|
|
905
|
+
ok: true,
|
|
906
|
+
base: scopeCarrierCopulaBase("hazu", "터", `${stemAttr} `),
|
|
907
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, " 터")
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
function nodaModalBase(mb, modal) {
|
|
911
|
+
const { stemLemma, stemIrregular, stemKind, preModalNeg, past, formal, inputPolicy, useShortFor, stemAttributive } = mb;
|
|
912
|
+
const stemAttr = stemAttributive("present", useShortFor(true));
|
|
913
|
+
const noun = nodaCarrierNoun(formal);
|
|
914
|
+
const nodaModal = modal;
|
|
915
|
+
const carrierStyle = nodaCarrierStyle(nodaModal);
|
|
916
|
+
if (nodaCarrierHasSupportConjecture(nodaModal)) {
|
|
917
|
+
return {
|
|
918
|
+
ok: true,
|
|
919
|
+
base: {
|
|
920
|
+
prefix: "",
|
|
921
|
+
final: {
|
|
922
|
+
kind: "lemma",
|
|
923
|
+
lemma: `${stemAttr} 것이겠다`,
|
|
924
|
+
irregular: null,
|
|
925
|
+
isVerb: false,
|
|
926
|
+
idiom: {
|
|
927
|
+
kind: "conjecture",
|
|
928
|
+
conjecturePolite: modal.polite,
|
|
929
|
+
projection: "nominalized",
|
|
930
|
+
sourceLemma: stemLemma,
|
|
931
|
+
sourceIrregular: stemIrregular
|
|
932
|
+
}
|
|
933
|
+
},
|
|
934
|
+
policy: { kind: "scope_carrier", carrier: "noda", nounSurface: "것", style: "emphasis" }
|
|
935
|
+
},
|
|
936
|
+
chainOnFinalSupported: false,
|
|
937
|
+
sourceTrace: modalSourceTrace(modal, stemAttr, "")
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
const connectiveBaseOverride = preModalNeg === null && shouldFlattenNodaConnectiveToHost(inputPolicy, stemLemma)
|
|
941
|
+
? {
|
|
942
|
+
connectiveBaseOverride: {
|
|
943
|
+
base: {
|
|
944
|
+
prefix: "",
|
|
945
|
+
final: { kind: "lemma", lemma: stemLemma, irregular: stemIrregular, isVerb: stemKind === "verb" },
|
|
946
|
+
policy: inputPolicy
|
|
947
|
+
},
|
|
948
|
+
past,
|
|
949
|
+
adversativeSurface: "のに"
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
: {};
|
|
953
|
+
const carrierOptions = carrierStyle === undefined
|
|
954
|
+
? {}
|
|
955
|
+
: {
|
|
956
|
+
style: carrierStyle,
|
|
957
|
+
connectiveSourcePoliteness: "preserve_when_supported"
|
|
958
|
+
};
|
|
959
|
+
return {
|
|
960
|
+
ok: true,
|
|
961
|
+
base: scopeCarrierCopulaBase("noda", noun, `${stemAttr} `, carrierOptions),
|
|
962
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, ` ${noun}`),
|
|
963
|
+
...connectiveBaseOverride
|
|
964
|
+
};
|
|
965
|
+
}
|
|
966
|
+
function youdaModalBase(mb, modal) {
|
|
967
|
+
const { stemLemma, stemIrregular, stemKind, preModalNeg, past, preferShortLikenessNegation, useShortFor, stemAttributive } = mb;
|
|
968
|
+
const stemAttr = stemAttributive("present", useShortFor(preferShortLikenessNegation));
|
|
969
|
+
const kaNoYouFlattenPolicy = modal.form === "youda" && modal.source.tokens.some((token, index) => kaMarkerRelationForToken(token, index, ["tail_render"], {
|
|
970
|
+
acceptedParticleSubtypes: ["副助詞", "終助詞", "係助詞"]
|
|
971
|
+
}) !== null)
|
|
972
|
+
? { nodaConnectiveFlatten: "ka_no_you" }
|
|
973
|
+
: {};
|
|
974
|
+
const attributiveLexicalization = likenessAttributiveLexicalizationBase(modal, stemAttr);
|
|
975
|
+
return {
|
|
976
|
+
ok: true,
|
|
977
|
+
base: {
|
|
978
|
+
prefix: `${stemAttr} 것 `,
|
|
979
|
+
final: { kind: "lemma", lemma: "같다", irregular: null, isVerb: false },
|
|
980
|
+
policy: {
|
|
981
|
+
kind: "likeness",
|
|
982
|
+
...kaNoYouFlattenPolicy,
|
|
983
|
+
...(attributiveLexicalization === undefined ? {} : { attributiveLexicalization }),
|
|
984
|
+
...(modal.form === "youda" && preModalNeg === null && !past && stemKind === "verb"
|
|
985
|
+
? {
|
|
986
|
+
potentialObjectAttributive: {
|
|
987
|
+
stemLemma,
|
|
988
|
+
stemIrregular,
|
|
989
|
+
stemKind
|
|
990
|
+
}
|
|
991
|
+
}
|
|
992
|
+
: {})
|
|
993
|
+
}
|
|
994
|
+
},
|
|
995
|
+
sourceTrace: modalSourceTrace(modal, stemAttr, " 것 ")
|
|
996
|
+
};
|
|
997
|
+
}
|
|
998
|
+
function rashiiModalBase(mb, modal) {
|
|
999
|
+
const { preferShortLikenessNegation, useShortFor, stemAttributive } = mb;
|
|
1000
|
+
const stemAttr = stemAttributive("present", useShortFor(preferShortLikenessNegation));
|
|
1001
|
+
return {
|
|
1002
|
+
ok: true,
|
|
1003
|
+
base: {
|
|
1004
|
+
prefix: `${stemAttr} 것 `,
|
|
1005
|
+
final: { kind: "lemma", lemma: "같다", irregular: null, isVerb: false },
|
|
1006
|
+
policy: { kind: "likeness" }
|
|
1007
|
+
},
|
|
1008
|
+
sourceTrace: modalSourceTrace(modal, stemAttr, " 것 ")
|
|
1009
|
+
};
|
|
1010
|
+
}
|
|
1011
|
+
function tokoroModalBase(mb, modal) {
|
|
1012
|
+
const { stemLemma, stemIrregular, preModalNeg, past, stemAttributive } = mb;
|
|
1013
|
+
const tokoroCarrierOptions = carrierConnectiveSourcePolitenessOptions(modal.source);
|
|
1014
|
+
if (modal.reading === "place") {
|
|
1015
|
+
const stemAttr = stemAttributive("present", false);
|
|
1016
|
+
return {
|
|
1017
|
+
ok: true,
|
|
1018
|
+
base: scopeCarrierCopulaBase("tokoro", modal.nominalNoun ?? "곳", `${stemAttr} `, tokoroCarrierOptions),
|
|
1019
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, ` ${modal.nominalNoun ?? "곳"}`)
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
if (modal.reading === "intention") {
|
|
1023
|
+
const stemAttr = stemAttributive("present", false);
|
|
1024
|
+
return {
|
|
1025
|
+
ok: true,
|
|
1026
|
+
base: scopeCarrierCopulaBase("tokoro", modal.nominalNoun ?? "바", `${stemAttr} `, tokoroCarrierOptions),
|
|
1027
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, ` ${modal.nominalNoun ?? "바"}`)
|
|
1028
|
+
};
|
|
1029
|
+
}
|
|
1030
|
+
if (modal.reading !== "temporal") {
|
|
1031
|
+
return { ok: false, reason: `tokoro reading '${modal.reading}' 영역 외` };
|
|
1032
|
+
}
|
|
1033
|
+
if (modal.variant === "almost") {
|
|
1034
|
+
const stemAttr = stemAttributive("future", false);
|
|
1035
|
+
return {
|
|
1036
|
+
ok: true,
|
|
1037
|
+
base: {
|
|
1038
|
+
prefix: `${stemAttr} `,
|
|
1039
|
+
final: { kind: "lemma", lemma: "뻔하다", irregular: "여", isVerb: false }
|
|
1040
|
+
}
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
if (modal.variant === "progress_observation") {
|
|
1044
|
+
const stemAttr = stemAttributive("present", false);
|
|
1045
|
+
return {
|
|
1046
|
+
ok: true,
|
|
1047
|
+
base: scopeCarrierCopulaBase("tokoro", "중", `${stemAttr} `, tokoroCarrierOptions),
|
|
1048
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, " 중")
|
|
1049
|
+
};
|
|
1050
|
+
}
|
|
1051
|
+
if (modal.variant === "about_to") {
|
|
1052
|
+
const stemRyeogo = conjugate(stemLemma, stemIrregular, "(으)려는");
|
|
1053
|
+
return {
|
|
1054
|
+
ok: true,
|
|
1055
|
+
base: scopeCarrierCopulaBase("tokoro", "참", `${stemRyeogo} `, tokoroCarrierOptions),
|
|
1056
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemRyeogo, " 참")
|
|
1057
|
+
};
|
|
1058
|
+
}
|
|
1059
|
+
if (past && preModalNeg === null) {
|
|
1060
|
+
const stemJustNow = conjugate(stemLemma, stemIrregular, "ㄴ/은");
|
|
1061
|
+
return {
|
|
1062
|
+
ok: true,
|
|
1063
|
+
base: scopeCarrierCopulaBase("tokoro", "참", `막 ${stemJustNow} `, tokoroCarrierOptions),
|
|
1064
|
+
sourceTrace: carrierCopulaSourceTrace(modal, `막 ${stemJustNow}`, " 참")
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
const stemAttr = stemAttributive("future", false);
|
|
1068
|
+
return {
|
|
1069
|
+
ok: true,
|
|
1070
|
+
base: scopeCarrierCopulaBase("tokoro", "참", `${stemAttr} `, tokoroCarrierOptions),
|
|
1071
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, " 참")
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
function maiModalBase(mb, modal) {
|
|
1075
|
+
const { opts, stemLemma, stemIrregular, stemKind, preModalNeg, past, pastProjection, inputPolicy, sourceStemIsVerb, lookups, sahenShortNegationSplit } = mb;
|
|
1076
|
+
const sourceVerbalHost = stemKind === "verb" || sourceStemIsVerb === true;
|
|
1077
|
+
const alreadyNegativeScopeHost = inputPolicy?.kind === "scope_carrier" &&
|
|
1078
|
+
(stemLemma === "아니다" || stemLemma === "없다" || stemLemma === "않다");
|
|
1079
|
+
if (!sourceVerbalHost && !alreadyNegativeScopeHost) {
|
|
1080
|
+
return { ok: false, reason: "mai on non-verb 영역 외" };
|
|
1081
|
+
}
|
|
1082
|
+
if (past || preModalNeg !== null) {
|
|
1083
|
+
return { ok: false, reason: "mai with pre-modal tense/negation 영역 외" };
|
|
1084
|
+
}
|
|
1085
|
+
const [negativePrefix, negativeLemma, negativeIrregular] = alreadyNegativeScopeHost
|
|
1086
|
+
? ["", stemLemma, stemIrregular]
|
|
1087
|
+
: stemKind === "adj" && sourceStemIsVerb === true
|
|
1088
|
+
? ["", `${conjugate(stemLemma, stemIrregular, "지")} 않다`, null]
|
|
1089
|
+
: shortNegationPrefix(stemLemma, stemIrregular, opts.lookups, { sahenSplit: sahenShortNegationSplit });
|
|
1090
|
+
const stemAttr = modalInputStemAttributive({
|
|
1091
|
+
stemLemma: negativeLemma,
|
|
1092
|
+
stemIrregular: negativeIrregular,
|
|
1093
|
+
stemKind: sourceVerbalHost && stemKind === "verb" ? "verb" : "adj",
|
|
1094
|
+
past: false,
|
|
1095
|
+
preModalNeg: null,
|
|
1096
|
+
attrPolicy: "future",
|
|
1097
|
+
useShortHint: false,
|
|
1098
|
+
pastProjection,
|
|
1099
|
+
lookups,
|
|
1100
|
+
sahenShortNegationSplit,
|
|
1101
|
+
...(inputPolicy === undefined ? {} : { inputPolicy })
|
|
1102
|
+
});
|
|
1103
|
+
return {
|
|
1104
|
+
ok: true,
|
|
1105
|
+
base: scopeCarrierCopulaBase("mai", "거", `${negativePrefix}${stemAttr} `),
|
|
1106
|
+
sourceTrace: carrierCopulaSourceTrace(modal, `${negativePrefix}${stemAttr}`, " 거")
|
|
1107
|
+
};
|
|
1108
|
+
}
|
|
1109
|
+
function soudaHearsayModalBase(mb, modal) {
|
|
1110
|
+
const { opts, stemLemma, stemIrregular, stemKind, preModalNeg, past, pastProjection, inputPolicy, sourceStemIsVerb, lookups, sahenShortNegationSplit } = mb;
|
|
1111
|
+
if (modal.reading === "yotai") {
|
|
1112
|
+
return soudaYotaiBaseFromStem({
|
|
1113
|
+
modal,
|
|
1114
|
+
stemLemma,
|
|
1115
|
+
stemIrregular,
|
|
1116
|
+
stemKind,
|
|
1117
|
+
preModalNeg,
|
|
1118
|
+
past,
|
|
1119
|
+
pastProjection,
|
|
1120
|
+
lookups,
|
|
1121
|
+
sahenShortNegationSplit,
|
|
1122
|
+
...(sourceStemIsVerb === undefined ? {} : { sourceStemIsVerb }),
|
|
1123
|
+
...(inputPolicy === undefined ? {} : { inputPolicy })
|
|
1124
|
+
});
|
|
1125
|
+
}
|
|
1126
|
+
return soudaHearsayBaseFromPredicateBase(simpleStemBase(stemLemma, stemIrregular, stemKind === "verb"), preModalNeg, past, opts.lookups, modal);
|
|
1127
|
+
}
|
|
1128
|
+
function monoModalBase(mb, modal) {
|
|
1129
|
+
const { formal, stemAttributive } = mb;
|
|
1130
|
+
if (modal.reading === "admirative" || modal.reading === "habitual") {
|
|
1131
|
+
return { ok: false, reason: "mono admirative/habitual requires the composed predicate base" };
|
|
1132
|
+
}
|
|
1133
|
+
const stemAttr = stemAttributive("present", false);
|
|
1134
|
+
const noun = nodaCarrierNoun(formal);
|
|
1135
|
+
return {
|
|
1136
|
+
ok: true,
|
|
1137
|
+
base: scopeCarrierCopulaBase("mono", noun, `${stemAttr} `),
|
|
1138
|
+
sourceTrace: carrierCopulaSourceTrace(modal, stemAttr, ` ${noun}`)
|
|
1139
|
+
};
|
|
1140
|
+
}
|
|
1141
|
+
export function maiScopeCarrierBase(modal, inputBase) {
|
|
1142
|
+
const policy = inputBase.policy;
|
|
1143
|
+
if (policy?.kind !== "scope_carrier" ||
|
|
1144
|
+
policy.carrier !== "wake" ||
|
|
1145
|
+
policy.style !== "emphasis" ||
|
|
1146
|
+
policy.hostPrefix === undefined) {
|
|
1147
|
+
return null;
|
|
1148
|
+
}
|
|
1149
|
+
const negativeAttr = conjugate("아니다", "아니", "ㄹ/을");
|
|
1150
|
+
return {
|
|
1151
|
+
ok: true,
|
|
1152
|
+
base: scopeCarrierCopulaBase("mai", "거", `${policy.hostPrefix}것은 ${negativeAttr} `)
|
|
1153
|
+
};
|
|
1154
|
+
}
|
|
1155
|
+
function carrierCopulaHasExplicitSupport(source) {
|
|
1156
|
+
const de = source.tokens[1];
|
|
1157
|
+
return copulaDeMarkerRelationForToken(de, 1, { consumers: ["tail_render"] }) !== null &&
|
|
1158
|
+
((de.pos & POS4) === 助動詞_ダ) &&
|
|
1159
|
+
isAffirmativeCopulaSupportVerbToken(source.tokens[2]);
|
|
1160
|
+
}
|
|
1161
|
+
function carrierConnectiveSourcePolitenessOptions(source) {
|
|
1162
|
+
return carrierCopulaHasExplicitSupport(source)
|
|
1163
|
+
? { connectiveSourcePoliteness: "preserve_when_supported" }
|
|
1164
|
+
: {};
|
|
1165
|
+
}
|
|
1166
|
+
function nodaCarrierStyle(modal) {
|
|
1167
|
+
const de = modal.source.tokens[1];
|
|
1168
|
+
if (((de?.pos ?? 0) & POS4) === 助動詞_ジャ) {
|
|
1169
|
+
return "assertive_jya";
|
|
1170
|
+
}
|
|
1171
|
+
return carrierCopulaHasExplicitSupport(modal.source) ? "emphasis" : undefined;
|
|
1172
|
+
}
|
|
1173
|
+
function nodaCarrierHasSupportConjecture(modal) {
|
|
1174
|
+
if (!carrierCopulaHasExplicitSupport(modal.source)) {
|
|
1175
|
+
return false;
|
|
1176
|
+
}
|
|
1177
|
+
const support = modal.source.tokens[2];
|
|
1178
|
+
const politeConjecture = modal.source.tokens[3];
|
|
1179
|
+
return (support.pos & POS5A) === 意志推量形_ ||
|
|
1180
|
+
(politeConjecture !== undefined &&
|
|
1181
|
+
(politeConjecture.pos & (POS4 | POS5A)) === (助動詞_マス | 意志推量形_));
|
|
1182
|
+
}
|
|
1183
|
+
export function tokoroBaseFromPredicateBase(opts) {
|
|
1184
|
+
const { modal, base, preModalNeg, past, formal, pastProjection } = opts;
|
|
1185
|
+
if (preModalNeg !== null) {
|
|
1186
|
+
return null;
|
|
1187
|
+
}
|
|
1188
|
+
const tokoroCarrierOptions = carrierConnectiveSourcePolitenessOptions(modal.source);
|
|
1189
|
+
const inputProjection = (attr) => attr.startsWith(base.prefix) ? attr.slice(base.prefix.length) : attr;
|
|
1190
|
+
if (modal.reading === "place") {
|
|
1191
|
+
const attr = projectBaseAttributive(base, past, formal, pastProjection);
|
|
1192
|
+
if (attr === null) {
|
|
1193
|
+
return { ok: false, reason: "tokoro place host projection 영역 외" };
|
|
1194
|
+
}
|
|
1195
|
+
return {
|
|
1196
|
+
ok: true,
|
|
1197
|
+
base: scopeCarrierCopulaBase("tokoro", modal.nominalNoun ?? "곳", `${attr} `, tokoroCarrierOptions),
|
|
1198
|
+
sourceTrace: carrierCopulaSourceTrace(modal, inputProjection(attr), ` ${modal.nominalNoun ?? "곳"}`)
|
|
1199
|
+
};
|
|
1200
|
+
}
|
|
1201
|
+
if (modal.reading === "intention") {
|
|
1202
|
+
const attr = projectBaseAttributive(base, past, formal, pastProjection);
|
|
1203
|
+
if (attr === null) {
|
|
1204
|
+
return { ok: false, reason: "tokoro intention host projection 영역 외" };
|
|
1205
|
+
}
|
|
1206
|
+
return {
|
|
1207
|
+
ok: true,
|
|
1208
|
+
base: scopeCarrierCopulaBase("tokoro", modal.nominalNoun ?? "바", `${attr} `, tokoroCarrierOptions),
|
|
1209
|
+
sourceTrace: carrierCopulaSourceTrace(modal, inputProjection(attr), ` ${modal.nominalNoun ?? "바"}`)
|
|
1210
|
+
};
|
|
1211
|
+
}
|
|
1212
|
+
if (modal.reading === "temporal" && modal.variant === "progress_observation") {
|
|
1213
|
+
const attr = projectBaseAttributive(base, past, formal, pastProjection);
|
|
1214
|
+
if (attr === null) {
|
|
1215
|
+
return { ok: false, reason: "tokoro progress host projection 영역 외" };
|
|
1216
|
+
}
|
|
1217
|
+
return {
|
|
1218
|
+
ok: true,
|
|
1219
|
+
base: scopeCarrierCopulaBase("tokoro", "중", `${attr} `, tokoroCarrierOptions),
|
|
1220
|
+
sourceTrace: carrierCopulaSourceTrace(modal, inputProjection(attr), " 중")
|
|
1221
|
+
};
|
|
1222
|
+
}
|
|
1223
|
+
return null;
|
|
1224
|
+
}
|
|
1225
|
+
export function monoHostPredicateBase(modal, inputBase, preNeg) {
|
|
1226
|
+
const host = preNeg === null ? inputBase : applyNegationChainToLemmaBase(inputBase, preNeg);
|
|
1227
|
+
if (host === null || host.final.kind !== "lemma") {
|
|
1228
|
+
return { ok: false, reason: "mono host predicate base lowering 영역 외" };
|
|
1229
|
+
}
|
|
1230
|
+
if (modal.reading === "admirative") {
|
|
1231
|
+
return { ok: true, base: host, terminalRealization: { kind: "exclamative" } };
|
|
1232
|
+
}
|
|
1233
|
+
if (modal.reading === "habitual") {
|
|
1234
|
+
return {
|
|
1235
|
+
ok: true,
|
|
1236
|
+
base: {
|
|
1237
|
+
prefix: `${host.prefix}${conjugate(host.final.lemma, host.final.irregular, "곤")} `,
|
|
1238
|
+
final: { kind: "lemma", lemma: "하다", irregular: "여", isVerb: true }
|
|
1239
|
+
}
|
|
1240
|
+
};
|
|
1241
|
+
}
|
|
1242
|
+
return { ok: false, reason: "mono nominal reading uses the bound-noun carrier base" };
|
|
1243
|
+
}
|