Skip to content

Official Implementation of ACL2023: Unsupervised Discontinuous Constituency Parsing with Mildly Context-Sensitive Grammars

Notifications You must be signed in to change notification settings

sustcsonglin/TN-LCFRS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TN-LCFRS

Official Implementation of ACL2023: Unsupervised Discontinuous Constituency Parsing with Mildly Context-Sensitive Grammars.

Data

For simplicity, you can download pre-processed data and also pretrained models at Google Drive

Or, you can generate the pickle files by your own using discobracket files and '''corpus_reader.py''' function

Run

Dependencies

Follow the instruction of TN-PCFG to install dependnecies. Then install triton=2.0.0 and use CUDA=11.4

Train

python train.py --conf=path/to/config

e.g.: python train.py --conf=config/tnlcfrs_de.yaml

Evaluate

python evaluate.py --load_from_dir=path/to/your/saved_dir --test_file=path/to/your/test_pickle_file

e.g.: python evaluate.py --load_from_dir=log/LCFRS_rank_full22022-11-08-00_04_02 --test_file='data/dev_nopunct_negra.pickle'

Useful command

Draw Trees

discodop treedraw --fmt=discbracket --output=svg something.txt > something.html

Contact

Feel free to contact bestsonta@gmail.com if you have any questions.

About

Official Implementation of ACL2023: Unsupervised Discontinuous Constituency Parsing with Mildly Context-Sensitive Grammars

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages