Upload Train.md
Browse files
Train.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Creating and Training
|
| 2 |
+
```
|
| 3 |
+
cd biaffine-parser-master
|
| 4 |
+
```
|
| 5 |
+
## Perl Installation
|
| 6 |
+
|
| 7 |
+
Follow the link for perl installation :
|
| 8 |
+
https://linuxhint.com/install-perl-ubuntu/
|
| 9 |
+
|
| 10 |
+
## conllu_to_conllx.pl
|
| 11 |
+
|
| 12 |
+
Converts a file in the CoNLL-U format to the old CoNLL-X format.
|
| 13 |
+
```
|
| 14 |
+
perl conllu_to_conllx.pl < file.conllu > file.conll
|
| 15 |
+
```
|
| 16 |
+
Move the result .conllx file in <b>data/ptb/</b> folder
|
| 17 |
+
|
| 18 |
+
## Creating tnt_pos_tagger.dill
|
| 19 |
+
```
|
| 20 |
+
python3.7 hn_pos.py
|
| 21 |
+
```
|
| 22 |
+
my_tagger.dill file is created rename it to tnt_pos_tagger.dill and move it to <b>models</b> folder
|
| 23 |
+
|
| 24 |
+
## Training the model
|
| 25 |
+
```
|
| 26 |
+
python3.7 run.py train -p --feat=bert --ftrain=data/ptb/tamtrain.conllx --ftest=data/ptb/tamtest.conllx --fdev=data/ptb/tamdev.conllx
|
| 27 |
+
```
|
| 28 |
+
## Evaluate the model
|
| 29 |
+
```
|
| 30 |
+
python3.7 run.py evaluate --feat=bert --fdata=data/ptb/tamtest.conllx
|
| 31 |
+
```
|
| 32 |
+
## Prediction using Web App
|
| 33 |
+
Move to the upper directory and then run the web app
|
| 34 |
+
```
|
| 35 |
+
cd ..
|
| 36 |
+
```
|
| 37 |
+
```
|
| 38 |
+
python3.7 app.py
|
| 39 |
+
```
|