Skip to content

Commit

Permalink
updated data to combined hexa dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
MihaiSurdeanu committed Jul 4, 2024
1 parent 5bf353b commit a300b8e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions encoder/src/main/python/averaging_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,13 @@ def print_some_params(self, model: TokenClassificationModel, msg: str) -> None:
ShortTaskDef("NER", "conll-ner/", "train.txt", "dev.txt", "test.txt"),
ShortTaskDef("POS", "pos/", "train.txt", "dev.txt", "test.txt"),
ShortTaskDef("Chunking", "chunking/", "train.txt", "test.txt", "test.txt"),
#ShortTaskDef("Hexa Term", "deps-wsj/", "train.labels.hexaterms", "dev.labels.hexaterms", "test.labels.hexaterms"),
#ShortTaskDef("Hexa NonTerm", "deps-wsj/", "train.labels.hexanonterms", "dev.labels.hexanonterms", "test.labels.hexanonterms")
ShortTaskDef("Hexa Term", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels.hexaterms", "test.labels.hexaterms", "test.labels.hexaterms"), # dev is included in train
ShortTaskDef("Hexa NonTerm", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels.hexanonterms", "test.labels.hexanonterms", "test.labels.hexanonterms") # dev is included in train
#ShortTaskDef("Deps Head", "deps-wsj/", "train.heads", "dev.heads", "test.heads"),
#ShortTaskDef("Deps Label", "deps-wsj/", "train.labels", "dev.labels", "test.labels", dual_mode=True)
ShortTaskDef("Deps Head", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.heads", "test.heads", "test.heads"),
ShortTaskDef("Deps Label", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels", "test.labels", "test.labels", dual_mode=True)
#ShortTaskDef("Deps Head", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.heads", "test.heads", "test.heads"),
#ShortTaskDef("Deps Label", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels", "test.labels", "test.labels", dual_mode=True)
])
AveragingTrainer(tokenizer).train(tasks)
8 changes: 6 additions & 2 deletions encoder/src/main/python/clu_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,12 @@ def compute_metrics(self, eval_pred: EvalPrediction) -> Dict[str, float]:
ShortTaskDef("NER", "conll-ner/", "train.txt", "dev.txt", "test.txt"),
ShortTaskDef("POS", "pos/", "train.txt", "dev.txt", "test.txt"),
ShortTaskDef("Chunking", "chunking/", "train.txt", "test.txt", "test.txt"), # this dataset has no dev
ShortTaskDef("Deps Head", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.heads", "test.heads", "test.heads"), # dev is included in train
ShortTaskDef("Deps Label", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels", "test.labels", "test.labels", dual_mode=True) # dev is included in train
#ShortTaskDef("Hexa Term", "deps-wsj/", "train.labels.hexaterms", "dev.labels.hexaterms", "test.labels.hexaterms"),
#ShortTaskDef("Hexa NonTerm", "deps-wsj/", "train.labels.hexanonterms", "dev.labels.hexanonterms", "test.labels.hexanonterms"),
ShortTaskDef("Hexa Term", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels.hexaterms", "test.labels.hexaterms", "test.labels.hexaterms"), # dev is included in train
ShortTaskDef("Hexa NonTerm", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels.hexanonterms", "test.labels.hexanonterms", "test.labels.hexanonterms") # dev is included in train
#ShortTaskDef("Deps Head", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.heads", "test.heads", "test.heads"), # dev is included in train
#ShortTaskDef("Deps Label", "deps-combined/", "wsjtrain-wsjdev-geniatrain-geniadev.labels", "test.labels", "test.labels", dual_mode=True) # dev is included in train
#ShortTaskDef("Deps Head", "deps-wsj/", "train.heads", "dev.heads", "test.heads"),
#ShortTaskDef("Deps Label", "deps-wsj/", "train.labels", "dev.labels", "test.labels", dual_mode=True)
])
Expand Down

0 comments on commit a300b8e

Please sign in to comment.