data

package
v0.0.0-...-3d176a0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 6, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateComment

func CreateComment(comment *models.Comment, session *gocql.Session) error

CreateComment creates a Comment in the database, without classif info

func CreateSubmission

func CreateSubmission(submission *models.Submission, session *gocql.Session) error

CreateSubmission creates a Submission in the database, without classif info

func GetComment

func GetComment(name string, session *gocql.Session) (*models.Comment, error)

GetComment returns a Comment by its full name

func GetSubmission

func GetSubmission(name string, session *gocql.Session) (*models.Submission, error)

GetSubmission returns a Submission by its full name

func UpdateClassification

func UpdateClassification(tp string, name string, isClassified bool, isHatespeech bool, probaHateful float64, probaNotHateful float64, session *gocql.Session) error

UpdateClassification updates a record classification info according to its type tp

func UpdateComment

func UpdateComment(name string, params map[string]interface{}, session *gocql.Session) error

UpdateComment updates a Comment

func UpdateCommentClassification

func UpdateCommentClassification(name string, isClassified bool, isHatespeech bool, probaHateful float64, probaNotHateful float64, session *gocql.Session) error

UpdateCommentClassification updates a Comment classification info

func UpdateSubmission

func UpdateSubmission(name string, params map[string]interface{}, session *gocql.Session) error

UpdateSubmission updates a Submission

func UpdateSubmissionClassification

func UpdateSubmissionClassification(name string, isClassified bool, isHatespeech bool, probaHateful float64, probaNotHateful float64, session *gocql.Session) error

UpdateSubmissionClassification updates a Submission classification info

Types

type Classification

type Classification struct {
	Name            string  `json:"name" cql:"name"`
	Type            string  `json:"type" cql:"type"`
	ProbaHateful    float64 `json:"proba_hateful"`
	ProbaNotHateful float64 `json:"proba_not_hateful"`
	Class           int     `json:"is_hatespech"`
}

Classification contains classification result from the classifier

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL