Code Monkey home page Code Monkey logo

ir535_project2_postingslist's Introduction

CSE 4/535 Project 2: Starter Kit

This codebase is a starter kit for Project 2. Usage of this toolkit is RECOMMENDED.

Requirements

Use the package manager pip3 to install the requirements. Update apt if you are using EC2 Ubuntu instance.

sudo apt-get update
sudo apt install python3-pip -y
pip3 install tqdm Flask nltk

Files and Tasks

  1. run_project.py is the driver file, which will create the Flask app. Implement the logic for getting the postings list, executing DAAT AND query, merging linked list. etc. in this file.
  2. indexer.py contains code to create and manipulate the index. Implement the necessary functions in indexer.
  3. preprocessor.py contains code to pre-process documents & queries. Implement the necessary functions in preprocessor.
  4. linkedlist.py defines the basic data structures for the postings list and the nodes of the postings list. It also contains code to manipulate the postings list. . Implement the necessary functions in linkedlist.
  5. Execute run_project.py to create your index and start your API endpoint. Your endpoint will be available at http://<ec2 public ipv4:9999>/execute_query

Strategies for completing the project efficiently

  • Use EC2 t2.micro (or medium) instance for hosting your Flask app. Make sure the instance is running during grading.
  • Run run_project.py using nohup in the server. The command is sudo nohup python3 run_project.py --corpus ./data/input_corpus.txt --output_location ./data/output.json --username your_UB_username> log.txt 2>&1 &
  • The nohup command will create a log file log.txt check the log file for execution status. The result of running the queries will be stored in the file output.json
  • In order to stop your app, run sudo lsof -n -i :9999 in command line to get the PID of the running nohup process. Kill the process using the command sudo kill -9 <PID>
  • Don't forget to open the port 9999 on your ec2 instance for TCP connections.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

ir535_project2_postingslist's People

Watchers

 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.