GithubHelp home page GithubHelp logo

nlp_weak_supervision's Introduction

A weakly supervised NLP approach to analyzing scientific literature on climate change and critical infrastructure

We designed a method for programmatic labeling of a large corpus using weak supervision, allowing the dataset to be labeled with minimal human involvement. Programmatic labeling with weak supervision is accomplished by defining labeling functions that capture semantic similarity instead of patterns, heuristics, or rules for labeling. The labeling functions in our weak supervision method evaluate the semantic similarity between the definitions and unlabeled documents. To increase performance by making the method more robust, we construct the labeling functions for the first time utilizing multiple semantic embedding techniques. The semantic embedding models have different architectures and are pretrained on different general-purpose datasets. Therefore, a single embedding technique is not sufficient to label our climate and NCF dataset. Hence, we define multiple labeling functions using different embedding techniques to cover different aspects of the data. The weak supervision model generates the probabilistic labels by maximizing the overlap and minimizing the conflict among the multiple labeling functions using probabilistic modeling.

Requirements

  • snorkel >= 0.9.8
  • sentence_transformers >= 2.2.0
  • numpy >= 1.20.3
  • pandas >= 1.2.4

Data

The cliamte and critical infrastructure data is available under data folder in the file data_NCF_climate_all.csv

Generate label using weak supervision

Simply run the following command to generate the label for the first climate definition.

python snorkel_label0.py

nlp_weak_supervision's People

Contributors

tanwimallick avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.