fa45d8aa5f
- health_checklist.json: 192.168.1.122→node122
- ocr_client.py: docstring IP→node122
- docs/market-data-requirements.md: IP→node122
- 所有API调用通过ProxyHandler({})绕过系统代理
Privoxy对node122:18003返回500,直连正常
32 lines
591 B
Plaintext
32 lines
591 B
Plaintext
.. Copyright (C) 2001-2026 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}}
|
|
|
|
LazyIteratorList
|
|
----------------
|
|
|
|
Fetching the length of a LazyIteratorList object does not throw a StopIteration exception:
|
|
|
|
>>> lil = LazyIteratorList(i for i in range(1, 11))
|
|
>>> lil[-1]
|
|
10
|
|
>>> len(lil)
|
|
10
|