Coder Social home page Coder Social logo

reuters-docsim's Introduction

reuters-docsim

Different approaches to computing document similarity, compared quantitatively using the Reuters-21578 corpus. This blog post has more details:

Document Similarity using various Text Vectorizing Strategies

Running the code

  • Make a data folder under the project directory.
  • Download and expand the Reuters-21578 corpus into this folder. This will create a data/reuters-21578 folder under the project directory.
  • Run the parse-input.py script, this will parse the corpus data and produce two flat files, one for text and another for tags in the data directory, called text.tsv and tags.tsv respectively.
  • Generate vectors for the tags by running the tag-sims.py script. This will generate a tag-vecs.tsv file in the data directory.
  • Generate vectors for a vectorizer by running one of the *-sims.py scripts, which will generate a corresponding *-vecs.csv or *-vecs.mtx file depending on whether the generated vectors are dense or sparse.
  • Compute the correlation coefficient between the tag vectors and the text vectors by running the calc-pearson.py script.

reuters-docsim's People

Contributors

sujitpal avatar

Stargazers

Whats_in_name avatar Sadaf Azad avatar  avatar Simone Marsili avatar  avatar  avatar gooooo avatar Xidao Wen avatar  avatar  avatar  avatar  avatar Dmitry Kan avatar Ari Bajo avatar WcW avatar R. Burke Squires avatar Ali Hürriyetoğlu avatar Olivier RISSER-MAROIX avatar  avatar Ji Wang avatar Daniel tan avatar  avatar  avatar Zhengboju avatar xfcygaocan avatar  avatar  avatar Allen avatar

Watchers

James Cloos avatar  avatar Sadaf Azad 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.