Commit Graph

19 Commits

Author SHA1 Message Date
GolanLevy
72d7e80f94 adding a missing apostrophe (#2436) 2018-06-11 17:47:24 +02:00
Ines Montani
49cee4af92
💫 Interactive code examples, spaCy Universe and various docs improvements (#2274)
* Integrate Python kernel via Binder

* Add live model test for languages with examples

* Update docs and code examples

* Adjust margin (if not bootstrapped)

* Add binder version to global config

* Update terminal and executable code mixins

* Pass attributes through infobox and section

* Hide v-cloak

* Fix example

* Take out model comparison for now

* Add meta text for compat

* Remove chart.js dependency

* Tidy up and simplify JS and port big components over to Vue

* Remove chartjs example

* Add Twitter icon

* Add purple stylesheet option

* Add utility for hand cursor (special cases only)

* Add transition classes

* Add small option for section

* Add thumb object for small round thumbnail images

* Allow unset code block language via "none" value

(workaround to still allow unset language to default to DEFAULT_SYNTAX)

* Pass through attributes

* Add syntax highlighting definitions for Julia, R and Docker

* Add website icon

* Remove user survey from navigation

* Don't hide GitHub icon on small screens

* Make top navigation scrollable on small screens

* Remove old resources page and references to it

* Add Universe

* Add helper functions for better page URL and title

* Update site description

* Increment versions

* Update preview images

* Update mentions of resources

* Fix image

* Fix social images

* Fix problem with cover sizing and floats

* Add divider and move badges into heading

* Add docstrings

* Reference converting section

* Add section on converting word vectors

* Move converting section to custom section and fix formatting

* Remove old fastText example

* Move extensions content to own section

Keep weird ID to not break permalinks for now (we don't want to rewrite URLs if not absolutely necessary)

* Use better component example and add factories section

* Add note on larger model

* Use better example for non-vector

* Remove similarity in context section

Only works via small models with tensors so has always been kind of confusing

* Add note on init-model command

* Fix lightning tour examples and make excutable if possible

* Add spacy train CLI section to train

* Fix formatting and add video

* Fix formatting

* Fix textcat example description (resolves #2246)

* Add dummy file to try resolve conflict

* Delete dummy file

* Tidy up [ci skip]

* Ensure sufficient height of loading container

* Add loading animation to universe

* Update Thebelab build and use better startup message

* Fix asset versioning

* Fix typo [ci skip]

* Add note on project idea label
2018-04-29 02:06:46 +02:00
Matt Upson
87cc6b3599 Add missing comma to NN example in docs (#2255)
Also add a completed contributor agreement.
2018-04-28 14:56:00 +02:00
ines
a3b965b29d Remove UPPER from Matcher attributes docs (resolves #1949) 2018-02-08 11:29:27 +01:00
mpuels
e3af19a076
doc: Replace 'is not' with '!=' in code example
The function `dependency_labels_to_root(token)` defined in section *Get syntactic dependencies* does not terminate. Here is a complete example:

    import spacy
    
    nlp = spacy.load('en')
    doc = nlp("Apple and banana are similar. Pasta and hippo aren't.")
    
    def dependency_labels_to_root(token):
        """Walk up the syntactic tree, collecting the arc labels."""
        dep_labels = []
        while token.head is not token:
            dep_labels.append(token.dep)
            token = token.head
        return dep_labels
    
    dep_labels = dependency_labels_to_root(doc[1])
    dep_labels

Replacing `is not` with `!=` solves the issue:

    import spacy
    
    nlp = spacy.load('en')
    doc = nlp("Apple and banana are similar. Pasta and hippo aren't.")
    
    def dependency_labels_to_root(token):
        """Walk up the syntactic tree, collecting the arc labels."""
        dep_labels = []
        while token.head != token:
            dep_labels.append(token.dep)
            token = token.head
        return dep_labels
    
    dep_labels = dependency_labels_to_root(doc[1])
    dep_labels

The output is

    ['cc', 'nsubj']
2017-12-06 20:08:42 +01:00
mpuels
82e575ebfb
doc: Fix assert statement in Lightning Tour
Python 3 throws an error message on the original assert statement. Also, according to the Python documentation regarding the assert statement (https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement), `assert` takes at least one argument and at most two. In the two-argument form the second argument is meant as an error message to be displayed when the assertion fails. I don't think this is intended in this case.
2017-12-06 16:40:51 +01:00
mpuels
662601f01c
doc: Add missing *-operator to nlp.disable_pipes()
I'm using SpaCy version 2.0.3. If I don't use the *-operator in the example, Python throws an error message. With the operator it works fine. Also according to the documentation of the function `nlp.disable_pipes()`, it expects one or more strings as arguments and not one argument being a list of strings.
2017-12-06 15:26:43 +01:00
ines
bda6e2a816 Add training example to lightning tour 2017-11-26 18:04:18 +01:00
ines
89f8b1fba0 Update example documents 2017-11-26 18:04:04 +01:00
ines
65d66b81f1 Fix typo 2017-11-26 18:03:44 +01:00
ines
4c5d2c80d5 Re-add python -m to commands, too brittle :( (see #1536) 2017-11-10 02:30:55 +01:00
Victor Salgado
fe1d969d5f fix typos 2017-11-09 10:55:13 -02:00
ines
2ba4e4fc88 Fix broken links and add check_links shortcut script 2017-11-01 21:11:10 +01:00
ines
5dd0d6a383 Update lightning tour 2017-11-01 19:49:36 +01:00
ines
5147cdc468 Fix formatting and add missing v2 label 2017-10-29 01:18:09 +02:00
ines
4cfe259266 Fix formatting 2017-10-16 20:36:41 +02:00
ines
d383612225 Add note about word vectors in example (see #1117) 2017-10-16 20:31:58 +02:00
ines
f4ae6763b9 Fix consistency of imports from spacy.tokens in examples 2017-10-11 02:30:40 +02:00
ines
3f4fd2c5d5 Update usage documentation 2017-10-03 14:26:20 +02:00