Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Sentence.stem() function: I think it's the "GetNameByTag" and not the "GetTagByName" #165

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion analysis/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 2 additions & 2 deletions network/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -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...)

Expand Down