context_weights.py 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #!/usr/bin/env python3
  2. # -*- coding: utf-8 -*-
  3. """
  4. Centralized context template weights.
  5. """
  6. from __future__ import annotations
  7. DEFAULT_TEMPLATE = "plot"
  8. TEMPLATE_WEIGHTS: dict[str, dict[str, float]] = {
  9. "plot": {"core": 0.40, "scene": 0.35, "global": 0.25},
  10. "battle": {"core": 0.35, "scene": 0.45, "global": 0.20},
  11. "emotion": {"core": 0.45, "scene": 0.35, "global": 0.20},
  12. "transition": {"core": 0.50, "scene": 0.25, "global": 0.25},
  13. }
  14. TEMPLATE_WEIGHTS_DYNAMIC_DEFAULT: dict[str, dict[str, dict[str, float]]] = {
  15. "early": {
  16. "plot": {"core": 0.48, "scene": 0.39, "global": 0.13},
  17. "battle": {"core": 0.42, "scene": 0.50, "global": 0.08},
  18. "emotion": {"core": 0.52, "scene": 0.38, "global": 0.10},
  19. "transition": {"core": 0.56, "scene": 0.28, "global": 0.16},
  20. },
  21. "mid": {
  22. "plot": {"core": 0.40, "scene": 0.35, "global": 0.25},
  23. "battle": {"core": 0.35, "scene": 0.45, "global": 0.20},
  24. "emotion": {"core": 0.45, "scene": 0.35, "global": 0.20},
  25. "transition": {"core": 0.50, "scene": 0.25, "global": 0.25},
  26. },
  27. "late": {
  28. "plot": {"core": 0.36, "scene": 0.29, "global": 0.35},
  29. "battle": {"core": 0.31, "scene": 0.39, "global": 0.30},
  30. "emotion": {"core": 0.41, "scene": 0.29, "global": 0.30},
  31. "transition": {"core": 0.46, "scene": 0.21, "global": 0.33},
  32. },
  33. }