|
|
|
@ -17,10 +17,12 @@ 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) |
|
|
|
|
|
|
|
|
|
text_slice = FindHexBinArticles(text_slice) // convert nr systems
|
|
|
|
|
|
|
|
|
|
text := RemoveDoubleSpaces(strings.Join(text_slice, " ")) // empty slice units removed
|
|
|
|
@ -31,12 +33,16 @@ func main() {
|
|
|
|
|
|
|
|
|
|
next_slice := SplitBySpace(text) |
|
|
|
|
|
|
|
|
|
// strings.Fields(sisesta_string)
|
|
|
|
|
|
|
|
|
|
next_slice = FindTriggers(next_slice) // upper lower capitalize
|
|
|
|
|
|
|
|
|
|
output_text := RemoveDoubleSpaces(strings.Join(next_slice, " ")) // slice back to single string
|
|
|
|
|
|
|
|
|
|
output_text = FixPunctuation(output_text) // final punctuation control
|
|
|
|
|
|
|
|
|
|
fmt.Println(string(output_text)) |
|
|
|
|
|
|
|
|
|
output_text = FixApostrophes(output_text) // apostrophes being checked
|
|
|
|
|
|
|
|
|
|
// fmt.Println(string(output_text))
|
|
|
|
@ -113,8 +119,8 @@ func FixApostrophes(text string) string {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// fmt.Println(runes[(len(runes) - 1)])
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
text = "" |
|
|
|
|
for _, char := range runes { |
|
|
|
|
text += string(char) |
|
|
|
@ -193,7 +199,7 @@ func SplitBySpace(text string) []string {
|
|
|
|
|
|
|
|
|
|
for i, char := range text { |
|
|
|
|
|
|
|
|
|
if string(char) != separator { |
|
|
|
|
if string(char) != separator && i != len(text)-1 { |
|
|
|
|
str_temp += string(char) |
|
|
|
|
} else if str_temp == "(low," || str_temp == "(up," || str_temp == "(cap," { |
|
|
|
|
str_temp += string(char) |
|
|
|
@ -202,9 +208,11 @@ func SplitBySpace(text string) []string {
|
|
|
|
|
text_slice = append(text_slice, str_temp) |
|
|
|
|
str_temp = "" |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if i == len(text)-1 { |
|
|
|
|
text_slice = append(text_slice, str_temp) |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
return text_slice |
|
|
|
|
} |
|
|
|
|