Last active
December 6, 2016 19:28
-
-
Save PrateekKumarSingh/a37fe3799abc1137d47e844640bc8c8a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #Get important words that where length is greater than 3 to avoid - in, on, of, to, by etc | |
| $FrequencyDistribution = $Content.split(" ") |?{-not [String]::IsNullOrEmpty($_)} |` | |
| %{[Regex]::Replace($_,'[^a-zA-Z0-9]','')} |group |sort count -Descending | |
| $ImportantWords = $FrequencyDistribution |?{$_.name.length -gt 3} |` | |
| select @{n='ImportanceWeight';e={$_.Count * 0.01}}, @{n='ImportantWord';e={$_.Name}} -First 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment