GithubHelp home page GithubHelp logo

nlp's Introduction

Natural Language Processing

This repo contains the assignments that I did from March to May 2015 for the "Natural Language Processing" course teached by Prof. Beuls at the Vrije Universiteit Brussel. This course covered the classical approach to Natural Language Processing (i.e. no deep learning), and more specifically covered the following topics: regular expressions, n-gram models, part-of-speech tagging, speech recognition, parsing, unification, meanings and semantics.

The programming language used for the assignments was Python along with the NLTK library.

Assignment 1: Language Modeling

The goal of this assignment was to build a language model and to detect in which language a test document is written. For this purpose, I used a 3-gram letter model. Based on this model and on some training data (from Wikipedia), I was also able to generate some random output texts which have a "similarity" to real words written in the same language.

Assignment 2: Chart Parser

The goal of this assignment was to build a chart parser which is appropriate for ambiguous grammars such as grammars of natural languages. I used the dynamic programming approach to solve the problem. From a practical point of view, the goal was to compute the parse tables, and from those generate the final parse trees.

For instance, here are the obtained parse trees for the following sentences:

  • "I gave the teacher a very heavy book"
  • "This is the cat that the dog chased" Tree 1 Tree 2

Assignment 3: Word Sense Disambiguation

The goal of this assignment was twofold: first, to simulate manually the original Lesk word overlap disambiguation algorithm, and second, to implement this algorithm using WordNet. The sentence to disambiguate was “Time flies like an arrow” in which each word should be disambiguated one at a time, from left to right, and in which earlier decisions are used later in the process.

How to run the code?

Just type in the terminal:

python <assignment_name>.py

nlp's People

Contributors

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