def test1(): fst = FstMachine("abc") fst = FstMachine(["abc","fff"]) fst = FstMachine(["a","b","c","d"]) grapth = FstGraph(fst) grapth.draw("outfiles//test1")
def test4(): item1 = ["a","b","c"] item2 = [item1,item1 ] item3 = Alternate([item1,item1]) fst = FstMachine(item3) grapth = FstGraph(fst) grapth.draw("outfiles//test4")
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")
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")
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")
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")
def test7(): item1 = ["DL", StarRepetition([",","DL"]), QuestionRepetition(["or","DL"]),"DEGREE" ] fst = FstMachine(item1) grapth = FstGraph(fst) grapth.draw("outfiles//test6")