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
#Extracting Best sentences with highest Ranks within the word limit | |
$BestSentences = Foreach($Item in (Get-SentenceRank $Content | Sort SentenceScore -Descending)) | |
{ | |
#Condition to limit Total word Count | |
$TotalWords += $Item.WordCount | |
If($TotalWords -gt $WordLimit) | |
{ | |
break |
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
<#.Synopsis | |
Returns Summary of a text document. | |
.DESCRIPTION | |
Returns the summary of a text document passed to it, depending upon your chosen word limit (Default 100 words). | |
.PARAMETER File | |
Text File with the content to summarize. | |
.PARAMETER WordLimit | |
Maximum number of words to be allowed in Summary | |
.EXAMPLE | |
PS Root\> Get-Summary -File .\Document.txt |
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
Function Format-XMLIndent | |
{ | |
[Cmdletbinding()] | |
[Alias("IndentXML")] | |
param | |
( | |
[xml]$Content, | |
[int]$Indent | |
) |
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
Function Get-Nutrient | |
{ | |
[cmdletbinding()] | |
[Alias("Nutrient")] | |
Param | |
( | |
[Parameter(Mandatory=$True)] [String] $Query | |
) | |
$Script:i=0 |
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
Function Get-Sentence | |
{ | |
[cmdletBinding()] | |
[alias('gs')] | |
param( | |
[parameter(mandatory=$true)] [String]$Word, | |
[int] $count = 10, | |
[int] $WordLimit, | |
[Switch] $HighlightWord | |
) |
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
[char[]]"vwxyz" | ForEach-Object { | |
$Alpha = $_ | |
Get-DictionaryWord $Alpha -Verbose | ConvertTo-Json | ` | |
Out-File ".\DictionaryAlphabetJSON\$Alpha.json" | |
Write-Host "Alphabet : $Alpha is complete" -ForegroundColor Yellow | |
} |
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
Function Get-DictionaryWord | |
{ | |
[Cmdletbinding()] | |
Param( | |
[String]$StartingAlphabet | |
) | |
$Results = @() | |
$i = 1 | |
$StartingAlphabet = $StartingAlphabet.toLower() |
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
$Content = @" | |
<HTML> | |
<BODY> | |
<h1> This is a heading </h1> | |
<P id='para1'>First Paragraph with some Random text</P> | |
<P>Second paragraph with more random text</P> | |
<A href="http://Geekeefy.wordpress.com">Cool Powershell blog</A> | |
</BODY> | |
</HTML> | |
"@ | Out-File File.html |
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
[ | |
{ | |
"ImageURL": [ | |
"https://pbs.twimg.com/profile_images/818406636800733184/br3nwOU0_400x400.jpg", | |
"https://abs.twimg.com/emoji/v2/72x72/1f3a4.png", | |
"https://abs.twimg.com/emoji/v2/72x72/1f47b.png", | |
"https://abs.twimg.com/emoji/v2/72x72/1f48b.png", | |
"https://abs.twimg.com/emoji/v2/72x72/1f1e6-1f1fa.png", | |
"https://abs.twimg.com/emoji/v2/72x72/1f483-1f3fb.png", | |
"https://abs.twimg.com/emoji/v2/72x72/2764.png", |
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
Function Get-TwitterProfile | |
{ | |
[cmdletbinding()] | |
Param( | |
$URL = "https://twitter.com/followers" | |
) | |
Begin | |
{} | |
Process |