Git Product home page Git Product logo

autoperusalprocedure's Introduction

AutoPerusalProcedure


英文作文自动批阅程序,主要包括拼写检测、语法检测、语句一致性检测与主题检测等几个部分。

主要技术栈:

  • Web: Flask、Mako。
  • 语法单词检查:pylinkgrammar、PyEnchant。
  • 学习算法:链语法、决策树。

效果: 微信示意图 微信示意图

程序架构

程序主要包括了五个模块,拼写检测模块、语法检测模块、统计信息模块、评分模块和前端模块。

模块关系图

1、拼写检查模块

拼写检查模块用PyEnchant对单词进行检查。其通过一个带有正确拼写得字典,判断文章中得词是否为正确拼写,如果不在正确拼写词典中则根据概率返回最可能得拼写单词。

2、语法检查模块

语法检查模块采用pylinkgrammar库,主要通过语法链对语义进行分析。

链语法算法利用词典文件中词条的链接子表达式分析输入文本的句法结构,符合语法的句子会形成完整的链路图(linkpage),而不符合语法的句子会形成局部的链路图(partial linkpage)。更多可见grammar-link

>>> from pylinkgrammar.linkgrammar import Parser
>>> p = Parser()
>>> linkages = p.parse_sent("This is a simple sentence.")
>>> len(linkages)
2
>>> print linkages[0].diagram

        +-------------------Xp------------------+
        |              +--------Ost-------+     |
        |              |  +-------Ds------+     |
        +---Wd---+-Ss*b+  |     +----A----+     |
        |        |     |  |     |         |     |
    LEFT-WALL this.p is.v a simple.a sentence.n .

链语法通过词语的链接属性,来对句子进行分析,将语言知识完全落实到词汇基础上。 在分析不合语法的输人时,链语法分析器能够跨越句子中不合语法的单词,找到后面的词汇,并连接构成有句法意义的词对,比如主语动词,动词宾语和助动词动词等。

3、统计信息模块

这里的统计信息主要包括单词个数,句子平均长度,句子长度方差等。 在很多英文作文的评分中,都会对句子长度、核心单词的数量等指标进行关注,因此在指标中加入了这类的统计信息。

4、评分模块

评分模块功能主要是对单词拼写、句法评分、统计信息三个维度的特征进行整合,输出评分机制。 评分模块主要采用机器学习的方法对给定的样本数据打分情况进行学习,拟合出最接近样本数据的各项评分权重值,从而实现接近人类的评分结果。

5、前端模块

前端主要包括了两种,一种是Web页面,一种是微信端。 Web页面采用Flask构建,模板采用Mako语法。 微信端采用itchat构建。

TODO

  • 语法检查模块加入马尔科夫链进行检测,对于低分的句子给出正确的修改方法。
  • 引入主题相关性维度,计算各句之间的相关性,对偏离主题的文章给予低分。
  • 完善评分模块,加入机器学习训练算法。
  • 完善微信端功能,使得系统支持ORC图片识别功能,可以让用户直接通过微信拍照上传作文进行批阅。

autoperusalprocedure's People

Contributors

eacontang avatar shikanon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

autoperusalprocedure's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.