what's the meaning of [SYMM_LABELS, MAP_LABELS] #12420
-
I have used the prodigy tool to mark the entity relationship, and got a dataset in json format. After comparison, my dataset is consistent with the demo file rel_component/assets/annotations.jsonl. Now I want to generate the corresponding train.spacy and other files. I found that parser_data.py is provided to achieve this function, but I encountered this error after execution. After looking at the source code of parser_data, I guess YMM_LABELS, MAP_LABELS is the problem. How to modify these two maps. The categories of relations I annotated are share-phon, involve and req-rel. Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi! The If you want to reuse this script, you should really use it as an example on how this type of conversion can be done, but go through all the parts of the code and see what is relevant and what should be changed for your specific use-case. Alternatively, we recently created this more general script: https://github.com/explosion/projects/blob/v3/tutorials/rel_component/scripts/parse_data_generic.py. Here, you only have to go through the 3 TODO's at the top of the script. Most importantly, Let us know how you go with this! |
Beta Was this translation helpful? Give feedback.
Hi!
The
parser_data.py
file was not originally implemented as a generic script that will convert any type of relation annotation - it was developed to support the tutorial and specific data format from https://github.com/explosion/projects/tree/v3/tutorials/rel_component (only).If you want to reuse this script, you should really use it as an example on how this type of conversion can be done, but go through all the parts of the code and see what is relevant and what should be changed for your specific use-case.
Alternatively, we recently created this more general script: https://github.com/explosion/projects/blob/v3/tutorials/rel_component/scripts/parse_data_generic.py. Here, you only ha…