Skip to content

Commit

Permalink
Merge branch 'improving'
Browse files Browse the repository at this point in the history
  • Loading branch information
LazataknesSoftware committed Aug 24, 2024
2 parents 45d7f88 + 579e7c1 commit cfb558e
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,25 +62,26 @@ func main() {
temp_prefixes, _ := regexp.Compile(PREFIXES)
done = temp_prefixes.ReplaceAllString(done, "")
}
no_I_Q = regexp.MustCompile(`[^\w ]`)
done = strings.Trim(no_I_Q.ReplaceAllString(done, ""), " ")
backup := done
var i uint = 0

dictionary, file_removed := os.ReadFile("./dict.txt")
dictionary_txt := strings.Replace(string(dictionary), "\r\n", "\n", -1)
text = strings.Split(string(dictionary_txt), "\n")
if file_removed != nil {
fmt.Println("Oops, dictionary (dict.txt) removed!")
os.Exit(1)
}
CheckSyntax(&text)

for i = 0; i < repeats; i++ {
done = backup
if !self {
dictionary, file_removed := os.ReadFile("./dict.txt")
dictionary_txt := strings.Replace(string(dictionary), "\r\n", "\n", -1)
text = strings.Split(string(dictionary_txt), "\n")
if file_removed != nil {
fmt.Println("Oops, dictionary (dict.txt) removed!")
os.Exit(1)
}
CheckSyntax(&text)

no_I_Q, _ = regexp.Compile("[!?]")
done = no_I_Q.ReplaceAllString(done, "")
backup = done
featured := []string{}
featured_one := []string{}
done = backup
for _, line := range text {
featured = append(featured, strings.Split(line, " - ")[1])
featured_one = append(featured_one, strings.Split(line, " - ")[0])
Expand All @@ -99,7 +100,7 @@ func main() {
}
}
if self {
done = backup
backup = done
otherw = strings.Split(done, " ")
}
for _, fi := range otherw {
Expand Down

0 comments on commit cfb558e

Please sign in to comment.