Exemplo n.º 1
0
def test8():
    item1 =  ["a","b","c"] 
    item2 =   [item1,item1 ] 
    item3 =   Alternate(["a","a"]) 
    item4 =   Alternate([item3 , item3]) 
    fst = FstMachine(item4)    
    grapth = FstGraph(fst)
    grapth.draw("outfiles//test8")
Exemplo n.º 2
0
def test2():
    item1 = Alternate(["a","b","c"])
    item2 =   ["d","e",item1,"f"] 
    item3 =   Alternate([item1,"d","e"])
    item4 =   ["z","y", item3]
    fst = FstMachine(item4)    
    grapth = FstGraph(fst)
    grapth.draw("outfiles//test2")
Exemplo n.º 3
0
def test6():
    item1 = StarRepetition(["a","b","c"])
    item2 =  StarRepetition("r")
    item3 =   Alternate(["d","e"])
    item4 =   ["z","y", item1]
    item5 =   ["z","y", item2,item3]
    item6 = QuestionRepetition(  Alternate([item1, item2])) 
    fst = FstMachine(item4)    
    grapth = FstGraph(fst)
    grapth.draw("outfiles//test6")
Exemplo n.º 4
0
def test9():
    pattern1 = Alternate(["ccc","fff"])   
    pattern2 = [ "bbb", pattern1 ]
    pattern3 = [pattern2,"ggg"]
    
    pattern4 = ["bbb","ccc"]
    pattern5 = Alternate([pattern4,"bbb"]) 
    pattern6 = Alternate(["bbb",pattern4])
    pattern7 = Alternate([ ["bbb","ddd"],pattern4])
    pattern8 = ["aaa", Alternate([pattern3, pattern7 ]) ,"ddd" ]
    
    
    fst = FstMachine(pattern8)    
    grapth = FstGraph(fst)
    grapth.draw("outfiles//test9")
Exemplo n.º 5
0
def test4():
    item1 =  ["a","b","c"] 
    item2 =   [item1,item1 ] 
    item3 =   Alternate([item1,item1]) 
    fst = FstMachine(item3)    
    grapth = FstGraph(fst)
    grapth.draw("outfiles//test4")