SemanticValue Class

SemanticValue Class

 

Represents the semantic organization of a recognized phrase.

Namespace:   System.Speech.Recognition
Assembly:  System.Speech (in System.Speech.dll)

System.Object
  System.Speech.Recognition.SemanticValue

[SerializableAttribute]
public sealed class SemanticValue : IDictionary<string, SemanticValue>, 
	ICollection<KeyValuePair<string, SemanticValue>>, IEnumerable<KeyValuePair<string, SemanticValue>>, 
	IEnumerable

NameDescription
System_CAPS_pubmethodSemanticValue(Object)

Initializes a new instance of the SemanticValue class and specifies a semantic value.

System_CAPS_pubmethodSemanticValue(String, Object, Single)

Initializes a new instance of the SemanticValue class and specifies a semantic value, a key name, and a confidence level.

NameDescription
System_CAPS_pubpropertyConfidence

Returns a relative measure of the certainty as to the correctness of the semantic parsing that returned the current instance of SemanticValue.

System_CAPS_pubpropertyCount

Returns the number of child SemanticValue objects under the current SemanticValue instance.

System_CAPS_pubpropertyItem[String]

Returns child SemanticValue instances that belong to the current SemanticValue.

System_CAPS_pubpropertyValue

A read-only property that returns the information contained in the current SemanticValue.

NameDescription
System_CAPS_pubmethodContains(KeyValuePair<String, SemanticValue>)

Indicates whether the current SemanticValue instance collection contains a specific key and a specific instance of SemanticValue expressed as a key/value pair.

System_CAPS_pubmethodContainsKey(String)

Indicates whether the current SemanticValue instance collection contains a child SemanticValue instance with a given key string.

System_CAPS_pubmethodEquals(Object)

Determines whether a specified object is an instance of SemanticValue and equal to the current instance of SemanticValue.(Overrides Object.Equals(Object).)

System_CAPS_pubmethodGetHashCode()

Provides a hash code for a SemanticValue object.(Overrides Object.GetHashCode().)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<KeyValuePair<String, SemanticValue>>.Add(KeyValuePair<String, SemanticValue>)

Adds the specified key and SemanticValue to the collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<KeyValuePair<String, SemanticValue>>.Clear()

Removes all key/value pairs from the collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<KeyValuePair<String, SemanticValue>>.CopyTo(KeyValuePair<String, SemanticValue>[], Int32)

Copies a key/value pair to a specific location in a targeted array.

System_CAPS_pubinterfaceSystem_CAPS_privmethodICollection<KeyValuePair<String, SemanticValue>>.Remove(KeyValuePair<String, SemanticValue>)

Removes the specified key and SemanticValue from the collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary<String, SemanticValue>.Add(String, SemanticValue)

Adds the specified key and SemanticValue to the dictionary.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary<String, SemanticValue>.Remove(String)

Removes the specified key and SemanticValue from the dictionary.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIDictionary<String, SemanticValue>.TryGetValue(String, SemanticValue)

Gets the SemanticValue associated with the specified key.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable<KeyValuePair<String, SemanticValue>>.GetEnumerator()

Returns an enumerator that iterates through a collection.

System_CAPS_pubinterfaceSystem_CAPS_privmethodIEnumerable.GetEnumerator()

Returns an enumerator that iterates through a collection.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyICollection<KeyValuePair<String, SemanticValue>>.IsReadOnly

Gets a value that indicates whether the collection is read-only.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDictionary<String, SemanticValue>.Keys

Gets a collection that contains the keys from a dictionary of key/value pairs.

System_CAPS_pubinterfaceSystem_CAPS_privpropertyIDictionary<String, SemanticValue>.Values

Gets a collection that contains the values from a dictionary of key/value pairs.

NameDescription
System_CAPS_pubmethodAggregate<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, KeyValuePair<String, SemanticValue>, KeyValuePair<String, SemanticValue>>)

Overloaded. Applies an accumulator function over a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAggregate<KeyValuePair<String, SemanticValue>, TAccumulate>(TAccumulate, Func<TAccumulate, KeyValuePair<String, SemanticValue>, TAccumulate>)

Overloaded. Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.(Defined by Enumerable.)

System_CAPS_pubmethodAggregate<KeyValuePair<String, SemanticValue>, TAccumulate, TResult>(TAccumulate, Func<TAccumulate, KeyValuePair<String, SemanticValue>, TAccumulate>, Func<TAccumulate, TResult>)

Overloaded. Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.(Defined by Enumerable.)

System_CAPS_pubmethodAll<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Determines whether all elements of a sequence satisfy a condition.(Defined by Enumerable.)

System_CAPS_pubmethodAny<KeyValuePair<String, SemanticValue>>()

Overloaded. Determines whether a sequence contains any elements.(Defined by Enumerable.)

System_CAPS_pubmethodAny<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Determines whether any element of a sequence satisfies a condition.(Defined by Enumerable.)

System_CAPS_pubmethodAsEnumerable<KeyValuePair<String, SemanticValue>>()

Returns the input typed as IEnumerable<T>.(Defined by Enumerable.)

System_CAPS_pubmethodAsParallel()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsParallel<KeyValuePair<String, SemanticValue>>()

Overloaded. Enables parallelization of a query.(Defined by ParallelEnumerable.)

System_CAPS_pubmethodAsQueryable()

Overloaded. Converts an IEnumerable to an IQueryable.(Defined by Queryable.)

System_CAPS_pubmethodAsQueryable<KeyValuePair<String, SemanticValue>>()

Overloaded. Converts a generic IEnumerable<T> to a generic IQueryable<T>.(Defined by Queryable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Decimal>)

Overloaded. Computes the average of a sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Double>)

Overloaded. Computes the average of a sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int32>)

Overloaded. Computes the average of a sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int64>)

Overloaded. Computes the average of a sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Decimal>>)

Overloaded. Computes the average of a sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Double>>)

Overloaded. Computes the average of a sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int32>>)

Overloaded. Computes the average of a sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int64>>)

Overloaded. Computes the average of a sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Single>>)

Overloaded. Computes the average of a sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodAverage<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Single>)

Overloaded. Computes the average of a sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodCast<TResult>()

Casts the elements of an IEnumerable to the specified type.(Defined by Enumerable.)

System_CAPS_pubmethodConcat<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>)

Concatenates two sequences.(Defined by Enumerable.)

System_CAPS_pubmethodContains<KeyValuePair<String, SemanticValue>>(KeyValuePair<String, SemanticValue>)

Overloaded. Determines whether a sequence contains a specified element by using the default equality comparer.(Defined by Enumerable.)

System_CAPS_pubmethodContains<KeyValuePair<String, SemanticValue>>(KeyValuePair<String, SemanticValue>, IEqualityComparer<KeyValuePair<String, SemanticValue>>)

Overloaded. Determines whether a sequence contains a specified element by using a specified IEqualityComparer<T>.(Defined by Enumerable.)

System_CAPS_pubmethodCount<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the number of elements in a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodCount<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns a number that represents how many elements in the specified sequence satisfy a condition.(Defined by Enumerable.)

System_CAPS_pubmethodDefaultIfEmpty<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the sequence is empty.(Defined by Enumerable.)

System_CAPS_pubmethodDefaultIfEmpty<KeyValuePair<String, SemanticValue>>(KeyValuePair<String, SemanticValue>)

Overloaded. Returns the elements of the specified sequence or the specified value in a singleton collection if the sequence is empty.(Defined by Enumerable.)

System_CAPS_pubmethodDistinct<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns distinct elements from a sequence by using the default equality comparer to compare values.(Defined by Enumerable.)

System_CAPS_pubmethodDistinct<KeyValuePair<String, SemanticValue>>(IEqualityComparer<KeyValuePair<String, SemanticValue>>)

Overloaded. Returns distinct elements from a sequence by using a specified IEqualityComparer<T> to compare values.(Defined by Enumerable.)

System_CAPS_pubmethodElementAt<KeyValuePair<String, SemanticValue>>(Int32)

Returns the element at a specified index in a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodElementAtOrDefault<KeyValuePair<String, SemanticValue>>(Int32)

Returns the element at a specified index in a sequence or a default value if the index is out of range.(Defined by Enumerable.)

System_CAPS_pubmethodExcept<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>)

Overloaded. Produces the set difference of two sequences by using the default equality comparer to compare values.(Defined by Enumerable.)

System_CAPS_pubmethodExcept<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>, IEqualityComparer<KeyValuePair<String, SemanticValue>>)

Overloaded. Produces the set difference of two sequences by using the specified IEqualityComparer<T> to compare values.(Defined by Enumerable.)

System_CAPS_pubmethodFirst<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the first element of a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodFirst<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns the first element in a sequence that satisfies a specified condition.(Defined by Enumerable.)

System_CAPS_pubmethodFirstOrDefault<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the first element of a sequence, or a default value if the sequence contains no elements.(Defined by Enumerable.)

System_CAPS_pubmethodFirstOrDefault<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>)

Overloaded. Groups the elements of a sequence according to a specified key selector function.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>, IEqualityComparer<TKey>)

Overloaded. Groups the elements of a sequence according to a specified key selector function and compares the keys by using a specified comparer.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey, TElement>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>)

Overloaded. Groups the elements of a sequence according to a specified key selector function and projects the elements for each group by using a specified function.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey, TElement>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>, IEqualityComparer<TKey>)

Overloaded. Groups the elements of a sequence according to a key selector function. The keys are compared by using a comparer and each group's elements are projected by using a specified function.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey, TResult>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<TKey, IEnumerable<KeyValuePair<String, SemanticValue>>, TResult>)

Overloaded. Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey, TResult>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<TKey, IEnumerable<KeyValuePair<String, SemanticValue>>, TResult>, IEqualityComparer<TKey>)

Overloaded. Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The keys are compared by using a specified comparer.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey, TElement, TResult>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>, Func<TKey, IEnumerable<TElement>, TResult>)

Overloaded. Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. The elements of each group are projected by using a specified function.(Defined by Enumerable.)

System_CAPS_pubmethodGroupBy<KeyValuePair<String, SemanticValue>, TKey, TElement, TResult>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>, Func<TKey, IEnumerable<TElement>, TResult>, IEqualityComparer<TKey>)

Overloaded. Groups the elements of a sequence according to a specified key selector function and creates a result value from each group and its key. Key values are compared by using a specified comparer, and the elements of each group are projected by using a specified function.(Defined by Enumerable.)

System_CAPS_pubmethodGroupJoin<KeyValuePair<String, SemanticValue>, TInner, TKey, TResult>(IEnumerable<TInner>, Func<KeyValuePair<String, SemanticValue>, TKey>, Func<TInner, TKey>, Func<KeyValuePair<String, SemanticValue>, IEnumerable<TInner>, TResult>)

Overloaded. Correlates the elements of two sequences based on equality of keys and groups the results. The default equality comparer is used to compare keys.(Defined by Enumerable.)

System_CAPS_pubmethodGroupJoin<KeyValuePair<String, SemanticValue>, TInner, TKey, TResult>(IEnumerable<TInner>, Func<KeyValuePair<String, SemanticValue>, TKey>, Func<TInner, TKey>, Func<KeyValuePair<String, SemanticValue>, IEnumerable<TInner>, TResult>, IEqualityComparer<TKey>)

Overloaded. Correlates the elements of two sequences based on key equality and groups the results. A specified IEqualityComparer<T> is used to compare keys.(Defined by Enumerable.)

System_CAPS_pubmethodIntersect<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>)

Overloaded. Produces the set intersection of two sequences by using the default equality comparer to compare values.(Defined by Enumerable.)

System_CAPS_pubmethodIntersect<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>, IEqualityComparer<KeyValuePair<String, SemanticValue>>)

Overloaded. Produces the set intersection of two sequences by using the specified IEqualityComparer<T> to compare values.(Defined by Enumerable.)

System_CAPS_pubmethodJoin<KeyValuePair<String, SemanticValue>, TInner, TKey, TResult>(IEnumerable<TInner>, Func<KeyValuePair<String, SemanticValue>, TKey>, Func<TInner, TKey>, Func<KeyValuePair<String, SemanticValue>, TInner, TResult>)

Overloaded. Correlates the elements of two sequences based on matching keys. The default equality comparer is used to compare keys.(Defined by Enumerable.)

System_CAPS_pubmethodJoin<KeyValuePair<String, SemanticValue>, TInner, TKey, TResult>(IEnumerable<TInner>, Func<KeyValuePair<String, SemanticValue>, TKey>, Func<TInner, TKey>, Func<KeyValuePair<String, SemanticValue>, TInner, TResult>, IEqualityComparer<TKey>)

Overloaded. Correlates the elements of two sequences based on matching keys. A specified IEqualityComparer<T> is used to compare keys.(Defined by Enumerable.)

System_CAPS_pubmethodLast<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the last element of a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodLast<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns the last element of a sequence that satisfies a specified condition.(Defined by Enumerable.)

System_CAPS_pubmethodLastOrDefault<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the last element of a sequence, or a default value if the sequence contains no elements.(Defined by Enumerable.)

System_CAPS_pubmethodLastOrDefault<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns the last element of a sequence that satisfies a condition or a default value if no such element is found.(Defined by Enumerable.)

System_CAPS_pubmethodLongCount<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns an Int64 that represents the total number of elements in a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodLongCount<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns an Int64 that represents how many elements in a sequence satisfy a condition.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the maximum value in a generic sequence.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Decimal>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum Decimal value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Double>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum Double value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int32>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum Int32 value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int64>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum Int64 value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Decimal>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum nullable Decimal value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Double>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum nullable Double value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int32>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum nullable Int32 value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int64>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum nullable Int64 value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Single>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum nullable Single value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Single>)

Overloaded. Invokes a transform function on each element of a sequence and returns the maximum Single value.(Defined by Enumerable.)

System_CAPS_pubmethodMax<KeyValuePair<String, SemanticValue>, TResult>(Func<KeyValuePair<String, SemanticValue>, TResult>)

Overloaded. Invokes a transform function on each element of a generic sequence and returns the maximum resulting value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the minimum value in a generic sequence.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Decimal>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum Decimal value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Double>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum Double value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int32>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum Int32 value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int64>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum Int64 value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Decimal>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum nullable Decimal value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Double>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum nullable Double value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int32>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum nullable Int32 value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int64>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum nullable Int64 value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Single>>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum nullable Single value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Single>)

Overloaded. Invokes a transform function on each element of a sequence and returns the minimum Single value.(Defined by Enumerable.)

System_CAPS_pubmethodMin<KeyValuePair<String, SemanticValue>, TResult>(Func<KeyValuePair<String, SemanticValue>, TResult>)

Overloaded. Invokes a transform function on each element of a generic sequence and returns the minimum resulting value.(Defined by Enumerable.)

System_CAPS_pubmethodOfType<TResult>()

Filters the elements of an IEnumerable based on a specified type.(Defined by Enumerable.)

System_CAPS_pubmethodOrderBy<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>)

Overloaded. Sorts the elements of a sequence in ascending order according to a key.(Defined by Enumerable.)

System_CAPS_pubmethodOrderBy<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>, IComparer<TKey>)

Overloaded. Sorts the elements of a sequence in ascending order by using a specified comparer.(Defined by Enumerable.)

System_CAPS_pubmethodOrderByDescending<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>)

Overloaded. Sorts the elements of a sequence in descending order according to a key.(Defined by Enumerable.)

System_CAPS_pubmethodOrderByDescending<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>, IComparer<TKey>)

Overloaded. Sorts the elements of a sequence in descending order by using a specified comparer.(Defined by Enumerable.)

System_CAPS_pubmethodReverse<KeyValuePair<String, SemanticValue>>()

Inverts the order of the elements in a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSelect<KeyValuePair<String, SemanticValue>, TResult>(Func<KeyValuePair<String, SemanticValue>, TResult>)

Overloaded. Projects each element of a sequence into a new form.(Defined by Enumerable.)

System_CAPS_pubmethodSelect<KeyValuePair<String, SemanticValue>, TResult>(Func<KeyValuePair<String, SemanticValue>, Int32, TResult>)

Overloaded. Projects each element of a sequence into a new form by incorporating the element's index.(Defined by Enumerable.)

System_CAPS_pubmethodSelectMany<KeyValuePair<String, SemanticValue>, TResult>(Func<KeyValuePair<String, SemanticValue>, IEnumerable<TResult>>)

Overloaded. Projects each element of a sequence to an IEnumerable<T> and flattens the resulting sequences into one sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSelectMany<KeyValuePair<String, SemanticValue>, TResult>(Func<KeyValuePair<String, SemanticValue>, Int32, IEnumerable<TResult>>)

Overloaded. Projects each element of a sequence to an IEnumerable<T>, and flattens the resulting sequences into one sequence. The index of each source element is used in the projected form of that element.(Defined by Enumerable.)

System_CAPS_pubmethodSelectMany<KeyValuePair<String, SemanticValue>, TCollection, TResult>(Func<KeyValuePair<String, SemanticValue>, IEnumerable<TCollection>>, Func<KeyValuePair<String, SemanticValue>, TCollection, TResult>)

Overloaded. Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein.(Defined by Enumerable.)

System_CAPS_pubmethodSelectMany<KeyValuePair<String, SemanticValue>, TCollection, TResult>(Func<KeyValuePair<String, SemanticValue>, Int32, IEnumerable<TCollection>>, Func<KeyValuePair<String, SemanticValue>, TCollection, TResult>)

Overloaded. Projects each element of a sequence to an IEnumerable<T>, flattens the resulting sequences into one sequence, and invokes a result selector function on each element therein. The index of each source element is used in the intermediate projected form of that element.(Defined by Enumerable.)

System_CAPS_pubmethodSequenceEqual<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>)

Overloaded. Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type.(Defined by Enumerable.)

System_CAPS_pubmethodSequenceEqual<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>, IEqualityComparer<KeyValuePair<String, SemanticValue>>)

Overloaded. Determines whether two sequences are equal by comparing their elements by using a specified IEqualityComparer<T>.(Defined by Enumerable.)

System_CAPS_pubmethodSingle<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSingle<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns the only element of a sequence that satisfies a specified condition, and throws an exception if more than one such element exists.(Defined by Enumerable.)

System_CAPS_pubmethodSingleOrDefault<KeyValuePair<String, SemanticValue>>()

Overloaded. Returns the only element of a sequence, or a default value if the sequence is empty; this method throws an exception if there is more than one element in the sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSingleOrDefault<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns the only element of a sequence that satisfies a specified condition or a default value if no such element exists; this method throws an exception if more than one element satisfies the condition.(Defined by Enumerable.)

System_CAPS_pubmethodSkip<KeyValuePair<String, SemanticValue>>(Int32)

Bypasses a specified number of elements in a sequence and then returns the remaining elements.(Defined by Enumerable.)

System_CAPS_pubmethodSkipWhile<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements.(Defined by Enumerable.)

System_CAPS_pubmethodSkipWhile<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int32, Boolean>)

Overloaded. Bypasses elements in a sequence as long as a specified condition is true and then returns the remaining elements. The element's index is used in the logic of the predicate function.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Decimal>)

Overloaded. Computes the sum of the sequence of Decimal values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Double>)

Overloaded. Computes the sum of the sequence of Double values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int32>)

Overloaded. Computes the sum of the sequence of Int32 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int64>)

Overloaded. Computes the sum of the sequence of Int64 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Decimal>>)

Overloaded. Computes the sum of the sequence of nullable Decimal values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Double>>)

Overloaded. Computes the sum of the sequence of nullable Double values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int32>>)

Overloaded. Computes the sum of the sequence of nullable Int32 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Int64>>)

Overloaded. Computes the sum of the sequence of nullable Int64 values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Nullable<Single>>)

Overloaded. Computes the sum of the sequence of nullable Single values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodSum<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Single>)

Overloaded. Computes the sum of the sequence of Single values that are obtained by invoking a transform function on each element of the input sequence.(Defined by Enumerable.)

System_CAPS_pubmethodTake<KeyValuePair<String, SemanticValue>>(Int32)

Returns a specified number of contiguous elements from the start of a sequence.(Defined by Enumerable.)

System_CAPS_pubmethodTakeWhile<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Returns elements from a sequence as long as a specified condition is true.(Defined by Enumerable.)

System_CAPS_pubmethodTakeWhile<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int32, Boolean>)

Overloaded. Returns elements from a sequence as long as a specified condition is true. The element's index is used in the logic of the predicate function.(Defined by Enumerable.)

System_CAPS_pubmethodToArray<KeyValuePair<String, SemanticValue>>()

Creates an array from a IEnumerable<T>.(Defined by Enumerable.)

System_CAPS_pubmethodToDictionary<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>)

Overloaded. Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to a specified key selector function.(Defined by Enumerable.)

System_CAPS_pubmethodToDictionary<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>, IEqualityComparer<TKey>)

Overloaded. Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to a specified key selector function and key comparer.(Defined by Enumerable.)

System_CAPS_pubmethodToDictionary<KeyValuePair<String, SemanticValue>, TKey, TElement>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>)

Overloaded. Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to specified key selector and element selector functions.(Defined by Enumerable.)

System_CAPS_pubmethodToDictionary<KeyValuePair<String, SemanticValue>, TKey, TElement>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>, IEqualityComparer<TKey>)

Overloaded. Creates a Dictionary<TKey, TValue> from an IEnumerable<T> according to a specified key selector function, a comparer, and an element selector function.(Defined by Enumerable.)

System_CAPS_pubmethodToList<KeyValuePair<String, SemanticValue>>()

Creates a List<T> from an IEnumerable<T>.(Defined by Enumerable.)

System_CAPS_pubmethodToLookup<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>)

Overloaded. Creates a Lookup<TKey, TElement> from an IEnumerable<T> according to a specified key selector function.(Defined by Enumerable.)

System_CAPS_pubmethodToLookup<KeyValuePair<String, SemanticValue>, TKey>(Func<KeyValuePair<String, SemanticValue>, TKey>, IEqualityComparer<TKey>)

Overloaded. Creates a Lookup<TKey, TElement> from an IEnumerable<T> according to a specified key selector function and key comparer.(Defined by Enumerable.)

System_CAPS_pubmethodToLookup<KeyValuePair<String, SemanticValue>, TKey, TElement>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>)

Overloaded. Creates a Lookup<TKey, TElement> from an IEnumerable<T> according to specified key selector and element selector functions.(Defined by Enumerable.)

System_CAPS_pubmethodToLookup<KeyValuePair<String, SemanticValue>, TKey, TElement>(Func<KeyValuePair<String, SemanticValue>, TKey>, Func<KeyValuePair<String, SemanticValue>, TElement>, IEqualityComparer<TKey>)

Overloaded. Creates a Lookup<TKey, TElement> from an IEnumerable<T> according to a specified key selector function, a comparer and an element selector function.(Defined by Enumerable.)

System_CAPS_pubmethodUnion<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>)

Overloaded. Produces the set union of two sequences by using the default equality comparer.(Defined by Enumerable.)

System_CAPS_pubmethodUnion<KeyValuePair<String, SemanticValue>>(IEnumerable<KeyValuePair<String, SemanticValue>>, IEqualityComparer<KeyValuePair<String, SemanticValue>>)

Overloaded. Produces the set union of two sequences by using a specified IEqualityComparer<T>.(Defined by Enumerable.)

System_CAPS_pubmethodWhere<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Boolean>)

Overloaded. Filters a sequence of values based on a predicate.(Defined by Enumerable.)

System_CAPS_pubmethodWhere<KeyValuePair<String, SemanticValue>>(Func<KeyValuePair<String, SemanticValue>, Int32, Boolean>)

Overloaded. Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.(Defined by Enumerable.)

System_CAPS_pubmethodZip<KeyValuePair<String, SemanticValue>, TSecond, TResult>(IEnumerable<TSecond>, Func<KeyValuePair<String, SemanticValue>, TSecond, TResult>)

Applies a specified function to the corresponding elements of two sequences, producing a sequence of the results.(Defined by Enumerable.)

SemanticValue is the primary object that implements the semantic technology in System.Speech. Semantic interpretation allows grammars to define rules for use by a recognition engine to correctly interpret audio input. Semantic interpretation also enables recognition engines to organize their results so that they can be more easily processed, rather than returning only recognized words and sequences of words.

For example, the recognition engine output "Change background to red" would have to be parsed and interpreted by an application before it could be acted upon. A Grammar object can specify a semantic interpretation to make processing clearer by specifying that the phrase has two semantic substructures, one for selecting background or foreground (represented by the text "background"), and the other for selecting color (represented by the text "red").

System.Speech represents the semantics of a recognition operation in a tree of SemanticValue objects.

Each SemanticValue instance includes the following:

  • An Object, accessed by means of the Value property, used to key the instance of the SemanticValue.

  • A measure of the accuracy of semantic parsing, returned by the Confidence property.

  • A collection of name/value pairs (T:System.Collections.Generic.KeyValuePair(TKey, TValue)) of child objects, which are also SemanticValue instances. Child nodes are accessible through the SemanticValue implementation of T:System.Collection.Generic.IDictionaryIDictionary(TKey, TValue) using a string lookup key and a SemanticValue instance, as in the following example.

    foreach (KeyValuePair<String, SemanticValue> child in semantics) 
    {
      Utils.CreateSemanticsTreeNodes(semanticsNode.Nodes, child.Value, child.Key);
    }
    

Recognition engines based on System.Speech provide valid instances of SemanticValue for all output from recognition, even for phrases with no explicit semantic structure.

The SemanticValue instance for a phrase is obtained using the Semantics property on the RecognizedPhrase object (or objects that inherit from it, such as RecognitionResult).

SemanticValue objects obtained for recognized phrases without semantic structure are characterized by:

  • The lack of children (Count is 0).

  • The Value property is null.

  • An artificial semantic confidence level of 1.0 (returned by Confidence).

Typically, applications create SemanticValue instances indirectly, adding them to Grammar objects by using SemanticResultValue and SemanticResultKey instances, in conjunction with Choices and GrammarBuilder objects.

Direct construction of a SemanticValue instance is useful during the creation of strongly-typed grammars.

SemanticValue implements the T:System.Collection.Generic.IDictionary(TKey, TValue), T:System.Collections.Generic.ICollection(T), and T:System.Collections.Generic.IEnumerable(T) interfaces.

The following example shows a handler for a SpeechRecognized event designed to handle commands to change foreground and background color.

The handler identifies recognized phrases that have no underlying semantic structure by detecting a Count of zero and a Value of null. This recognition output is then processed directly by parsing the raw text.

In other cases, the handler uses keys to obtain the RGB components of a color name, to determine whether the command will change the foreground or background, or to indicate that no valid key was found.


newGrammar.SpeechRecognized +=
  delegate(object sender, SpeechRecognizedEventArgs eventArgs) 
  {

    // Retrieve the value of the semantic property.
    bool changeBackGround = true;
    string errorString = "";
    SemanticValue semantics = eventArgs.Result.Semantics;

    Color newColor = Color.Empty;

    try 
    {
      if (semantics.Count == 0 && semantics.Value==null)
      {
        // Signifies recognition by a grammar with no semantics.
        // Parse the string, assuming that the last word is color,
        // and search for “background” or “foreground” in the input.
        if (eventArgs.Result.Text.Contains("foreground")) 
        {
          changeBackGround = false;
        }
        string cName = eventArgs.Result.Words[eventArgs.Result.Words.Count - 1].Text;
        newColor = Color.FromName(cName);

      }
      else if (semantics.ContainsKey("colorStringList") ^ semantics.ContainsKey("colorRGBValueList")) 
      {

        // Determine whether to change background or foreground.
        if (semantics.ContainsKey("applyChgToBackground")) 
        {
          changeBackGround = semantics["applyChgToBackground"].Value is bool;
        }

        // Get the RGB color value.
        if (semantics.ContainsKey("colorStringList")) 
        {
          newColor = Color.FromName((string)semantics["colorStringList"].Value);
        }
        if (semantics.ContainsKey("colorRGBValueList")) 
        {
          newColor = System.Drawing.Color.FromArgb((int)semantics["colorRGBValueList"].Value);
        }
      }
      else 
      {

        // Throw an exception if the semantics do not contain the keys we
        // support.
        throw(new Exception("Unsupported semantics keys found."));
      }
    }

    catch (Exception exp) 
    {
      MessageBox.Show(String.Format("Unable to process color semantics.:\n{0}\n", exp.Message));
      return;
    }

    // Change colors, either foreground or background.
    if (changeBackGround) 
    {
      BackColor = newColor;
      float Bright = BackColor.GetBrightness();
      float Hue = BackColor.GetHue();
      float Sat = BackColor.GetSaturation();

      // Make sure that text is readable regardless of the background.
      if (BackColor.GetBrightness() <= .50) 
      {
        ForeColor = Color.White;
      }
      else 
      {
        ForeColor = Color.Black;
      }
    }
    else 
    {
      ForeColor = newColor;
      float Bright = ForeColor.GetBrightness();
      float Hue = ForeColor.GetHue();
      float Sat = ForeColor.GetSaturation();

      // Make sure that text is readable regardless of Foreground.
      if (ForeColor.GetBrightness() <= .50) 
      {
        BackColor = Color.White;
      }
      else 
      {
        BackColor = Color.Black;
      }
    }
    return;
  };

.NET Framework
Available since 3.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft