sparse.proto 570 B

1234567891011121314151617181920
  1. // Protocol for passing around sparse sets of features.
  2. syntax = "proto2";
  3. package syntaxnet;
  4. // A sparse set of features.
  5. //
  6. // If using SparseStringToIdTransformer, description is required and id should
  7. // be omitted; otherwise, id is required and description optional.
  8. //
  9. // id, weight, and description fields are all aligned if present (ie, any of
  10. // these that are non-empty should have the same # items). If weight is omitted,
  11. // 1.0 is used.
  12. message SparseFeatures {
  13. repeated uint64 id = 1;
  14. repeated float weight = 2;
  15. repeated string description = 3;
  16. };