Skip to content

ChristophAlt/fewrel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Few-Shot Relation Extraction with AllenNLP

The repo contains additional functionality, not implemented in AllenNLP, for few-shot relation extraction / relation classification.

  • Dataset reader for FewRel dataset
  • N-way K-shot iterator, creating batches according to the few-shot scenario
  • Few-shot relation classifier, configurable via jsonnet files (see experiments/config/ for examples)
  • Relative offset embeddings (required for non-sequential models, i.e. CNN)
  • Additional models for few-shot classification
    • Prototypicial Network

Setup

$ pip install -r requirements.txt

Run experiment

$ allennlp train --include-package fewrel experiments/configs/baseline.jsonnet -s <RESULT DIR>

References

Releases

No releases published

Packages

No packages published

Languages