lexorank
Project description
lexorank.py
python3 -m pip install lexorank-py
New Rank
from pprint import pprint
from lexorank import Bucket, middle
prev = middle(Bucket.BUCEKT_0)
ranks = [prev]
for _ in range(9):
ranks.append(prev.next())
prev = ranks[-1]
pprint(ranks)
[<LexoRank value=0|i00000: base=36>,
<LexoRank value=0|i0000g: base=36>,
<LexoRank value=0|i0000w: base=36>,
<LexoRank value=0|i0001c: base=36>,
<LexoRank value=0|i0001s: base=36>,
<LexoRank value=0|i00028: base=36>,
<LexoRank value=0|i0002o: base=36>,
<LexoRank value=0|i00034: base=36>,
<LexoRank value=0|i0003k: base=36>,
<LexoRank value=0|i00040: base=36>]
Between
from lexorank import between, parse
a = parse("0|i00000:")
b = parse("0|i00001:")
mid = between(a, b)
# <LexoRank value=0|i00000:i base=36>
a = parse("0|i00000:")
b = None
mid = between(a, b) # = a.next()
# <LexoRank value=0|i0000g: base=36>
a = None
b = parse("0|i00000:")
mid = between(a, b) # = b.prev()
# <LexoRank value=0|hzzzzk: base=36>
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
lexorank-py-0.1.1.tar.gz
(48.7 kB
view details)
Built Distribution
File details
Details for the file lexorank-py-0.1.1.tar.gz
.
File metadata
- Download URL: lexorank-py-0.1.1.tar.gz
- Upload date:
- Size: 48.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2045d8cef314cea8f5bd7df036b4dffafab12a569842e60efed6c8f7c3bc31e8 |
|
MD5 | ecb021447a6aab8a8db7b141442ecebd |
|
BLAKE2b-256 | afb9a8213f5ed28cbb6f1f24354157745787e1d6776cbbc8106f11c49625d3bd |
File details
Details for the file lexorank_py-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: lexorank_py-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0798b15e7d47d0f94591f872e5d6cf5f2d2ea0186226673141cd1e35f28dfe4 |
|
MD5 | dc97b66db7a9df574158205fe63c050d |
|
BLAKE2b-256 | face563e2935fb89ea66828201d2eba5ce737e76866d1d0067791374007cb380 |