mirror of
https://github.com/explosion/spaCy.git
synced 2025-11-05 18:37:27 +03:00
Add official support for the `DependencyMatcher`. Redesign the pattern
specification. Fix and extend operator implementations. Update API docs
and add usage docs.
Patterns
--------
Refactor pattern structure to:
```
{
"LEFT_ID": str,
"REL_OP": str,
"RIGHT_ID": str,
"RIGHT_ATTRS": dict,
}
```
The first node contains only `RIGHT_ID` and `RIGHT_ATTRS` and all
subsequent nodes contain all four keys.
New operators
-------------
Because of the way patterns are constructed from left to right, it's
helpful to have `follows` operators along with `precedes` operators. Add
operators for simple precedes / follows alongside immediate precedes /
follows.
* `.*`: precedes
* `;`: immediately follows
* `;*`: follows
Operator fixes
--------------
* `<` and `<<` do not include the node itself
* Fix reversed order for all operators involving linear precedence (`.`,
all sibling operators)
* Linear precedence operators do not match nodes outside the same parse
Additional fixes
----------------
* Use v3 Matcher API
* Support `get` and `remove`
* Support pickling
|
||
|---|---|---|
| .. | ||
| architectures.md | ||
| attributeruler.md | ||
| cli.md | ||
| corpus.md | ||
| cython-classes.md | ||
| cython-structs.md | ||
| cython.md | ||
| data-formats.md | ||
| dependencymatcher.md | ||
| dependencyparser.md | ||
| doc.md | ||
| docbin.md | ||
| entitylinker.md | ||
| entityrecognizer.md | ||
| entityruler.md | ||
| example.md | ||
| index.md | ||
| kb.md | ||
| language.md | ||
| lemmatizer.md | ||
| lexeme.md | ||
| lookups.md | ||
| matcher.md | ||
| morphologizer.md | ||
| morphology.md | ||
| phrasematcher.md | ||
| pipe.md | ||
| pipeline-functions.md | ||
| scorer.md | ||
| sentencerecognizer.md | ||
| sentencizer.md | ||
| span.md | ||
| stringstore.md | ||
| tagger.md | ||
| textcategorizer.md | ||
| tok2vec.md | ||
| token.md | ||
| tokenizer.md | ||
| top-level.md | ||
| transformer.md | ||
| vectors.md | ||
| vocab.md | ||