Giter Site home page Giter Site logo

junkai0531 / textsimilarity Goto Github PK

View Code? Open in Web Editor NEW

This project forked from xiaoran-2/textsimilarity

0.0 0.0 0.0 7 KB

这是一个类,里面包含的有关文本相似度的常用的计算算法,例如,最长公共子序列,最短标记距离,TF-IDF等算法

Python 100.00%

textsimilarity's Introduction

TextSimilarity

这是一个类,里面包含的有关文本相似度的常用的计算算法,例如,最长公共子序列,最短标记距离,TF-IDF等算法 例如简单简单简单的用法:创建类实例,参数是两个文件目录,之后会生成两个字符串a.str_a, a.str_b

a = TextSimilarity('/home/a.txt','/home/b.txt')

In[89]:

a.minimumEditDistance(a.str_a,a.str_b) Out[89]: 0.3273657289002558

In[90]:

a.JaccardSim(a.str_a,a.str_b) Out[90]: 0.17937219730941703

In[91]:

a.splitWordSimlaryty(a.str_a,a.str_b,sim=a.pers_sim) Out[91]: 0.54331148827606712

textsimilarity's People

Contributors

xiaoran-2 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.