From 573e543e4aadc83e30a1f4069f3624899945e66e Mon Sep 17 00:00:00 2001 From: Ines Montani Date: Sun, 6 Oct 2019 13:30:01 +0200 Subject: [PATCH] Alphanumeric -> alphabetic [ci skip] see ines/spacy-course#38 --- spacy/lexeme.pyx | 2 +- spacy/matcher/_schemas.py | 2 +- website/docs/usage/rule-based-matching.md | 2 +- website/docs/usage/spacy-101.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/spacy/lexeme.pyx b/spacy/lexeme.pyx index 5b88e8fcc..5c981bc25 100644 --- a/spacy/lexeme.pyx +++ b/spacy/lexeme.pyx @@ -375,7 +375,7 @@ cdef class Lexeme: Lexeme.c_set_flag(self.c, IS_STOP, x) property is_alpha: - """RETURNS (bool): Whether the lexeme consists of alphanumeric + """RETURNS (bool): Whether the lexeme consists of alphabetic characters. Equivalent to `lexeme.text.isalpha()`. """ def __get__(self): diff --git a/spacy/matcher/_schemas.py b/spacy/matcher/_schemas.py index 471e2b7b5..1b10f0dd5 100644 --- a/spacy/matcher/_schemas.py +++ b/spacy/matcher/_schemas.py @@ -111,7 +111,7 @@ TOKEN_PATTERN_SCHEMA = { "$ref": "#/definitions/integer_value", }, "IS_ALPHA": { - "title": "Token consists of alphanumeric characters", + "title": "Token consists of alphabetic characters", "$ref": "#/definitions/boolean_value", }, "IS_ASCII": { diff --git a/website/docs/usage/rule-based-matching.md b/website/docs/usage/rule-based-matching.md index 9c3a43f1d..fe8e4e2d2 100644 --- a/website/docs/usage/rule-based-matching.md +++ b/website/docs/usage/rule-based-matching.md @@ -163,7 +163,7 @@ rule-based matching are: | `TEXT` 2.1 | unicode | The exact verbatim text of a token. | | `LOWER` | unicode | The lowercase form of the token text. | |  `LENGTH` | int | The length of the token text. | -|  `IS_ALPHA`, `IS_ASCII`, `IS_DIGIT` | bool | Token text consists of alphanumeric characters, ASCII characters, digits. | +|  `IS_ALPHA`, `IS_ASCII`, `IS_DIGIT` | bool | Token text consists of alphabetic characters, ASCII characters, digits. | |  `IS_LOWER`, `IS_UPPER`, `IS_TITLE` | bool | Token text is in lowercase, uppercase, titlecase. | |  `IS_PUNCT`, `IS_SPACE`, `IS_STOP` | bool | Token is punctuation, whitespace, stop word. | |  `LIKE_NUM`, `LIKE_URL`, `LIKE_EMAIL` | bool | Token text resembles a number, URL, email. | diff --git a/website/docs/usage/spacy-101.md b/website/docs/usage/spacy-101.md index 379535cf4..da56f2397 100644 --- a/website/docs/usage/spacy-101.md +++ b/website/docs/usage/spacy-101.md @@ -573,7 +573,7 @@ apple = doc[0] print("Fine-grained POS tag", apple.pos_, apple.pos) print("Coarse-grained POS tag", apple.tag_, apple.tag) print("Word shape", apple.shape_, apple.shape) -print("Alphanumeric characters?", apple.is_alpha) +print("Alphabetic characters?", apple.is_alpha) print("Punctuation mark?", apple.is_punct) billion = doc[10]