Let's not store the whole file in memory at once!
Practical DAWG application would be the following anyway:
import dawg
d = dawg.DAWG().load('words.dawg')
because DAWG minimization may require a lot of memory. import dawg
with open('/usr/share/dict/words','r') as words:
d = dawg.DAWG(w.strip() for w in words) import dawg
with open('/usr/share/dict/words','r') as f:
words = (w.strip() for w in f)
d = dawg.DAWG(words, input_is_sorted=True)