Store
ExampleStore¶
__contains__(self, example)¶
Show source code in recon/store.py
28 29 30 31 32 33 34 35 36 37 38 | |
Check whether a string is in the store.
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
example |
Union[int, recon.types.Example] |
The example to check | required |
Returns
| Type | Description |
|---|---|
bool |
Whether the store contains the example. |
__len__(self)¶
Show source code in recon/store.py
20 21 22 23 24 25 26 | |
The number of strings in the store.
Returns
| Type | Description |
|---|---|
int |
Number of examples in store |
add(self, example)¶
Show source code in recon/store.py
40 41 42 43 44 45 46 47 | |
Add an Example to the store
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
example |
Example |
example to add | required |
from_disk(self, path)¶
Show source code in recon/store.py
49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | |
Load store from disk
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
path |
Path |
Path to file to load from | required |
Returns
| Type | Description |
|---|---|
ExampleStore |
ExampleStore: Initialized ExampleStore |
to_disk(self, path)¶
Show source code in recon/store.py
69 70 71 72 73 74 75 76 77 78 79 80 | |
Save store to disk
Parameters
| Name | Type | Description | Default |
|---|---|---|---|
path |
Path |
Path to save store to | required |