Git Product home page Git Product logo

nlsparql-nn's Introduction

(Update) Exam evaluation

This project and this are part of the Language Understanding System class that I took in my Master Degree at the University of Trento.

Mark (ITA): 30/30 Mark (US): A

CRF

Under the conditional_random_field folder, the CRF model can be found. To generate the results, elaborate the training and test sets and to create the other necessary files, you just have to use the main.py script. You can run it using Python 3 by typing python3 main.py or python main.py (depending on the environment of your machine).

By typing python main.py -h or python main.py --help, a small usage guideline appears in your terminal. Here is an example on how to run it:

python main.py 3 template/win3 result/win3_result evaluation/win3_evaluation model/win3_model

Important note: the only file that must exists is the template file. All the others are generated.

Elman RNN

NOTE: Python < 3, Theano and an evironment variable to rnn_slu folder are needed to run this part.

First, go in recursive_neural_network_elman/support and run generator.py. This script will generate all the necessary files in the folder data. Once you did it,

NOTE: the following scripts must be run from the upper level folder (nlsparql-nn). If you run it from other folders, an error like this should appears python: can't open file 'rnn_slu/lus/rnn_elman_train.py': [Errno 2] No such file or directory

Example of training:

python rnn_slu/lus/rnn_elman_train.py recursive_neural_network_elman/data/training_word_pos_set recursive_neural_network_elman/data/validation_word_pos_set recursive_neural_network_elman/data/unique_word_pos_lexicon recursive_neural_network_elman/data/unique_iob_lexicon recursive_neural_network_elman/rnn_models/config3.cfg recursive_neural_network_elman/results/config3_word_pos_elman

Example of test:

python rnn_slu/lus/rnn_elman_test.py config3_word_pos_elman recursive_neural_network_elman/data/test_word_pos_set recursive_neural_network_elman/data/unique_word_pos_lexicon recursive_neural_network_elman/data/unique_iob_lexicon recursive_neural_network_elman/rnn_models/config3.cfg out_config3_word_pos_elman

Jordan RNN

NOTE: Python < 3, Theano and an evironment variable to rnn_slu folder are needed to run this part.

First, go in recursive_neural_network_jordan/support and run generator.py. This script will generate all the necessary files in the folder data. Once you did it,

NOTE: the following scripts must be run from the upper level folder (nlsparql-nn). If you run it from other folders, an error like this should appears python: can't open file 'rnn_slu/lus/rnn_jordan_train.py': [Errno 2] No such file or directory

Example of training:

python rnn_slu/lus/rnn_jordan_train.py recursive_neural_network_jordan/data/training_word_pos_set recursive_neural_network_jordan/data/validation_word_pos_set recursive_neural_network_jordan/data/unique_word_pos_lexicon recursive_neural_network_jordan/data/unique_iob_lexicon recursive_neural_network_jordan/rnn_models/config3.cfg recursive_neural_network_jordan/results/config3_word_pos_jordan

Example of test:

python rnn_slu/lus/rnn_jordan_test.py config3_word_pos_jordan recursive_neural_network_jordan/data/test_word_pos_set recursive_neural_network_jordan/data/unique_word_pos_lexicon recursive_neural_network_jordan/data/unique_iob_lexicon recursive_neural_network_jordan/rnn_models/config3.cfg out_config3_word_pos_jordan

RNN_SLU

In this folder a set of scripts to train and test Jordan RNNs and Elman RNNs can be found. All the scripts in this folder have been provided during the classes. I did not work on this code.

nlsparql-nn's People

Contributors

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