447e3500868def45ec6750cfff2e6b7e57634da9,src/textacy/extract.py,,matches,#,339
Before Change
elif all(isinstance(item, (list, tuple)) for item in patterns):
pass // already in the right format!
else:
raise TypeError(
"patterns={} is invalid; values must be one of {}".format(
patterns, {"str", "List[str]", "List[dict]", "List[list[dict]]"}
)
)
else:
raise TypeError(
"patterns={} is invalid; values must be one of {}".format(
patterns, {"str", "List[str]", "List[dict]", "List[list[dict]]"}
After Change
)
)
else:
raise TypeError(
errors.type_invalid_msg(
"patterns",
type(patterns),
Union[str, List[str], List[Dict[str, str]], List[List[Dict[str, str]]]]
)
)
matcher = Matcher(doc.vocab)
matcher.add("match", on_match, *patterns)
for _, start, end in matcher(doc):
yield doc[start:end]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: chartbeat-labs/textacy
Commit Name: 447e3500868def45ec6750cfff2e6b7e57634da9
Time: 2020-08-16
Author: burtdewilde@gmail.com
File Name: src/textacy/extract.py
Class Name:
Method Name: matches
Project Name: chartbeat-labs/textacy
Commit Name: c369dea462f62b61a586c69953d99daea454a3e3
Time: 2020-08-16
Author: burtdewilde@gmail.com
File Name: src/textacy/spacier/doc_extensions.py
Class Name:
Method Name: to_terms_list
Project Name: chartbeat-labs/textacy
Commit Name: 41416dec1bc3ec7d8bf163842591d1a356830f8c
Time: 2019-05-09
Author: burtdewilde@gmail.com
File Name: textacy/corpus.py
Class Name: Corpus
Method Name: __delitem__