arminta
February 28, 2021, 2:36am
1
I’d love to do some sentiment analysis on my notes. Especially if I can do sections of notes like: today, this past week, all notes in a folder, or by tag, notes linked to a specific note, etc.
4 Likes
Hey Sarah!
In case you were interested!
vault_stats.R
#!/usr/bin/env Rscript
# Install/Attach necessary packages to session
pkgs <- c('tidyverse','tidytext','tokenizers','DiagrammeR','glue')
xfun::pkg_attach2(pkgs)
#===============================================================#
#################### Environmental Variables ####################
vault_path <- '/Users/bryanjenks/Documents/Knowledge'
#===============================================================#
This file has been truncated. show original
So I cant sleep.
It’s 2AM, I got bored.
I ran a slapped together sentiment analysis on the text data in the obsidian forums for every post that had >=50 replies.
an aggregate total of 38.1k words here are the results:
[image]
[image]
[image]
The word cloud contains words that occurred 25 or more times in the data set
for anyone who wants the code you can grab it HERE
it looks like this at a glance:
[image]
Getting the data was difficult as the site doesn’t easily just give you a …
1 Like
Nice work!
I was wondering if this might be helpful in a plugin as well.
For example:
right click a note and generate a sentiment analysis in the footnote
or select a block of text and use a command to get the sentiment analysis below
chegr
December 27, 2021, 8:41am
4
I was sure this exists already in Obsidian, like if I saw a plugin that does that. But it’s not! Wow. Words count and Better one is way too basic. I’d like to have a built-in analyzer in a panel. Well, can’t have everything But hope remains.