fix documentation of 'path' in tokenizer.to_disk (#6634)

This commit is contained in:
Sofie Van Landeghem 2020-12-27 22:01:06 +01:00 committed by svlandeg
parent c7feeeb660
commit aa50aca519

View File

@ -144,7 +144,7 @@ produced are identical to `Tokenizer.__call__` except for whitespace tokens.
> ``` > ```
| Name | Type | Description | | Name | Type | Description |
| ------------| -------- | --------------------------------------------------- | | ----------- | ------- | --------------------------------------------------- |
| `string` | unicode | The string to tokenize with the debugging tokenizer | | `string` | unicode | The string to tokenize with the debugging tokenizer |
| **RETURNS** | list | A list of `(pattern_string, token_string)` tuples | | **RETURNS** | list | A list of `(pattern_string, token_string)` tuples |
@ -160,8 +160,8 @@ Serialize the tokenizer to disk.
> ``` > ```
| Name | Type | Description | | Name | Type | Description |
| --------- | ---------------- | --------------------------------------------------------------------------------------------------------------------- | | --------- | ---------------- | ---------------------------------------------------------------------------------------------------------------- |
| `path` | unicode / `Path` | A path to a directory, which will be created if it doesn't exist. Paths may be either strings or `Path`-like objects. | | `path` | unicode / `Path` | A path to a file, which will be created if it doesn't exist. Paths may be either strings or `Path`-like objects. |
| `exclude` | list | String names of [serialization fields](#serialization-fields) to exclude. | | `exclude` | list | String names of [serialization fields](#serialization-fields) to exclude. |
## Tokenizer.from_disk {#from_disk tag="method"} ## Tokenizer.from_disk {#from_disk tag="method"}
@ -219,7 +219,7 @@ it.
## Attributes {#attributes} ## Attributes {#attributes}
| Name | Type | Description | | Name | Type | Description |
| ---------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- | | ---------------- | ------- | -------------------------------------------------------------------------------------------------------------------------- |
| `vocab` | `Vocab` | The vocab object of the parent `Doc`. | | `vocab` | `Vocab` | The vocab object of the parent `Doc`. |
| `prefix_search` | - | A function to find segment boundaries from the start of a string. Returns the length of the segment, or `None`. | | `prefix_search` | - | A function to find segment boundaries from the start of a string. Returns the length of the segment, or `None`. |
| `suffix_search` | - | A function to find segment boundaries from the end of a string. Returns the length of the segment, or `None`. | | `suffix_search` | - | A function to find segment boundaries from the end of a string. Returns the length of the segment, or `None`. |