Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxinyu0922 committed Aug 17, 2022
1 parent f75c0c7 commit 7033e91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ def count_parameters(model):
if student.tag_type=='dependency' or student.tag_type=='enhancedud':
corpus=datasets.UniversalDependenciesCorpus(args.target_dir,add_root=True,spliter=args.spliter)
else:
# corpus=datasets.ColumnCorpus(args.target_dir, column_format={0: 'text', 1:'ner'}, tag_to_bioes='ner')
corpus=datasets.ColumnCorpus(args.target_dir, column_format={0: 'text', 1: 'upos', 2: 'xpos', 3:'ner'}, tag_to_bioes='ner')
corpus=datasets.ColumnCorpus(args.target_dir, column_format={0: 'text', 1:'ner'}, tag_to_bioes='ner')
# corpus=datasets.ColumnCorpus(args.target_dir, column_format={0: 'text', 1: 'upos', 2: 'xpos', 3:'ner'}, tag_to_bioes='ner')
if trainer_name == 'ReinforcementTrainer' and 'assign_doc_id' in config.config['ReinforcementTrainer'] and config.config['ReinforcementTrainer']['assign_doc_id']:
corpus_data = trainer.assign_corpus(corpus = corpus.train, set_name= args.set_name, corpus_name = args.corpus_name, train_with_doc = True, pretrained_file_dict = config.config['ReinforcementTrainer']['pretrained_file_dict'])
tar_file_name = str(Path(args.target_dir)).split('/')[-1]
Expand Down

0 comments on commit 7033e91

Please sign in to comment.