Skip to content

Language implimentation #9

@bazuker

Description

@bazuker

Hi,
I am trying to implement Russian language.

I've created train data in Russian and trained the model using .Train() (init.go) function previously added TrainRussianModel() line inside of it. Then I used go-bindata to generate a file and replaced bindata.go with it.
bindata.zip this is my version of the compiled model containing Russian language.

The problem is when I am trying to restore the model I am getting this error

panic: json: cannot unmarshal object into Go struct field NaiveBayes.tokenizer of type text.Tokenizer

in this code

models, err := sentiment.Restore()
if err != nil {
   panic(err)
}
result := models.SentimentAnalysis("Это отличный фильм!", sentiment.Russian)
mt.Println(result)

The model works if I train it and use it right away after training without trying to save it on the disk.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions