snorkel-team / snorkel

A system for quickly generating training data with weak supervision
https://snorkel.org
Apache License 2.0
5.81k stars 857 forks source link

Connecting snorkel to a web app and making it work for n labels #1647

Closed JayThibs closed 3 years ago

JayThibs commented 3 years ago

Hey, I'm looking for advice on how to use snorkel in a particular way. I'd like to create a labeling function with spaCy's Matcher. Basically, I want a user to input all of the words (with the corresponding label) in a web app and send it to the Matcher. Then, match a paragraph of text inside the labeling function.

How would I go about creating a labeling function(s?) for n number of labels on the backend? Typically, we would write code >n number of labeling functions for all the labels, but I'm trying to use snorkel in a use-case where we don't know how many labels there are until the user creates them.

Is there a way around this? Basically, the Matcher would go over the input text and check how many labels are in the text and then return all the labels found.Kind of like I'm trying to get the users to use snorkel without creating the functions themselves and only input the (label, word(s)) combinations.

Is there a way to use the Matcher in such a way that there is only one labeling function and it uses the Matcher for all labels?

github-actions[bot] commented 3 years ago

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.