You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

README.md 2.2 kB

6 years ago
6 years ago
6 years ago
6 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [中文](#支持批并行的LatticeLSTM)
  2. [English](#Batch-Parallel-LatticeLSTM)
  3. # 支持批并行的LatticeLSTM
  4. + 原论文:https://arxiv.org/abs/1805.02023
  5. + 在batch=10时,计算速度已明显超过[原版代码](https://github.com/jiesutd/LatticeLSTM)。
  6. + 在main.py中添加三个embedding的文件路径以及对应数据集的路径即可运行
  7. + 此代码集合已加入fastNLP
  8. ## 运行环境:
  9. + python >= 3.7.3
  10. + fastNLP >= dev.0.5.0
  11. + pytorch >= 1.1.0
  12. + numpy >= 1.16.4
  13. + fitlog >= 0.2.0
  14. ## 支持的数据集:
  15. + Resume,可以从[这里](https://github.com/jiesutd/LatticeLSTM)下载
  16. + Ontonote
  17. + [Weibo](https://github.com/hltcoe/golden-horse)
  18. 未包含的数据集可以通过提供增加类似 load_data.py 中 load_ontonotes4ner 这个输出格式的函数来增加对其的支持
  19. ## 性能:
  20. |数据集| 目前达到的F1分数(test)|原文中的F1分数(test)|
  21. |:----:|:----:|:----:|
  22. |Weibo|58.66|58.79|
  23. |Resume|95.18|94.46|
  24. |Ontonote|73.62|73.88|
  25. 备注:Weibo数据集我用的是V2版本,也就是更新过的版本,根据杨杰博士Github上LatticeLSTM仓库里的某个issue,应该是一致的。
  26. ## 如有任何疑问请联系:
  27. + lixiaonan_xdu@outlook.com
  28. ---
  29. # Batch Parallel LatticeLSTM
  30. + paper:https://arxiv.org/abs/1805.02023
  31. + when batch is 10,the computation efficiency exceeds that of [original code](https://github.com/jiesutd/LatticeLSTM)。
  32. + set the path of embeddings and corpus before you run main.py
  33. + this code set has been added to fastNLP
  34. ## Environment:
  35. + python >= 3.7.3
  36. + fastNLP >= dev.0.5.0
  37. + pytorch >= 1.1.0
  38. + numpy >= 1.16.4
  39. + fitlog >= 0.2.0
  40. ## Dataset:
  41. + Resume,downloaded from [here](https://github.com/jiesutd/LatticeLSTM)
  42. + Ontonote
  43. + [Weibo](https://github.com/hltcoe/golden-horse)
  44. to those unincluded dataset, you can write the interface function whose output form is like *load_ontonotes4ner* in load_data.py
  45. ## Performance:
  46. |Dataset|F1 of my code(test)|F1 in paper(test)|
  47. |:----:|:----:|:----:|
  48. |Weibo|58.66|58.79|
  49. |Resume|95.18|94.46|
  50. |Ontonote|73.62|73.88|
  51. PS:The Weibo dataset I use is V2, namely revised version.
  52. ## If any confusion, please contact:
  53. + lixiaonan_xdu@outlook.com