From a3b965b29d56fe9b2cd64d11f65db93ab7b2f988 Mon Sep 17 00:00:00 2001 From: ines Date: Thu, 8 Feb 2018 11:29:27 +0100 Subject: [PATCH] Remove UPPER from Matcher attributes docs (resolves #1949) --- .../usage/_linguistic-features/_rule-based-matching.jade | 8 ++++---- website/usage/_spacy-101/_lightning-tour.jade | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/website/usage/_linguistic-features/_rule-based-matching.jade b/website/usage/_linguistic-features/_rule-based-matching.jade index ea50ec7b3..7872b668f 100644 --- a/website/usage/_linguistic-features/_rule-based-matching.jade +++ b/website/usage/_linguistic-features/_rule-based-matching.jade @@ -88,8 +88,8 @@ p +cell The exact verbatim text of a token. +row - +cell.u-nowrap #[code LOWER], #[code UPPER] - +cell The lowercase, uppercase form of the token text. + +cell.u-nowrap #[code LOWER] + +cell The lowercase form of the token text. +row +cell.u-nowrap #[code IS_ALPHA], #[code IS_ASCII], #[code IS_DIGIT] @@ -222,8 +222,8 @@ p doc.ents += ((EVENT, start, end),) matcher.add('GoogleIO', add_event_ent, - [{'ORTH': 'Google'}, {'UPPER': 'I'}, {'ORTH': '/'}, {'UPPER': 'O'}], - [{'ORTH': 'Google'}, {'UPPER': 'I'}, {'ORTH': '/'}, {'UPPER': 'O'}, {'IS_DIGIT': True}]) + [{'ORTH': 'Google'}, {'ORTH': 'I'}, {'ORTH': '/'}, {'ORTH': 'O'}], + [{'ORTH': 'Google'}, {'ORTH': 'I'}, {'ORTH': '/'}, {'ORTH': 'O'}, {'IS_DIGIT': True}]) p | In addition to mentions of "Google I/O", your data also contains some diff --git a/website/usage/_spacy-101/_lightning-tour.jade b/website/usage/_spacy-101/_lightning-tour.jade index 96f274002..dc0808eea 100644 --- a/website/usage/_spacy-101/_lightning-tour.jade +++ b/website/usage/_spacy-101/_lightning-tour.jade @@ -231,7 +231,7 @@ p def set_sentiment(matcher, doc, i, matches): doc.sentiment += 0.1 - pattern1 = [{'ORTH': 'Google'}, {'UPPER': 'I'}, {'ORTH': '/'}, {'UPPER': 'O'}] + pattern1 = [{'ORTH': 'Google'}, {'ORTH': 'I'}, {'ORTH': '/'}, {'ORTH': 'O'}] pattern2 = [[{'ORTH': emoji, 'OP': '+'}] for emoji in ['😀', '😂', '🤣', '😍']] matcher.add('GoogleIO', None, pattern1) # match "Google I/O" or "Google i/o" matcher.add('HAPPY', set_sentiment, *pattern2) # match one or more happy emoji