-
First satisfy the following requirements
python 3.6
tensorflow 1.4.0
gensim 3.4.0
flask-cors
-
Training data should be in following directories
The predicate identifier -
/data/predIdData
The srl tagger -/data/srlIdData
-
Fasttext word embedding model should be in
/data
directory -
To train the model execute following script
The predicate identifier -
python train.py predId train
The srl tagger -python train.py srlId train
-
If training was interrupted. It can be continued again using following command
python train.py predId retrain {{modelname}}
python train.py srlId retrain {{modelname}}
model name here should be the directory name that saves checkpoints for the model that should continue with training. They can be found atroot/results/test/predIdData/model.weights
root/results/test/srlIdData/model.weights
-
Training parameters can be configured using
parameters.json
file which available in the project root directory -
To get the predictions from each trained models -
predicate identifier -
python individualModelpredict.py predId {{modelname}}
srl tagger -python individualModelpredict.py srlId {{modelname}}
8.To get the final prediction for a given Sinhala sentence
`python finalPredict.py {{predId model name}} {{srlId model name}}`
- logs are stored in
/results
directory
NOTE: ServerVersionDirectSinSRL directory consists the REST implementation of the project
execute following code snippet inside the browser console to remain connected the colab session
function ClickConnect(){
console.log("Working");
document.querySelector("colab-connect-button").click()
}
setInterval(ClickConnect,60000)