Click or drag to resize
TokenBundle Class
A special Token which represents a set of alternatives (i.e. an ambiguous analysis) of other tokens which cover the exactly same input span.
Inheritance Hierarchy

Namespace: Sdl.LanguagePlatform.Core.Tokenization
Assembly: Sdl.LanguagePlatform.Core (in Sdl.LanguagePlatform.Core.dll) Version: 1.6.0.0 (1.7.3164.0)
Syntax
public class TokenBundle : Token, 
	IEnumerable<PrioritizedToken>, IEnumerable

The TokenBundle type exposes the following members.

Constructors
Properties
  NameDescription
Public propertyCount
Gets the number of elements in the collection.
Public propertyIsPlaceable
IsPlaceable. Is true if any of the alternatives is a placeable token.
(Overrides TokenIsPlaceable.)
Public propertyIsPunctuation
true iff the token is a general punctuation, an opening punctuation, or a closing punctuation
(Inherited from Token.)
Public propertyIsSubstitutable
IsSubstitutable. Is true if any of the alternatives is a substitutable token.
(Overrides TokenIsSubstitutable.)
Public propertyIsWhitespace
Gets a value which indicates whether this token is a whitespace token or not.
(Inherited from Token.)
Public propertyIsWord
true iff the token is a word, an abbreviation, or an acronym
(Inherited from Token.)
Public propertyItem
Gets the prioritized token at the specified index position. If the index position is invalid, an exception is thrown.
Public propertySpan
Gets or sets the span covered by this token in the original segment.
(Inherited from Token.)
Public propertyText
Gets or sets the token's text.
(Inherited from Token.)
Public propertyType
Gets, or sets, the TokenType of this token.
(Inherited from Token.)
Top
Methods
  NameDescription
Public methodAcceptSegmentElementVisitor
Invalid for this class. Will throw a InvalidOperationException
(Overrides SegmentElementAcceptSegmentElementVisitor(ISegmentElementVisitor).)
Public methodAdd(Token, Int32)
Adds a new token to the set of alternatives. Potential duplicates are kept.
Public methodAdd(Token, Int32, Boolean)
Adds a new token to the set of alternatives.
Public methodContains
Determines whether the specified token is contained in the set of alternatives.
Public methodDuplicate
Invalid for this class. Will throw a InvalidOperationException
(Overrides SegmentElementDuplicate.)
Public methodEquals
Equals(object)
(Inherited from Token.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetBest
Obtains the token with the highest priority in the set of alternatives. If two tokens have the same priority, the first one will be the winner.
Public methodGetEnumerator
Gets an enumerator to iterate through the list of alternatives.
Public methodGetHashCode
GetHashCode(object)
(Inherited from Token.)
Public methodGetSimilarity
GetSimilarity(SegmentElement). Returns the highest similarity to any of the alternatives.
(Overrides SegmentElementGetSimilarity(SegmentElement).)
Protected methodGetTokenType
Type. Returns the token type of the first alternative in the collection. However, be aware that the alternatives may represent different token types.
(Overrides TokenGetTokenType.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetWeakHashCode (Inherited from Token.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodSetTokenType (Inherited from Token.)
Public methodSortByDecreasingPriority
Sorts the set of alternatives by decreasing priority.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also
Community
Edit

Be the first to Edit the community content of this topic.
Comments