Spatial graph embeddings for ObsidianMD
Project description
brainwalk
::: {.cell 0=‘h’ 1=‘i’ 2=‘d’ 3=‘e’}
import sys
sys.path.append("..")
from brainwalk.core import *
:::
Spatial graph embeddings for ObsidianMD
Install
pip install brainwalk
How to use
# Find the Obsidian Vault directory and assert that it exists
import os
from pathlib import Path
vault_dir = Path(os.getcwd()) / 'vault-stub'
assert vault_dir.exists()
# Retrieve a Gensim word2vec model of your Obsidian Graph
from brainwalk.core import brainwave
from wirewalk.core import jaccard_coefficient
model = brainwave(vault_dir,jaccard_coefficient)
model.wv.key_to_index
{'Vulnera ubera': 0,
'Causam mihi': 1,
'Sussudio': 2,
'Ne fuit': 3,
'Brevissimus moenia': 4,
'Alimenta': 5,
'American Psycho (film)': 6,
'Aras Teucras': 7,
'Tydides': 8,
'Dives': 9,
'Caelum': 10,
'Vita': 11,
'Isolated note': 12,
'Tarpeia': 13,
'Manus': 14,
'Amor': 15,
'lipsum/Isolated note': 16,
'Bacchus': 17,
'Virtus': 18,
'Aetna': 19}
model.wv.most_similar("Vulnera ubera")
[('Ne fuit', 0.9992153644561768),
('Bacchus', 0.9991818070411682),
('Manus', 0.9991797804832458),
('Tydides', 0.9991616606712341),
('Sussudio', 0.9991515278816223),
('Vita', 0.9991357922554016),
('American Psycho (film)', 0.9991220831871033),
('lipsum/Isolated note', 0.9991198182106018),
('Virtus', 0.9991057515144348),
('Causam mihi', 0.999089777469635)]
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
brainwalk-0.0.3.tar.gz
(8.1 kB
view details)
Built Distribution
File details
Details for the file brainwalk-0.0.3.tar.gz
.
File metadata
- Download URL: brainwalk-0.0.3.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0733d43ad531f60bebfc9b8b864aaf7c745c4d57f3cdbaebb10aa43e06c191f2 |
|
MD5 | 0ea6777b45ae966324be163a98682ae5 |
|
BLAKE2b-256 | 07ac390c46758e51dec8f40639d7d2c89a630055e53cf56a9630dc27a67cb796 |
File details
Details for the file brainwalk-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: brainwalk-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b33ad8c750b64110acc455d8a70111eadc45844de8709d0dcea837d147de31ed |
|
MD5 | eded6c288aabc05a238cd7fa313cbf30 |
|
BLAKE2b-256 | 6a784284d3f3d582f6edbb6ceb680a4e9369458e2a5a5fffe372bf21082a5c84 |