All Projects → wangxinyu0922 → Second_order_sdp

wangxinyu0922 / Second_order_sdp

Licence: apache-2.0
Second-Order Semantic Dependency Parsing with End-to-End Neural Networks

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Second order sdp

Nlp Papers With Arxiv
Statistics and accepted paper list of NLP conferences with arXiv link
Stars: ✭ 345 (+1400%)
Mutual labels:  acl
Laravel Acl
This package helps you to associate users with permissions and permission groups with laravel framework
Stars: ✭ 404 (+1656.52%)
Mutual labels:  acl
Awesome Relation Extraction
📖 A curated list of awesome resources dedicated to Relation Extraction, one of the most important tasks in Natural Language Processing (NLP).
Stars: ✭ 656 (+2752.17%)
Mutual labels:  acl
Nlp Conference Compendium
Compendium of the resources available from top NLP conferences.
Stars: ✭ 349 (+1417.39%)
Mutual labels:  acl
Vue Acl
Access Control List plugin for VueJS 2.0
Stars: ✭ 376 (+1534.78%)
Mutual labels:  acl
Aclight
A script for advanced discovery of Privileged Accounts - includes Shadow Admins
Stars: ✭ 536 (+2230.43%)
Mutual labels:  acl
Security Acl
Symfony Security ACL Component
Stars: ✭ 321 (+1295.65%)
Mutual labels:  acl
Acl4ssr
SSR 去广告ACL规则/SS完整GFWList规则/Clash规则碎片,Telegram频道订阅地址
Stars: ✭ 6,960 (+30160.87%)
Mutual labels:  acl
Defender
Roles & Permissions for Laravel 8 / 7 / 6 / 5
Stars: ✭ 403 (+1652.17%)
Mutual labels:  acl
Pycasbin
An authorization library that supports access control models like ACL, RBAC, ABAC in Python
Stars: ✭ 625 (+2617.39%)
Mutual labels:  acl
Permissionmanager
Admin interface for managing users, roles, permissions, using Backpack CRUD
Stars: ✭ 363 (+1478.26%)
Mutual labels:  acl
Casbin Rs
An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
Stars: ✭ 375 (+1530.43%)
Mutual labels:  acl
Casbin.net
An authorization library that supports access control models like ACL, RBAC, ABAC in .NET (C#)
Stars: ✭ 535 (+2226.09%)
Mutual labels:  acl
Vokuro
Sample application for Phalcon Framework (Acl, Auth, Security)
Stars: ✭ 350 (+1421.74%)
Mutual labels:  acl
Hmq
High performance mqtt broker
Stars: ✭ 722 (+3039.13%)
Mutual labels:  acl
Zoonavigator
Web-based ZooKeeper UI / editor / browser
Stars: ✭ 326 (+1317.39%)
Mutual labels:  acl
Chn Iplist
Chnroutes rules for routers、Shadowrocket、Quantumult、Kitsunebi、acl、BifrostV、v2rayNG、v2rayN、clash、pac、Qv2ray、v2ray config file.
Stars: ✭ 469 (+1939.13%)
Mutual labels:  acl
Ngx Permissions
Permission and roles based access control for your angular(angular 2,4,5,6,7,9+) applications(AOT, lazy modules compatible
Stars: ✭ 749 (+3156.52%)
Mutual labels:  acl
Incubator
Incubator adapters/functionality for the Phalcon PHP Framework
Stars: ✭ 734 (+3091.3%)
Mutual labels:  acl
Blinksocks
A framework for building composable proxy protocol stack.
Stars: ✭ 587 (+2452.17%)
Mutual labels:  acl

Second Order SDP

Second Order Parser for Semantic Dependency Parsing

This repo contains the code forked from Parser-v3 and used for the semantic dependency parser in Wang et al. (2019), Second-Order Semantic Dependency Parsing with End-to-End Neural Networks and CoNLL 2019 shared task (SDP part only).

News

The PyTorch Version for the Second-Order SDP parser is now available at MultilangStructureKD!

Requirements

python3
tensorflow-gpu>=1.12.0

How to use

Training

Our second order parser can be trained by simply running

python3 -u main.py train GraphParserNetwork --config_file config/sec_order.cfg --noscreen

This config file will run Mean Field Variational Inference for second order parts, and if you want to run with Loopy Belief Propagation, run

python3 -u main.py train GraphParserNetwork --config_file config/sec_order_LBP.cfg --noscreen

Training with Bert Embedding

Our second order parser can be trained with bert. First clone the bert repository:

git clone https://github.com/google-research/bert

Download bert model: BERT-Large, Uncased (Whole Word Masking)

To train with bert, simply run

python3 -u main.py train GraphParserNetwork --config_file config_gen/bert_large_glove_previous_layer_100linear_01lr_5decay_dm_switch_new1.cfg --noscreen

If you want to fine tune bert model, set is_training=True in BertVocab

Parsing

A trained model can be run by calling

python3 main.py --save_dir $SAVEDIR run $DATADIR --output_dir results 

The parsed result will be saved results/ directory. The $SAVEDIR is the directory of the model, for example, if you trained with config/sec_order.cfg, the model will be saved in saves/SemEval15/DM/MF_dm_3iter. The $DATADIR is the directory of the data in CONLLU format.

Pretrained Model

The pretrained model on DM can be download from the following links:

Baidu Netdisk, Password: ecqe

Google Drive

The model is trained with Bert and Glove embeddings considering there are no golden POS tags and lemmas in practice, the Labeled F1 score is 94.25 and 90.76 for in-domain and out-of-domain respectively.

OOM issue

To avoid out of memory in training phase, our parser should be trained with 12GB gpu memory, and no longer than 60 words for each sentence. The number of iterations for mean field variational inference is at most 3 and at most 2 for loopy belief propagation in a 12GB Titan X gpu. If you have a larger gpu, such as Tesla P40 24GB, loopy belief propation can be also trained with 3 iterations. To set the number of iterations, set num_iteration in SecondOrderGraphIndexVocab or SecondOrderGraphLBPVocab of the config file. Another way is reduce the training batch_size in CoNLLUTrainset of the config file.

Details

If you want to see some details of our parser, the source code for our parser is in parser/structs/vocabs/second_order_vocab.py for Mean Field Variational Inference and second_order_LBP_vocab.py for Loopy Belief Propagation in the same directory.

Cite

If you find our code is useful, please cite:

@inproceedings{wang-etal-2019-second,
    title = "Second-Order Semantic Dependency Parsing with End-to-End Neural Networks",
    author = "Wang, Xinyu  and
      Huang, Jingxian  and
      Tu, Kewei",
    booktitle = "Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics",
    month = jul,
    year = "2019",
    address = "Florence, Italy",
    publisher = "Association for Computational Linguistics",
    url = "https://www.aclweb.org/anthology/P19-1454",
    pages = "4609--4618",}
@inproceedings{Wan:Liu:Jia:19,
  author = {Wang, Xinyu and Liu, Yixian and Jia, Zixia
            and Jiang, Chengyue and Tu, Kewei},
  title = {{ShanghaiTech} at {MRP}~2019:
           {S}equence-to-Graph Transduction with Second-Order Edge Inference
           for Cross-Framework Meaning Representation Parsing},
  booktitle = CONLL:19:U,
  address = L:CONLL:19,
  pages = {\pages{--}{55}{65}},
  year = 2019
}

Contact

If you have any questions, feel free to contact with me through email.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].