Code Monkey home page Code Monkey logo

language-modelling-approach-to-article-usage-prediction's Introduction

Language-Modelling-approach-to-Article-Usage-Prediction

Language-Modelling-approach-to-Article-Usage-Prediction

Problem Statement: Given a text, predict the correct usage of article "a" and "the" in an obfuscated text and compare it with the original text.

Two approaches to solve the problem of Article usage in english text.

  1. Language modelling approach
  2. Word Embedding (Word2Vec) Approach

Evaluation Metrics: The final evaluation is preformed using standard Precision, Recall and F1 measures.

Data is provided into ~/data folder.

  1. ~/trainSet contains 19 Charles Dickens writings. Taken from http://www.textfiles.com/etext/AUTHORS/DICKENS/
  2. ~/testSet contains the file to be test.
  3. ~/trainModels contains the trained word2Vec model.
  4. ~/originalSet contains the original version of file to be tested

External Dependencies:

  1. nltk for tokenization, sentence segmentation and corpora building
  2. gensim for word2Vec word embedding
  3. sklearn for evaluation metrics

Running Instructions:

  1. Save all the Data from ~/data folder to the Desktop.
  2. Update all the path information in ArticleUsagePrediction.py and TrainWord2Vec.py with the location of ~/data folder.
  3. Now Run TrainWord2Vec.py and this will populate word2Vec Model file in folder ~/data/trainModels/ by the name of "Word2VecModelChDicken"
  4. Run ArticleUsagePrediction.py. It will load the populated model and perform prediction on testData stored in ~data/testSet/

language-modelling-approach-to-article-usage-prediction's People

Contributors

ramansinghca 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.