|
7 | 7 | from typing import List, Dict, Any |
8 | 8 |
|
9 | 9 | from psl_proof.models.submission_dtos import ChatHistory, SubmissionChat, ChatHistory, SubmissionHistory |
10 | | -#from psl_proof.utils.feature_extraction import get_keywords_keybert, get_sentiment_data |
| 10 | +from psl_proof.utils.feature_extraction import get_keywords_keybert, get_sentiment_data |
11 | 11 |
|
12 | 12 | def get_total_score(quality, uniqueness)-> float: |
13 | 13 | #total_score = quality # Since uniqueness always 1 |
@@ -141,21 +141,24 @@ def validate_data( |
141 | 141 | #print(f"source_contents: {source_contents}") |
142 | 142 |
|
143 | 143 | # disable on 27/03/2025 |
144 | | - # chat_sentiment = get_sentiment_data( |
145 | | - # source_contents |
146 | | - # ) |
147 | | - # chat_keywords = get_keywords_keybert( |
148 | | - # source_contents |
149 | | - # ) |
150 | | - |
151 | | - # chat_data = ChatData( |
152 | | - # chat_length=contents_length, |
153 | | - # chat_start_on = source_chat.chat_start_on, |
154 | | - # chat_ended_on = source_chat.chat_ended_on, |
155 | | - # sentiment = chat_sentiment, |
156 | | - # keywords = chat_keywords |
157 | | - # ) |
158 | | - # #print(f"chat_data: {chat_data}") |
159 | | - # cargo_data.chat_list.append( |
160 | | - # chat_data |
161 | | - # ) |
| 144 | + chat_sentiment = get_sentiment_data( |
| 145 | + source_contents |
| 146 | + ) |
| 147 | + chat_keywords = get_keywords_keybert( |
| 148 | + source_contents |
| 149 | + ) |
| 150 | + |
| 151 | + print(f"chat_sentiment: {chat_sentiment}") |
| 152 | + print(f"chat_keywords: {chat_keywords}") |
| 153 | + |
| 154 | + chat_data = ChatData( |
| 155 | + chat_length=contents_length, |
| 156 | + chat_start_on = source_chat.chat_start_on, |
| 157 | + chat_ended_on = source_chat.chat_ended_on, |
| 158 | + # sentiment = chat_sentiment, |
| 159 | + # keywords = chat_keywords |
| 160 | + ) |
| 161 | + #print(f"chat_data: {chat_data}") |
| 162 | + cargo_data.chat_list.append( |
| 163 | + chat_data |
| 164 | + ) |
0 commit comments