cheniison / e2e-joint-coref Goto Github PK
View Code? Open in Web Editor NEWTackling Zero Pronoun Resolution and Non-Zero Coreference Resolution Jointly
License: MIT License
Tackling Zero Pronoun Resolution and Non-Zero Coreference Resolution Jointly
License: MIT License
请问在中文指代消解的时候,如果要复现论文结果,具体参数要如何设置?按照代码中默认参数,模型的损失一直无法下降,f1距离论文描述效果相去甚远。
`# best config
best_config = {
"embedding_dim": 768,
"max_span_width": 20,
# max training sentences depends on size of memery
"max_training_sentences": 11,
# max seq length
"max_seq_length": 128,
"bert_max_seq_length": 512,
"device": "cuda",
# "device": "cpu",
"checkpoint_path": "./data/checkpoint",
"lr": 0.0002,
"weight_decay": 0.0005,
"dropout": 0.3,
"report_frequency": 50,
"eval_frequency": 200,
# ontonotes dir
# 英文
# "ontonotes_root_dir": "./data/ontonotes",
# 中文零指代
"ontonotes_root_dir": "./data/ontonotes/data/files/data/chinese/annotations",
"train_file_path": "./data/train.json",
"test_file_path": "./data/test.json",
"val_file_path": "./data/val.json",
# max candidate mentions size in first/second stage
"top_unit_ratio": 0.5,
"max_top_antecedents": 50,
# use coarse to fine pruning
"coarse_to_fine": True,
# high order coref depth
"coref_depth": 2,
# FFNN config
"ffnn_depth": 1,
"ffnn_size": 3000,
# use span features, such as distance
"use_features": True,
"feature_dim": 20,
"model_heads": True,
# use metadata, such as genre and speaker info
"use_metadata": True,
"genres": ["bc", "bn", "mz", "nw", "tc", "wb"],
# 选择topk时是否考虑单元互斥
"extract_units": True,
# 指代检测损失权重
"unit_detection_loss_weight": 0.2,
# interaction among units
"use_units_interaction_before_score": True, # 计算得分前的交互
"use_units_interaction_after_score": True, # 计算得分后的交互
"interaction_method_after_score": "max", # 计算得分后的交互方式max/mean
# 带权self attention
"wsa_depth": 1,
"wsa_layer_num": 1,
"wsa_dropout": 0.3,
"wsa_pwff_size": 3072,
"wsa_head_num": 8,
"wsa_lr": 0.0002,
# transformer model
# "transformer_model_name": './data/bert-base-chinese',
"transformer_model_name": 'bert-base-chinese',
"transformer_lr": 0.00001,
}
`
你好,感谢开源这么棒的工作。
我想问一下经过数据处理之后我的验证集有252个文档,和论文中汇报的数量对不上。。。
谢谢!
Hi,
我在运行你的python predict.py
文件时发现了一些bug,针对测试样本的推理部分好像没有写完是吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.