rc1
authorMart Lubbers <mart@martlubbers.net>
Wed, 11 Mar 2015 20:10:06 +0000 (21:10 +0100)
committerMart Lubbers <mart@martlubbers.net>
Wed, 11 Mar 2015 20:10:06 +0000 (21:10 +0100)
program/dawg/dawg.py

index feefcd0..aad2f75 100644 (file)
@@ -98,11 +98,3 @@ class DAWG:
             for letter, state in transitions.items():
                 s += '{} -> {} [label="{}"]\n'.format(node, state, letter)
         return s + '}\n'
-
-
-if __name__ == '__main__':
-    d = DAWG()
-    d.add_words(['abd', 'bad', 'bae'])
-#    d.add_words(['abcde', 'fghde', 'fghdghde'])
-    print repr(d.common_prefix('', d.v0))
-    print d.to_dot(options='rankdir=LR')