Class RegexpAutomatonFormat
Converts a given automaton to a regular expression (or a regular expression-like string) corresponding to the support of the automaton.
Implements
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Distributions.Automata
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class RegexpAutomatonFormat : IAutomatonFormat
Constructors
RegexpAutomatonFormat(RegexpFormattingSettings)
Initializes a new instance of the RegexpAutomatonFormat class.
Declaration
public RegexpAutomatonFormat(RegexpFormattingSettings formattingSettings)
Parameters
Type | Name | Description |
---|---|---|
RegexpFormattingSettings | formattingSettings | The formatting settings used for conversion from an automaton to a string. |
Properties
FormattingSettings
Gets the formatting settings used for conversion.
Declaration
public RegexpFormattingSettings FormattingSettings { get; }
Property Value
Type | Description |
---|---|
RegexpFormattingSettings |
Methods
ConvertToString<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton>(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton>)
Converts a given automaton to a regular expression corresponding to the support of the function.
Declaration
public string ConvertToString<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton>(Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton> automaton)
where TSequence : class, IEnumerable<TElement> where TElementDistribution : IImmutableDistribution<TElement, TElementDistribution>, CanGetLogAverageOf<TElementDistribution>, CanComputeProduct<TElementDistribution>, CanCreatePartialUniform<TElementDistribution>, SummableExactly<TElementDistribution>, new()
where TSequenceManipulator : ISequenceManipulator<TSequence, TElement>, new()
where TAutomaton : Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton>, new()
Parameters
Type | Name | Description |
---|---|---|
Automaton<TSequence, TElement, TElementDistribution, TSequenceManipulator, TAutomaton> | automaton | The automaton to convert to a string. |
Returns
Type | Description |
---|---|
String | The string representation of |
Type Parameters
Name | Description |
---|---|
TSequence | The type of sequences |
TElement | The type of sequence elements of |
TElementDistribution | The type of distributions over sequence elements of |
TSequenceManipulator | The type providing ways to manipulate instances of |
TAutomaton | The concrete type of |
Escape(String)
Escapes a raw string, such that potential special characters can be represented in a way that the target can handle.
Declaration
public string Escape(string rawString)
Parameters
Type | Name | Description |
---|---|---|
String | rawString | Raw generated string. |
Returns
Type | Description |
---|---|
String | An escaped string. |