mirror of
https://github.com/explosion/spaCy.git
synced 2025-08-05 21:00:19 +03:00
case fix
This commit is contained in:
parent
e636f4941b
commit
974e5f9902
|
@ -1048,6 +1048,7 @@ def _get_extra_predicates_dict(attr, value_dict, vocab, fuzzy, fuzzy_match,
|
||||||
predicate_types, extra_predicates, seen_predicates):
|
predicate_types, extra_predicates, seen_predicates):
|
||||||
output = []
|
output = []
|
||||||
for type_, value in value_dict.items():
|
for type_, value in value_dict.items():
|
||||||
|
type_ = type_.upper()
|
||||||
if type_ == 'FUZZY':
|
if type_ == 'FUZZY':
|
||||||
fuzzy_match = True # explicit fuzzy match
|
fuzzy_match = True # explicit fuzzy match
|
||||||
if isinstance(value, dict):
|
if isinstance(value, dict):
|
||||||
|
@ -1056,10 +1057,10 @@ def _get_extra_predicates_dict(attr, value_dict, vocab, fuzzy, fuzzy_match,
|
||||||
predicate_types,
|
predicate_types,
|
||||||
extra_predicates, seen_predicates))
|
extra_predicates, seen_predicates))
|
||||||
continue
|
continue
|
||||||
cls = predicate_types.get(type_.upper())
|
cls = predicate_types.get(type_)
|
||||||
if cls is None:
|
if cls is None:
|
||||||
warnings.warn(Warnings.W035.format(pattern=value_dict))
|
warnings.warn(Warnings.W035.format(pattern=value_dict))
|
||||||
# ignore unrecongized predicate type
|
# ignore unrecognized predicate type
|
||||||
continue
|
continue
|
||||||
predicate = cls(len(extra_predicates), attr, value, type_, vocab=vocab,
|
predicate = cls(len(extra_predicates), attr, value, type_, vocab=vocab,
|
||||||
fuzzy=fuzzy if fuzzy_match else 0)
|
fuzzy=fuzzy if fuzzy_match else 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user