|
@@ -144,7 +144,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="ai_echartsData" v-if="currentAnalysis && currentAnalysis.json.keyword">
|
|
<div class="ai_echartsData" v-if="currentAnalysis && currentAnalysis.json.keyword">
|
|
|
<div class="title">{{ lang.ssKeyword }}:</div>
|
|
<div class="title">{{ lang.ssKeyword }}:</div>
|
|
|
- <!--<span v-for="(item,index) in currentAnalysis.json.keyword" :key="index">{{ item }}</span>-->
|
|
|
|
|
|
|
+ <span v-for="(item,index) in currentAnalysis.json.keyword" :key="index">{{ item }}</span>
|
|
|
<div class="btn" @click="openEchatsDialog()">{{ lang.ssViewKeywordCloud }}</div>
|
|
<div class="btn" @click="openEchatsDialog()">{{ lang.ssViewKeywordCloud }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="generatingContent" v-if="currentAnalysis && currentAnalysis.generatingContent">{{ lang.ssGeneratingContent }}...</div>
|
|
<div class="generatingContent" v-if="currentAnalysis && currentAnalysis.generatingContent">{{ lang.ssGeneratingContent }}...</div>
|
|
@@ -316,6 +316,7 @@ const props = defineProps<{
|
|
|
courseDetail: any;
|
|
courseDetail: any;
|
|
|
userId: string;
|
|
userId: string;
|
|
|
workId: string;
|
|
workId: string;
|
|
|
|
|
+ cid: string;
|
|
|
}>()
|
|
}>()
|
|
|
|
|
|
|
|
const emit = defineEmits<{
|
|
const emit = defineEmits<{
|
|
@@ -731,7 +732,7 @@ const getAnalysis = () => {
|
|
|
}
|
|
}
|
|
|
console.log('props.workId', props.workId)
|
|
console.log('props.workId', props.workId)
|
|
|
const params = {
|
|
const params = {
|
|
|
- pid: props.workId,
|
|
|
|
|
|
|
+ pid: props.workId+(props.cid?','+props.cid:''),
|
|
|
}
|
|
}
|
|
|
axios.get('https://pbl.cocorobo.cn/api/pbl/select_pptAnalysisByPid?pid=' + params.pid).then(res => {
|
|
axios.get('https://pbl.cocorobo.cn/api/pbl/select_pptAnalysisByPid?pid=' + params.pid).then(res => {
|
|
|
const data = res[0]
|
|
const data = res[0]
|
|
@@ -1063,12 +1064,17 @@ const openEchatsDialog = () => {
|
|
|
const getWordCloud15 = () => {
|
|
const getWordCloud15 = () => {
|
|
|
|
|
|
|
|
return new Promise((resolve,) => {
|
|
return new Promise((resolve,) => {
|
|
|
- const msg = `## 任务 请基于以下文本,提炼出10 - 30个关键词,用于绘制词云图。请给出相应的关键词,以及关键词出现的频次。请确保输出的关键字准确反映该段文本的主要内容和主题。
|
|
|
|
|
-## 要求
|
|
|
|
|
-1. ** 提取关键词 **:从提供的文本中提取出10 - 30个最具代表性的关键字。关键词应该涵盖该文本的主要概念、重要术语和核心主题。尽量选择多样化的关键词,避免过于集中在某一个主题或概念上。
|
|
|
|
|
- 2. ** 词频统计 **:计算每个关键字在文本中出现的频率。
|
|
|
|
|
- 3. ** 词汇大小 **:根据词频数量,确定每个关键字在词云图中的大小。词频越高,词汇大小数值越大,数值范围1 - 100。
|
|
|
|
|
- 4. ** 输出格式 **:输出结果应包含输出相应的关键词或元话语、对应的词频数量以及词汇大小数值,请以json格式输出,严格按照输出示例输出。
|
|
|
|
|
|
|
+ const msg = `## 任务
|
|
|
|
|
+请针对文本中学生提交的问答题回答内容进行深度分析,提炼出 10 - 30 个核心关键词,用于绘制词云图。
|
|
|
|
|
+## 提取准则
|
|
|
|
|
+1. 聚焦内容主体:仅从学生的具体回答文本中提取关键词。
|
|
|
|
|
+2. 严格排除杂质:禁止提取任何属于系统元数据或固定格式的词汇,包括但不限于:“课程数据”、“学生姓名”、“回答结果”、“课程标题”、“提交时间”、“作业名称”、“分数”等。
|
|
|
|
|
+3. 语义去重:将意思相近的词进行合并(例如“高效”与“效率高”),保留最具代表性的词条。
|
|
|
|
|
+4. 涵盖核心:关键词应准确反映学生回答中的核心观点、关键知识点、高频论据或情感倾向。
|
|
|
|
|
+## 任务要求
|
|
|
|
|
+1. 词频统计:计算每个有效关键字在回答内容中出现的频率。
|
|
|
|
|
+2. 词汇大小:根据词频,确定每个关键字在词云中的权重。词频越高,数值越大,范围 1 - 100。
|
|
|
|
|
+3. 输出格式:请严格按照 JSON 格式输出,包含关键词、词频及对应的词汇大小。
|
|
|
|
|
|
|
|
## 文本
|
|
## 文本
|
|
|
课程数据:
|
|
课程数据:
|
|
@@ -1216,7 +1222,7 @@ const saveAnalysis = () => {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
const params = [{
|
|
const params = [{
|
|
|
- pid: props.workId,
|
|
|
|
|
|
|
+ pid: props.workId+(props.cid?','+props.cid:''),
|
|
|
idx: props.showData.workIndex,
|
|
idx: props.showData.workIndex,
|
|
|
json: JSON.stringify(currentAnalysis.value.json),
|
|
json: JSON.stringify(currentAnalysis.value.json),
|
|
|
}]
|
|
}]
|