devdch/fsrs
Composer 安装命令:
composer require devdch/fsrs
包简介
Free Spaced Repetition Scheduler (FSRS) algorithm implementation in PHP.
README 文档
README
Free Spaced Repetition Scheduler (FSRS) algorithm implementation in PHP
More info about FSRS here: https://github.com/open-spaced-repetition/awesome-fsrs
Example:
use Fsrs\Config\Config; use Fsrs\DTO\Card; use Fsrs\Enum\RatingEnum; use Fsrs\Enum\StateEnum; use Fsrs\Scheduler; // All params are optional (default config will be used). $scheduler = new Scheduler(config: new Config( weights: [ 0.40255, 1.18385, 3.173, 15.69105, 7.1949, 0.5345, 1.4604, 0.0046, 1.54575, 0.1192, 1.01925, 1.9395, 0.11, 0.29605, 2.2698, 0.2315, 2.9898, 0.51655, 0.6621, ], desiredRetention: 0.9, learningSteps: [60, 600,], relearningSteps: [600,], maximumInterval: 36500, enableFuzzing: true, )); $card = new Card(); $card = $scheduler->reviewCard( card: $card, rating: RatingEnum::Good, reviewDatetime: new DateTimeImmutable('now', Config::getTimezone()) )->card;
统计信息
- 总下载量: 279
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-13