mirror of
https://github.com/ArvinLovegood/go-stock.git
synced 2025-07-19 00:00:09 +08:00
- 在 App.vue 中添加情感分析相关的导入和使用 - 在 app_common.go 中实现 AnalyzeSentiment 方法- 在 market_news_api.go 和 models.go 中集成情感分析结果 - 更新前端通知显示,根据情感分析结果调整通知类型和样式 - 在 go.mod 中添加 gojieba 依赖用于情感分析
34 lines
925 B
Go
34 lines
925 B
Go
package main
|
|
|
|
import (
|
|
"go-stock/backend/data"
|
|
"go-stock/backend/models"
|
|
)
|
|
|
|
// @Author spark
|
|
// @Date 2025/6/8 20:45
|
|
// @Desc
|
|
//-----------------------------------------------------------------------------------
|
|
|
|
func (a *App) LongTigerRank(date string) *[]models.LongTigerRankData {
|
|
return data.NewMarketNewsApi().LongTiger(date)
|
|
}
|
|
|
|
func (a *App) StockResearchReport(stockCode string) []any {
|
|
return data.NewMarketNewsApi().StockResearchReport(stockCode, 7)
|
|
}
|
|
func (a *App) StockNotice(stockCode string) []any {
|
|
return data.NewMarketNewsApi().StockNotice(stockCode)
|
|
}
|
|
|
|
func (a *App) IndustryResearchReport(industryCode string) []any {
|
|
return data.NewMarketNewsApi().IndustryResearchReport(industryCode, 7)
|
|
}
|
|
func (a App) EMDictCode(code string) []any {
|
|
return data.NewMarketNewsApi().EMDictCode(code, a.cache)
|
|
}
|
|
|
|
func (a App) AnalyzeSentiment(text string) data.SentimentResult {
|
|
return data.AnalyzeSentiment(text)
|
|
}
|