Good news! This project has been obsoleted in favor of a simple hardlink into a source checkout of FathomFox. Please see that project's readme for further instructions.
This is a "sidecar" addon to FathomFox; it is where you park rulesets to be trained using FathomFox's Trainer. Fork this repo, stick your own ruleset in it, and install it alongside FathomFox to optimize your coefficients. By keeping your rulesets in a separate addon, you avoid having to fork and keep up with FathomFox itself, and you can choose and control your own independent compilation pipeline.
- Fork this repository.
- Install libraries:
yarn run deps
. - Edit
src/trainees.js
, replacing the included example ruleset with your own. Or leave the example there the first time around, just to make sure everything is working. You can add multiple rulesets if you wish. - Run rollup in the background to keep the compiled version of your addon up to date as you edit:
yarn run watch
. - In another terminal, fire up the addon in Firefox, reloading it as it changes:
yarn run browser
. - Install FathomFox in that instance of Firefox.
- Open the FathomFox Trainer as documented at https://github.com/mozilla/fathom-fox#the-trainer, drag some labeled pages into the same window, and train your ruleset.
Once you've found some well-performing coefficients, replace the old ones in src/trainees.js
, and ship your ruleset!
- Start naming versions, just for ease of conversation. All pushes to master are considered released, however.
- Upgrade to Fathom 3. This required some changes:
- Switch to specifying coefficients as a Map instead of an Array.
- rulesetMaker function no longer takes any params. In Fathom 3, all weighting is done internal to the framework.
- All rules should return a value between 0 and 1, representing a confidence. ZEROISH and ONEISH constants are no longer needed.
ruleset()
takes its rules as an array rather than as a flat sequence of arguments.