diff --git a/analysis/format.go b/analysis/format.go index a7b9f7e5..0b1072aa 100644 --- a/analysis/format.go +++ b/analysis/format.go @@ -69,7 +69,7 @@ func (sentence Sentence) tokenize() (tokens []string) { // stem returns the sentence split in stemmed words func (sentence Sentence) stem() (tokenizeWords []string) { - locale := locales.GetTagByName(sentence.Locale) + locale := locales.GetNameByTag(sentence.Locale) // Set default locale to english if locale == "" { locale = "english" diff --git a/network/network.go b/network/network.go index a385fff3..f32c6629 100644 --- a/network/network.go +++ b/network/network.go @@ -46,10 +46,10 @@ func LoadNetwork(fileName string) *Network { // CreateNetwork creates the network by generating the layers, weights and biases func CreateNetwork(locale string, rate float64, input, output Matrix, hiddensNodes ...int) Network { - input = append([][]float64{ + input = append(Matrix{ make([]float64, len(input[0])), }, input...) - output = append([][]float64{ + output = append(Matrix{ make([]float64, len(output[0])), }, output...)