首次推送
This commit is contained in:
@@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class AutoSummarizationRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待处理的文本(仅支持UTF-8格式,不超过2000字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 指定摘要的长度上限(默认值为200)
|
||||
/// 注:为保证摘要的可读性,最终生成的摘要长度会低于指定的长度上限。
|
||||
/// </summary>
|
||||
[JsonProperty("Length")]
|
||||
public ulong? Length{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
this.SetParamSimple(map, prefix + "Length", this.Length);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class AutoSummarizationResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 文本摘要结果
|
||||
/// </summary>
|
||||
[JsonProperty("Summary")]
|
||||
public string Summary{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Summary", this.Summary);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/CCIToken.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/CCIToken.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class CCIToken : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 错别字的起始位置,从0开始
|
||||
/// </summary>
|
||||
[JsonProperty("BeginOffset")]
|
||||
public ulong? BeginOffset{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错别字纠错结果
|
||||
/// </summary>
|
||||
[JsonProperty("CorrectWord")]
|
||||
public string CorrectWord{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错别字内容
|
||||
/// </summary>
|
||||
[JsonProperty("Word")]
|
||||
public string Word{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "BeginOffset", this.BeginOffset);
|
||||
this.SetParamSimple(map, prefix + "CorrectWord", this.CorrectWord);
|
||||
this.SetParamSimple(map, prefix + "Word", this.Word);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/ChatBotRequest.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/ChatBotRequest.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class ChatBotRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 用户请求的query
|
||||
/// </summary>
|
||||
[JsonProperty("Query")]
|
||||
public string Query{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 0: 通用闲聊, 1:儿童闲聊, 默认是通用闲聊
|
||||
/// </summary>
|
||||
[JsonProperty("Flag")]
|
||||
public ulong? Flag{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 服务的id, 主要用于儿童闲聊接口,比如手Q的openid
|
||||
/// </summary>
|
||||
[JsonProperty("OpenId")]
|
||||
public string OpenId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Query", this.Query);
|
||||
this.SetParamSimple(map, prefix + "Flag", this.Flag);
|
||||
this.SetParamSimple(map, prefix + "OpenId", this.OpenId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/ChatBotResponse.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/ChatBotResponse.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class ChatBotResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 对于当前输出回复的自信度
|
||||
/// </summary>
|
||||
[JsonProperty("Confidence")]
|
||||
public float? Confidence{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 闲聊回复
|
||||
/// </summary>
|
||||
[JsonProperty("Reply")]
|
||||
public string Reply{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Confidence", this.Confidence);
|
||||
this.SetParamSimple(map, prefix + "Reply", this.Reply);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
TencentCloud/Nlp/V20190408/Models/ClassificationResult.cs
Normal file
64
TencentCloud/Nlp/V20190408/Models/ClassificationResult.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class ClassificationResult : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 一级分类名称
|
||||
/// </summary>
|
||||
[JsonProperty("FirstClassName")]
|
||||
public string FirstClassName{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 一级分类概率
|
||||
/// </summary>
|
||||
[JsonProperty("FirstClassProbability")]
|
||||
public float? FirstClassProbability{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 二级分类名称
|
||||
/// </summary>
|
||||
[JsonProperty("SecondClassName")]
|
||||
public string SecondClassName{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 二级分类概率
|
||||
/// </summary>
|
||||
[JsonProperty("SecondClassProbability")]
|
||||
public float? SecondClassProbability{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "FirstClassName", this.FirstClassName);
|
||||
this.SetParamSimple(map, prefix + "FirstClassProbability", this.FirstClassProbability);
|
||||
this.SetParamSimple(map, prefix + "SecondClassName", this.SecondClassName);
|
||||
this.SetParamSimple(map, prefix + "SecondClassProbability", this.SecondClassProbability);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DependencyParsingRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待分析的文本(仅支持UTF-8格式,不超过200字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DependencyParsingResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 句法依存分析结果,其中句法依存关系的类型包括:
|
||||
/// <li>主谓关系,eg: 我送她一束花 (我 <-- 送)
|
||||
/// <li>动宾关系,eg: 我送她一束花 (送 --> 花)
|
||||
/// <li>间宾关系,eg: 我送她一束花 (送 --> 她)
|
||||
/// <li>前置宾语,eg: 他什么书都读 (书 <-- 读)
|
||||
/// <li>兼语,eg: 他请我吃饭 (请 --> 我)
|
||||
/// <li>定中关系,eg: 红苹果 (红 <-- 苹果)
|
||||
/// <li>状中结构,eg: 非常美丽 (非常 <-- 美丽)
|
||||
/// <li>动补结构,eg: 做完了作业 (做 --> 完)
|
||||
/// <li>并列关系,eg: 大山和大海 (大山 --> 大海)
|
||||
/// <li>介宾关系,eg: 在贸易区内 (在 --> 内)
|
||||
/// <li>左附加关系,eg: 大山和大海 (和 <-- 大海)
|
||||
/// <li>右附加关系,eg: 孩子们 (孩子 --> 们)
|
||||
/// <li>独立结构,eg: 两个单句在结构上彼此独立
|
||||
/// <li>标点符号,eg: 。
|
||||
/// <li>核心关系,eg: 整个句子的核心
|
||||
/// </summary>
|
||||
[JsonProperty("DpTokens")]
|
||||
public DpToken[] DpTokens{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "DpTokens.", this.DpTokens);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
TencentCloud/Nlp/V20190408/Models/DescribeEntityRequest.cs
Normal file
43
TencentCloud/Nlp/V20190408/Models/DescribeEntityRequest.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DescribeEntityRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 实体名称
|
||||
/// </summary>
|
||||
[JsonProperty("EntityName")]
|
||||
public string EntityName{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "EntityName", this.EntityName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/DescribeEntityResponse.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/DescribeEntityResponse.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DescribeEntityResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 返回查询实体相关信息
|
||||
/// </summary>
|
||||
[JsonProperty("Content")]
|
||||
public string Content{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Content", this.Content);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/DescribeRelationRequest.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/DescribeRelationRequest.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DescribeRelationRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 输入第一个实体
|
||||
/// </summary>
|
||||
[JsonProperty("LeftEntityName")]
|
||||
public string LeftEntityName{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 输入第二个实体
|
||||
/// </summary>
|
||||
[JsonProperty("RightEntityName")]
|
||||
public string RightEntityName{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "LeftEntityName", this.LeftEntityName);
|
||||
this.SetParamSimple(map, prefix + "RightEntityName", this.RightEntityName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DescribeRelationResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 返回查询实体间的关系
|
||||
/// </summary>
|
||||
[JsonProperty("Content")]
|
||||
public EntityRelationContent[] Content{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "Content.", this.Content);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
TencentCloud/Nlp/V20190408/Models/DescribeTripleRequest.cs
Normal file
43
TencentCloud/Nlp/V20190408/Models/DescribeTripleRequest.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DescribeTripleRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 三元组查询条件
|
||||
/// </summary>
|
||||
[JsonProperty("TripleCondition")]
|
||||
public string TripleCondition{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "TripleCondition", this.TripleCondition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/DescribeTripleResponse.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/DescribeTripleResponse.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DescribeTripleResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 返回三元组信息
|
||||
/// </summary>
|
||||
[JsonProperty("Content")]
|
||||
public TripleContent[] Content{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "Content.", this.Content);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
TencentCloud/Nlp/V20190408/Models/DpToken.cs
Normal file
64
TencentCloud/Nlp/V20190408/Models/DpToken.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class DpToken : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 当前词父节点的序号
|
||||
/// </summary>
|
||||
[JsonProperty("HeadId")]
|
||||
public ulong? HeadId{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础词的序号
|
||||
/// </summary>
|
||||
[JsonProperty("Id")]
|
||||
public ulong? Id{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 句法依存关系的类型
|
||||
/// </summary>
|
||||
[JsonProperty("Relation")]
|
||||
public string Relation{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础词
|
||||
/// </summary>
|
||||
[JsonProperty("Word")]
|
||||
public string Word{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "HeadId", this.HeadId);
|
||||
this.SetParamSimple(map, prefix + "Id", this.Id);
|
||||
this.SetParamSimple(map, prefix + "Relation", this.Relation);
|
||||
this.SetParamSimple(map, prefix + "Word", this.Word);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/EntityRelationContent.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/EntityRelationContent.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class EntityRelationContent : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 实体关系查询返回关系的object
|
||||
/// </summary>
|
||||
[JsonProperty("Object")]
|
||||
public EntityRelationObject[] Object{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体关系查询返回关系的subject
|
||||
/// </summary>
|
||||
[JsonProperty("Subject")]
|
||||
public EntityRelationSubject[] Subject{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体关系查询返回的关系名称
|
||||
/// </summary>
|
||||
[JsonProperty("Relation")]
|
||||
public string Relation{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "Object.", this.Object);
|
||||
this.SetParamArrayObj(map, prefix + "Subject.", this.Subject);
|
||||
this.SetParamSimple(map, prefix + "Relation", this.Relation);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/EntityRelationObject.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/EntityRelationObject.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class EntityRelationObject : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// object对应id
|
||||
/// </summary>
|
||||
[JsonProperty("Id")]
|
||||
public string[] Id{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// object对应name
|
||||
/// </summary>
|
||||
[JsonProperty("Name")]
|
||||
public string[] Name{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// object对应popular值
|
||||
/// </summary>
|
||||
[JsonProperty("Popular")]
|
||||
public long?[] Popular{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArraySimple(map, prefix + "Id.", this.Id);
|
||||
this.SetParamArraySimple(map, prefix + "Name.", this.Name);
|
||||
this.SetParamArraySimple(map, prefix + "Popular.", this.Popular);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/EntityRelationSubject.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/EntityRelationSubject.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class EntityRelationSubject : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Subject对应id
|
||||
/// </summary>
|
||||
[JsonProperty("Id")]
|
||||
public string[] Id{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Subject对应name
|
||||
/// </summary>
|
||||
[JsonProperty("Name")]
|
||||
public string[] Name{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Subject对应popular
|
||||
/// </summary>
|
||||
[JsonProperty("Popular")]
|
||||
public long?[] Popular{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArraySimple(map, prefix + "Id.", this.Id);
|
||||
this.SetParamArraySimple(map, prefix + "Name.", this.Name);
|
||||
this.SetParamArraySimple(map, prefix + "Popular.", this.Popular);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/Keyword.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/Keyword.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class Keyword : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 权重
|
||||
/// </summary>
|
||||
[JsonProperty("Score")]
|
||||
public float? Score{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关键词
|
||||
/// </summary>
|
||||
[JsonProperty("Word")]
|
||||
public string Word{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Score", this.Score);
|
||||
this.SetParamSimple(map, prefix + "Word", this.Word);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class KeywordsExtractionRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待处理的文本(仅支持UTF-8格式,不超过10000字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 指定关键词个数上限(默认值为5)
|
||||
/// </summary>
|
||||
[JsonProperty("Num")]
|
||||
public ulong? Num{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
this.SetParamSimple(map, prefix + "Num", this.Num);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class KeywordsExtractionResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 关键词提取结果
|
||||
/// </summary>
|
||||
[JsonProperty("Keywords")]
|
||||
public Keyword[] Keywords{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "Keywords.", this.Keywords);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
52
TencentCloud/Nlp/V20190408/Models/LexicalAnalysisRequest.cs
Normal file
52
TencentCloud/Nlp/V20190408/Models/LexicalAnalysisRequest.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class LexicalAnalysisRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待分析的文本(仅支持UTF-8格式,不超过500字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 词法分析模式(默认取2值):
|
||||
/// 1、高精度(混合粒度分词能力);
|
||||
/// 2、高性能(单粒度分词能力);
|
||||
/// </summary>
|
||||
[JsonProperty("Flag")]
|
||||
public ulong? Flag{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
this.SetParamSimple(map, prefix + "Flag", this.Flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
60
TencentCloud/Nlp/V20190408/Models/LexicalAnalysisResponse.cs
Normal file
60
TencentCloud/Nlp/V20190408/Models/LexicalAnalysisResponse.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class LexicalAnalysisResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 命名实体识别结果。取值范围:
|
||||
/// <li>PER:表示人名</li>
|
||||
/// <li>LOC:表示地名</li>
|
||||
/// <li>ORG:表示机构团体名</li>
|
||||
/// </summary>
|
||||
[JsonProperty("NerTokens")]
|
||||
public NerToken[] NerTokens{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分词&词性标注结果(词性表请参见附录)
|
||||
/// </summary>
|
||||
[JsonProperty("PosTokens")]
|
||||
public PosToken[] PosTokens{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "NerTokens.", this.NerTokens);
|
||||
this.SetParamArrayObj(map, prefix + "PosTokens.", this.PosTokens);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
TencentCloud/Nlp/V20190408/Models/NerToken.cs
Normal file
64
TencentCloud/Nlp/V20190408/Models/NerToken.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class NerToken : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 起始位置
|
||||
/// </summary>
|
||||
[JsonProperty("BeginOffset")]
|
||||
public ulong? BeginOffset{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 长度
|
||||
/// </summary>
|
||||
[JsonProperty("Length")]
|
||||
public ulong? Length{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 命名实体类型
|
||||
/// </summary>
|
||||
[JsonProperty("Type")]
|
||||
public string Type{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础词
|
||||
/// </summary>
|
||||
[JsonProperty("Word")]
|
||||
public string Word{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "BeginOffset", this.BeginOffset);
|
||||
this.SetParamSimple(map, prefix + "Length", this.Length);
|
||||
this.SetParamSimple(map, prefix + "Type", this.Type);
|
||||
this.SetParamSimple(map, prefix + "Word", this.Word);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
TencentCloud/Nlp/V20190408/Models/PosToken.cs
Normal file
64
TencentCloud/Nlp/V20190408/Models/PosToken.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class PosToken : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 起始位置
|
||||
/// </summary>
|
||||
[JsonProperty("BeginOffset")]
|
||||
public ulong? BeginOffset{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 长度
|
||||
/// </summary>
|
||||
[JsonProperty("Length")]
|
||||
public ulong? Length{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 词性
|
||||
/// </summary>
|
||||
[JsonProperty("Pos")]
|
||||
public string Pos{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 基础词
|
||||
/// </summary>
|
||||
[JsonProperty("Word")]
|
||||
public string Word{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "BeginOffset", this.BeginOffset);
|
||||
this.SetParamSimple(map, prefix + "Length", this.Length);
|
||||
this.SetParamSimple(map, prefix + "Pos", this.Pos);
|
||||
this.SetParamSimple(map, prefix + "Word", this.Word);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SentenceEmbeddingRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 输入的文本(仅支持UTF-8格式,不超过500字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SentenceEmbeddingResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 句向量的维度
|
||||
/// </summary>
|
||||
[JsonProperty("Dimension")]
|
||||
public ulong? Dimension{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 句向量数组
|
||||
/// </summary>
|
||||
[JsonProperty("Vector")]
|
||||
public float?[] Vector{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Dimension", this.Dimension);
|
||||
this.SetParamArraySimple(map, prefix + "Vector.", this.Vector);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SentenceSimilarityRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 计算相似度的源句子(仅支持UTF-8格式,不超过500字)
|
||||
/// </summary>
|
||||
[JsonProperty("SrcText")]
|
||||
public string SrcText{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计算相似度的目标句子(仅支持UTF-8格式,不超过500字)
|
||||
/// </summary>
|
||||
[JsonProperty("TargetText")]
|
||||
public string TargetText{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "SrcText", this.SrcText);
|
||||
this.SetParamSimple(map, prefix + "TargetText", this.TargetText);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SentenceSimilarityResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 两个文本的相似度
|
||||
/// </summary>
|
||||
[JsonProperty("Similarity")]
|
||||
public float? Similarity{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Similarity", this.Similarity);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SentimentAnalysisRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待分析的文本(仅支持UTF-8格式,不超过200字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文本所属类型(默认取4值):
|
||||
/// 1、商品评论类
|
||||
/// 2、社交类
|
||||
/// 3、美食酒店类
|
||||
/// 4、通用领域类
|
||||
/// </summary>
|
||||
[JsonProperty("Flag")]
|
||||
public ulong? Flag{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
this.SetParamSimple(map, prefix + "Flag", this.Flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SentimentAnalysisResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 负面情感概率
|
||||
/// </summary>
|
||||
[JsonProperty("Negative")]
|
||||
public float? Negative{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 正面情感概率
|
||||
/// </summary>
|
||||
[JsonProperty("Positive")]
|
||||
public float? Positive{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 情感属性
|
||||
/// </summary>
|
||||
[JsonProperty("Sentiment")]
|
||||
public string Sentiment{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Negative", this.Negative);
|
||||
this.SetParamSimple(map, prefix + "Positive", this.Positive);
|
||||
this.SetParamSimple(map, prefix + "Sentiment", this.Sentiment);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/SimilarWordsRequest.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/SimilarWordsRequest.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SimilarWordsRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 输入的词语(仅支持UTF-8格式,不超过20字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 相似词个数;取值范围:1-200,默认为10;
|
||||
/// </summary>
|
||||
[JsonProperty("WordNumber")]
|
||||
public ulong? WordNumber{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
this.SetParamSimple(map, prefix + "WordNumber", this.WordNumber);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/SimilarWordsResponse.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/SimilarWordsResponse.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class SimilarWordsResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 相似词数组
|
||||
/// </summary>
|
||||
[JsonProperty("SimilarWords")]
|
||||
public string[] SimilarWords{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArraySimple(map, prefix + "SimilarWords.", this.SimilarWords);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class TextClassificationRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待分类的文本(仅支持UTF-8格式,不超过10000字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 领域分类体系(默认取1值):
|
||||
/// 1、通用领域
|
||||
/// 2、新闻领域
|
||||
/// </summary>
|
||||
[JsonProperty("Flag")]
|
||||
public ulong? Flag{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
this.SetParamSimple(map, prefix + "Flag", this.Flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class TextClassificationResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 文本分类结果(文本分类映射表请参见附录)
|
||||
/// </summary>
|
||||
[JsonProperty("Classes")]
|
||||
public ClassificationResult[] Classes{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "Classes.", this.Classes);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
TencentCloud/Nlp/V20190408/Models/TextCorrectionRequest.cs
Normal file
43
TencentCloud/Nlp/V20190408/Models/TextCorrectionRequest.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class TextCorrectionRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 待纠错的文本(仅支持UTF-8格式,不超过2000字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/TextCorrectionResponse.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/TextCorrectionResponse.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class TextCorrectionResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 纠错详情
|
||||
/// </summary>
|
||||
[JsonProperty("CCITokens")]
|
||||
public CCIToken[] CCITokens{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 纠错后的文本
|
||||
/// </summary>
|
||||
[JsonProperty("ResultText")]
|
||||
public string ResultText{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamArrayObj(map, prefix + "CCITokens.", this.CCITokens);
|
||||
this.SetParamSimple(map, prefix + "ResultText", this.ResultText);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
64
TencentCloud/Nlp/V20190408/Models/TripleContent.cs
Normal file
64
TencentCloud/Nlp/V20190408/Models/TripleContent.cs
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class TripleContent : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 实体id
|
||||
/// </summary>
|
||||
[JsonProperty("Id")]
|
||||
public string Id{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体名称
|
||||
/// </summary>
|
||||
[JsonProperty("Name")]
|
||||
public string Name{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体order
|
||||
/// </summary>
|
||||
[JsonProperty("Order")]
|
||||
public long? Order{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 实体流行度
|
||||
/// </summary>
|
||||
[JsonProperty("Popular")]
|
||||
public long? Popular{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Id", this.Id);
|
||||
this.SetParamSimple(map, prefix + "Name", this.Name);
|
||||
this.SetParamSimple(map, prefix + "Order", this.Order);
|
||||
this.SetParamSimple(map, prefix + "Popular", this.Popular);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
43
TencentCloud/Nlp/V20190408/Models/WordEmbeddingRequest.cs
Normal file
43
TencentCloud/Nlp/V20190408/Models/WordEmbeddingRequest.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class WordEmbeddingRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 输入的词语(仅支持UTF-8格式,不超过20字)
|
||||
/// </summary>
|
||||
[JsonProperty("Text")]
|
||||
public string Text{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Text", this.Text);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
57
TencentCloud/Nlp/V20190408/Models/WordEmbeddingResponse.cs
Normal file
57
TencentCloud/Nlp/V20190408/Models/WordEmbeddingResponse.cs
Normal file
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class WordEmbeddingResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 词向量的维度
|
||||
/// </summary>
|
||||
[JsonProperty("Dimension")]
|
||||
public ulong? Dimension{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 词向量数组
|
||||
/// </summary>
|
||||
[JsonProperty("Vector")]
|
||||
public float?[] Vector{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Dimension", this.Dimension);
|
||||
this.SetParamArraySimple(map, prefix + "Vector.", this.Vector);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/WordSimilarityRequest.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/WordSimilarityRequest.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class WordSimilarityRequest : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 计算相似度的源词(仅支持UTF-8格式,不超过20字)
|
||||
/// </summary>
|
||||
[JsonProperty("SrcWord")]
|
||||
public string SrcWord{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计算相似度的目标词(仅支持UTF-8格式,不超过20字)
|
||||
/// </summary>
|
||||
[JsonProperty("TargetWord")]
|
||||
public string TargetWord{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "SrcWord", this.SrcWord);
|
||||
this.SetParamSimple(map, prefix + "TargetWord", this.TargetWord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
50
TencentCloud/Nlp/V20190408/Models/WordSimilarityResponse.cs
Normal file
50
TencentCloud/Nlp/V20190408/Models/WordSimilarityResponse.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408.Models
|
||||
{
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
using TencentCloud.Common;
|
||||
|
||||
public class WordSimilarityResponse : AbstractModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 两个词语的相似度
|
||||
/// </summary>
|
||||
[JsonProperty("Similarity")]
|
||||
public float? Similarity{ get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
|
||||
/// </summary>
|
||||
[JsonProperty("RequestId")]
|
||||
public string RequestId{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// For internal usage only. DO NOT USE IT.
|
||||
/// </summary>
|
||||
internal override void ToMap(Dictionary<string, string> map, string prefix)
|
||||
{
|
||||
this.SetParamSimple(map, prefix + "Similarity", this.Similarity);
|
||||
this.SetParamSimple(map, prefix + "RequestId", this.RequestId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
766
TencentCloud/Nlp/V20190408/NlpClient.cs
Normal file
766
TencentCloud/Nlp/V20190408/NlpClient.cs
Normal file
@@ -0,0 +1,766 @@
|
||||
/*
|
||||
* Copyright (c) 2018 THL A29 Limited, a Tencent company. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing,
|
||||
* software distributed under the License is distributed on an
|
||||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
* KIND, either express or implied. See the License for the
|
||||
* specific language governing permissions and limitations
|
||||
* under the License.
|
||||
*/
|
||||
|
||||
namespace TencentCloud.Nlp.V20190408
|
||||
{
|
||||
|
||||
using Newtonsoft.Json;
|
||||
using System.Threading.Tasks;
|
||||
using TencentCloud.Common;
|
||||
using TencentCloud.Common.Profile;
|
||||
using TencentCloud.Nlp.V20190408.Models;
|
||||
|
||||
public class NlpClient : AbstractClient{
|
||||
|
||||
private const string endpoint = "nlp.tencentcloudapi.com";
|
||||
private const string version = "2019-04-08";
|
||||
|
||||
/// <summary>
|
||||
/// Client constructor.
|
||||
/// </summary>
|
||||
/// <param name="credential">Credentials.</param>
|
||||
/// <param name="region">Region name, such as "ap-guangzhou".</param>
|
||||
public NlpClient(Credential credential, string region)
|
||||
: this(credential, region, new ClientProfile())
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Client Constructor.
|
||||
/// </summary>
|
||||
/// <param name="credential">Credentials.</param>
|
||||
/// <param name="region">Region name, such as "ap-guangzhou".</param>
|
||||
/// <param name="profile">Client profiles.</param>
|
||||
public NlpClient(Credential credential, string region, ClientProfile profile)
|
||||
: base(endpoint, version, credential, region, profile)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 利用人工智能算法,自动抽取文本中的关键信息并生成指定长度的文本摘要。可用于新闻标题生成、科技文献摘要生成和商品评论摘要等。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="AutoSummarizationRequest"/></param>
|
||||
/// <returns><see cref="AutoSummarizationResponse"/></returns>
|
||||
public async Task<AutoSummarizationResponse> AutoSummarization(AutoSummarizationRequest req)
|
||||
{
|
||||
JsonResponseModel<AutoSummarizationResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "AutoSummarization");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<AutoSummarizationResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 利用人工智能算法,自动抽取文本中的关键信息并生成指定长度的文本摘要。可用于新闻标题生成、科技文献摘要生成和商品评论摘要等。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="AutoSummarizationRequest"/></param>
|
||||
/// <returns><see cref="AutoSummarizationResponse"/></returns>
|
||||
public AutoSummarizationResponse AutoSummarizationSync(AutoSummarizationRequest req)
|
||||
{
|
||||
JsonResponseModel<AutoSummarizationResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "AutoSummarization");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<AutoSummarizationResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 闲聊服务基于腾讯领先的NLP引擎能力、数据运算能力和千亿级互联网语料数据的支持,同时集成了广泛的知识问答能力,可实现上百种自定义属性配置,以及儿童语言风格及说话方式,从而让聊天变得更睿智、简单和有趣。
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="ChatBotRequest"/></param>
|
||||
/// <returns><see cref="ChatBotResponse"/></returns>
|
||||
public async Task<ChatBotResponse> ChatBot(ChatBotRequest req)
|
||||
{
|
||||
JsonResponseModel<ChatBotResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "ChatBot");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<ChatBotResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 闲聊服务基于腾讯领先的NLP引擎能力、数据运算能力和千亿级互联网语料数据的支持,同时集成了广泛的知识问答能力,可实现上百种自定义属性配置,以及儿童语言风格及说话方式,从而让聊天变得更睿智、简单和有趣。
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="ChatBotRequest"/></param>
|
||||
/// <returns><see cref="ChatBotResponse"/></returns>
|
||||
public ChatBotResponse ChatBotSync(ChatBotRequest req)
|
||||
{
|
||||
JsonResponseModel<ChatBotResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "ChatBot");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<ChatBotResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 句法依存分析接口能够分析出句子中词与词之间的相互依存关系,并揭示其句法结构,包括主谓关系、动宾关系、核心关系等等,可用于提取句子主干、提取句子核心词等,在机器翻译、自动问答、知识抽取等领域都有很好的应用。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DependencyParsingRequest"/></param>
|
||||
/// <returns><see cref="DependencyParsingResponse"/></returns>
|
||||
public async Task<DependencyParsingResponse> DependencyParsing(DependencyParsingRequest req)
|
||||
{
|
||||
JsonResponseModel<DependencyParsingResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "DependencyParsing");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DependencyParsingResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 句法依存分析接口能够分析出句子中词与词之间的相互依存关系,并揭示其句法结构,包括主谓关系、动宾关系、核心关系等等,可用于提取句子主干、提取句子核心词等,在机器翻译、自动问答、知识抽取等领域都有很好的应用。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DependencyParsingRequest"/></param>
|
||||
/// <returns><see cref="DependencyParsingResponse"/></returns>
|
||||
public DependencyParsingResponse DependencyParsingSync(DependencyParsingRequest req)
|
||||
{
|
||||
JsonResponseModel<DependencyParsingResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "DependencyParsing");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DependencyParsingResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输入实体名称,返回实体相关的信息如实体别名、实体英文名、实体详细信息、相关实体等。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DescribeEntityRequest"/></param>
|
||||
/// <returns><see cref="DescribeEntityResponse"/></returns>
|
||||
public async Task<DescribeEntityResponse> DescribeEntity(DescribeEntityRequest req)
|
||||
{
|
||||
JsonResponseModel<DescribeEntityResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "DescribeEntity");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeEntityResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输入实体名称,返回实体相关的信息如实体别名、实体英文名、实体详细信息、相关实体等。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DescribeEntityRequest"/></param>
|
||||
/// <returns><see cref="DescribeEntityResponse"/></returns>
|
||||
public DescribeEntityResponse DescribeEntitySync(DescribeEntityRequest req)
|
||||
{
|
||||
JsonResponseModel<DescribeEntityResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "DescribeEntity");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeEntityResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输入两个实体,返回两个实体间的关系,例如马化腾与腾讯公司不仅是相关实体,二者还存在隶属关系(马化腾属于腾讯公司)。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DescribeRelationRequest"/></param>
|
||||
/// <returns><see cref="DescribeRelationResponse"/></returns>
|
||||
public async Task<DescribeRelationResponse> DescribeRelation(DescribeRelationRequest req)
|
||||
{
|
||||
JsonResponseModel<DescribeRelationResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "DescribeRelation");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeRelationResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输入两个实体,返回两个实体间的关系,例如马化腾与腾讯公司不仅是相关实体,二者还存在隶属关系(马化腾属于腾讯公司)。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DescribeRelationRequest"/></param>
|
||||
/// <returns><see cref="DescribeRelationResponse"/></returns>
|
||||
public DescribeRelationResponse DescribeRelationSync(DescribeRelationRequest req)
|
||||
{
|
||||
JsonResponseModel<DescribeRelationResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "DescribeRelation");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeRelationResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 三元组查询,主要分为两类,SP查询和PO查询。SP查询表示已知主语和谓语查询宾语,PO查询表示已知宾语和谓语查询主语。每一个SP或PO查询都是一个可独立执行的查询,TQL支持SP查询的嵌套查询,即主语可以是一个嵌套的子查询。其他复杂的三元组查询方法,请参考官网API文档示例。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DescribeTripleRequest"/></param>
|
||||
/// <returns><see cref="DescribeTripleResponse"/></returns>
|
||||
public async Task<DescribeTripleResponse> DescribeTriple(DescribeTripleRequest req)
|
||||
{
|
||||
JsonResponseModel<DescribeTripleResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "DescribeTriple");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeTripleResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 三元组查询,主要分为两类,SP查询和PO查询。SP查询表示已知主语和谓语查询宾语,PO查询表示已知宾语和谓语查询主语。每一个SP或PO查询都是一个可独立执行的查询,TQL支持SP查询的嵌套查询,即主语可以是一个嵌套的子查询。其他复杂的三元组查询方法,请参考官网API文档示例。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="DescribeTripleRequest"/></param>
|
||||
/// <returns><see cref="DescribeTripleResponse"/></returns>
|
||||
public DescribeTripleResponse DescribeTripleSync(DescribeTripleRequest req)
|
||||
{
|
||||
JsonResponseModel<DescribeTripleResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "DescribeTriple");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<DescribeTripleResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 基于关键词提取平台,通过对文本内容进行深度分析,提取出文本内容中的关键信息,为用户实现诸如新闻内容关键词自动提取、评论关键词提取等提供基础服务。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="KeywordsExtractionRequest"/></param>
|
||||
/// <returns><see cref="KeywordsExtractionResponse"/></returns>
|
||||
public async Task<KeywordsExtractionResponse> KeywordsExtraction(KeywordsExtractionRequest req)
|
||||
{
|
||||
JsonResponseModel<KeywordsExtractionResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "KeywordsExtraction");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<KeywordsExtractionResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 基于关键词提取平台,通过对文本内容进行深度分析,提取出文本内容中的关键信息,为用户实现诸如新闻内容关键词自动提取、评论关键词提取等提供基础服务。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="KeywordsExtractionRequest"/></param>
|
||||
/// <returns><see cref="KeywordsExtractionResponse"/></returns>
|
||||
public KeywordsExtractionResponse KeywordsExtractionSync(KeywordsExtractionRequest req)
|
||||
{
|
||||
JsonResponseModel<KeywordsExtractionResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "KeywordsExtraction");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<KeywordsExtractionResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 词法分析接口提供以下三个功能:
|
||||
///
|
||||
/// 1、智能分词:将连续的自然语言文本,切分成具有语义合理性和完整性的词汇序列;
|
||||
///
|
||||
/// 2、词性标注:为每一个词附上对应的词性,例如名词、代词、形容词、动词等;
|
||||
///
|
||||
/// 3、命名实体识别:快速识别文本中的实体,例如人名、地名、机构名等。
|
||||
///
|
||||
/// 所有的功能均基于千亿级大规模互联网语料进行持续迭代更新,以保证效果不断提升,用户无需担心新词发现、歧义消除、调用性能等问题。目前词法分析已经在泛互联网、金融、政务等不同垂直领域提供业务支持,并取得良好的效果。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="LexicalAnalysisRequest"/></param>
|
||||
/// <returns><see cref="LexicalAnalysisResponse"/></returns>
|
||||
public async Task<LexicalAnalysisResponse> LexicalAnalysis(LexicalAnalysisRequest req)
|
||||
{
|
||||
JsonResponseModel<LexicalAnalysisResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "LexicalAnalysis");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<LexicalAnalysisResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 词法分析接口提供以下三个功能:
|
||||
///
|
||||
/// 1、智能分词:将连续的自然语言文本,切分成具有语义合理性和完整性的词汇序列;
|
||||
///
|
||||
/// 2、词性标注:为每一个词附上对应的词性,例如名词、代词、形容词、动词等;
|
||||
///
|
||||
/// 3、命名实体识别:快速识别文本中的实体,例如人名、地名、机构名等。
|
||||
///
|
||||
/// 所有的功能均基于千亿级大规模互联网语料进行持续迭代更新,以保证效果不断提升,用户无需担心新词发现、歧义消除、调用性能等问题。目前词法分析已经在泛互联网、金融、政务等不同垂直领域提供业务支持,并取得良好的效果。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="LexicalAnalysisRequest"/></param>
|
||||
/// <returns><see cref="LexicalAnalysisResponse"/></returns>
|
||||
public LexicalAnalysisResponse LexicalAnalysisSync(LexicalAnalysisRequest req)
|
||||
{
|
||||
JsonResponseModel<LexicalAnalysisResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "LexicalAnalysis");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<LexicalAnalysisResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 句向量接口能够将输入的句子映射成一个固定维度的向量,用来表示这个句子的语义特征,可用于文本聚类、文本相似度、文本分类等任务,能够显著提高它们的效果。
|
||||
///
|
||||
/// 该句向量服务由腾讯知文自然语言处理团队联合腾讯AI Lab共同打造,基于千亿级大规模互联网语料并采用AI Lab自研的DSG算法训练而成,在腾讯内部诸多业务的NLP任务上实测效果显著。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SentenceEmbeddingRequest"/></param>
|
||||
/// <returns><see cref="SentenceEmbeddingResponse"/></returns>
|
||||
public async Task<SentenceEmbeddingResponse> SentenceEmbedding(SentenceEmbeddingRequest req)
|
||||
{
|
||||
JsonResponseModel<SentenceEmbeddingResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "SentenceEmbedding");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceEmbeddingResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 句向量接口能够将输入的句子映射成一个固定维度的向量,用来表示这个句子的语义特征,可用于文本聚类、文本相似度、文本分类等任务,能够显著提高它们的效果。
|
||||
///
|
||||
/// 该句向量服务由腾讯知文自然语言处理团队联合腾讯AI Lab共同打造,基于千亿级大规模互联网语料并采用AI Lab自研的DSG算法训练而成,在腾讯内部诸多业务的NLP任务上实测效果显著。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SentenceEmbeddingRequest"/></param>
|
||||
/// <returns><see cref="SentenceEmbeddingResponse"/></returns>
|
||||
public SentenceEmbeddingResponse SentenceEmbeddingSync(SentenceEmbeddingRequest req)
|
||||
{
|
||||
JsonResponseModel<SentenceEmbeddingResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "SentenceEmbedding");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceEmbeddingResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文本相似度接口能够基于深度学习技术来计算两个输入文本的相似度,相似度数值越大的两个文本在语义上越相似。目前仅支持短文本的相似度计算,长文本的相似度计算也即将推出。
|
||||
///
|
||||
/// 鉴于文本相似度是一个应用非常广泛的功能,腾讯知文自然语言处理团队在深度神经网络模型的基础上,专门针对文本相似任务进行了优化,并持续迭代更新。基于文本相似度,可以轻松实现诸如文本去重、相似推荐等功能。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SentenceSimilarityRequest"/></param>
|
||||
/// <returns><see cref="SentenceSimilarityResponse"/></returns>
|
||||
public async Task<SentenceSimilarityResponse> SentenceSimilarity(SentenceSimilarityRequest req)
|
||||
{
|
||||
JsonResponseModel<SentenceSimilarityResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "SentenceSimilarity");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceSimilarityResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文本相似度接口能够基于深度学习技术来计算两个输入文本的相似度,相似度数值越大的两个文本在语义上越相似。目前仅支持短文本的相似度计算,长文本的相似度计算也即将推出。
|
||||
///
|
||||
/// 鉴于文本相似度是一个应用非常广泛的功能,腾讯知文自然语言处理团队在深度神经网络模型的基础上,专门针对文本相似任务进行了优化,并持续迭代更新。基于文本相似度,可以轻松实现诸如文本去重、相似推荐等功能。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SentenceSimilarityRequest"/></param>
|
||||
/// <returns><see cref="SentenceSimilarityResponse"/></returns>
|
||||
public SentenceSimilarityResponse SentenceSimilaritySync(SentenceSimilarityRequest req)
|
||||
{
|
||||
JsonResponseModel<SentenceSimilarityResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "SentenceSimilarity");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentenceSimilarityResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 情感分析接口能够对带有情感色彩的主观性文本进行分析、处理、归纳和推理,识别出用户的情感倾向,是积极还是消极,并且提供各自概率。
|
||||
///
|
||||
/// 该功能基于基于千亿级大规模互联网语料和LSTM、BERT等深度神经网络模型进行训练,并持续迭代更新,以保证效果不断提升。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SentimentAnalysisRequest"/></param>
|
||||
/// <returns><see cref="SentimentAnalysisResponse"/></returns>
|
||||
public async Task<SentimentAnalysisResponse> SentimentAnalysis(SentimentAnalysisRequest req)
|
||||
{
|
||||
JsonResponseModel<SentimentAnalysisResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "SentimentAnalysis");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentimentAnalysisResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 情感分析接口能够对带有情感色彩的主观性文本进行分析、处理、归纳和推理,识别出用户的情感倾向,是积极还是消极,并且提供各自概率。
|
||||
///
|
||||
/// 该功能基于基于千亿级大规模互联网语料和LSTM、BERT等深度神经网络模型进行训练,并持续迭代更新,以保证效果不断提升。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SentimentAnalysisRequest"/></param>
|
||||
/// <returns><see cref="SentimentAnalysisResponse"/></returns>
|
||||
public SentimentAnalysisResponse SentimentAnalysisSync(SentimentAnalysisRequest req)
|
||||
{
|
||||
JsonResponseModel<SentimentAnalysisResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "SentimentAnalysis");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SentimentAnalysisResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 相似词接口能够基于同义词库及词向量技术,检索出与输入词语在语义上最相似的若干个词语,可广泛用于检索系统、问答系统、文档归档等场景。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SimilarWordsRequest"/></param>
|
||||
/// <returns><see cref="SimilarWordsResponse"/></returns>
|
||||
public async Task<SimilarWordsResponse> SimilarWords(SimilarWordsRequest req)
|
||||
{
|
||||
JsonResponseModel<SimilarWordsResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "SimilarWords");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SimilarWordsResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 相似词接口能够基于同义词库及词向量技术,检索出与输入词语在语义上最相似的若干个词语,可广泛用于检索系统、问答系统、文档归档等场景。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="SimilarWordsRequest"/></param>
|
||||
/// <returns><see cref="SimilarWordsResponse"/></returns>
|
||||
public SimilarWordsResponse SimilarWordsSync(SimilarWordsRequest req)
|
||||
{
|
||||
JsonResponseModel<SimilarWordsResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "SimilarWords");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<SimilarWordsResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文本分类接口能够对用户输入的文本进行自动分类,将其映射到具体的类目上,用户只需要提供待分类的文本,而无需关注具体实现。
|
||||
///
|
||||
/// 该功能基于基于千亿级大规模互联网语料和LSTM、BERT等深度神经网络模型进行训练,并持续迭代更新,以保证效果不断提升。
|
||||
///
|
||||
/// 目前已提供:
|
||||
///
|
||||
/// - 通用领域分类体系,包括15个分类类目,分别是汽车、科技、健康、体育、旅行、教育、职业、文化、军事、房产、娱乐、女性、奥运、财经以及其他,适用于通用的场景。
|
||||
///
|
||||
/// - 新闻领域分类体系,包括37个一级分类类目,285个二级分类(详细请见 [类目体系映射表](https://cloud.tencent.com/document/product/271/36459)),已应用于腾讯新闻的文章分类。
|
||||
///
|
||||
/// 更多垂直领域的分类体系即将推出,敬请期待。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="TextClassificationRequest"/></param>
|
||||
/// <returns><see cref="TextClassificationResponse"/></returns>
|
||||
public async Task<TextClassificationResponse> TextClassification(TextClassificationRequest req)
|
||||
{
|
||||
JsonResponseModel<TextClassificationResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "TextClassification");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<TextClassificationResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 文本分类接口能够对用户输入的文本进行自动分类,将其映射到具体的类目上,用户只需要提供待分类的文本,而无需关注具体实现。
|
||||
///
|
||||
/// 该功能基于基于千亿级大规模互联网语料和LSTM、BERT等深度神经网络模型进行训练,并持续迭代更新,以保证效果不断提升。
|
||||
///
|
||||
/// 目前已提供:
|
||||
///
|
||||
/// - 通用领域分类体系,包括15个分类类目,分别是汽车、科技、健康、体育、旅行、教育、职业、文化、军事、房产、娱乐、女性、奥运、财经以及其他,适用于通用的场景。
|
||||
///
|
||||
/// - 新闻领域分类体系,包括37个一级分类类目,285个二级分类(详细请见 [类目体系映射表](https://cloud.tencent.com/document/product/271/36459)),已应用于腾讯新闻的文章分类。
|
||||
///
|
||||
/// 更多垂直领域的分类体系即将推出,敬请期待。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="TextClassificationRequest"/></param>
|
||||
/// <returns><see cref="TextClassificationResponse"/></returns>
|
||||
public TextClassificationResponse TextClassificationSync(TextClassificationRequest req)
|
||||
{
|
||||
JsonResponseModel<TextClassificationResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "TextClassification");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<TextClassificationResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提供对中文文本的自动纠错功能,能够识别输入文本中的错误片段,定位错误并给出正确的文本结果;支持长度不超过2000字的长文本纠错。
|
||||
///
|
||||
/// 此功能是基于千亿级大规模互联网语料和LSTM、BERT等深度神经网络模型进行训练,并持续迭代更新,以保证效果不断提升,是搜索引擎、语音识别、内容审核等功能更好运行的基础之一。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="TextCorrectionRequest"/></param>
|
||||
/// <returns><see cref="TextCorrectionResponse"/></returns>
|
||||
public async Task<TextCorrectionResponse> TextCorrection(TextCorrectionRequest req)
|
||||
{
|
||||
JsonResponseModel<TextCorrectionResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "TextCorrection");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<TextCorrectionResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提供对中文文本的自动纠错功能,能够识别输入文本中的错误片段,定位错误并给出正确的文本结果;支持长度不超过2000字的长文本纠错。
|
||||
///
|
||||
/// 此功能是基于千亿级大规模互联网语料和LSTM、BERT等深度神经网络模型进行训练,并持续迭代更新,以保证效果不断提升,是搜索引擎、语音识别、内容审核等功能更好运行的基础之一。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="TextCorrectionRequest"/></param>
|
||||
/// <returns><see cref="TextCorrectionResponse"/></returns>
|
||||
public TextCorrectionResponse TextCorrectionSync(TextCorrectionRequest req)
|
||||
{
|
||||
JsonResponseModel<TextCorrectionResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "TextCorrection");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<TextCorrectionResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 词向量接口能够将输入的词语映射成一个固定维度的词向量,用来表示这个词语的语义特征。词向量是很多自然语言处理技术的基础,能够显著提高它们的效果。
|
||||
///
|
||||
/// 该词向量服务由腾讯知文自然语言处理团队联合腾讯AI Lab共同打造。使用的词向量基于千亿级大规模互联网语料并采用AI Lab自研的DSG算法训练而成,开源的词向量包含800多万中文词汇,在覆盖率、新鲜度及准确性等三方面性能突出。
|
||||
///
|
||||
/// 腾讯AI Lab词向量相关资料:
|
||||
///
|
||||
/// https://ai.tencent.com/ailab/zh/news/detial?id=22
|
||||
///
|
||||
/// https://ai.tencent.com/ailab/nlp/embedding.html
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="WordEmbeddingRequest"/></param>
|
||||
/// <returns><see cref="WordEmbeddingResponse"/></returns>
|
||||
public async Task<WordEmbeddingResponse> WordEmbedding(WordEmbeddingRequest req)
|
||||
{
|
||||
JsonResponseModel<WordEmbeddingResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "WordEmbedding");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<WordEmbeddingResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 词向量接口能够将输入的词语映射成一个固定维度的词向量,用来表示这个词语的语义特征。词向量是很多自然语言处理技术的基础,能够显著提高它们的效果。
|
||||
///
|
||||
/// 该词向量服务由腾讯知文自然语言处理团队联合腾讯AI Lab共同打造。使用的词向量基于千亿级大规模互联网语料并采用AI Lab自研的DSG算法训练而成,开源的词向量包含800多万中文词汇,在覆盖率、新鲜度及准确性等三方面性能突出。
|
||||
///
|
||||
/// 腾讯AI Lab词向量相关资料:
|
||||
///
|
||||
/// https://ai.tencent.com/ailab/zh/news/detial?id=22
|
||||
///
|
||||
/// https://ai.tencent.com/ailab/nlp/embedding.html
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="WordEmbeddingRequest"/></param>
|
||||
/// <returns><see cref="WordEmbeddingResponse"/></returns>
|
||||
public WordEmbeddingResponse WordEmbeddingSync(WordEmbeddingRequest req)
|
||||
{
|
||||
JsonResponseModel<WordEmbeddingResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "WordEmbedding");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<WordEmbeddingResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 词相似度接口能够基于词向量技术来计算两个输入词语的余弦相似度,相似度数值越大的两个词语在语义上越相似。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="WordSimilarityRequest"/></param>
|
||||
/// <returns><see cref="WordSimilarityResponse"/></returns>
|
||||
public async Task<WordSimilarityResponse> WordSimilarity(WordSimilarityRequest req)
|
||||
{
|
||||
JsonResponseModel<WordSimilarityResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = await this.InternalRequest(req, "WordSimilarity");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<WordSimilarityResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 词相似度接口能够基于词向量技术来计算两个输入词语的余弦相似度,相似度数值越大的两个词语在语义上越相似。
|
||||
/// </summary>
|
||||
/// <param name="req"><see cref="WordSimilarityRequest"/></param>
|
||||
/// <returns><see cref="WordSimilarityResponse"/></returns>
|
||||
public WordSimilarityResponse WordSimilaritySync(WordSimilarityRequest req)
|
||||
{
|
||||
JsonResponseModel<WordSimilarityResponse> rsp = null;
|
||||
try
|
||||
{
|
||||
var strResp = this.InternalRequestSync(req, "WordSimilarity");
|
||||
rsp = JsonConvert.DeserializeObject<JsonResponseModel<WordSimilarityResponse>>(strResp);
|
||||
}
|
||||
catch (JsonSerializationException e)
|
||||
{
|
||||
throw new TencentCloudSDKException(e.Message);
|
||||
}
|
||||
return rsp.Response;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user