Click or drag to resize
Token Class
Represents a generic, abstract token, which is a sequence of characters in the input. A token is identified using a tokenizer, which breaks up the sequence of characters in the input into a sequence of tokens. That token sequence is non-overlapping, but not necessarily contiguous.
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 abstract class Token : SegmentElement

The Token type exposes the following members.

Constructors
  NameDescription
Public methodToken
Initializes a new instance with default values.
Public methodToken(String)
Initializes a new instance with the specified token text.
Public methodToken(Token)
Initializes a new instance with the values from another instance, creating a deep copy.
Top
Properties
  NameDescription
Public propertyIsPlaceable
Gets a boolean value indicating whether this token represents a placeable. Always returns false for this class. Derived classes should override appropriately.
Public propertyIsPunctuation
true iff the token is a general punctuation, an opening punctuation, or a closing punctuation
Public propertyIsSubstitutable
Gets a boolean value indicating whether this token can be substituted (e.g. auto-localized) across segments. All substitutables are placeables, but not all placeables can be substituted (e.g. acronyms).
Public propertyIsWhitespace
Gets a value which indicates whether this token is a whitespace token or not.
Public propertyIsWord
true iff the token is a word, an abbreviation, or an acronym
Public propertySpan
Gets or sets the span covered by this token in the original segment.
Public propertyText
Gets or sets the token's text.
Public propertyType
Gets, or sets, the TokenType of this token.
Top
Methods
  NameDescription
Public methodAcceptSegmentElementVisitor
Visitor pattern implementation. Derived classes should call back on the appropriate method on the visitor.
(Inherited from SegmentElement.)
Public methodDuplicate
Creates a new instance that is a deep copy of this instance.
(Inherited from SegmentElement.)
Public methodEquals
Equals(object)
(Overrides ObjectEquals(Object).)
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 methodGetHashCode
GetHashCode(object)
(Overrides ObjectGetHashCode.)
Public methodGetSimilarity
Computes the degree of similarity to another instance.
(Inherited from SegmentElement.)
Protected methodGetTokenType
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetWeakHashCode (Overrides SegmentElementGetWeakHashCode.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodSetTokenType
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