Git Product home page Git Product logo

comp8730_assign03's Introduction

Lexical vs Vector Semantics

This repository contains the code that investigates the similarities between Lexical and Vector Semantics. This was done as a part of Assignment 03 for COMP8730 Course.

Overview

The code for training Word2Vec and TF-iDF models on the Brown Corpus and Reuters Corpus can be found in the /code/word2vec and code/tfidf directories. These models are then saved in the models directory, which are then used to create testing dictionaries for every single model saved at data/similarities. These dictionaries are then compared with the golden truth (SimLex-999) words using the nDCG metric.

To run our code, you need to have python >= 3.8 installed. You can then use pip to install all the required dependencies that are listed in requirements.txt. Step 1: Clone this github repository and set it as your working directory by the following command:

!git clone https://github.com/Mrulay/COMP8730_Assign03.git
!cd /content/COMP8730_Assign03

Step 2: Install all the dependencies from the requirements.txt

pip install -r requirements.txt

A tutorial notebook is available here that displays the execution of all these steps and performs testing of the code as well.

Results

alt text

Upon testing all the Word2Vec models, the best nDCG score was obtained with $window size=10$ and $vector size=10$ on Brown Corpus. While on Reuters Corpus, the most optimal parameters were $window size=10$ and $vector size=100$ The Word2Vec models trained on both The Brown Corpus and The Reuters Corpus perform better on this task. TF-iDF values only represent the weight of words based on their frequency, they do not represent the actual relation with other words. On the other hand, Word2Vec models actually look at the words surrounding them.

comp8730_assign03's People

Contributors

kriti-k avatar mrulay 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.