|
|
@@ -1,13 +1,14 @@
|
|
|
syntax = "proto3";
|
|
|
import "public.proto";
|
|
|
|
|
|
-package dictionary;
|
|
|
+package pcds.dictionary.v1;
|
|
|
+
|
|
|
|
|
|
/*
|
|
|
* dictionary 服务
|
|
|
- * 逐词译数据推送到社区字典,当这个channel是公开channel的时候。以channel的名义公开。不是公开channel ,推送到该studio默认channel
|
|
|
- * 每个channel对应一个且仅一个用户字典
|
|
|
- * 协作用户使用公共channel干活。公开的社区词典数据进到这个channel ,以及自己的默认channel
|
|
|
+ *
|
|
|
+ *
|
|
|
+ *
|
|
|
*/
|
|
|
service Dictionary{
|
|
|
//词典管理
|
|
|
@@ -26,6 +27,13 @@ service Dictionary{
|
|
|
rpc SetWord (WordRequest) returns (DictReply){}
|
|
|
rpc AddWord (WordRequest) returns (DictReply){}
|
|
|
rpc DelWord (WordRequest) returns (DictReply){}
|
|
|
+
|
|
|
+ //单词变格计算
|
|
|
+ rpc WordToBase(WordCaseRequest) returns (WordBaseReplay){}
|
|
|
+ rpc BaseToWord(WordCaseRequest) returns (WordListReply){}
|
|
|
+
|
|
|
+ //复合词自动拆词
|
|
|
+ rpc TurboSplit(TurboSplitRequest) returns (WordListReply){}
|
|
|
}
|
|
|
|
|
|
message DictListRequest{
|
|
|
@@ -33,7 +41,7 @@ message DictListRequest{
|
|
|
string Search = 3;
|
|
|
EnumAllowingSearch SearchCol = 4;
|
|
|
int32 CurrentPage = 5;
|
|
|
- int32 PageSize = 6;
|
|
|
+ int32 PerPage = 6;
|
|
|
EnumAllowingOrderby OrderBy = 7;
|
|
|
bool Desc = 8;
|
|
|
}
|
|
|
@@ -87,18 +95,21 @@ message DictListReply{
|
|
|
|
|
|
|
|
|
message WordListRequest{
|
|
|
- string Id = 1;
|
|
|
- string Search = 3;
|
|
|
- EnumAllowingSearch SearchCol = 4;
|
|
|
- int32 CurrentPage = 5;
|
|
|
- int32 PageSize = 6;
|
|
|
- EnumAllowingOrderby OrderBy = 7;
|
|
|
- bool Desc = 8;
|
|
|
+ string Id = 1;
|
|
|
+
|
|
|
+ EnumAllowingSearch SearchCol = 2;
|
|
|
+ string Search = 3;
|
|
|
+ EnumAllowingOrderby OrderBy = 4;
|
|
|
+ bool Desc = 5;
|
|
|
+
|
|
|
+ int32 CurrentPage = 6;
|
|
|
+ int32 PerPage = 7;
|
|
|
}
|
|
|
|
|
|
enum EnumWordAllowingSearch{
|
|
|
- EWAS_WORD = 0;
|
|
|
- EWAS_NOTE = 1;
|
|
|
+ EWAS_ALL = 0;
|
|
|
+ EWAS_WORD = 1;
|
|
|
+ EWAS_NOTE = 2;
|
|
|
}
|
|
|
enum EnumWordAllowingOrderby{
|
|
|
EWAO_UPDATED_AT = 0;
|
|
|
@@ -145,4 +156,34 @@ message WordListReply{
|
|
|
int32 PageNo = 3;
|
|
|
int32 PageSize = 4;
|
|
|
}
|
|
|
+}
|
|
|
+
|
|
|
+//自动变格查询参数
|
|
|
+message WordCaseRequest{
|
|
|
+ string Word = 1;
|
|
|
+ int32 Deep = 2;//查询最大深度
|
|
|
+ bool Verify = 3; //是否需要验证结果的存在性
|
|
|
+}
|
|
|
+
|
|
|
+message WordBaseReplay{
|
|
|
+ bool ok = 1;
|
|
|
+ string message = 2;
|
|
|
+ message data{
|
|
|
+ repeated WordBaseList Rows = 1;
|
|
|
+ int32 Count = 2;
|
|
|
+ int32 PageNo = 3;
|
|
|
+ int32 PageSize = 4;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+message WordBaseList{
|
|
|
+ string Base = 1;
|
|
|
+ fixed32 Confidence = 2;
|
|
|
+ repeated WordRequest Rows = 3;
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+//复合词自动拆词参数
|
|
|
+message TurboSplitRequest{
|
|
|
+ string Word = 1;
|
|
|
}
|