Git Product home page Git Product logo

trec's Introduction

TREC

Please see present.ipynb for more details. If github is not showing the file properly, go to https://nbviewer.jupyter.org/github/philip-fu/TREC/blob/main/present.ipynb

setup

bash setup.sh

train

python main.py train --train_data_path=<path_to_train_txt> --eval_data_path=<path_to_test_txt> --save_to=<path_to_model_output>

eval

python main.py evaluate --eval_data_path=<path_to_test_txt> \
--model_path_coarse=<path_to_coarse_model> \
--model_path_coarse=<path_to_finegrained_model> \
--model_path_coarse=<path_to_coarse_baseline_model> \
--model_path_coarse=<path_to_finegrained_baseline_model>

env

Some parameters can be passed via env variable. See config/config.py for more details.

code structure

 ./
 │   README.md
 │   present.ipynb
 │   requrements.txt
 │   setup.sh
 │   main.py # script to train/eval models
 └───config/
 │   │   config.py # model parameters
 └───data/
 │   │   train_5500.label.txt
 │   │   test_TREC_10.label.txt
 └───model/
 │   │   nb.py # a baseline naive bayes model
 │   │   embedding_lstm.py # a lstm model
 └───src/
 │   │   data.py # functions to load data
 │   │   word_embedding.py # functions for word embedding and cleaning

trec's People

Contributors

philip-fu avatar wonderandmaps avatar

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.