Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Apr 19, 2021. It is now read-only.

Framework to learn Named Entity Recognition models without labelled data using weak supervision.

NotificationsYou must be signed in to change notification settings

NorskRegnesentral/weak-supervision-for-NER

Repository files navigation

BIG FAT WARNING: This codebase is now deprecated and has been replaced by our brand-newskweak framework, please check it out!

Source code associated with the paper "Named Entity Recognition without Labelled Data: a Weak Supervision Approach" accepted to ACL 2020.

Requirements:

You should first make sure that the following Python packages are installed:

  • spacy (version >= 2.2)
  • hmmlearn
  • snips-nlu-parsers
  • pandas
  • numba
  • scikit-learn

You should also install theen_core_web_sm anden_core_web_md models in Spacy.

To run the neural models inner.py, you need also needpytorch,cupy,keras andtensorflow installed.

To run the baselines, you will also need to havesnorkel installed.

Finally, you also need to download the following files and add them to thedata directory:

Quick start

You should first convert your corpus to SpacyDocBin format.

Then, to run all labelling functions on your corpus, you can simply:

import annotationsannotator = annotations.FullAnnotator().add_all()annotator.annotate_docbin('path_to_your_docbin_corpus')

You can then estimate an HMM model that aggregates all sources:

import labellinghmm = labelling.HMMAnnotator()hmm.train('path_to_your_docbin_corpus')

And run it on your corpus to get the aggregated labels:

hmm.annotate_docbin('path_to_your_docbin_corpus')

Step-by-step instructions

More detailed instructions with a step-by-step example are available in the Jupyter NotebookWeak Supervision.ipynb. Don't forget to run it using Jupyter to get the visualisation for the NER annotations.

About

Framework to learn Named Entity Recognition models without labelled data using weak supervision.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors2

  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp