Update docs for Token.morph / Token.set_morph
@@ -172,6 +172,25 @@ Get a neighboring token.
| `i` | The relative position of the token to get. Defaults to `1`. ~~int~~ |
| **RETURNS** | The token at position `self.doc[self.i+i]`. ~~Token~~ |
+## Token.set_morph {#set_morph tag="method"}
+
+Set the morphological analysis from a UD FEATS string, hash value of a UD FEATS
+string, features dict or `MorphAnalysis`. The value `None` can be used to reset
+the morph to an unset state.
+
+> #### Example
+>
+> ```python
+> doc = nlp("Give it back! He pleaded.")
+> doc[0].set_morph("Mood=Imp|VerbForm=Fin")
+> assert "Mood=Imp" in doc[0].morph
+> assert doc[0].morph.get("Mood") == ["Imp"]
+> ```
+
+| Name | Description |
+| -------- | --------------------------------------------------------------------------------- |
+| features | The morphological features to set. ~~Union[int, dict, str, MorphAnalysis, None]~~ |
+
## Token.is_ancestor {#is_ancestor tag="method" model="parser"}
Check whether this token is a parent, grandparent, etc. of another in the
@@ -393,7 +412,7 @@ The L2 norm of the token's vector representation.
## Attributes {#attributes}
| Name | Description |
-| -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| -------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `doc` | The parent document. ~~Doc~~ |
| `lex` <Tag variant="new">3</Tag> | The underlying lexeme. ~~Lexeme~~ |
| `sent` <Tag variant="new">2.0.12</Tag> | The sentence span that this token is a part of. ~~Span~~ |
@@ -451,7 +470,6 @@ The L2 norm of the token's vector representation.
| `tag` | Fine-grained part-of-speech. ~~int~~ |
| `tag_` | Fine-grained part-of-speech. ~~str~~ |
| `morph` <Tag variant="new">3</Tag> | Morphological analysis. ~~MorphAnalysis~~ |
-| `morph_` <Tag variant="new">3</Tag> | Morphological analysis in the Universal Dependencies [FEATS](https://universaldependencies.org/format.html#morphological-annotation) format. ~~str~~ |
| `dep` | Syntactic dependency relation. ~~int~~ |
| `dep_` | Syntactic dependency relation. ~~str~~ |
| `lang` | Language of the parent document's vocabulary. ~~int~~ |
