Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docstring for return type of educe.corpus.Reader.slurp() #4

Open
moreymat opened this issue Sep 15, 2014 · 2 comments
Open

Fix docstring for return type of educe.corpus.Reader.slurp() #4

moreymat opened this issue Sep 15, 2014 · 2 comments

Comments

@moreymat
Copy link
Contributor

The docstring for educe.corpus.Reader.slurp() states it returns a dictionary from FileId to educe.annotation.Document.
However educe.rst_dt.corpus.Reader.slurp() returns a dictionary from FileId to educe.annotation.RSTTree (as correctly described by its own docstring), which is a direct subclass of educe.annotation.Standoff.
This breaks assumptions regarding the set of methods and attributes that can be called on the returned objects.

@kowey
Copy link
Contributor

kowey commented Sep 15, 2014

Oh dear, bound to be loads of these sorts of shenanigans littered throughout the API. I miss Haskell.

@kowey
Copy link
Contributor

kowey commented Sep 16, 2014

Come to think of it, maybe the right solution here is to have a more generic Document that RSTTree should be an instance of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants