Code Monkey home page Code Monkey logo

chinese_article_compare's Introduction

Chinese_article_compare

环境配置

python 3.7.0及以上版本

第三方库:

jieba

numpy

python-docx

使用方法

  • 将实验报告模板(docx文件)置入src文件夹中
  • 将需要比对的目标docx文件置入与ariticle_compare_in_simhash.py相同的文件目录中

运行ariticle_compare_in_simhash.py

即可获得该篇实验报告与语料库中报告的相似度

实现流程:

  1. 语料库(即src文件夹)中的docx文件全部转为txt文件,文本内容保存,图片、代码删除
  2. 读取txt中的内容并计算其simhash值
  3. 保存所有txt的simhash值和原文件名,便于后续索引
  4. 将需要比对的docx文件进行1、2操作,得到simhash2值
  5. 比对simhash2值和已经保存的simhash值库,输出比对结果

chinese_article_compare's People

Contributors

yijing233 avatar

Watchers

James Cloos avatar  avatar

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.