Change "function" to "callable" in docs

This commit is contained in:
ines 2017-05-21 13:17:40 +02:00
parent ee3fdffffb
commit d82ae9a585
5 changed files with 7 additions and 7 deletions

View File

@ -130,7 +130,7 @@ class Language(object):
vocab (Vocab): A `Vocab` object. If `True`, a vocab is created via
`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`.
pipeline (list): A list of annotation processes or IDs of annotation,
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.
golds (iterable): A batch of `GoldParse` objects.
drop (float): The droput rate.
sgd (function): An optimizer.
sgd (callable): An optimizer.
RETURNS (dict): Results from the update.
EXAMPLE:

View File

@ -130,7 +130,7 @@ class TokenVectorEncoder(object):
docs (iterable): A batch of `Doc` objects.
golds (iterable): A batch of `GoldParse` objects.
drop (float): The droput rate.
sgd (function): An optimizer.
sgd (callable): An optimizer.
RETURNS (dict): Results from the update.
"""
if isinstance(docs, Doc):

View File

@ -106,7 +106,7 @@ cdef class Vocab:
See also: `Lexeme.set_flag`, `Lexeme.check_flag`, `Token.set_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.
flag_id (int): An integer between 1 and 63 (inclusive), specifying
the bit at which the flag will be stored. If -1, the lowest

View File

@ -29,7 +29,7 @@ p Initialise a #[code Language] object.
+row
+cell #[code make_doc]
+cell function
+cell callable
+cell
| A function that takes text and returns a #[code Doc] object.
| Usually a #[code Tokenizer].
@ -111,7 +111,7 @@ p Update the models in the pipeline.
+row
+cell #[code sgd]
+cell function
+cell callable
+cell An optimizer.
+footrow

View File

@ -188,7 +188,7 @@ p
+row
+cell #[code on_match]
+cell function or #[code None]
+cell callable or #[code None]
+cell
| Callback function to act on matches. Takes the arguments
| #[code matcher], #[code doc], #[code i] and #[code matches].