Posts

Showing posts from January 31, 2019

Is there an OR operator in spaCy's Matcher patterns?

Image
0 Using spaCy 2.x, how to extract noun phrases based on parts of speech? I want to use patterns with spaCy's Matcher but combinations are too many to create them manually. Indeed, in my logic, a noun phrase is a group of one or many tokens that: must end with a NOUN token can also contain zero, one or many ADJ, PROPN, NOUN tokens in any order before the ending NOUN token For example: NOUN ADJ NOUN NOUN ADJ ADJ NOUN NOUN Is there an "OR" operator so I could use a pattern such as the below (using an array of matching POS, for example)? matcher.add( 'NounPhrases', None, [ {'POS': ['ADJ','NOUN','PROPN'], 'OP': '*'}, {'POS': 'NOUN'} ] )

English Grammar Problem [on hold]

Image
-2 Rubber ________ from vulcanized silicones with a high molecular weight is difficult to distinguish from natural rubber. (a) is produced (b) producing (c) that produce (d) produced What's the best answer and why? Thank you. grammar share | improve this question asked yesterday Active Reddevil Active Reddevil 1 1 New contributor Active Reddevil is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Co