trace.proto 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. syntax = "proto2";
  2. import "dragnn/protos/data.proto";
  3. package syntaxnet.dragnn;
  4. // Describes single embedding "group", e.g., 'words', 'tags'. Each group shares
  5. // an embedding space.
  6. message FixedFeatureChannelTrace {
  7. // string-valued name of the group, e.g., 'words'.
  8. optional string name = 1;
  9. // The feature functions active in this embedding group.
  10. repeated FixedFeatures value_trace = 2;
  11. }
  12. // Trace for an entire linked feature channel.
  13. message LinkedFeatureChannelTrace {
  14. // Name of the embedding space.
  15. optional string name = 1;
  16. // The component that this feature links to.
  17. optional string source_component = 2;
  18. // The string-valued name of the translator function that maps a feature value
  19. // to a step index.
  20. optional string source_translator = 3;
  21. // The name of the layer that we are extracting from the identified step.
  22. optional string source_layer = 4;
  23. // Individual features within this group.
  24. repeated LinkFeatures value_trace = 5;
  25. }
  26. // The trace for a single step of a single Component.
  27. message ComponentStepTrace {
  28. // A caption/description to describe this step. This should fit in a graphical
  29. // node rendered to the screen.
  30. optional string caption = 1;
  31. repeated FixedFeatureChannelTrace fixed_feature_trace = 2;
  32. repeated LinkedFeatureChannelTrace linked_feature_trace = 3;
  33. // An *HTML-language* representation of the current state.
  34. optional string html_representation = 4;
  35. // The scores for each potential decision. (The mapping from index to name is
  36. // managed by the component.)
  37. repeated double outcome_score = 5;
  38. // Set to true once the step is finished. (This allows us to open a step after
  39. // each transition, without having to know if it will be used.)
  40. optional bool step_finished = 6 [default = false];
  41. }
  42. // The traces for all steps for a single Component.
  43. message ComponentTrace {
  44. // Name of the component; should match the ComponentSpec.
  45. optional string name = 1;
  46. // The steps that have been taken by this Component.
  47. repeated ComponentStepTrace step_trace = 2;
  48. }
  49. // The traces for all Components.
  50. message MasterTrace {
  51. repeated ComponentTrace component_trace = 1;
  52. }
  53. // Main proto being used to trace parsing.
  54. message DragnnTrace {
  55. // For each sentence, there is a sequence of state sets storing tracing
  56. // information.
  57. repeated MasterTrace master_trace = 1;
  58. }