CODAIT / text-extensions-for-pandas

Natural language processing support for Pandas dataframes.
Apache License 2.0
217 stars 34 forks source link

Refactor TokenSpanArray base class #117

Closed BryanCutler closed 4 years ago

BryanCutler commented 4 years ago

This change makes TokenSpanArray a true subclass of SpanArray to simplify code and allow TokenSpanArray to inherit all of SpanArray attributes. Also, replacing span_util.py with mixin classes for span additions.

fixes #91

BryanCutler commented 4 years ago

@frreiss this is my shot at making TokenSpanArray a proper subclass of SpanArray - hopefully I'm not missing any major issues here. If you still prefer the current class hierarchy, then we don't have to go this route too.