Skip to main content

Ai solution for Luhmann's Zettelkasten

Project description

ZmsAi

Development Status py3.8 GPLv3

Say Thanks Black

A command line utility for topic discovery and doc-linking within the Zettelkasten using AI approaches.

Installation

Install zmsai by executing the following command-

$ pip3 install zmsai

Test Run

Test run using dummy docs (see ./custom)

$ zmsai test

Usage

To learn n topics in your Zettelkasten at /path/to/your/zettelkasten/-

$ zmsai run -t n -p "/path/to/your/zettelkasten/"

This will create a metadata file meta.zms storing all the distributions exhibited by the documents in your Zettelkasten.

[Running the model] it may take a while. Hang tight!
[Data stored] ... kb

You can delete your metadata file by executing-

$ zmsai delete

These learnt distributions can be printed using zmsai display. You can pass an additional argument -w, the number of top most occuring words that you want to print from the distributions involing words.

To display doc-topic distribution-

$ zmsai display -d dt

To display topic-word distribution-

$ zmsai display -w n -d tw

To display doc-word distribution-

$ zmsai display -w n -d dw

To display vocabulary-

$ zmsai display -w n -d voc

To display all distributions at once-

$ zmsai display -w n -d all

or simply

$ zmsai display

This will take default value of 5 for nwords argument.

Troubleshooting

If you get ModuleNotFoundError: No module named 'sklearn' error with display, try installing scikit-learn manually.

$ sudo pip3 install -U scikit-learn

Alternatively, if you're on ubuntu, try executing the following command-

$ zmsai fix-ubuntu

Feel free to raise an issue if you feel stuck.

Manual

usage: zmsai [-h] [--path [PATH]] [--topics [TOPICS]] [--nwords [NWORDS]] [--distro [DISTRO]] [task]

positional arguments:
  task                  Provide task to perform [default : 'run'] [values : 'run', 'delete', 'display', 'man', 'test', 'fix-ubuntu']

optional arguments:
  -h, --help            show this help message and exit
  --path [PATH], -p [PATH]
                        Provide directory of text files. [with : 'run'] [default : './custom']
  --topics [TOPICS], -t [TOPICS]
                        How many topics do you expect? [with : 'run'] [default : 'number of docs']
  --nwords [NWORDS], -w [NWORDS]
                        How many words per topic/doc do you want to display? [with : 'display'] [default : 5]
  --distro [DISTRO], -d [DISTRO]
                        What distributions do you want to display? [with : 'display'] [default : all] [values : 'dt', 'tw', 'dw', 'voc', 'all']

Dependency Graph

attrs==20.2.0
  - pytest==6.1.1 [requires: attrs>=17.4.0]
iniconfig==1.1.1
  - pytest==6.1.1 [requires: iniconfig]
joblib==0.17.0
  - scikit-learn==0.23.2 [requires: joblib>=0.11]
    - sklearn==0.0 [requires: scikit-learn]
numpy==1.19.2
  - scikit-learn==0.23.2 [requires: numpy>=1.13.3]
    - sklearn==0.0 [requires: scikit-learn]
  - scipy==1.5.3 [requires: numpy>=1.14.5]
    - scikit-learn==0.23.2 [requires: scipy>=0.19.1]
      - sklearn==0.0 [requires: scikit-learn]
pip==20.1.1
pluggy==0.13.1
  - pytest==6.1.1 [requires: pluggy>=0.12,<1.0]
py==1.9.0
  - pytest==6.1.1 [requires: py>=1.8.2]
pyparsing==2.4.7
  - packaging==20.4 [requires: pyparsing>=2.0.2]
    - pytest==6.1.1 [requires: packaging]
setuptools==46.4.0
six==1.15.0
  - packaging==20.4 [requires: six]
    - pytest==6.1.1 [requires: packaging]
threadpoolctl==2.1.0
  - scikit-learn==0.23.2 [requires: threadpoolctl>=2.0.0]
    - sklearn==0.0 [requires: scikit-learn]
toml==0.10.1
  - pytest==6.1.1 [requires: toml]
wheel==0.34.2

Contribution

Are welcome.

License

GNU General Public License v3 (GPLv3)

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

zmsai-0.1.5.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zmsai-0.1.5-py3-none-any.whl (19.9 kB view details)

Uploaded Python 3

File details

Details for the file zmsai-0.1.5.tar.gz.

File metadata

  • Download URL: zmsai-0.1.5.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for zmsai-0.1.5.tar.gz
Algorithm Hash digest
SHA256 1d3e4ebe0cd7bd16de0321abda64e7e7b6a81100ac473c8db33db3e63dcb0ba6
MD5 7345ea94f98f124b73132047c99bbcf4
BLAKE2b-256 a2675acfa513b79a802b4205be0bf837a06aee0bb0847e6d2406111164e3fb12

See more details on using hashes here.

File details

Details for the file zmsai-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: zmsai-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 19.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for zmsai-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6dc6620f38a9cba625a5f94593a1b40dbaf260b7d5ca315ced85ed8651b0041b
MD5 4bca82feeaffc17dce5449663cd6df4d
BLAKE2b-256 0e7967cd54005ef900c780d87761b31dfeb84adafc44707a119c00eaa648f8de

See more details on using hashes here.

Supported by

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