MCPcopy
hub / github.com/explosion/spaCy / get

Method get

spacy/lookups.py:109–117  ·  view source on GitHub ↗

Get the value for a given key. String keys will be hashed. key (str / int): The key to get. default: The default value to return. RETURNS: The value.

(self, key: Union[str, int], default: Optional[Any] = None)

Source from the content-addressed store, hash-verified

107 return OrderedDict.__getitem__(self, key) # type: ignore[index]
108
109 def get(self, key: Union[str, int], default: Optional[Any] = None) -> Any:
110 """Get the value for a given key. String keys will be hashed.
111
112 key (str / int): The key to get.
113 default: The default value to return.
114 RETURNS: The value.
115 """
116 key = get_string_id(key)
117 return OrderedDict.get(self, key, default) # type: ignore[arg-type]
118
119 def __contains__(self, key: Union[str, int]) -> bool: # type: ignore[override]
120 """Check whether a key is in the table. String keys will be hashed.

Callers 15

test_table_apiFunction · 0.95
build_optionsMethod · 0.45
build_extensionsMethod · 0.45
_minimal_ext_cmdFunction · 0.45
__init__Method · 0.45
configMethod · 0.45
add_factoryMethod · 0.45
add_componentMethod · 0.45
remove_pipeMethod · 0.45
__call__Method · 0.45
rehearseMethod · 0.45
initializeMethod · 0.45

Calls

no outgoing calls

Tested by 1

test_table_apiFunction · 0.76