Skip to content

Commit

Permalink
mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Mar 10, 2022
1 parent c1d9bab commit 8ff659f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scispacy/abbreviation.py
Expand Up @@ -229,7 +229,7 @@ def find_matches_for(
to_remove = set()
global_matches = self.global_matcher(doc)
for match, start, end in global_matches:
string_key = self.global_matcher.vocab.strings[match]
string_key = self.global_matcher.vocab.strings[match] # type: ignore
to_remove.add(string_key)
all_occurences[rules[string_key]].add(doc[start:end])
for key in to_remove:
Expand Down
4 changes: 3 additions & 1 deletion scispacy/hearst_patterns.py
@@ -1,3 +1,5 @@
from typing import List, Dict, Any

"""
BSD 3-Clause License
Expand Down Expand Up @@ -35,7 +37,7 @@
punct = {"IS_PUNCT": True, "OP": "?"}
det = {"ORTH": "*", "OP": "*"}

BASE_PATTERNS = [
BASE_PATTERNS: List[Dict[str, Any]] = [
# '(NP_\\w+ (, )?such as (NP_\\w+ ?(, )?(and |or )?)+)', 'first'
{
"label": "such_as",
Expand Down

0 comments on commit 8ff659f

Please sign in to comment.