Skip to main content

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, jaccard_coefficient

model = brainwave(vault_dir,jaccard_coefficient)
model.wv.key_to_index
{'Causam mihi': 0,
 'Alimenta': 1,
 'Brevissimus moenia': 2,
 'Sussudio': 3,
 'Ne fuit': 4,
 'Vulnera ubera': 5,
 'Bacchus': 6,
 'Virtus': 7,
 'Amor': 8,
 'Tarpeia': 9,
 'American Psycho (film)': 10,
 'Tydides': 11,
 'Manus': 12,
 'Vita': 13,
 'Aras Teucras': 14,
 'Dives': 15,
 'Aetna': 16,
 'Isolated note': 17,
 'lipsum/Isolated note': 18,
 'Caelum': 19}
model.wv.most_similar("Vulnera ubera")
[('Sussudio', 0.9991790056228638),
 ('Aetna', 0.9991780519485474),
 ('Tydides', 0.9991397857666016),
 ('Bacchus', 0.9991208910942078),
 ('Virtus', 0.9990988373756409),
 ('Brevissimus moenia', 0.9990975260734558),
 ('Ne fuit', 0.9990928769111633),
 ('Dives', 0.9990816116333008),
 ('Alimenta', 0.9990617036819458),
 ('Amor', 0.9990396499633789)]

Project details


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.2.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

brainwalk-0.0.2-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file brainwalk-0.0.2.tar.gz.

File metadata

  • Download URL: brainwalk-0.0.2.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for brainwalk-0.0.2.tar.gz
Algorithm Hash digest
SHA256 fad8d3fd923060c9afa1a2cf77803ff6d7713aa0c6526b30e60108cfaae87193
MD5 f5e5d48cc220aeb8b182142955ceecbd
BLAKE2b-256 2108b5b4a640a5c6ad928d0a11393a08c025f87d9b917eb88ec6e73883f6b523

See more details on using hashes here.

File details

Details for the file brainwalk-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: brainwalk-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.3

File hashes

Hashes for brainwalk-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8abaa1f4991058353236c2da65a5f6dcbabc9b91d5231df9bd00551f3264a1ce
MD5 667c983b576a22b78f61415f5bc67d56
BLAKE2b-256 9e3e1c74ac8244a8fe1bd98137825813db12b0af9a9ad9f6e6f3970b1fc7e12d

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page