Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:666ghj BettaFish Database Sentiment Mining

From Leeroopedia
Knowledge Sources
Domains Database, Social_Media_Analysis, Information_Retrieval
Last Updated 2026-10-08 00:00 GMT

Overview

Technique for discovering public opinion trends by querying a structured database of crawled social media content using topic-based, time-bounded, and platform-specific search strategies with weighted hotness scoring.

Description

Database Sentiment Mining searches a local database populated by web crawlers to find social media content relevant to a research topic. Unlike live web search, the database provides structured, pre-collected data with engagement metrics (likes, comments, shares, views) that enable quantitative analysis of content popularity and reach.

The key innovation is weighted hotness scoring: rather than simply counting engagement, different interaction types are weighted by their social significance. Comments (5.0×) indicate active engagement, shares (10.0×) indicate endorsement, while views (0.1×) are passive. This produces a more accurate measure of public attention than raw counts.

Usage

Use this principle when you have a pre-collected corpus of social media data and need to retrieve relevant content for sentiment analysis or public opinion research. It is especially valuable when engagement metrics are available for ranking content by public attention.

Theoretical Basis

The hotness score combines weighted engagement metrics:

H=wl⋅L+wc⋅C+ws⋅S+wv⋅V+wd⋅D

Where:

  • L = likes, C = comments, S = shares, V = views, D = danmaku
  • Weights: wl=1.0, wc=5.0, ws=10.0, wv=0.1, wd=0.5

The search strategy uses multi-table UNION queries across platform-specific tables:

Results=⋃p∈platformsSearchp(topic,constraints)

Pseudo-code Logic:

# Abstract pattern (NOT real implementation)
hotness = likes * 1.0 + comments * 5.0 + shares * 10.0 + views * 0.1
results = union_query(
    tables=[bilibili, douyin, weibo, xhs, kuaishou, zhihu],
    where=f"content LIKE '%{topic}%'",
    order_by="hotness DESC",
    limit=limit
)

Related Pages

Implemented By

Uses Heuristic

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment