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,724 @@
|
|
|
1
|
+
import { nextTransparentEvidenceIndex, previousNonSpaceIndex, previousTransparentEvidenceIndex } from "../clause-layout/trivia.js";
|
|
2
|
+
import { TokenCursor } from "../token-cursor.js";
|
|
3
|
+
import { activeProtoLayout } from "../clause-layout/proto-state.js";
|
|
4
|
+
import { QuoteHostMatch, markerBoundRelationalHeadSpanEndAt, isNominalSuffixToken } from "../quote/host-taxonomy.js";
|
|
5
|
+
import { caseParticleMarkerRelationForToken, nominalLinkMarkerRelationForToken, quoteHostSearchBridgeArgumentRelationAt } from "../head-tail/boundary/marker.js";
|
|
6
|
+
import { quoteMarkerRelationAt } from "../head-tail/boundary/quote-marker.js";
|
|
7
|
+
import { isAnimateReferentBeforeNi, isAnimateReferentToken, isHumanReferentToken } from "../head-tail/candidate/semantic-classifiers.js";
|
|
8
|
+
import { matchQuotedSareruTailAsClauseQuote } from "../quote/reporting-passive.js";
|
|
9
|
+
import { isTeConnectiveToken } from "../head-tail/tail/postverb-tail-classifier.js";
|
|
10
|
+
import { POS0, POS01, pos0in, isProperPersonNameToken, POS4, POS5A, PUNCTUATION_BITS, 記号, 助詞, 助詞_準体助詞, 助動詞, 助動詞_ダ, 接続助詞, 接頭辞, 動詞_非自立可能, 補助記号, 連体詞, 連用形_, isLexicalAdverb, isNaAdjCapableNoun, NOMINAL_BITS, INFLECTABLE_AUX_BITS } from "../../types/pos.js";
|
|
11
|
+
import { IU_LEXEME_FORMS } from "../head-tail/data/quoted-reporting-sets.js";
|
|
12
|
+
import { quoteContentTailStart, posLooksPredicateEvidence } from "./quote-content-span.js";
|
|
13
|
+
const TE_SHIMAU_CONTRACTION_FORMS = new Set(["ちゃう", "じゃう", "ちまう", "じまう"]);
|
|
14
|
+
export function quoteRelationHostHasPassiveAux(tokens, relation, end = tokens.length) {
|
|
15
|
+
return quoteHostHasPassiveAuxInRange(tokens, relation.quote.hostMatch.hostIdx + 1, end);
|
|
16
|
+
}
|
|
17
|
+
export function quoteHostAllowsBareNominalContent(tokens, relation, lookups) {
|
|
18
|
+
const registry = lookups.QUOTE_HOST_REGISTRY;
|
|
19
|
+
const host = relation.quote.hostMatch;
|
|
20
|
+
if (quoteMarkerPreemptedByNearerQuoteMarker(tokens, relation, lookups) ||
|
|
21
|
+
quoteHostUnreachableFromMarkerClause(tokens, relation)) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
if (registry.hostHasCapability(host, "bare_nominal_quote")) {
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
if (registry.hostHasCapability(host, "bare_nominal_passive_quote") &&
|
|
28
|
+
quoteHostHasBareNominalPassiveEvidence(tokens, relation, lookups)) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
if (relation.quote.markerBaseSurface === "って" &&
|
|
32
|
+
registry.hostHasCapability(host, "bare_nominal_colloquial_quote")) {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
35
|
+
if (registry.hostHasCapability(host, "bare_nominal_hearsay_quote") &&
|
|
36
|
+
quoteHostHasBareNominalHearsayEvidence(tokens, relation, lookups)) {
|
|
37
|
+
return true;
|
|
38
|
+
}
|
|
39
|
+
if (registry.hostHasCapability(host, "bare_nominal_object_label_quote") &&
|
|
40
|
+
quoteHostHasLabelableObjectArgumentBeforeMarker(tokens, relation, lookups)) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
if (registry.hostHasCapability(host, "bare_nominal_focus_quote") &&
|
|
44
|
+
quoteHostHasBareNominalFocusEvidence(relation)) {
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
function quoteHostHasBareNominalFocusEvidence(relation) {
|
|
50
|
+
return relation.quote.focusParticle === "でも";
|
|
51
|
+
}
|
|
52
|
+
export function quoteStructuralRelationLooksBareNominalContent(tokens, relation) {
|
|
53
|
+
if (relation.quote.markerBaseSurface !== "と" && relation.quote.markerBaseSurface !== "って") {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
if (relation.quote.slotKind !== "quoted_content" || relation.quote.contentSpan.endExclusive !== relation.quote.markerIdx) {
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
const phraseStart = quoteContentTailStart(tokens, relation.quote.contentSpan.start, relation.quote.contentSpan.endExclusive);
|
|
60
|
+
if (phraseStart === null) {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
if (quoteContentTailIsPredicateBoundTame(tokens, relation, phraseStart)) {
|
|
64
|
+
return false;
|
|
65
|
+
}
|
|
66
|
+
let sawNominalHead = false;
|
|
67
|
+
const nominalCursor = new TokenCursor(tokens, phraseStart, relation.quote.contentSpan.endExclusive);
|
|
68
|
+
while (nominalCursor.pos < nominalCursor.end) {
|
|
69
|
+
const index = nominalCursor.pos;
|
|
70
|
+
const token = nominalCursor.current();
|
|
71
|
+
const pos0 = (token?.pos ?? 0) & POS0;
|
|
72
|
+
nominalCursor.advance();
|
|
73
|
+
if (pos0in(pos0, NOMINAL_BITS)) {
|
|
74
|
+
sawNominalHead = true;
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (pos0 === 接頭辞 || pos0 === 連体詞 || isNominalSuffixToken(token)) {
|
|
78
|
+
continue;
|
|
79
|
+
}
|
|
80
|
+
if (nominalLinkMarkerRelationForToken(token, index, { consumers: ["quote_content"] }) !== null) {
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
return false;
|
|
84
|
+
}
|
|
85
|
+
return sawNominalHead;
|
|
86
|
+
}
|
|
87
|
+
function quoteBareNominalContentHasAdjectivalDistribution(tokens, relation) {
|
|
88
|
+
if (!quoteStructuralRelationLooksBareNominalContent(tokens, relation)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
const phraseStart = quoteContentTailStart(tokens, relation.quote.contentSpan.start, relation.quote.contentSpan.endExclusive);
|
|
92
|
+
if (phraseStart === null) {
|
|
93
|
+
return false;
|
|
94
|
+
}
|
|
95
|
+
const adjCursor = new TokenCursor(tokens, phraseStart, relation.quote.contentSpan.endExclusive);
|
|
96
|
+
while (adjCursor.pos < adjCursor.end) {
|
|
97
|
+
const token = adjCursor.current();
|
|
98
|
+
const pos0 = (token?.pos ?? 0) & POS0;
|
|
99
|
+
adjCursor.advance();
|
|
100
|
+
if (token !== undefined && pos0in(pos0, NOMINAL_BITS) && isNaAdjCapableNoun(token)) {
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
return false;
|
|
105
|
+
}
|
|
106
|
+
export function quoteContentRightEdgeHasAdjectivalDistribution(tokens, relation) {
|
|
107
|
+
if (relation.quote.markerBaseSurface !== "と" ||
|
|
108
|
+
relation.quote.slotKind !== "quoted_content" ||
|
|
109
|
+
relation.quote.contentSpan.endExclusive !== relation.quote.markerIdx) {
|
|
110
|
+
return false;
|
|
111
|
+
}
|
|
112
|
+
const headIdx = previousNonSpaceIndex(tokens, relation.quote.markerIdx, relation.quote.contentSpan.start);
|
|
113
|
+
if (headIdx === null) {
|
|
114
|
+
return false;
|
|
115
|
+
}
|
|
116
|
+
const token = tokens[headIdx];
|
|
117
|
+
return token !== undefined && pos0in(token.pos & POS0, NOMINAL_BITS) && isNaAdjCapableNoun(token);
|
|
118
|
+
}
|
|
119
|
+
function quoteContentTailIsPredicateBoundTame(tokens, relation, tailStart) {
|
|
120
|
+
const tailHead = onlyContentTokenInSpan(tokens, tailStart, relation.quote.contentSpan.endExclusive);
|
|
121
|
+
if (tailHead === null) {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
const token = tokens[tailHead];
|
|
125
|
+
const form = token?.dictionaryForm || token?.surface;
|
|
126
|
+
if (form !== "ため" && form !== "為") {
|
|
127
|
+
return false;
|
|
128
|
+
}
|
|
129
|
+
const predCursor = new TokenCursor(tokens, relation.quote.contentSpan.start, tailStart);
|
|
130
|
+
while (predCursor.pos < predCursor.end) {
|
|
131
|
+
if (posLooksPredicateEvidence(predCursor.current()?.pos ?? 0)) {
|
|
132
|
+
return true;
|
|
133
|
+
}
|
|
134
|
+
predCursor.advance();
|
|
135
|
+
}
|
|
136
|
+
return false;
|
|
137
|
+
}
|
|
138
|
+
function onlyContentTokenInSpan(tokens, start, endExclusive) {
|
|
139
|
+
let only = null;
|
|
140
|
+
const onlyCursor = new TokenCursor(tokens, start, endExclusive);
|
|
141
|
+
while (onlyCursor.pos < onlyCursor.end) {
|
|
142
|
+
const index = onlyCursor.pos;
|
|
143
|
+
onlyCursor.advance();
|
|
144
|
+
if (only !== null) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
only = index;
|
|
148
|
+
}
|
|
149
|
+
return only;
|
|
150
|
+
}
|
|
151
|
+
function quoteHostHasBareNominalHearsayEvidence(tokens, relation, lookups) {
|
|
152
|
+
if (relation.quote.hostMatch.kind !== "question" ||
|
|
153
|
+
!quoteStructuralRelationLooksBareNominalContent(tokens, relation) ||
|
|
154
|
+
!quoteMarkerBelongsToHostPredicate(tokens, relation)) {
|
|
155
|
+
return false;
|
|
156
|
+
}
|
|
157
|
+
return !quoteHostHasSamePredicateObjectArgument(tokens, relation) &&
|
|
158
|
+
!quoteHostHasCompanionCueBetweenMarkerAndHost(tokens, relation, lookups) &&
|
|
159
|
+
!quoteBareNominalContentFillsHostCompanionSlot(tokens, relation, lookups);
|
|
160
|
+
}
|
|
161
|
+
function quoteBareNominalContentFillsHostCompanionSlot(tokens, relation, lookups) {
|
|
162
|
+
const headIdx = previousNominalHeadBefore(tokens, relation.quote.markerIdx, relation.quote.contentSpan.start);
|
|
163
|
+
const head = headIdx === null ? undefined : tokens[headIdx];
|
|
164
|
+
if (head === undefined || !isProperPersonNameToken(head) || !isHumanReferentToken(head, lookups)) {
|
|
165
|
+
return false;
|
|
166
|
+
}
|
|
167
|
+
return quoteHostHasAdditiveParticipantBetweenMarkerAndHost(tokens, relation, lookups);
|
|
168
|
+
}
|
|
169
|
+
function quoteHostHasAdditiveParticipantBetweenMarkerAndHost(tokens, relation, lookups) {
|
|
170
|
+
const clause = activeProtoLayout()?.clauseContaining(relation.quote.hostMatch.hostIdx);
|
|
171
|
+
const hostStart = relation.quote.hostMatch.supportIdx ?? relation.quote.hostMatch.hostIdx;
|
|
172
|
+
const end = Math.min(hostStart, clause?.end ?? hostStart);
|
|
173
|
+
for (let index = relation.quote.markerIdx + 1; index < end; index += 1) {
|
|
174
|
+
const headIdx = previousNominalHeadBefore(tokens, index, relation.quote.markerIdx + 1);
|
|
175
|
+
const participant = headIdx === null ? undefined : tokens[headIdx];
|
|
176
|
+
if (headIdx === null || participant === undefined || !isAnimateReferentToken(participant, lookups)) {
|
|
177
|
+
continue;
|
|
178
|
+
}
|
|
179
|
+
const bridge = quoteHostSearchBridgeArgumentRelationAt(tokens, index, {
|
|
180
|
+
consumers: ["quote_content"],
|
|
181
|
+
headIdx
|
|
182
|
+
});
|
|
183
|
+
if (bridge?.argumentKind === "subject_topic" && bridge.surface === "も") {
|
|
184
|
+
return true;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
return false;
|
|
188
|
+
}
|
|
189
|
+
export function quoteHostHasBareNominalPassiveEvidence(tokens, relation, lookups) {
|
|
190
|
+
if (!quoteReportingPassiveHostNeedsCompanionDisambiguation(relation.quote.hostMatch, lookups)) {
|
|
191
|
+
return quoteRelationHostHasPassiveAux(tokens, relation);
|
|
192
|
+
}
|
|
193
|
+
if (!quoteStructuralRelationLooksBareNominalContent(tokens, relation)) {
|
|
194
|
+
return false;
|
|
195
|
+
}
|
|
196
|
+
return quoteReportingPassiveMarkerEvidence(tokens, relation, lookups);
|
|
197
|
+
}
|
|
198
|
+
export function quoteReportingPassiveMarkerEvidence(tokens, relation, lookups) {
|
|
199
|
+
if (relation.quote.markerBaseSurface !== "と" ||
|
|
200
|
+
!quoteRelationHostHasPassiveAux(tokens, relation) ||
|
|
201
|
+
!quoteMarkerBelongsToHostPredicate(tokens, relation) ||
|
|
202
|
+
!quoteMarkerImmediatelyPrecedesHost(tokens, relation)) {
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
return !quoteHostHasSamePredicateObjectArgument(tokens, relation) &&
|
|
206
|
+
!quoteHostHasCompanionCueBetweenMarkerAndHost(tokens, relation, lookups);
|
|
207
|
+
}
|
|
208
|
+
export function quoteReportingPassiveHostNeedsCompanionDisambiguation(host, lookups) {
|
|
209
|
+
return lookups.QUOTE_HOST_REGISTRY.hostHasCapability(host, "companion_disambiguated_passive_quote");
|
|
210
|
+
}
|
|
211
|
+
function quoteMarkerImmediatelyPrecedesHost(tokens, relation) {
|
|
212
|
+
const hostStart = relation.quote.hostMatch.supportIdx ?? relation.quote.hostMatch.hostIdx;
|
|
213
|
+
const next = nextTransparentEvidenceIndex(tokens, relation.quote.markerIdx + 1, {
|
|
214
|
+
endExclusive: hostStart + 1,
|
|
215
|
+
isTransparentToken: (token) => {
|
|
216
|
+
const pos0 = token.pos & POS0;
|
|
217
|
+
return pos0 === 補助記号 || pos0 === 記号;
|
|
218
|
+
}
|
|
219
|
+
});
|
|
220
|
+
return next?.index === hostStart;
|
|
221
|
+
}
|
|
222
|
+
function quoteMarkerPreemptedByNearerQuoteMarker(tokens, relation, lookups) {
|
|
223
|
+
const proto = activeProtoLayout();
|
|
224
|
+
const clause = proto?.clauseContaining(relation.quote.hostMatch.hostIdx);
|
|
225
|
+
if (proto === null || clause === undefined) {
|
|
226
|
+
return false;
|
|
227
|
+
}
|
|
228
|
+
const hostStart = relation.quote.hostMatch.supportIdx ?? relation.quote.hostMatch.hostIdx;
|
|
229
|
+
for (const particleIdx of clause.particleIndices) {
|
|
230
|
+
if (particleIdx <= relation.quote.markerIdx || particleIdx >= hostStart) {
|
|
231
|
+
continue;
|
|
232
|
+
}
|
|
233
|
+
if (quoteMarkerRelationAt(tokens, particleIdx, { consumers: ["quote_content"] }) === null) {
|
|
234
|
+
continue;
|
|
235
|
+
}
|
|
236
|
+
if (companionCueFollowsMarker(tokens, particleIdx, hostStart, lookups)) {
|
|
237
|
+
continue;
|
|
238
|
+
}
|
|
239
|
+
return true;
|
|
240
|
+
}
|
|
241
|
+
return false;
|
|
242
|
+
}
|
|
243
|
+
function companionCueFollowsMarker(tokens, markerIdx, endExclusive, lookups) {
|
|
244
|
+
const evidence = nextTransparentEvidenceIndex(tokens, markerIdx + 1, {
|
|
245
|
+
endExclusive,
|
|
246
|
+
isTransparentToken: (token) => {
|
|
247
|
+
const pos0 = token.pos & POS0;
|
|
248
|
+
return pos0 === 補助記号 || pos0 === 記号;
|
|
249
|
+
}
|
|
250
|
+
});
|
|
251
|
+
if (evidence === null) {
|
|
252
|
+
return false;
|
|
253
|
+
}
|
|
254
|
+
return companionCueSpanEndAt(tokens, evidence.index, endExclusive, lookups) !== null;
|
|
255
|
+
}
|
|
256
|
+
function quoteHostUnreachableFromMarkerClause(tokens, relation) {
|
|
257
|
+
const proto = activeProtoLayout();
|
|
258
|
+
if (proto === null) {
|
|
259
|
+
return false;
|
|
260
|
+
}
|
|
261
|
+
const hostClauseIdx = proto.clauseIndexOfToken(relation.quote.hostMatch.hostIdx);
|
|
262
|
+
const hostClause = hostClauseIdx < 0 ? undefined : proto.protoClauses[hostClauseIdx];
|
|
263
|
+
if (hostClause === undefined || hostClause.kind !== "relative") {
|
|
264
|
+
return false;
|
|
265
|
+
}
|
|
266
|
+
if (relation.quote.markerIdx >= hostClause.start && relation.quote.markerIdx < hostClause.end) {
|
|
267
|
+
return false;
|
|
268
|
+
}
|
|
269
|
+
return !quoteMarkerClauseSuppliesHostArgument(tokens, relation);
|
|
270
|
+
}
|
|
271
|
+
function quoteMarkerClauseSuppliesHostArgument(tokens, relation) {
|
|
272
|
+
const proto = activeProtoLayout();
|
|
273
|
+
const clause = proto?.clauseContaining(relation.quote.markerIdx);
|
|
274
|
+
if (proto === null || clause === undefined) {
|
|
275
|
+
return false;
|
|
276
|
+
}
|
|
277
|
+
for (const particleIdx of clause.particleIndices) {
|
|
278
|
+
if (particleIdx === relation.quote.markerIdx) {
|
|
279
|
+
continue;
|
|
280
|
+
}
|
|
281
|
+
if (caseParticleMarkerRelationForToken(tokens[particleIdx], particleIdx, {
|
|
282
|
+
consumers: ["quote_content"]
|
|
283
|
+
}) === null) {
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
const ownerPredicateIdx = proto.followingPredicateEvidenceIndexAfter(tokens, particleIdx, {
|
|
287
|
+
limit: relation.quote.hostMatch.hostIdx + 1
|
|
288
|
+
});
|
|
289
|
+
if (ownerPredicateIdx === relation.quote.hostMatch.hostIdx) {
|
|
290
|
+
return true;
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
function quoteMarkerBelongsToHostPredicate(tokens, relation) {
|
|
296
|
+
const proto = activeProtoLayout();
|
|
297
|
+
if (proto === null) {
|
|
298
|
+
return false;
|
|
299
|
+
}
|
|
300
|
+
const ownerPredicateIdx = proto.followingPredicateEvidenceIndexAfter(tokens, relation.quote.markerIdx, {
|
|
301
|
+
limit: relation.quote.hostMatch.hostIdx + 1
|
|
302
|
+
});
|
|
303
|
+
return ownerPredicateIdx === relation.quote.hostMatch.hostIdx;
|
|
304
|
+
}
|
|
305
|
+
function quoteHostHasSamePredicateObjectArgument(tokens, relation) {
|
|
306
|
+
const proto = activeProtoLayout();
|
|
307
|
+
const clause = proto?.clauseContaining(relation.quote.hostMatch.hostIdx);
|
|
308
|
+
if (proto === null || clause === undefined) {
|
|
309
|
+
return false;
|
|
310
|
+
}
|
|
311
|
+
for (const particleIdx of clause.particleIndices) {
|
|
312
|
+
if (particleIdx >= relation.quote.hostMatch.hostIdx || particleIdx === relation.quote.markerIdx) {
|
|
313
|
+
continue;
|
|
314
|
+
}
|
|
315
|
+
if (caseParticleMarkerRelationForToken(tokens[particleIdx], particleIdx, {
|
|
316
|
+
acceptedSurfaces: ["を"],
|
|
317
|
+
consumers: ["quote_content"]
|
|
318
|
+
}) === null) {
|
|
319
|
+
continue;
|
|
320
|
+
}
|
|
321
|
+
const ownerPredicateIdx = proto.followingPredicateEvidenceIndexAfter(tokens, particleIdx, {
|
|
322
|
+
limit: relation.quote.hostMatch.hostIdx + 1
|
|
323
|
+
});
|
|
324
|
+
if (ownerPredicateIdx === relation.quote.hostMatch.hostIdx) {
|
|
325
|
+
return true;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
return false;
|
|
329
|
+
}
|
|
330
|
+
function companionCueSpanEndAt(tokens, idx, endExclusive, lookups) {
|
|
331
|
+
return markerBoundRelationalHeadSpanEndAt(tokens, idx, endExclusive, lookups, ["bare_nominal_hearsay_companion_cues"]);
|
|
332
|
+
}
|
|
333
|
+
function quoteHostHasCompanionCueBetweenMarkerAndHost(tokens, relation, lookups) {
|
|
334
|
+
const proto = activeProtoLayout();
|
|
335
|
+
const clause = proto?.clauseContaining(relation.quote.hostMatch.hostIdx);
|
|
336
|
+
const hostStart = relation.quote.hostMatch.supportIdx ?? relation.quote.hostMatch.hostIdx;
|
|
337
|
+
const end = Math.min(hostStart, clause?.end ?? hostStart);
|
|
338
|
+
let index = relation.quote.markerIdx + 1;
|
|
339
|
+
while (index < end) {
|
|
340
|
+
const evidence = nextTransparentEvidenceIndex(tokens, index, {
|
|
341
|
+
endExclusive: end,
|
|
342
|
+
isTransparentToken: (token) => {
|
|
343
|
+
const pos0 = token.pos & POS0;
|
|
344
|
+
return pos0 === 補助記号 || pos0 === 記号;
|
|
345
|
+
}
|
|
346
|
+
});
|
|
347
|
+
if (evidence === null) {
|
|
348
|
+
return false;
|
|
349
|
+
}
|
|
350
|
+
index = evidence.index;
|
|
351
|
+
const token = tokens[index];
|
|
352
|
+
if (token === undefined) {
|
|
353
|
+
return false;
|
|
354
|
+
}
|
|
355
|
+
if (companionCueSpanEndAt(tokens, index, end, lookups) !== null) {
|
|
356
|
+
return true;
|
|
357
|
+
}
|
|
358
|
+
index += 1;
|
|
359
|
+
}
|
|
360
|
+
return false;
|
|
361
|
+
}
|
|
362
|
+
function quoteHostHasLabelableObjectArgumentBeforeMarker(tokens, relation, lookups) {
|
|
363
|
+
const proto = activeProtoLayout();
|
|
364
|
+
const clause = proto?.clauseContaining(relation.quote.hostMatch.hostIdx);
|
|
365
|
+
if (proto === null || clause === undefined) {
|
|
366
|
+
return false;
|
|
367
|
+
}
|
|
368
|
+
for (const particleIdx of clause.particleIndices) {
|
|
369
|
+
if (particleIdx >= relation.quote.markerIdx || particleIdx >= relation.quote.hostMatch.hostIdx) {
|
|
370
|
+
continue;
|
|
371
|
+
}
|
|
372
|
+
if (caseParticleMarkerRelationForToken(tokens[particleIdx], particleIdx, {
|
|
373
|
+
acceptedSurfaces: ["を"],
|
|
374
|
+
consumers: ["quote_content"]
|
|
375
|
+
}) !== null) {
|
|
376
|
+
const ownerPredicateIdx = proto.followingPredicateEvidenceIndexAfter(tokens, particleIdx, {
|
|
377
|
+
limit: relation.quote.hostMatch.hostIdx + 1
|
|
378
|
+
});
|
|
379
|
+
if (ownerPredicateIdx !== relation.quote.hostMatch.hostIdx) {
|
|
380
|
+
continue;
|
|
381
|
+
}
|
|
382
|
+
const objectHeadIdx = previousNominalHeadBefore(tokens, particleIdx, clause.start);
|
|
383
|
+
const objectHead = objectHeadIdx === null ? undefined : tokens[objectHeadIdx];
|
|
384
|
+
const objectForm = objectHead?.dictionaryForm || objectHead?.surface;
|
|
385
|
+
return lookups.QUOTE_HOST_REGISTRY.evidenceSetHas("bare_nominal_object_label_object_nouns", objectForm);
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return false;
|
|
389
|
+
}
|
|
390
|
+
function previousNominalHeadBefore(tokens, beforeIdx, lowerBound) {
|
|
391
|
+
const evidence = previousTransparentEvidenceIndex(tokens, beforeIdx, {
|
|
392
|
+
lowerBoundInclusive: lowerBound,
|
|
393
|
+
isTransparentToken: (token) => isNominalSuffixToken(token)
|
|
394
|
+
});
|
|
395
|
+
if (evidence === null) {
|
|
396
|
+
return null;
|
|
397
|
+
}
|
|
398
|
+
const token = tokens[evidence.index];
|
|
399
|
+
if (token !== undefined && (pos0in(token.pos, NOMINAL_BITS))) {
|
|
400
|
+
return evidence.index;
|
|
401
|
+
}
|
|
402
|
+
return null;
|
|
403
|
+
}
|
|
404
|
+
function quoteHostHasPassiveAuxInRange(tokens, pos, end) {
|
|
405
|
+
let index = pos;
|
|
406
|
+
while (index < end) {
|
|
407
|
+
const evidence = nextTransparentEvidenceIndex(tokens, index, { endExclusive: end });
|
|
408
|
+
if (evidence === null) {
|
|
409
|
+
return false;
|
|
410
|
+
}
|
|
411
|
+
index = evidence.index;
|
|
412
|
+
const token = tokens[index];
|
|
413
|
+
if (token === undefined) {
|
|
414
|
+
return false;
|
|
415
|
+
}
|
|
416
|
+
if ((token.pos & POS0) === 助動詞) {
|
|
417
|
+
const form = token.dictionaryForm || token.surface;
|
|
418
|
+
if (form === "れる" || form === "られる") {
|
|
419
|
+
return true;
|
|
420
|
+
}
|
|
421
|
+
index += 1;
|
|
422
|
+
continue;
|
|
423
|
+
}
|
|
424
|
+
if (pos0in(token.pos, (1 << 助詞) | PUNCTUATION_BITS)) {
|
|
425
|
+
return false;
|
|
426
|
+
}
|
|
427
|
+
return false;
|
|
428
|
+
}
|
|
429
|
+
return false;
|
|
430
|
+
}
|
|
431
|
+
export function quoteReportingPassiveIsBeTold(tokens, relation, lookups) {
|
|
432
|
+
return !quoteRelationHostIsAttributive(tokens, relation) &&
|
|
433
|
+
quoteReportingPassiveHostEventIsBeTold(tokens, relation, lookups);
|
|
434
|
+
}
|
|
435
|
+
export function quoteReportingPassiveHostRealizesBeTold(tokens, relation, lookups, committedContentBeTold) {
|
|
436
|
+
if (quoteRelationHostIsAttributive(tokens, relation)) {
|
|
437
|
+
return quoteReportingPassiveHostEventIsBeTold(tokens, relation, lookups);
|
|
438
|
+
}
|
|
439
|
+
return committedContentBeTold ?? quoteReportingPassiveIsBeTold(tokens, relation, lookups);
|
|
440
|
+
}
|
|
441
|
+
export function quoteReportingPassiveHostEventIsBeTold(tokens, relation, lookups) {
|
|
442
|
+
if (relation.quote.slotKind !== "quoted_content" ||
|
|
443
|
+
!quoteRelationHostIsIu(relation) ||
|
|
444
|
+
!quoteRelationHostHasPassiveAux(tokens, relation)) {
|
|
445
|
+
return false;
|
|
446
|
+
}
|
|
447
|
+
if (quoteRelationHasAnimateNiAgent(tokens, relation, lookups)) {
|
|
448
|
+
return true;
|
|
449
|
+
}
|
|
450
|
+
if (quoteRelationHostHasNominalizerTail(tokens, relation)) {
|
|
451
|
+
return true;
|
|
452
|
+
}
|
|
453
|
+
if (quoteRelationHostHasTeIruAux(tokens, relation)) {
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
if (quoteRelationHostHasTeFormConnectiveTail(tokens, relation)) {
|
|
457
|
+
return true;
|
|
458
|
+
}
|
|
459
|
+
if (quoteRelationLooksBareNominalLabel(tokens, relation)) {
|
|
460
|
+
return false;
|
|
461
|
+
}
|
|
462
|
+
return quoteRelationHostHasPastAux(tokens, relation);
|
|
463
|
+
}
|
|
464
|
+
function quoteRelationHostHasTeFormConnectiveTail(tokens, relation) {
|
|
465
|
+
let index = relation.quote.hostMatch.hostIdx + 1;
|
|
466
|
+
while (index < tokens.length) {
|
|
467
|
+
const token = tokens[index];
|
|
468
|
+
if (token === undefined) {
|
|
469
|
+
return false;
|
|
470
|
+
}
|
|
471
|
+
const pos0 = token.pos & POS0;
|
|
472
|
+
if (isTeConnectiveToken(token)) {
|
|
473
|
+
return !teFollowedByStateAspectAux(tokens, index + 1);
|
|
474
|
+
}
|
|
475
|
+
if (TE_SHIMAU_CONTRACTION_FORMS.has(token.dictionaryForm || token.surface)) {
|
|
476
|
+
return teShimauFollowedByConnectiveContinuation(tokens, index + 1);
|
|
477
|
+
}
|
|
478
|
+
if (pos0 === 助動詞 || (token.pos & POS01) === 動詞_非自立可能) {
|
|
479
|
+
index += 1;
|
|
480
|
+
continue;
|
|
481
|
+
}
|
|
482
|
+
return false;
|
|
483
|
+
}
|
|
484
|
+
return false;
|
|
485
|
+
}
|
|
486
|
+
function teFollowedByStateAspectAux(tokens, from) {
|
|
487
|
+
let index = from;
|
|
488
|
+
while (index < tokens.length) {
|
|
489
|
+
const token = tokens[index];
|
|
490
|
+
if (token === undefined) {
|
|
491
|
+
return false;
|
|
492
|
+
}
|
|
493
|
+
const form = token.dictionaryForm || token.surface;
|
|
494
|
+
return form === "いる" || form === "てる" || form === "おる" || form === "居る";
|
|
495
|
+
}
|
|
496
|
+
return false;
|
|
497
|
+
}
|
|
498
|
+
function teShimauFollowedByConnectiveContinuation(tokens, from) {
|
|
499
|
+
let index = from;
|
|
500
|
+
while (index < tokens.length) {
|
|
501
|
+
const token = tokens[index];
|
|
502
|
+
if (token === undefined) {
|
|
503
|
+
return false;
|
|
504
|
+
}
|
|
505
|
+
const pos0 = token.pos & POS0;
|
|
506
|
+
if ((token.pos & POS01) === (助詞 | 接続助詞) || isTeConnectiveToken(token)) {
|
|
507
|
+
return true;
|
|
508
|
+
}
|
|
509
|
+
if (pos0 === 助動詞 || (token.pos & POS01) === 動詞_非自立可能) {
|
|
510
|
+
index += 1;
|
|
511
|
+
continue;
|
|
512
|
+
}
|
|
513
|
+
return false;
|
|
514
|
+
}
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
function quoteRelationHostHasNominalizerTail(tokens, relation) {
|
|
518
|
+
let index = relation.quote.hostMatch.hostIdx + 1;
|
|
519
|
+
while (index < tokens.length) {
|
|
520
|
+
const token = tokens[index];
|
|
521
|
+
if (token === undefined) {
|
|
522
|
+
return false;
|
|
523
|
+
}
|
|
524
|
+
const pos0 = token.pos & POS0;
|
|
525
|
+
if ((token.pos & POS01) === 助詞_準体助詞) {
|
|
526
|
+
return true;
|
|
527
|
+
}
|
|
528
|
+
if (pos0 === 助動詞 || (token.pos & POS01) === 動詞_非自立可能) {
|
|
529
|
+
index += 1;
|
|
530
|
+
continue;
|
|
531
|
+
}
|
|
532
|
+
return false;
|
|
533
|
+
}
|
|
534
|
+
return false;
|
|
535
|
+
}
|
|
536
|
+
function quoteRelationHostHasPastAux(tokens, relation) {
|
|
537
|
+
let index = relation.quote.hostMatch.hostIdx + 1;
|
|
538
|
+
while (index < tokens.length) {
|
|
539
|
+
const token = tokens[index];
|
|
540
|
+
if (token === undefined) {
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
const pos0 = token.pos & POS0;
|
|
544
|
+
if (pos0 === 助動詞 || pos0 === 助詞 || (token.pos & POS01) === 動詞_非自立可能) {
|
|
545
|
+
if ((token.dictionaryForm || token.surface) === "た") {
|
|
546
|
+
return true;
|
|
547
|
+
}
|
|
548
|
+
index += 1;
|
|
549
|
+
continue;
|
|
550
|
+
}
|
|
551
|
+
return false;
|
|
552
|
+
}
|
|
553
|
+
return false;
|
|
554
|
+
}
|
|
555
|
+
function quoteRelationHostIsAttributive(tokens, relation) {
|
|
556
|
+
let index = relation.quote.hostMatch.hostIdx + 1;
|
|
557
|
+
while (index < tokens.length) {
|
|
558
|
+
const token = tokens[index];
|
|
559
|
+
if (token === undefined) {
|
|
560
|
+
return false;
|
|
561
|
+
}
|
|
562
|
+
const pos0 = token.pos & POS0;
|
|
563
|
+
if (pos0 === 助動詞 || (token.pos & POS01) === 動詞_非自立可能) {
|
|
564
|
+
index += 1;
|
|
565
|
+
continue;
|
|
566
|
+
}
|
|
567
|
+
return pos0in(pos0, NOMINAL_BITS);
|
|
568
|
+
}
|
|
569
|
+
return false;
|
|
570
|
+
}
|
|
571
|
+
function quoteRelationHostIsIu(relation) {
|
|
572
|
+
return IU_LEXEME_FORMS.has(relation.quote.hostMatch.hostForm);
|
|
573
|
+
}
|
|
574
|
+
function quoteRelationHostHasTeIruAux(tokens, relation) {
|
|
575
|
+
let index = relation.quote.hostMatch.hostIdx + 1;
|
|
576
|
+
while (index < tokens.length) {
|
|
577
|
+
const token = tokens[index];
|
|
578
|
+
if (token === undefined) {
|
|
579
|
+
return false;
|
|
580
|
+
}
|
|
581
|
+
const pos0 = token.pos & POS0;
|
|
582
|
+
if (pos0 === 助動詞 || pos0 === 助詞 || (token.pos & POS01) === 動詞_非自立可能) {
|
|
583
|
+
const form = token.dictionaryForm || token.surface;
|
|
584
|
+
if (form === "いる" || form === "てる" || form === "おる" || form === "居る") {
|
|
585
|
+
return true;
|
|
586
|
+
}
|
|
587
|
+
index += 1;
|
|
588
|
+
continue;
|
|
589
|
+
}
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
return false;
|
|
593
|
+
}
|
|
594
|
+
function quoteRelationHasAnimateNiAgent(tokens, relation, lookups) {
|
|
595
|
+
const proto = activeProtoLayout();
|
|
596
|
+
const hostIdx = relation.quote.hostMatch.hostIdx;
|
|
597
|
+
const clause = proto?.clauseContaining(hostIdx);
|
|
598
|
+
const contentStart = relation.quote.contentSpan.start;
|
|
599
|
+
const markerIdx = relation.quote.markerIdx;
|
|
600
|
+
if (proto !== null && clause !== undefined) {
|
|
601
|
+
for (const particleIdx of clause.particleIndices) {
|
|
602
|
+
if (particleIdx >= hostIdx || (particleIdx >= contentStart && particleIdx <= markerIdx)) {
|
|
603
|
+
continue;
|
|
604
|
+
}
|
|
605
|
+
if (caseParticleMarkerRelationForToken(tokens[particleIdx], particleIdx, {
|
|
606
|
+
acceptedSurfaces: ["に"],
|
|
607
|
+
consumers: ["quote_content"]
|
|
608
|
+
}) !== null &&
|
|
609
|
+
isAnimateReferentBeforeNi(tokens, particleIdx, lookups)) {
|
|
610
|
+
return true;
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
return false;
|
|
614
|
+
}
|
|
615
|
+
for (let index = markerIdx + 1; index < hostIdx; index += 1) {
|
|
616
|
+
if (caseParticleMarkerRelationForToken(tokens[index], index, {
|
|
617
|
+
acceptedSurfaces: ["に"],
|
|
618
|
+
consumers: ["quote_content"]
|
|
619
|
+
}) !== null &&
|
|
620
|
+
isAnimateReferentBeforeNi(tokens, index, lookups)) {
|
|
621
|
+
return true;
|
|
622
|
+
}
|
|
623
|
+
}
|
|
624
|
+
return false;
|
|
625
|
+
}
|
|
626
|
+
export function quoteRelationLooksBareNominalLabel(tokens, relation) {
|
|
627
|
+
if (relation.quote.markerSurface === "とかって") {
|
|
628
|
+
return false;
|
|
629
|
+
}
|
|
630
|
+
if (quoteRelationHasCopulaAux(tokens, relation)) {
|
|
631
|
+
return false;
|
|
632
|
+
}
|
|
633
|
+
if (quoteRelationLooksPredicateBoundTame(tokens, relation)) {
|
|
634
|
+
return false;
|
|
635
|
+
}
|
|
636
|
+
const last = previousNonSpaceIndex(tokens, relation.quote.markerIdx, relation.quote.contentSpan.start);
|
|
637
|
+
if (last === null || last < relation.quote.contentSpan.start) {
|
|
638
|
+
return false;
|
|
639
|
+
}
|
|
640
|
+
const pos0 = (tokens[last]?.pos ?? 0) & POS0;
|
|
641
|
+
return pos0in(pos0, NOMINAL_BITS);
|
|
642
|
+
}
|
|
643
|
+
function quoteRelationLooksPredicateBoundTame(tokens, relation) {
|
|
644
|
+
const last = previousNonSpaceIndex(tokens, relation.quote.markerIdx, relation.quote.contentSpan.start);
|
|
645
|
+
const tail = last === null ? undefined : tokens[last];
|
|
646
|
+
const tailForm = tail?.dictionaryForm || tail?.surface;
|
|
647
|
+
if (last === null || (tailForm !== "ため" && tailForm !== "為")) {
|
|
648
|
+
return false;
|
|
649
|
+
}
|
|
650
|
+
for (let index = relation.quote.contentSpan.start; index < last; index += 1) {
|
|
651
|
+
const pos0 = ((tokens[index]?.pos ?? 0) & POS0);
|
|
652
|
+
if (pos0in(pos0, INFLECTABLE_AUX_BITS)) {
|
|
653
|
+
return true;
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
return false;
|
|
657
|
+
}
|
|
658
|
+
function quoteRelationHasCopulaAux(tokens, relation) {
|
|
659
|
+
for (let index = relation.quote.contentSpan.start; index < relation.quote.markerIdx; index += 1) {
|
|
660
|
+
const token = tokens[index];
|
|
661
|
+
if (token === undefined || (token.pos & (POS0 | POS4)) !== (助動詞 | 助動詞_ダ)) {
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
if ((token.pos & POS5A) === 連用形_) {
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
667
|
+
return true;
|
|
668
|
+
}
|
|
669
|
+
return false;
|
|
670
|
+
}
|
|
671
|
+
export function quoteRelationContentLooksLabelIsh(tokens, relation) {
|
|
672
|
+
return quoteRelationLooksBareNominalLabel(tokens, relation) || quoteRelationHasCopulaAux(tokens, relation);
|
|
673
|
+
}
|
|
674
|
+
export function quoteNominalRoleParticleFromRelation(tokens, relation, lookups) {
|
|
675
|
+
if (relation.quote.markerBaseSurface !== "と" ||
|
|
676
|
+
!quoteReportingPassiveHostNeedsCompanionDisambiguation(relation.quote.hostMatch, lookups) ||
|
|
677
|
+
!quoteHostHasBareNominalPassiveEvidence(tokens, relation, lookups) ||
|
|
678
|
+
quoteBareNominalContentHasAdjectivalDistribution(tokens, relation)) {
|
|
679
|
+
return null;
|
|
680
|
+
}
|
|
681
|
+
return "으로/로";
|
|
682
|
+
}
|
|
683
|
+
export function quoteStructuralRelationLooksAdverbialToContent(tokens, relation) {
|
|
684
|
+
if (relation.quote.slotKind !== "quoted_content" ||
|
|
685
|
+
relation.quote.contentSpan.endExclusive !== relation.quote.markerIdx ||
|
|
686
|
+
relation.quote.markerBaseSurface !== "と") {
|
|
687
|
+
return false;
|
|
688
|
+
}
|
|
689
|
+
const tailStart = quoteContentTailStart(tokens, relation.quote.contentSpan.start, relation.quote.contentSpan.endExclusive);
|
|
690
|
+
if (tailStart === null) {
|
|
691
|
+
return false;
|
|
692
|
+
}
|
|
693
|
+
let adverbIdx = null;
|
|
694
|
+
let index = tailStart;
|
|
695
|
+
while (index < relation.quote.contentSpan.endExclusive) {
|
|
696
|
+
const evidence = nextTransparentEvidenceIndex(tokens, index, {
|
|
697
|
+
endExclusive: relation.quote.contentSpan.endExclusive
|
|
698
|
+
});
|
|
699
|
+
if (evidence === null) {
|
|
700
|
+
return adverbIdx !== null;
|
|
701
|
+
}
|
|
702
|
+
index = evidence.index;
|
|
703
|
+
const token = tokens[index];
|
|
704
|
+
if (token === undefined) {
|
|
705
|
+
return adverbIdx !== null;
|
|
706
|
+
}
|
|
707
|
+
if (adverbIdx !== null || !isLexicalAdverb(token)) {
|
|
708
|
+
return false;
|
|
709
|
+
}
|
|
710
|
+
adverbIdx = index;
|
|
711
|
+
index += 1;
|
|
712
|
+
}
|
|
713
|
+
const token = adverbIdx === null ? undefined : tokens[adverbIdx];
|
|
714
|
+
return token !== undefined;
|
|
715
|
+
}
|
|
716
|
+
export function quoteHostMatchForPassiveSareru(cursor) {
|
|
717
|
+
const match = matchQuotedSareruTailAsClauseQuote(cursor);
|
|
718
|
+
if (match === null) {
|
|
719
|
+
return null;
|
|
720
|
+
}
|
|
721
|
+
const { tokens } = cursor;
|
|
722
|
+
const [predicateIdx] = match;
|
|
723
|
+
return new QuoteHostMatch("report", tokens[predicateIdx]?.dictionaryForm || "する", predicateIdx);
|
|
724
|
+
}
|