基于批改网文章得分系统的狗屁不通文章生成器
众所周知,批改网是一个提交英语作文,能够自动给出作文得分的网站。然后同样众所周知的是,这个批改系统有点智障。我研究了一下这个批改系统的批改规则,然后制作了这个更加智障的“基于批改网文章得分系统的狗屁不通文章生成器”,然后目前它生成的文章能够比较稳定地获得
具体思路是研究了一下批改网的得分标准。批改网的得分可以分成四部分:词汇、句子、篇章结构、内容相关。
然后经过 bdfs 和 多次提交实验,最终总结出它的得分规律:
词汇:多整一堆长难单词和奇奇怪怪的专有名词
句子:多用 which、that 从句
篇章结构:多用连接词,如 firstly,secondly,last but not least 等等
内容相关:主题单词的重复次数尽量多
然后我的应对方法是:
词汇:bdfs 一堆奇奇怪怪的名词做词汇库
句子:多整一堆奇奇怪怪的多含 which、that 从句的句型模板
篇章结构:连接词(短语)词汇库
内容相关:每个句子固定把主题单词往里面硬塞 1-2 次
然后批改网是不看意思的,它只看短语搭配和词汇类型,所以只要按照相应词性把词往模板里硬塞就好了。
代码如下:
#include<cstdio>
#include<cstdlib>
#include<ctime>
#include<cstring>
constexpr int S=50, SS = 200, SSS = 800;
constexpr char
FIRST[][S] = {"First of all", "To begin with","To start with","To outline the main points"},
THEN[][S] = {"Since then","Following this","For such a reason","As a result",
"Therefore","Thus","Consequently","Firstly","Secondly","In this case","In truth","What's more",
"However","At the same time","On the contrary","Moreover","Furthermore","In other words"},
END[][S] = {"To end with","Eventually","Last but not least","Finally","In conclusion","All in all"};
constexpr char
ACAD[][S] = {"limits of tolerance","law of minimum","chronic toxicity test","screening test","biological degradation",
"urban heat island effect","endocrine disrupting chemicals","organochlorine pesticide",
"photochemical oxidant","reverse osmosis membrane","toxicological pollution index"},
NOUN[][S] = {"hazard","catastrophe","upbringing","adolescents","merits","virtue","obligation","capacity","entertainment",
"recreation","blaze","glitter","billow","drudgery","compulsion","premiere","discrimination","disappointment","representative",
"identification","discrimination","administration","accommodation","questionnaire","circumstance","thunderstorm",
"refrigerator","receptionist","constitution","acquaintance","reservation","punctuation","acquisition"},
ADJ[][S] = {"good","great","excellent","important","necessary","perfect","bad","awful","terrible","beautiful","easy","simple"};
constexpr char
SENTENCES[][SS] = {
"%s is used for %s which can be used as the %s, while there's not so many people who think about %s",
"I strongly prefer %s than %s which really makes me sad",
"%s which is developed by them to help them out and benefit other people with the %s which is similar to %s should be thought about",
"%s can not only be made by %s but also by %s which has been known by more people",
"I don't think %s will become more and more popular, which has something to do with the %s",
"there is so much water which is polluted by the %s which can not be used as the %s",
"a host of %s which has %s was used for doing something about %s",
"we can really use %s with %s to finish %s which has been thrown away",
"more and more %s has been destroyed by %s, which can cause big problems",
"%s is a special kind of %s that gives %s to the one who really cares about the %s",
"with the popularity of the %s, %s enjoys widespread popularity which has nothing to do with the %s",
"%s is supposed to strengthen the position of the %s which should be used with %s",
"both %s and %s can be thought to be bad, which has been supported by lots of people"
},
INTRO[][SS] = {
"it's %s to say that",
"it is %s that",
"it's widely known that",
"it's %s for you to know that",
"that is the reason why",
"it is universally acknowledged that",
"it goes without saying that",
"there is no denying that",
"it's %s for me to tell you that"
};
char word[SS];
int count_words(char *s)
{
int cnt = 1;
while(*s) cnt+=*(s++)==' ';
return cnt;
}
const char* getnoun()
{
int x = rand()%10;
if(x<4) return ACAD[rand()%11];
else return NOUN[rand()%33];
}
void generate_sentence(char* s)
{
char t[SSS];
strcpy(s, "");
int x = rand()%10;
if(x<2) strcat(s, FIRST[rand()%4]);
else if(x<4) strcat(s, END[rand()%6]);
else strcat(s, THEN[rand()%18]);
strcat(s, ", ");
x = rand()%5;
if(x == 0) sprintf(t, INTRO[rand()%9], ADJ[rand()%12]), strcat(s, t), strcat(s, " ");
sprintf(t, SENTENCES[rand()%12], word, getnoun(), word, getnoun()), strcat(s, t), strcat(s, ". ");
}
void generate()
{
char s[SSS];
int cnt = 0;
do
{
generate_sentence(s);
cnt += count_words(s);
printf("%s", s);
}while(cnt<250);
}
int main()
{
srand(time(NULL));
sprintf(word, "Acquired Immunodeficiency Syndrome");
generate();
return 0;
}
实验发现内容相关得分要高需要较长的关键词来增加出现比例,所以这里固定了一个较长的单词 Acquired Immunodeficiency Syndrome。
然后生成文章之后随便找几句话的开头切成四段话提交就好了,否则篇章结构分可能不够导致卡
声明:本生成器仅供研究学习使用,若用来作业提交导致老师生气地给你赋了