You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: example/ee/standard/README.md
+20-10Lines changed: 20 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,6 +12,7 @@
12
12
```bash
13
13
python==3.8
14
14
pip install -r requirements.txt
15
+
pip install hydra-core==1.3.1 # ignore the conlict with deepke
15
16
```
16
17
17
18
## Download Code
@@ -30,30 +31,39 @@ Follow the instruction [here](./data/DuEE/README.md)
30
31
31
32
## Train
32
33
33
-
Modify the parameters in `./conf/train.yaml`.
34
+
Modify the parameters in `./conf/train.yaml`. Select different dataset by set `data_name`, and change the `model_name_or_path` for different dataset.
34
35
35
-
- Trigger
36
+
- Trigger (Event Detection or Trigger Classification)
37
+
38
+
First train trigger classification model, and predict the trigger of each instance.
39
+
36
40
Set `task_name` to `trigger`.
37
-
Select different dataset by set `data_name`.
38
41
Then run the following command:
42
+
39
43
```bash
40
44
python run.py
41
45
```
46
+
47
+
The prediction will be conducted after the training, and the result will be in `exp/xx/trigger/xxx/eval_pred.json`.
42
48
43
-
- Role
44
-
Here we train the event arguments extraction model with the gold trigger.
49
+
Then train the event arguments extraction model by the gold trigger.
50
+
- Role (Event Arguments Extraction)
51
+
Then, we train the event arguements extraction models, here we train the event arguments extraction model with the gold trigger.
45
52
Set `task_name` to `role`.
46
-
Select different dataset by set `data_name`.
47
53
Then run the following command:
54
+
48
55
```bash
49
56
python run.py
50
57
```
51
58
52
-
## Predict
59
+
## Predict (Event Arguments Extraction)
60
+
61
+
The trigger prediction has been conducted during training, and the result is in the `output_dir`. Here we predict the event arguments extraction results with pred trigger result.
62
+
63
+
Modify the parameters in `./conf/predict.yaml`. Set the `model_name_or_path` to the trained role model path, and `do_pipeline_predict=True` to do the pipeline prediction.
53
64
54
-
The trigger prediction has been conducted during training, and the result is in the `output_dir`.Here we predict the event arguments extraction results with pred trigger result.
55
-
Modify the parameters in `./conf/predict.yaml`.
56
65
Then run the following command:
57
66
```bash
58
67
python predict.py
59
-
```
68
+
```
69
+
The final result will be in `eval_pred.json` of the role model path folder.
0 commit comments