● node alignment console · 04 // deployed systems v0.2.0
Logical Attribute Node Aligner
A Python library that compares two records head-to-head — or ranks a whole lineup into a leaderboard — weighing every attribute by what you decide matters.
// transmission · changelog
lana grew up: it no longer compares only two things at a time.
lana.rank() new — rank any number of records into a leaderboard, scored by your priorities. Try it live below.lana.compare() is unchanged and fully backward compatible — nothing you built on 0.1.0 breaks.show, to_json, to_csv, to_markdown, to_df, save) now works on rankings too.pip install -U ablevlabs.// what it is
Give lana records that share the same attributes — candidates, laptops, model runs, cars, fighters — and it weighs them field by field. Compare two for a head-to-head verdict, or rank many into a leaderboard.
It's a matchup engine, not a diff tool — it relates different things and scores them, which is a question diffs never answer. And because it only sees “records with fields,” it works in any domain.
// head-to-head — compare() · drag the sliders, watch the beam tip
// rank a lineup — rank() · NEW · drag sliders, watch the board reshuffle
Same engine, scaled to any number of items. On each field the best item earns the full priority, the worst earns zero, evenly spaced — so consistency pays off, not just spikes.
// how it works
Give lana records that share attribute names, so there's something to line up.
Score the fields you care about 1 to 5. A 5 counts five times as much as a 1.
List fields where a smaller number wins — price, latency, weight.
You get a clean dict back. compare() returns a head-to-head
verdict; rank() returns an ordered leaderboard. For exactly two items,
they agree.
// cheat sheet
install / upgrade & import
# install or upgrade to the latest $ pip install -U ablevlabs from ablevlabs import lana
compare two — head-to-head
zoro = {"name": "Zoro", "power": 92, "speed": 80}
sanji = {"name": "Sanji", "power": 88, "speed": 95}
result = lana.compare(zoro, sanji, priority={"power": 5, "speed": 3})
lana.show(result)
rank many — leaderboard (new)
roster = [
{"name": "Goku", "power": 9100, "attack": 88},
{"name": "Vegeta", "power": 9000, "attack": 90},
{"name": "Frieza", "power": 10500, "attack": 86},
]
board = lana.rank(roster, priority={"power": 5, "attack": 4})
lana.show(board)
rank() — options
| Argument | What it does |
|---|---|
items | A list of records, or a {name: record} dict. Required (2+). |
priority | {field: 1–5} — how much each field matters. Omit it and every numeric field counts equally. |
lower_better | List of fields where a smaller number wins. |
aliases | {variant: canonical} to reconcile differing field names. |
works on both compare() and rank() results
lana.show(r)Scorecard or leaderboard, in the terminal.lana.to_json(r)JSON string.lana.to_csv(r)CSV — Excel / Sheets.lana.to_markdown(r)Markdown table for docs / GitHub.lana.to_df(r)pandas DataFrame.lana.save(r, "x.csv")To disk — format from the extension.