@@ -31,10 +31,11 @@ CancellationToken cancellationToken
3131 await call . RequestStream . WriteAsync (
3232 new InsertWordAlignmentsRequest
3333 {
34- EngineId = ( string ) content ,
34+ EngineId = content ,
3535 CorpusId = wordAlignment . CorpusId ,
3636 TextId = wordAlignment . TextId ,
37- Refs = { wordAlignment . Refs } ,
37+ SourceRefs = { wordAlignment . SourceRefs } ,
38+ TargetRefs = { wordAlignment . TargetRefs } ,
3839 SourceTokens = { wordAlignment . SourceTokens } ,
3940 TargetTokens = { wordAlignment . TargetTokens } ,
4041 Alignment = { Map ( wordAlignment . Alignment ) }
@@ -78,7 +79,8 @@ JsonSerializerOptions options
7879 }
7980 string corpusId = "" ,
8081 textId = "" ;
81- IReadOnlyList < string > refs = [ ] ,
82+ IReadOnlyList < string > sourceRefs = [ ] ,
83+ targetRefs = [ ] ,
8284 sourceTokens = [ ] ,
8385 targetTokens = [ ] ;
8486 IReadOnlyList < SIL . Machine . Corpora . AlignedWordPair > alignedWordPairs = [ ] ;
@@ -99,7 +101,15 @@ JsonSerializerOptions options
99101 break ;
100102 case "refs" :
101103 reader . Read ( ) ;
102- refs = JsonSerializer . Deserialize < IList < string > > ( ref reader , options ) ! . ToArray ( ) ;
104+ targetRefs = JsonSerializer . Deserialize < IList < string > > ( ref reader , options ) ! . ToArray ( ) ;
105+ break ;
106+ case "sourceRefs" :
107+ reader . Read ( ) ;
108+ sourceRefs = JsonSerializer . Deserialize < IList < string > > ( ref reader , options ) ! . ToArray ( ) ;
109+ break ;
110+ case "targetRefs" :
111+ reader . Read ( ) ;
112+ targetRefs = JsonSerializer . Deserialize < IList < string > > ( ref reader , options ) ! . ToArray ( ) ;
103113 break ;
104114 case "sourceTokens" :
105115 reader . Read ( ) ;
@@ -124,7 +134,8 @@ JsonSerializerOptions options
124134 {
125135 CorpusId = corpusId ,
126136 TextId = textId ,
127- Refs = refs ,
137+ SourceRefs = sourceRefs ,
138+ TargetRefs = targetRefs ,
128139 Alignment = alignedWordPairs ,
129140 SourceTokens = sourceTokens ,
130141 TargetTokens = targetTokens
0 commit comments