BertTokenizer.CreateTokenTypeIdsFromSequences Metoda
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przeciążenia
| Nazwa | Opis |
|---|---|
| CreateTokenTypeIdsFromSequences(IEnumerable<Int32>, IEnumerable<Int32>) |
Utwórz maskę z dwóch przekazanych sekwencji, które mają być używane w zadaniu klasyfikacji sekwencji par. Maska pary sekwencji BERT ma następujący format: 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 | pierwsza sekwencja | druga sekwencja | Jeśli |
| CreateTokenTypeIdsFromSequences(IEnumerable<Int32>, Span<Int32>, Int32, IEnumerable<Int32>) |
CreateTokenTypeIdsFromSequences(IEnumerable<Int32>, IEnumerable<Int32>)
- Źródło:
- BertTokenizer.cs
- Źródło:
- BertTokenizer.cs
- Źródło:
- BertTokenizer.cs
Utwórz maskę z dwóch przekazanych sekwencji do użycia w zadaniu klasyfikacji sekwencji par. Maska pary sekwencji BERT ma następujący format: 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 | pierwsza sekwencja | druga sekwencja | Jeśli additionalTokenIds ma wartość null, ta metoda zwraca tylko pierwszą część identyfikatorów typów (0).
public System.Collections.Generic.IReadOnlyList<int> CreateTokenTypeIdsFromSequences(System.Collections.Generic.IEnumerable<int> tokenIds, System.Collections.Generic.IEnumerable<int>? additionalTokenIds = default);
member this.CreateTokenTypeIdsFromSequences : seq<int> * seq<int> -> System.Collections.Generic.IReadOnlyList<int>
Public Function CreateTokenTypeIdsFromSequences (tokenIds As IEnumerable(Of Integer), Optional additionalTokenIds As IEnumerable(Of Integer) = Nothing) As IReadOnlyList(Of Integer)
Parametry
- tokenIds
- IEnumerable<Int32>
Lista identyfikatorów tokenów dla pierwszej sekwencji.
- additionalTokenIds
- IEnumerable<Int32>
Opcjonalna lista identyfikatorów tokenów dla drugiej sekwencji.
Zwraca
Lista identyfikatorów typów tokenów zgodnie z podanymi sekwencjami.
Wyjątki
Gdy tokenIds wartość ma wartość null.
Dotyczy
CreateTokenTypeIdsFromSequences(IEnumerable<Int32>, Span<Int32>, Int32, IEnumerable<Int32>)
- Źródło:
- BertTokenizer.cs
- Źródło:
- BertTokenizer.cs
- Źródło:
- BertTokenizer.cs
public System.Buffers.OperationStatus CreateTokenTypeIdsFromSequences(System.Collections.Generic.IEnumerable<int> tokenIds, Span<int> destination, out int valuesWritten, System.Collections.Generic.IEnumerable<int>? additionalTokenIds = default);
member this.CreateTokenTypeIdsFromSequences : seq<int> * Span<int> * int * seq<int> -> System.Buffers.OperationStatus
Public Function CreateTokenTypeIdsFromSequences (tokenIds As IEnumerable(Of Integer), destination As Span(Of Integer), ByRef valuesWritten As Integer, Optional additionalTokenIds As IEnumerable(Of Integer) = Nothing) As OperationStatus
Parametry
- tokenIds
- IEnumerable<Int32>
- valuesWritten
- Int32
- additionalTokenIds
- IEnumerable<Int32>