Skip to content

Instantly share code, notes, and snippets.

@iOnline247
Created June 17, 2025 15:32
Show Gist options
  • Select an option

  • Save iOnline247/36965c32a9b2608a6d6d6d5ce6430257 to your computer and use it in GitHub Desktop.

Select an option

Save iOnline247/36965c32a9b2608a6d6d6d5ce6430257 to your computer and use it in GitHub Desktop.
word-count.ps1
Name Count
---- -----
brandon 23
patient 17
care 11
healthcare 8
education 7
patients 6
career 5
assistant 5
i 5
continued 5
review 4
future 4
consistently 4
physical 4
professional 4
nurse 4
only 4
your 4
nursing 3
new 3
$stopwords = @('the','and','to','of','a','in','for','is','on','that','with','as','by','at','from','it','an','be','or','are','this','was','but','not','have','has','had','he','she','they','you','we','his','her','their','our','can','will','would','should','could','do','does','did','so','if','all','any','each','which','who','whom','what','when','where','why','how','about','into','than','then','them','these','those','such','no','nor','too','very','more','most','some','may','might','must','shall','also','been','being','were','because','while','during','before','after','above','below','up','down','out','over','under','again','further','once')
# Read the file, split into words, remove punctuation, convert to lowercase
Get-Content '.\LoR\person''s_review.md' |
Select-String -Pattern '\w+' -AllMatches |
ForEach-Object { $_.Matches.Value.ToLower() } |
Where-Object { $_ -notin $stopwords } |
Group-Object |
Sort-Object Count -Descending |
Select-Object -First 20 Name,Count |
clip.exe
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment