textpipe icon indicating copy to clipboard operation
textpipe copied to clipboard

Moved doc properties to logical classes

Open dodijk opened this issue 7 years ago • 2 comments

PR for discussion as first steps for resolving #38 and #39. I started with grouping properties into subclasses of Doc. These can be than moved to separate files and be integrated with the respective operators (not entirely sure on how we will do this yet). Feedback welcome.

dodijk avatar Aug 07 '18 14:08 dodijk

I like where you're going. But can't we be a bit more bold and move most of this directly to the operations?

anneschuth avatar Aug 07 '18 19:08 anneschuth

Why wouldn't you directly subclass a SpaCy Doc, and then organise the additions into mixins? That way you'd get a whole bunch of utility functions from the SpaCy docs for free (serializationn for example), and it would let you "compose" your Doc in the pipeline.

Added benefit of that is that you could skip some of the stuff you don't need (especially when that loads a bunch of data in memory), which would be faster and cheaper to run.

bartdegoede avatar Sep 26 '18 15:09 bartdegoede