Skip to content
This repository has been archived by the owner on Jun 9, 2021. It is now read-only.

Moved doc properties to logical classes #50

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dodijk
Copy link
Member

@dodijk dodijk commented Aug 7, 2018

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 dodijk requested a review from anneschuth August 7, 2018 14:33
@anneschuth
Copy link
Member

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

README.md Outdated
>>> print(pipe(sample_text))
("clean_text":'Sample text!', "language": 'en', "nwords": 2)
{'CleanText': 'Sample text!', 'NWords': 2}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually a leftover from #19.

@dodijk dodijk changed the title Moved doc properties to logical mixins Moved doc properties to logical classes Aug 10, 2018
@dodijk dodijk force-pushed the feature/38/doc-mixins branch 3 times, most recently from 922cd8c to 66c8404 Compare August 15, 2018 14:52
@dodijk dodijk added the help wanted Extra attention is needed label Aug 22, 2018
@bartdegoede
Copy link
Contributor

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants