一、选择指标
@@ -363,7 +363,7 @@ const g_taskAnswer = ref({
summation: 4993.0,
observations: 100,
});
-
+const flat = ref(false);
// 预处理
const preProcess = (tetx) => {
if (analysisData.value.length == 0) {
@@ -442,7 +442,7 @@ const modelCalculation = () => {
}, 1000);
})
.catch((err) => {
- loading.value = true;
+ loading.value = false;
});
};
function processArrayData(keys, data) {
@@ -472,17 +472,15 @@ const knowledgeImport = () => {
};
// 实训任务提交
const submitTask = () => {
- const flat = false;
for (let key in formInline.value) {
if (formInline.value[key] == "") {
const label = tableLabel.find((item) => item.prop == key);
proxy.$modal.msgWarning(`${label.label}不能为空`);
return;
} else {
- // 判断value的值等不等于g_taskAnswer.value每一项都要相等才行
if (Number(formInline.value[key]) != g_taskAnswer.value[key]) {
const label = tableLabel.find((item) => item.prop == key);
- flat = true
+ flat.value = true;
proxy.$modal.msgWarning(`${label.label}错误`);
return;
}
@@ -492,7 +490,7 @@ const submitTask = () => {
.submit({
userId: n_dataTableQuery.value.userId,
taskName: "描述性统计",
- numberOfErrors: flat ? 1 : 0,
+ numberOfErrors: flat.value ? 1 : 0,
})
.then((res) => {
dialogVisible.value = false;
@@ -604,11 +602,10 @@ const download = () => {
}
}
.startOver {
- margin-left: -10px;
- width: 205px;
- height: 55px;
+ width: 150px;
+ height: 40px;
background: #00f4ff;
- //水平居中
+ margin: auto;
display: flex;
align-items: center;
justify-content: center;
diff --git a/src/views/digitalMarketingAlgorithms/components/emotion-analysis.vue b/src/views/digitalMarketingAlgorithms/components/emotion-analysis.vue
index 4a447ff..704371b 100644
--- a/src/views/digitalMarketingAlgorithms/components/emotion-analysis.vue
+++ b/src/views/digitalMarketingAlgorithms/components/emotion-analysis.vue
@@ -200,7 +200,7 @@
另一个挑战是: 大多数情况下文本是非结构化数据(not structured)。
-

+
文本分析步骤
1.句法分析(Parsing): 是指处理非结构化文本使其具有一定的结构,供将来分析的过程。句法分析将文本进行解构,然后以一种更为结构化的方式来呈现。(unsturctured -> sturctured)
@@ -251,7 +251,7 @@
停止词(stop word): 在给定语言中,并非所有的单词都需要被考虑。(比如:the, a, of, and, to等这些不太可能有助于语义的理解)
词根法(Lemmatization)和词干法(Stemming): 词根法看单词的意义(如: Goose, geese, goose, gander, ganders)。词干法看单词的组成(如:walk, walking, Walk, walks, walked)。最受欢迎的是"Porter stemmer", “WordNet”。
词袋法(Bag-of-words representation): 将文档转化成高维向量(high-dimensional vector),向量指示了文档中各个单词的 存在/不存在/出现频率(presence/absence/frequency)。
-

+
词袋法足够简单(朴素且过分简化问题 naive and over-simplified) 并被广泛应用于文本分析问题中 (是入门的好方法)。其将文档表示为一组词语(单词),而忽略了其他信息(如顺序 order,上下文 context,推论 inferences和语义 semantics)。比如,“a dog bites a man” 和 "a man bites a dog"意思完全不同但是他们在词袋法里是同一种表示。
语料库的表示(Representation of a corpus): 语料库可以大到包括一种或者多种语言的所有文档,也可以小到仅限于特定领域(focused on a specific domains)。
@@ -383,7 +383,7 @@
分类方法(朴素贝叶斯,最大熵,或者支持向量机SVM) 经常被用来提取语料库统计以用于情感分析。
-

+
分类器仅基于对其进行训练的数据集来确定情感:
词义随着领域不同而改变。
因此模型无法直接应用于其他领域。
@@ -401,15 +401,15 @@
获得结果(gaining insights)
词云(word cloud)
五星好评的词云
-

+
一星差评的词云:
TFIDF能够用来凸显评论中有信息量的单词。
-

+
LDA可以把评论归类为主题。圆盘的大小代表了词的权重。
-

+
另一种可视化方式。
-

+
@@ -501,6 +501,7 @@ const aCommentOpinion = ref([]);
// 下载状态
const downloadStatus = ref(false);
//提交校验
+const flat = ref(false);
const g_submitVerification = ref({
max: "13",
frequency: "3",
@@ -590,7 +591,6 @@ const knowledgeImport = () => {
};
// 实训任务提交
const submitTask = () => {
- let flat = false;
for (let key in formInline.value) {
if (formInline.value[key] == "") {
const label = tableLabel.find((item) => item.prop == key);
@@ -600,7 +600,7 @@ const submitTask = () => {
if (formInline.value[key] != g_submitVerification.value[key]) {
const label = tableLabel.find((item) => item.prop == key);
proxy.$modal.msgWarning(`${label.label}错误`);
- flat = true;
+ flat.value = true;
return;
}
}
@@ -609,7 +609,7 @@ const submitTask = () => {
.submit({
userId: n_dataTableQuery.value.userId,
taskName: "情感分析",
- numberOfErrors: flat ? 1 : 0,
+ numberOfErrors: flat.value ? 1 : 0,
})
.then((res) => {
dialogVisible.value = false;
@@ -937,11 +937,10 @@ const switchingModels = () => {
}
}
.startOver {
- margin-left: -10px;
- width: 205px;
- height: 55px;
+ width: 150px;
+ height: 40px;
background: #00f4ff;
- //水平居中
+ margin: auto;
display: flex;
align-items: center;
justify-content: center;