-
Notifications
You must be signed in to change notification settings - Fork 4.8k
/
AnalyzeTextOptions.cs
48 lines (41 loc) · 2.22 KB
/
AnalyzeTextOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// <auto-generated/>
#nullable disable
using System;
using System.Collections.Generic;
namespace Azure.Search.Documents.Indexes.Models
{
/// <summary> Specifies some text and analysis components used to break that text into tokens. </summary>
public partial class AnalyzeTextOptions
{
/// <summary> Initializes a new instance of <see cref="AnalyzeTextOptions"/>. </summary>
/// <param name="text"> The text to break into tokens. </param>
/// <exception cref="ArgumentNullException"> <paramref name="text"/> is null. </exception>
public AnalyzeTextOptions(string text)
{
Argument.AssertNotNull(text, nameof(text));
Text = text;
TokenFilters = new ChangeTrackingList<TokenFilterName>();
CharFilters = new ChangeTrackingList<string>();
}
/// <summary> Initializes a new instance of <see cref="AnalyzeTextOptions"/>. </summary>
/// <param name="text"> The text to break into tokens. </param>
/// <param name="analyzerName"> The name of the analyzer to use to break the given text. </param>
/// <param name="tokenizerName"> The name of the tokenizer to use to break the given text. </param>
/// <param name="normalizerName"> The name of the normalizer to use to normalize the given text. </param>
/// <param name="tokenFilters"> An optional list of token filters to use when breaking the given text. </param>
/// <param name="charFilters"> An optional list of character filters to use when breaking the given text. </param>
internal AnalyzeTextOptions(string text, LexicalAnalyzerName? analyzerName, LexicalTokenizerName? tokenizerName, LexicalNormalizerName? normalizerName, IList<TokenFilterName> tokenFilters, IList<string> charFilters)
{
Text = text;
AnalyzerName = analyzerName;
TokenizerName = tokenizerName;
NormalizerName = normalizerName;
TokenFilters = tokenFilters;
CharFilters = charFilters;
}
/// <summary> The text to break into tokens. </summary>
public string Text { get; }
}
}