ai_office_plugin/util-lib/DocumentCorrectItem.cs
callmeyan d2e960243c 优化多文档校对性能;
修复多文档同时校对时有几率数据错乱的问题;
2024-08-24 12:20:47 +08:00

44 lines
1.2 KiB
C#

using Newtonsoft.Json;
using System.Collections.Generic;
namespace UtilLib
{
public class DocumentCorrectItem
{
public string Key { get; set; }
/// <summary>
/// 句子原始文本(可能过滤掉空格等特殊字符)
/// </summary>
public string Insert { get; set; }
/// <summary>
/// 校对后的文本
/// </summary>
[JsonProperty("new_text")]
public string NewText { get; set; }
/// <summary>
/// 句子原始文本长度
/// </summary>
[JsonProperty("insert_len")]
public int InsertLength { get; set; }
public int Offset { get; set; }
public int Paragraph_offset { get; set; }
/// <summary>
/// 句子所在文档的段落数(从1开始)
/// </summary>
[JsonProperty("paragraph_num")]
public int ParagraphNumber { get; set; }
/// <summary>
/// 句子在段落中的其实位置
/// </summary>
[JsonProperty("sentence_offset")]
public int SentenceOffset { get; set; }
/// <summary>
/// 当前句子的校对列表项
/// </summary>
public List<CorrectedContent> Diffs { get; set; }
}
}