-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added README to contrib folder for Snorkel DB backend
- Loading branch information
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Backends | ||
|
||
### Snorkel Databases | ||
This provides a generic wrapper class for using Snorkel v0.7 databases in MeTal. We make several assumptions when using this class: | ||
- The snorkel database is fully initialized (e.g., candidates, splits, probabilistic and gold labels are pre-defined). | ||
- The application is a standard unary/binary relation extraction task. | ||
- The dataset fits in local memory. | ||
|
||
Usage example: | ||
``` | ||
db_conn_str = "cdr.db" | ||
candidate_def = ['ChemicalDisease', ['chemical', 'disease']] | ||
train, dev, test = SnorkelDataset.splits(db_conn_str, candidate_def) | ||
``` |