|
2 | 2 |
|
3 | 3 | ### Channel
|
4 | 4 |
|
5 |
| -- **channel_id**: Unique identifier |
6 |
| -- **platform**: Platform (e.g., Telegram) |
7 |
| -- **name**: Name of the channel |
8 |
| -- **description**: Description of the channel |
9 |
| -- **created_at**: Creation date |
10 |
| -- **active_members_count**: Number of active members |
11 |
| -- **language**: Language of the channel |
12 |
| -- **region**: Geographical region |
13 |
| -- **activity_score**: Posting activity score, indicating channel activity level |
| 5 | +- **channel_id**: Unique identifier for the channel. |
| 6 | +- **name**: Name of the channel. |
| 7 | +- **description**: Brief description of the channel. |
| 8 | +- **created_at**: Timestamp indicating when the channel was created. |
| 9 | +- **language**: Language predominantly used in the channel. |
| 10 | +- **activity_score**: Numerical score representing the activity level in the channel. |
| 11 | + |
| 12 | +**Methods**: |
| 13 | +- `create_channel`: Creates a new channel with specified details. |
| 14 | +- `associate_with_topic`: Connects a topic to the channel, setting scores and trend. |
| 15 | +- `add_semantic_vector`: Adds a semantic vector to the channel. |
14 | 16 |
|
15 | 17 | ---
|
16 | 18 |
|
17 | 19 | ### Topic
|
18 | 20 |
|
19 |
| -- **topic_id**: Unique identifier |
20 |
| -- **name**: Summary of the topic |
21 |
| -- **keywords**: List of key terms with associated weights (e.g., `[{"term": "AI", "weight": 0.35}, {"term": "neural networks", "weight": 0.28}]`) |
22 |
| -- **bertopic_metadata**: BerTopic metadata |
23 |
| -- **topic_embedding: Topic embedding |
24 |
| -- **updated_at**: Last updated timestamp |
| 21 | +- **topic_id**: Unique identifier for the topic. |
| 22 | +- **name**: Summary name of the topic. |
| 23 | +- **keywords**: List of key terms and associated weights (e.g., `[{"term": "AI", "weight": 0.35}]`). |
| 24 | +- **bertopic_metadata**: Metadata from BerTopic processing. |
| 25 | +- **topic_embedding**: Vector embedding for the topic. |
| 26 | +- **updated_at**: Timestamp of the last update. |
| 27 | + |
| 28 | +**Methods**: |
| 29 | +- `create_topic`: Creates a new topic with specified keywords and metadata. |
| 30 | +- `relate_to_topic`: Relates this topic to another, setting similarity metrics. |
| 31 | +- `add_update`: Adds a topic update with score change and keywords. |
| 32 | +- `set_topic_embedding`: Sets the embedding vector for the topic. |
| 33 | +- `get_topic_embedding`: Retrieves the embedding as a numpy array. |
25 | 34 |
|
26 | 35 | ---
|
27 | 36 |
|
28 | 37 | ### TopicUpdate
|
29 | 38 |
|
30 |
| -- **update_id**: Unique identifier |
31 |
| -- **channel_id**: Associated channel |
32 |
| -- **topic_id**: Associated topic |
33 |
| -- **keywords**: Keywords from the update |
34 |
| -- **score_delta**: Change in topic score |
35 |
| -- **timestamp**: Update time |
| 39 | +- **update_id**: Unique identifier for the update. |
| 40 | +- **keywords**: Keywords associated with this update. |
| 41 | +- **score_delta**: Numerical change in the topic score. |
| 42 | +- **timestamp**: Time when the update was made. |
| 43 | +- **topic_embedding**: Vector embedding for the topic. |
| 44 | + |
| 45 | +**Methods**: |
| 46 | +- `create_topic_update`: Creates a new update for a topic. |
| 47 | +- `link_to_channel`: Links this update to a channel. |
36 | 48 |
|
37 | 49 | ---
|
38 | 50 |
|
39 | 51 | ### SemanticVector
|
40 | 52 |
|
41 |
| -- **vector_id**: Unique identifier |
42 |
| -- **semantic_vector**: Aggregated representation of recent message semantics in a channel, preserving privacy by summarizing content instead of storing individual messages. |
43 |
| -- **created_at**: Creation date |
| 53 | +- **vector_id**: Unique identifier for the semantic vector. |
| 54 | +- **semantic_vector**: Aggregated vector summarizing recent message semantics. |
| 55 | +- **created_at**: Timestamp indicating creation. |
44 | 56 |
|
45 |
| -> **Explanation**: The SemanticVector node represents a general semantic profile of recent messages in a channel, supporting dynamic topic relevance without storing each message individually. This approach aligns with privacy requirements while allowing for the adjustment of topic relevance. |
| 57 | +**Methods**: |
| 58 | +- `create_semantic_vector`: Creates a new semantic vector. |
46 | 59 |
|
47 | 60 | ---
|
48 | 61 |
|
49 | 62 | ## Relationships
|
50 | 63 |
|
51 | 64 | ### ASSOCIATED_WITH (Channel → Topic)
|
52 | 65 |
|
53 |
| -- **topic_score**: Cumulative or weighted score representing a topic’s importance or relevance to the channel |
54 |
| -- **keywords_weights**: Channel-specific keywords and their weights, highlighting the unique relationship between the channel and topic |
55 |
| -- **message_count**: Number of messages analyzed in relation to the topic |
56 |
| -- **last_updated**: Timestamp of the last update |
57 |
| -- **trend**: Indicator of topic trend over time within the channel |
58 |
| - |
59 |
| -> **Explanation**: This relationship captures the importance of each topic to specific channels, with channel-specific keyword weights providing additional insight into unique topic-channel dynamics. `trend` enables tracking how each topic's relevance changes over time within the channel. |
| 66 | +- **topic_score**: Weighted score indicating a topic's relevance to the channel. |
| 67 | +- **last_updated**: Last time the relationship was updated. |
| 68 | +- **trend**: Trend indication for the topic within the channel. |
60 | 69 |
|
61 | 70 | ---
|
62 | 71 |
|
63 | 72 | ### RELATED_TO (Topic ↔ Topic)
|
64 | 73 |
|
65 |
| -- **similarity_score**: Degree of similarity between two topics |
66 |
| -- **temporal_similarity**: Metric to track similarity over time |
67 |
| -- **co-occurrence_rate**: Frequency of concurrent discussion of topics across channels |
68 |
| -- **common_channels**: Number of shared channels discussing both topics |
69 |
| -- **topic_trend_similarity**: Measure of similarity in topic trends across channels |
| 74 | +- **similarity_score**: Similarity metric between topics. |
| 75 | +- **temporal_similarity**: Measure of similarity persistence over time. |
| 76 | +- **co_occurrence_rate**: Rate of joint appearance in discussions. |
| 77 | +- **common_channels**: Count of shared channels discussing both topics. |
| 78 | +- **topic_trend_similarity**: Trend similarity between topics across channels. |
| 79 | + |
| 80 | +--- |
| 81 | + |
| 82 | +### HasRel (General Relationship) |
| 83 | + |
| 84 | +This relationship can be used as a generic placeholder for relationships that do not have specific attributes. |
| 85 | + |
| 86 | +> **Note**: The relationships provide both dynamic and static metrics, such as similarity scores and temporal similarity, enabling analytical insights into evolving topic relationships. |
| 87 | +
|
0 commit comments