diff --git a/README.md b/README.md index 7d2b62b..b661eee 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,19 @@ This repository now includes the solutions provided by Kohya_ss in a single loca A note accompanying the release of his new repository can be found here: https://note.com/kohya_ss/n/nba4eceaa4594 +## Required Dependencies + +Python 3.10.6+ and Git: + +- Python 3.10.6+: https://www.python.org/ftp/python/3.10.6/python-3.10.6-amd64.exe +- git: https://git-scm.com/download/win + +Give unrestricted script access to powershell so venv can work: + +- Open an administrator powershell window +- Type `Set-ExecutionPolicy Unrestricted` and answer A +- Close admin powershell window + ## Installation Open a regular Powershell terminal and type the following inside: diff --git a/examples/word_frequency.ps1 b/examples/word_frequency.ps1 index 0a81626..ed601d7 100644 --- a/examples/word_frequency.ps1 +++ b/examples/word_frequency.ps1 @@ -1,4 +1,4 @@ -$txt_files_folder = "D:\dataset\metart_g1\img\100_asd girl" +$txt_files_folder = "D:\dataset\" $txt_prefix_to_ignore = "asds" $txt_postfix_ti_ignore = "asds" @@ -6,10 +6,10 @@ $txt_postfix_ti_ignore = "asds" # (Get-Content $txt_files_folder"\*.txt" ).Replace(",", "") -Split '\W' | Group-Object -NoElement | Sort-Object -Descending -Property Count -$combined_txt = Get-Content $txt_files_folder"\*.cap" +$combined_txt = Get-Content $txt_files_folder"\*.txt" $combined_txt = $combined_txt.Replace(",", "") $combined_txt = $combined_txt.Replace("$txt_prefix_to_ignore", "") $combined_txt = $combined_txt.Replace("$txt_postfix_ti_ignore", "") -Split '\W' | Group-Object -NoElement | Sort-Object -Descending -Property Count Write-Output "Sorted by count" -Write-Output $combined_txt \ No newline at end of file +Write-Output $combined_txt.Name \ No newline at end of file