Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brickfrog/resorter.py
Python implementation of gwern's resorter
https://github.com/brickfrog/resorter.py
ranking-algorithm statistics
Last synced: about 23 hours ago
JSON representation
Python implementation of gwern's resorter
- Host: GitHub
- URL: https://github.com/brickfrog/resorter.py
- Owner: brickfrog
- License: cc0-1.0
- Created: 2023-10-11T01:19:24.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-14T14:25:04.000Z (10 days ago)
- Last Synced: 2025-01-20T00:57:05.619Z (4 days ago)
- Topics: ranking-algorithm, statistics
- Language: Python
- Homepage:
- Size: 89.8 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# resorter.py
Python implementation(-ish) of gwern's [resorter](https://www.gwern.net/Resorter) for ranking items based on user input.
# Installation
The simplest option is to use the `uv` to install the package as CLI tool, granting you the `resorter` command.
```bash
uv tool install .
```See the help for more (up-to-date) information about usage.
```bash
Usage: main.py [OPTIONS]Options:
--input TEXT input file: a CSV file of items to
sort: one per line, with up to two
columns. (eg. both 'Akira' and
'Akira, 10' are valid) [required]
--output TEXT output file: a file to write the
final results to. Default: printing
to stdout.
--queries INTEGER Maximum number of questions to ask
the user; defaults to N*log(N)
comparisons.
--levels INTEGER The highest level; rated items will
be discretized into 1–l levels.
--quantiles TEXT What fraction to allocate to each
level; space-separated; overrides
`--levels`.
--progress Print the mean standard error to
stdout
--save-state TEXT Save the current state to this file
--load-state TEXT Load the previous state from this
file
--min-confidence FLOAT Minimum confidence level before
stopping (0-1)
--visualize Show ASCII visualization of rankings
--format [csv|json|markdown] Output format for the rankings
--help Show this message and exit.
```## Acknowledgments
Thanks to Gwern for the [original concept](https://gwern.net/resorter) and inspiration.
I primarily wrote it to integrate with other python code, I'd recommending looking at hiAndrewQuinn's [repackaging](https://github.com/hiAndrewQuinn/resorter) if you're looking for the original resorter in an easier-to-install package. Python doesn't have the same kind of statistics packages available, so I had to handroll the comparison functionality. I'm not 100% sure I have it correct, but it passes the smell test insofar as rankings.