单词属性

// Protocol buffer specification for document analysis.

syntax = "proto2";

package syntaxnet;

// A Sentence contains the raw text contents of a sentence, as well as an
// analysis.
message Sentence {
  // Identifier for document.
  optional string docid = 1;

  // Raw text contents of the sentence.
  optional string text = 2;

  // Tokenization of the sentence.
  repeated Token token = 3;

  extensions 1000 to max;
}

// A document token marks a span of bytes in the document text as a token
// or word.
message Token {
  // Token word form.
  required string word = 1;

  // Start position of token in text.
  required int32 start = 2;

  // End position of token in text. Gives index of last byte, not one past
  // the last byte. If token came from lexer, excludes any trailing HTML tags.
  required int32 end = 3;

  // Head of this token in the dependency tree: the id of the token which has an
  // arc going to this one. If it is the root token of a sentence, then it is
  // set to -1.
  optional int32 head = 4 [default = -1];

  // Part-of-speech tag for token.
  optional string tag = 5;

  // Coarse-grained word category for token.
  optional string category = 6;

  // Label for dependency relation between this token and its head.
  optional string label = 7;

  // Break level for tokens that indicates how it was separated from the
  // previous token in the text.
  enum BreakLevel {
    NO_BREAK = 0;         // No separation between tokens.
    SPACE_BREAK = 1;      // Tokens separated by space.
    LINE_BREAK = 2;       // Tokens separated by line break.
    SENTENCE_BREAK = 3;   // Tokens separated by sentence break.
  }

  optional BreakLevel break_level = 8 [default = SPACE_BREAK];

  extensions 1000 to max;
}

// Stores information about the morphology of a token.
message TokenMorphology {
  extend Token {
    optional TokenMorphology morphology = 63949837;
  }

  // Morphology is represented by a set of attribute values.
  message Attribute {
    required string name = 1;
    required string value = 2;
  }
  // This attribute field is designated to hold a single disambiguated analysis.
  repeated Attribute attribute = 3;
};
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值