spaCy icon indicating copy to clipboard operation
spaCy copied to clipboard

Feedback on the docs?

Open honnibal opened this issue 11 years ago • 23 comments

How are you finding the docs. Answers to any of the following (or other feedback you want to give) would be appreciated.

Usage Examples

http://spacy.io/#example-use

  • Did these help you understand what the library does?
  • Do you find yourself referring to these instead of the API docs? If so, is it because the examples are good, or because the API docs are bad?

API docs

http://spacy.io/docs/

  • Have you used this page?
  • Did you find what you wanted?
  • What did you think of the navigation tree? Would you prefer a flat structure?
  • Was it better or worse than traditional Sphinx-generated documentation?

Tutorials

http://spacy.io/tutorials

  • Did you find a tutorial for the functionality you're most interested in?
  • Is the tutorial code hard to understand? Do you write in a different "dialect" or style of Python than me?
  • If you could see a tutorial on one additional topic, what would it be?

honnibal avatar Sep 29 '15 04:09 honnibal

Orthogonally, I'd like to see a roadmap. If you are planning coreference resolution, for example, it would be nice to see it (right now I don't know!).

rw avatar Sep 29 '15 04:09 rw

The problem with a standard roadmap is that it's heavily influenced by new research results, and my reading of the current landscape. Some quick thoughts.

There are a number of competing concerns here:

  1. We're looking for high bang-for-buck algorithms, where the "buck" is patch weight, run time cost, memory consumption, and model size; and the "bang" is utility.

  2. No matter how low "buck" some functionality is, if it's not useful (in production), it shouldn't be supported. Nothing should be implemented just so that we can say it exists.

  3. We want a design that's pointing forwards --- one which is likely to match up well with future research developments. To use an open source metaphor: the rest of the research community is the main repository. We need to keep our branch close to trunk, so we can keep merging in their changes. This is a task of "picking winners", which involves judgment calls over current research trends. Sometimes these calls are relatively easy, for instance it's clear that designs which use joint models and neural networks are "on trend". I would say that greedy search strategies are also on trend.

So, where does that leave coreference resolution specifically? Well, none of the current system designs that I've looked at have seemed too compelling to me. The current coref data is also pretty bad. And the situation outside of English is much worse.

I'm very interested in entity centric coreference resolution,[1] tightly coupled to named entity linking. The design will resemble the Berkeley system, except that the system will bend over backwards to avoid using a database. Instead we'll try to do as much as possible in memory. If necessary we'll use mmap. But this is (slightly) novel research, which takes longer to do and is less certain than some of the other things I could be doing. And if I just keep waiting, someone else will do this research for me.

At the moment, one of the top priorities is to get KB-integrated named entity recognition working well. This has taken longer than I've wanted it to, but the key algorithms are in place in the library. But processing the KB's is fiddly, and we want to get it right from the start, particularly across languages.

Hopefully over time as spaCy builds a few more core team members, and core community contributors, more of these discussions can take place in writing, instead of only in my head.

[1] Entity centric coreference resolution means that each coreference chain should be anchored by an unambiguous reference to an entity in a knowledge base (or a "nil" reference if the entity is a member of the classes of interest, but not in the KB). Coreference chains that consist entirely of nominal references are less useful, and substantially less clear, particularly for links between two non-anaphoric nominals.

honnibal avatar Sep 29 '15 04:09 honnibal

I would prefer the website to avoid the collapsable content blocks as much as possible as I find scrolling easier than clicking. Also having more anchors such that it is easier to link to a sample or section would be great.

henningpeters avatar Sep 29 '15 06:09 henningpeters

Maybe it's just out of habit, but I find the ReadTheDocs scheme for Sphinx significantly more readable than the collapsible sections in the SpaCy docs.

The distinction between "examples" and "tutorials" may come as a surprise to some, maybe make the links to the tutorials at the end of the examples section more obvious. Also, the technical examples (i.e. for people who want to build NLP models) and the usage examples (for people who just want to use the tools in SpaCy) should be visibly distinguished to avoid confusing people who just want to use the package.

yv avatar Sep 29 '15 09:09 yv

The collapsed view interferes with searching the Docs page. For example you give sample code: for sentence in doc.sents: ... sentence.root.orth_ If I do a string search in the browser for "root" nothing shows up (unless it expand a lot of controls). I'd suggest an 'expand all' button. Or, a separate page without all the tree controls.

mschonwe avatar Sep 29 '15 14:09 mschonwe

Well we could do that...But is the design worth saving, or should we just do it differently?

There were things I liked about the collapsible tree, but in many ways I'm the worst audience for the docs, since I already know where everything is.

honnibal avatar Sep 29 '15 15:09 honnibal

I think your docs are pretty close to perfect in my view. I however wonder whether it might be a nice idea to put "If you encountered... common_bug... refer to this GitHub issue to resolve it.

Could help new people?

On Wed, Sep 30, 2015 at 4:39 AM Matthew Honnibal [email protected] wrote:

Well we could do that...But is the design worth saving, or should we just do it differently?

There were things I liked about the collapsible tree, but in many ways I'm the worst audience for the docs, since I already know where everything is.

— Reply to this email directly or view it on GitHub https://github.com/honnibal/spaCy/issues/115#issuecomment-144097475.

veb avatar Sep 29 '15 21:09 veb

Gojomo writes via Twitter

frustrating to click-to-expand things; can't browser CTRL-F to find strings in collapsed areas; hard to link to exact features

honnibal avatar Sep 30 '15 02:09 honnibal

As a quick fix I've set everything to default to open: http://spacy.io/docs/

This should allow link anchors to work, although there'll still be some weirdness if you collapse a tree and then follow a docs-internal link to it, within the same page. Javascript workarounds are likely to be ugly.

honnibal avatar Sep 30 '15 02:09 honnibal

re links between the issue tracker and docs: I think this would indicate that the information should "live" in the docs. I'd also like to improve the error handling in the library, and ensure that errors come with useful links to documentation and the issue tracker.

honnibal avatar Sep 30 '15 02:09 honnibal

Do you have a list of references anywhere? I'd like to read up on the algorithms you've implemented in Spacy.

rw avatar Oct 01 '15 07:10 rw

I agree with @yv that sphinx is the way to go. Yes it is a bit less snappy and exiting, but it has simply better features:

  • searching,
  • getting a quick overview,
  • new contributors know how to format docs,
  • and most importantly, people are not distracted by visuals, but use something they are used to.

I think moving the docs to readthedocs is the way to go. I do appreciate the efforts you put in trying to rethink the docs and I am going to go ahead and play with the examples right now.

As I am working through the docs, a few things we could change:

  • create a natural starting point for the docs. If a user now navigates to http://spacy.io/docs/ it does not have a "read next" button or something that adds a direction in the way the docs are to be read
  • the opening paragraph is too complex
  • API docs should be at the end not the start
  • It is not easy to see that to get access to the full tutorial one has to a) open http://spacy.io/docs/#tutorials b) open a collapsed view, c) click on that little reversed triangle
  • there is no page on how to install spacy in the docs
  • some of the example give errors (for instance if the corpora are not installed)
  • the reason why specific api choices are made are not explained, for instance why .orth_?

As a community we can help with the docs if you want to of course.

jdejoode avatar Oct 01 '15 08:10 jdejoode

The counterpoint is that writing the docs with Sphinx was very difficult. Restructured text is a very unfortunate markup language, and you can't easily mix it with arbitrary html.

Sphinx also doesn't work so smoothly with Cython source, so the autoclass stuff is more or less useless, because you can't use "autoclass" and then extend it with additional manually written things. At least, when I did that, i could never understand why the result looked as it did.

We can always just write search functionality if that's the key requirement.

syllog1sm avatar Oct 01 '15 09:10 syllog1sm

Or alternatively we could write html that looks like the readthedocs theme.

jdejoode avatar Oct 01 '15 09:10 jdejoode

+1 to pretty much all of that. I'll go through them when I get a chance.

syllog1sm avatar Oct 01 '15 09:10 syllog1sm

Feel free to assign me a few of the smaller things you want changed in the docs.

jdejoode avatar Oct 01 '15 09:10 jdejoode

Shouldn't this article about loading pre-trained word vectors be in the tutorial section instead of the blog section?

avisingh599 avatar Oct 22 '15 19:10 avisingh599

The docs are really impressive in many ways, but I did find a few of the points others mention coming up a fair bit.

Although I get why you did it, expanding sections can be a pain - if I were using a mouse it'd be different, but on a laptop it's more annoying and fiddly than just scrolling lots (which is easy). The impact on find is a problem too. I also got caught out with the Examples - they were excellent when I first stumbled on spaCy, but then when I came back to it I was momentarily caught out thinking I was sure there were details on a number of features I couldn't find.

The docs on a mobile (Nexus 6P) look great and are easy to get round (none of the laptop awkwardness shows up when viewing it on mobile, apart from the search of collapsed sections point). The code does go off the side of the screen, but it's easy to scroll horizontally and I don't think there's much better that could be done (since you probably wouldn't want to wrap the lines)

nmstoker avatar Feb 05 '16 01:02 nmstoker

On a computer, the docs are great. Simple, clean, and even a non-python developer like myself is able to get up and running. Probably the main reason I'm trying spaCy is the docs.

The main thing I haven't found is examples on how to break sentences down into small sub thoughts. The noun_chunks is handy, but having examples on using the token.head to find small (near-complete) sentence chunks would be neat. Actually, let me open a ticket for this.

xeoncross avatar Feb 06 '16 23:02 xeoncross

I had some trouble with the POS tag set (I'm new to NLP) since the content blocks for Annotation Specs are not defaulted to open like the API and the Tutorials sections.

... I personally find the content blocks quite nice though, except for the reason mentioned above, being that you can't search when a block is collapsed.

I think it would be helpful/convenient for the POS tags to be in a dictionary similar to the NER descriptions instead of linked out to the source code, but this seems to be addressed in issue #233. It also seems like the .dep and .dep_ properties are completely omitted from the Token class for some reason?

Really love the project though and I can see myself using it a lot :smiley:

saigelatesia avatar Feb 15 '16 02:02 saigelatesia