affect-kit
Turn timestamped affect annotations into a living emotional state — bands, momentum and residual warmth, not a single number.
安裝
此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗
說明文件
閱讀完整 README ↗7. 配置
DEFAULT_CONFIG 里每个数字都能调,最值得动的是三个:
import { DEFAULT_CONFIG } from "affect-kit";
const cfg = {
...DEFAULT_CONFIG,
halfLifeHours: 72, // 基线更稳
fade: { weight: 0.55, fast: 10, slow: 48 }, // 余温记得更久
hysteresisMinutes: 60, // 状态更粘
};
词汇校准表(比如把「沉」这个做事状态从 −0.6 折成 −0.15)不在库里——那是各人自己的词表:
compose(entries, now, cfg, { calibrate: { 沉: -0.15, 认真: 0.15 } });