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.BUCKET_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.2.0.tar.gz
(48.8 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lexorank_py-0.2.0.tar.gz.
File metadata
- Download URL: lexorank_py-0.2.0.tar.gz
- Upload date:
- Size: 48.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
63ff48ddf28aa6954e8f12ca2b21343ecb30ee5f7cfd3982606fd3195cb5d259
|
|
| MD5 |
f8d419dab4e8d7a5c4799cff8378fd86
|
|
| BLAKE2b-256 |
f0b707a1e942e883211fb0293d4bed716a74896d85988e2443be5967ac67c7b8
|
File details
Details for the file lexorank_py-0.2.0-py3-none-any.whl.
File metadata
- Download URL: lexorank_py-0.2.0-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.19
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d126a7bc7025037262c04cbd12b388df5fb9b087864821cbbbbfe8f21fb79cc
|
|
| MD5 |
9e424d2b682c868a0c1544a1ec309f06
|
|
| BLAKE2b-256 |
3de432d40d9d7a9c5d589031ff398176c3fb4697bf2bee6da6e14b352d92b479
|