aoldoni / tetre

TETRE: a Toolkit for Exploring Text for Relation Extraction
MIT License
76 stars 7 forks source link

Cache results from spacy using pickle #9

Closed aoldoni closed 8 years ago

aoldoni commented 8 years ago
aoldoni commented 8 years ago

Seems not possible: https://github.com/spacy-io/spaCy/search?q=pickle&type=Issues&utf8=%E2%9C%93 Seeing same error as: https://github.com/spacy-io/spaCy/issues/377

aoldoni commented 8 years ago

One way to resolve this is:

Downside is basically reimplementing the spacy structure, but in a "picklable" manner.

aoldoni commented 8 years ago

Attempted in https://github.com/aoldoni/comp9596/commit/0f23de30f552f51ac3530e4485c6f32b744805ad

aoldoni commented 8 years ago

Fixed in https://github.com/aoldoni/comp9596/commit/a32b85e4de3570537312df1f637b27274448b371 by implementing TreeNode, a new tree structure that is serializable and mimics Spacy tree structure.