Module test_data_generation::engine[][src]

Expand description

Fact

The Fact object is a representation of a character based on its context within a data entity. Facts are created during the analyze process and then later used to generate data from the algorithm.

Example

extern crate test_data_generation;

use test_data_generation::engine::Fact;

fn main() {
    //fact created for the character 'r' in the string "word"
   	let mut fact =  Fact::new('r','c',0,0,2);

    // set the char that appears after the 'r'
    fact.set_next_key('d');

    // set the char that appears before the 'r'
    fact.set_prior_key('o');
}

PatternDefinition

The PatternDefinition provides functionality to retrieve symbols that are used in defining a pattern.

Here is the list of symbols that identify a type of character:
@ = unknown [Unknonw]
C = upper case consonant [ConsonantUpper]
c = lower case consonant [ConsonantLower]
V = upper case vowel [VowelUpper]
v = lower case vowel [VowelLower]
# = numeric digit [Numeric]
~ = special regex character [RegExSpcChar]
S = white space [WhiteSpace]
p = punctuation [Punctuation]

Example

extern crate test_data_generation;

use test_data_generation::engine::PatternDefinition;

fn main() {
	let pttrn_def = PatternDefinition::new();
    println!("Upper case vowel symbol: {:?}", pttrn_def.get(&"VowelUpper".to_string()));
}

Structs

Represents a Fact for a character in a sample data entity that has been analyzed

Represents a symbolic pattern of an entity (String)

Represents the object managing all the symbols used in pattern definitions

Traits