allanj / ner_with_dependency

GNU General Public License v3.0
72 stars 11 forks source link

label not found error #8

Closed BillKiller closed 4 years ago

BillKiller commented 4 years ago

at line 270 in main.py : conf.build_label_idx(trains) you use only trains labels to build a dict which may cause label not found in dict.It seem to be normal that training corpus should contain all kinds of labels,but it is not guaranteed that every corpus follow this limitation.The Interesting point is you use trains+devs+tests when you build word vocab and slot vocab. But you didn't do it in building label vocab.Is is a mistakes? Or It is based on another concern that i don't know?

allanj commented 4 years ago

Because the label size is relatively small and usually the training set contains all the possible labels. But of course, you can also do something like conf.build_label_idx(trains+devs+tests)

allanj commented 4 years ago

In other words, it doesn't matter you use: conf.build_label_idx(trains) or conf.build_label_idx(trains+devs+tests) as long as we can cover all the possible labels