laywerrobot/lib/python3.6/site-packages/nltk/test/collections.doctest
2020-08-27 21:55:39 +02:00

20 lines
No EOL
359 B
Text

.. Copyright (C) 2001-2018 NLTK Project
.. For license information, see LICENSE.TXT
===========
Collections
===========
>>> import nltk
>>> from nltk.collections import *
Trie
----
Trie can be pickled:
>>> import pickle
>>> trie = nltk.collections.Trie(['a'])
>>> s = pickle.dumps(trie)
>>> pickle.loads(s)
{'a': {True: None}}