nlp

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NPLNotWordsString string = ""

Functions

func CutAndSave

func CutAndSave(content string, db *gorm.DB, tableName string, mid int)

分词并保存到数据库

func SearchKwd

func SearchKwd(slice []NLPKwd, str string) int

Types

type KeywordsForDB

type KeywordsForDB struct {
	Id    int    `gorm:"column:id;primaryKey"`
	Word  string `gorm:"column:word"`
	Mid   int    `gorm:"column:mid"`
	Score int    `gorm:"column:score"`
}

type NLPKwd

type NLPKwd struct {
	KeyWord string
	Count   int
}

func Cut

func Cut(content string) ([]NLPKwd, []string)

分词

Jump to

Keyboard shortcuts

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