如何平均一百多条消息中每个单词的成功指标

How do I average the success metric of each word in message for over a hundred messages

我希望使用 google 表格来确定大约 100 条 10-25 字的消息中每个字的盈利能力。

现在我开始做一些类似的事情:

Message Success Word Count
Cats are gross 150% 3
I love Dogs 250% 3
I love Dogs and Cats are gross 450% 6

要查询单词用法,我使用的是公式:

=ArrayFormula(query(Flatten(split(trim(REGEXREPLACE(LOWER(Message1:Message), "[!?,.:;-]"," "))," ")), "SELECT Col1, COUNT(Col1) Group By Col1",0))

这让我来到这里:

Word Count
cats 2
are 2
gross 2
i 2
love 2
dogs 2
and 1

我使用这个公式为每个单词分配成功百分比,使用单词计数作为拆分单词和复制的基础:

=IFERROR(IF(COUNTIF(Value:Value2,Value2)<=VLOOKUP(Value2,$Success:$Word_Count0,6,FALSE),Value2,IF(OFFSET($Success,MATCH(Value2,$Success:$Success0,0),0)="","",OFFSET($Success,MATCH(Value2,$Success:$Success0,0),0))),"")

这让我来到这里:

Word Value
cats 150%
are 150%
gross 150%
I 250%
love 250%
dogs 250%
I 450%
love 450%
dogs 450%
and 450%
cats 450%
are 450%
gross 450%

我可以使用什么公式来组合这些数据集以将我带到这里:

Word Count Success AVG
cats 2 300%
are 2 300%
gross 2 300%
I 2 350%
love 2 350%
dogs 2 350%
and 1 450%

使用:

=ARRAYFORMULA(QUERY(SPLIT(FLATTEN(SPLIT(REGEXREPLACE(LOWER(A2:A), 
 "[!?,.:;-]", " "), " ")&"×"&B2:B), "×"), 
 "select Col1,count(Col1),avg(Col2)
  where Col2 is not null 
  group by Col1 
  label Col1'Word',count(Col1)'Count',avg(Col2)'Success AVG'"))