|
|
|
@ -8,6 +8,8 @@ import (
|
|
|
|
|
"strings" |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
// 20OCT21 review commit verison
|
|
|
|
|
|
|
|
|
|
func main() { |
|
|
|
|
file_name := string(os.Args[1]) |
|
|
|
|
input_text, err_01 := ioutil.ReadFile(file_name) |
|
|
|
@ -17,11 +19,11 @@ func main() {
|
|
|
|
|
os.Exit(1) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
fmt.Println(string(input_text)) |
|
|
|
|
// fmt.Println(string(input_text))
|
|
|
|
|
|
|
|
|
|
text_slice := SplitBySpace(string(input_text)) |
|
|
|
|
|
|
|
|
|
fmt.Println(text_slice) |
|
|
|
|
// fmt.Println(text_slice)
|
|
|
|
|
|
|
|
|
|
text_slice = FindHexBinArticles(text_slice) // convert nr systems
|
|
|
|
|
|
|
|
|
@ -41,7 +43,7 @@ func main() {
|
|
|
|
|
|
|
|
|
|
output_text = FixPunctuation(output_text) // final punctuation control
|
|
|
|
|
|
|
|
|
|
fmt.Println(string(output_text)) |
|
|
|
|
// fmt.Println(string(output_text))
|
|
|
|
|
|
|
|
|
|
output_text = FixApostrophes(output_text) // apostrophes being checked
|
|
|
|
|
|
|
|
|
@ -115,11 +117,19 @@ func FixApostrophes(text string) string {
|
|
|
|
|
} else { |
|
|
|
|
runes[i] = mark2 |
|
|
|
|
pair_count = true |
|
|
|
|
/* |
|
|
|
|
if i < len(runes)-1 { |
|
|
|
|
if rune(runes[i+1]) != ' ' { |
|
|
|
|
helper := runes |
|
|
|
|
runes = append(runes[:i+1], rune(32)) |
|
|
|
|
runes = append(runes, helper[i+1:]...) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// fmt.Println(runes[(len(runes) - 1)])
|
|
|
|
|
} |
|
|
|
|
text = "" |
|
|
|
|
for _, char := range runes { |
|
|
|
|