This repository has been archived by the owner on Dec 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#36: Make fathom_ruleset.js mirror Fathom's trainer script.
This enables the same script to be used for training and running in the commerce webextension. How to train a ruleset with Fathom: 1. Follow Fathom's [instructions](https://github.com/erikrose/fathom-fox). 2. Open the [Fathom Trainees](https://github.com/mozilla/fathom-trainees) add-on in a new profile. 3. Install FathomFox in that window from AMO. 4. Drag and drop the training corpus (HTML files in ./training-set) into that window. 5. Copy ./src/fathom_ruleset.js into fathom-trainees/src/trainees.js and save over it. 6. Choose a feature to train, 'price', 'title' or 'image', and edit `trainees.set()` so that one of those features is the first argument. 7. Comment out the rules pertaining to all but that feature. 8. Click the FathomFox browserAction and select "Train" 9. Select the feature from the dropdown list and click the "Train against the tabs in this window" button. 10. You will see the accuracy based on the initial coefficients passed in, and Fathom will start generating optimized coefficients. This could take a while. 11. When Fathom is done, those coefficients will be logged to the Fathom page.
- Loading branch information
1 parent
289df7d
commit 42cd870
Showing
3 changed files
with
232 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"largerImage": 3, | ||
"largerFontSize": 1, | ||
"hasDollarSign": 3, | ||
"hasTitleInID": 10, | ||
"hasTitleInClassName": 5, | ||
"isHidden": -100, | ||
"isHeaderElement": 10 | ||
"largerImageCoeff": 3, | ||
"largerFontSizeCoeff": 1, | ||
"hasDollarSignCoeff": 3, | ||
"hasTitleInIDCoeff": 10, | ||
"hasTitleInClassNameCoeff": 5, | ||
"isHiddenCoeff": -100, | ||
"isHeaderElementCoeff": 10 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.