search_query.wos.parser
Web-of-Science query parser.
Classes
|
Parser for Web-of-Science (list format) queries. |
|
Parser for Web-of-Science queries. |
- class search_query.wos.parser.WOSListParser(query_list: str, field_general: str = '', ignore_failing_linter: bool = False)
Bases:
QueryListParserParser for Web-of-Science (list format) queries.
- class search_query.wos.parser.WOSParser(query_str: str, *, field_general: str = '', offset: dict | None = None, original_str: str | None = None, silent: bool = False, ignore_failing_linter: bool = False)
Bases:
QueryStringParserParser for Web-of-Science queries.
- FIELD_REGEX = re.compile('\\b\\w{2,3}=')
- LOGIC_OPERATOR_REGEX = re.compile('\\b(AND|OR|NOT)\\b', re.IGNORECASE)
- PARENTHESIS_REGEX = re.compile('[\\(\\)]')
- PERMISSIVE_TERM_REGEX = re.compile('[^\\s\\(\\)=]+')
- PROXIMITY_OPERATOR_REGEX = re.compile('\\b(NEAR/\\d{1,2}|NEAR)\\b', re.IGNORECASE)
- QUOTED_TERM_REGEX = re.compile('\\".*?\\"')
- combine_subsequent_terms() None
Combine subsequent terms in the list of tokens.
- pattern = re.compile('\\b\\w{2,3}=|\\b(AND|OR|NOT)\\b|\\b(NEAR/\\d{1,2}|NEAR)\\b|[\\(\\)]|\\".*?\\"|[^\\s\\(\\)=]+', re.IGNORECASE)
- tokenize() None
Tokenize the query_str.