some question of syntaxnet dependency parsing model
@calberti hello! Can you tell me that what is the default eval metric in the output of the program? UAS LAS or f1score. if the metric is UAS , How do I change the metric to LAS in the program? And now I want to get k-best of the parsing result , Is there some parameter to control the output number of the parsing result?
thank you very much!
Syntaxnet has a bunch of layers of abstraction.
- sentence.proto defines the token class and what fields a token has.
- text_formats.cc will read conll or another format and populate tokens this is were the tag is populated
- sentence_features.h/.cc defines a Tag input type for using as input output
- parser_transitions.h defines a class other transition types inherit from tag and gold_tag are key here
- tagger_transition.cc implements ParserTransitionSystem and its tag and gold_tag pull from the tag field of the conll
- reader_ops.cc defines a few tensorflow operators and uses tag and gold_tag functions for its metrics.
- ops/parser_ops.cc defines the cpp to python interfaces for the custom tensorflow operators above
- graph_builder.py will use those operators to build the model
- parser_eval.py and parser_trainer.py will use the model building functions to train and evaluate
- context.pbtxt and command line flags define what transistion system is used along with many other things
If you want to change what it validates you will likely have to add/modify classes at a bunch of levels of abstraction.
Here is where the tag is pulled. https://github.com/tensorflow/models/blob/a9133ae914b44602c5f26afbbd7dd794ff9c6637/syntaxnet/syntaxnet/tagger_transitions.cc#L62
Hope this helps. Nathan
@nburn42 thank you for the reply.