mirror of
https://github.com/explosion/spaCy.git
synced 2025-06-02 04:03:19 +03:00
Change "function" to "callable" in docs
This commit is contained in:
parent
ee3fdffffb
commit
d82ae9a585
|
@ -130,7 +130,7 @@ class Language(object):
|
||||||
|
|
||||||
vocab (Vocab): A `Vocab` object. If `True`, a vocab is created via
|
vocab (Vocab): A `Vocab` object. If `True`, a vocab is created via
|
||||||
`Language.Defaults.create_vocab`.
|
`Language.Defaults.create_vocab`.
|
||||||
make_doc (function): A function that takes text and returns a `Doc`
|
make_doc (callable): A function that takes text and returns a `Doc`
|
||||||
object. Usually a `Tokenizer`.
|
object. Usually a `Tokenizer`.
|
||||||
pipeline (list): A list of annotation processes or IDs of annotation,
|
pipeline (list): A list of annotation processes or IDs of annotation,
|
||||||
processes, e.g. a `Tagger` object, or `'tagger'`. IDs are looked
|
processes, e.g. a `Tagger` object, or `'tagger'`. IDs are looked
|
||||||
|
@ -189,7 +189,7 @@ class Language(object):
|
||||||
docs (iterable): A batch of `Doc` objects.
|
docs (iterable): A batch of `Doc` objects.
|
||||||
golds (iterable): A batch of `GoldParse` objects.
|
golds (iterable): A batch of `GoldParse` objects.
|
||||||
drop (float): The droput rate.
|
drop (float): The droput rate.
|
||||||
sgd (function): An optimizer.
|
sgd (callable): An optimizer.
|
||||||
RETURNS (dict): Results from the update.
|
RETURNS (dict): Results from the update.
|
||||||
|
|
||||||
EXAMPLE:
|
EXAMPLE:
|
||||||
|
|
|
@ -130,7 +130,7 @@ class TokenVectorEncoder(object):
|
||||||
docs (iterable): A batch of `Doc` objects.
|
docs (iterable): A batch of `Doc` objects.
|
||||||
golds (iterable): A batch of `GoldParse` objects.
|
golds (iterable): A batch of `GoldParse` objects.
|
||||||
drop (float): The droput rate.
|
drop (float): The droput rate.
|
||||||
sgd (function): An optimizer.
|
sgd (callable): An optimizer.
|
||||||
RETURNS (dict): Results from the update.
|
RETURNS (dict): Results from the update.
|
||||||
"""
|
"""
|
||||||
if isinstance(docs, Doc):
|
if isinstance(docs, Doc):
|
||||||
|
|
|
@ -106,7 +106,7 @@ cdef class Vocab:
|
||||||
See also: `Lexeme.set_flag`, `Lexeme.check_flag`, `Token.set_flag`,
|
See also: `Lexeme.set_flag`, `Lexeme.check_flag`, `Token.set_flag`,
|
||||||
`Token.check_flag`.
|
`Token.check_flag`.
|
||||||
|
|
||||||
flag_getter (function): A function `f(unicode) -> bool`, to get the flag
|
flag_getter (callable): A function `f(unicode) -> bool`, to get the flag
|
||||||
value.
|
value.
|
||||||
flag_id (int): An integer between 1 and 63 (inclusive), specifying
|
flag_id (int): An integer between 1 and 63 (inclusive), specifying
|
||||||
the bit at which the flag will be stored. If -1, the lowest
|
the bit at which the flag will be stored. If -1, the lowest
|
||||||
|
|
|
@ -29,7 +29,7 @@ p Initialise a #[code Language] object.
|
||||||
|
|
||||||
+row
|
+row
|
||||||
+cell #[code make_doc]
|
+cell #[code make_doc]
|
||||||
+cell function
|
+cell callable
|
||||||
+cell
|
+cell
|
||||||
| A function that takes text and returns a #[code Doc] object.
|
| A function that takes text and returns a #[code Doc] object.
|
||||||
| Usually a #[code Tokenizer].
|
| Usually a #[code Tokenizer].
|
||||||
|
@ -111,7 +111,7 @@ p Update the models in the pipeline.
|
||||||
|
|
||||||
+row
|
+row
|
||||||
+cell #[code sgd]
|
+cell #[code sgd]
|
||||||
+cell function
|
+cell callable
|
||||||
+cell An optimizer.
|
+cell An optimizer.
|
||||||
|
|
||||||
+footrow
|
+footrow
|
||||||
|
|
|
@ -188,7 +188,7 @@ p
|
||||||
|
|
||||||
+row
|
+row
|
||||||
+cell #[code on_match]
|
+cell #[code on_match]
|
||||||
+cell function or #[code None]
|
+cell callable or #[code None]
|
||||||
+cell
|
+cell
|
||||||
| Callback function to act on matches. Takes the arguments
|
| Callback function to act on matches. Takes the arguments
|
||||||
| #[code matcher], #[code doc], #[code i] and #[code matches].
|
| #[code matcher], #[code doc], #[code i] and #[code matches].
|
||||||
|
|
Loading…
Reference in New Issue
Block a user