spaCy/spacy/tokens
Adriane Boyd a119667a36
Clean up spacy.tokens (#6046)
* Clean up spacy.tokens

* Update `set_children_from_heads`:
  * Don't check `dep` when setting lr_* or sentence starts
  * Set all non-sentence starts to `False`

* Use `set_children_from_heads` in `Token.head` setter
  * Reduce similar/duplicate code (admittedly adds a bit of overhead)
  * Update sentence starts consistently

* Remove unused `Doc.set_parse`

* Minor changes:
  * Declare cython variables (to avoid cython warnings)
  * Clean up imports

* Modify set_children_from_heads to set token range

Modify `set_children_from_heads` so that it adjust tokens within a
specified range rather then the whole document.

Modify the `Token.head` setter to adjust only the tokens affected by the
new head assignment.
2020-09-16 20:32:38 +02:00
..
__init__.pxd * Break up tokens.pyx into tokens/doc.pyx, tokens/token.pyx, tokens/spans.pyx 2015-07-13 20:20:58 +02:00
__init__.py Modify morphology to support arbitrary features (#4932) 2020-01-23 22:01:54 +01:00
_retokenize.pyx Clean up spacy.tokens (#6046) 2020-09-16 20:32:38 +02:00
_serialize.py Update docs links in codebase 2020-09-04 12:58:50 +02:00
doc.pxd Clean up spacy.tokens (#6046) 2020-09-16 20:32:38 +02:00
doc.pyx Clean up spacy.tokens (#6046) 2020-09-16 20:32:38 +02:00
morphanalysis.pxd Modify morphology to support arbitrary features (#4932) 2020-01-23 22:01:54 +01:00
morphanalysis.pyx Minor refactor for Morphology and MorphAnalysis (#5804) 2020-07-24 09:28:06 +02:00
span.pxd annotate kb_id through ents in doc 2019-03-22 11:36:44 +01:00
span.pyx Clean up spacy.tokens (#6046) 2020-09-16 20:32:38 +02:00
token.pxd Tidy up compiler flags and imports (#5071) 2020-03-02 11:48:10 +01:00
token.pyx Clean up spacy.tokens (#6046) 2020-09-16 20:32:38 +02:00
underscore.py Remove object subclassing 2020-07-12 14:03:23 +02:00