repositories
/
bsc-thesis1415.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3646078
)
rc1
author
Mart Lubbers
<mart@martlubbers.net>
Wed, 11 Mar 2015 20:10:06 +0000
(21:10 +0100)
committer
Mart Lubbers
<mart@martlubbers.net>
Wed, 11 Mar 2015 20:10:06 +0000
(21:10 +0100)
program/dawg/dawg.py
patch
|
blob
|
history
diff --git
a/program/dawg/dawg.py
b/program/dawg/dawg.py
index
feefcd0
..
aad2f75
100644
(file)
--- a/
program/dawg/dawg.py
+++ b/
program/dawg/dawg.py
@@
-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')