- ๐ Pronouns: She/her
ttthy / ure Goto Github PK
View Code? Open in Web Editor NEWSource code for "Revisiting Unsupervised Relation Extraction" in ACL 2020
License: Other
Source code for "Revisiting Unsupervised Relation Extraction" in ACL 2020
License: Other
Hi,
I'm writing a paper related to URE. I want to use your paper EType as a comparison algorithm. But I can't run your code on GitHub right now. I tried to run the code according to the relevant tips of README, but I was very confused about the processing of data sets. I couldn't find a way to generate "nyt/train.txt (or tacred/ train.txt)" and other data files. Therefore, could you please send a more detailed operation instruction or complete data after NYT and TACRED processing? Thank you very very much!
Following "readme", I got train.txt, dev.txt, test.txt, dict.entity, dict.enttype, dict.ent_wf, dict.relation, dict.word. However, I don't know which one is the lexicon_file in the next step?
Specifically, my problem is in the following step:
We also provide the file for feature extraction
python ure/preprocessing/feature_extractor.py --input_file [file] --lexicon_file [file] --output_file [file] --threshold [occurrence threshold]
Thanks!
Hi, I'm trying to run the test phase, and got the following error. Besides that, which is the output file of the test phase and how do I interpret it? Can I get the clustered input lines (similar relations)?
Traceback (most recent call last):
File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/data/users/fmuniz/mp/ure/ure/etypeplus/main.py", line 88, in
test(model, dataset, config)
NameError: name 'test' is not defined
Hi @ttthy ,
Sorry for disturbing you. However, I wonder about using the dataset NYT-FB in your experiment. While TACRED test set provides the relation type for each sentence, I cannot find each relation type for each sentence in NYT-FB. I already got the NYT-FB dataset from Diego Marcheggiani, but most sentences are without relation type as (https://github.com/diegma/relation-autoencoder/blob/master/data-sample.txt). I wonder how to evaluate your system on NYT-FB without labels?
Thanks for your help!
I'm studying URE recently and I want to run your code. Although I have tried many methods, I can't process the date of TACRED into the format required in the code. For example, the trigger and posPatternPath in sample.txt. Could you tell me how to deal with it or send the script to me? Thanks very much.
The error infomation is as:
RuntimeError: CUDA error: CUBLAS_STATUS_EXECUTION_FAILED when calling `cublasSgemmStridedBatched( handle, opa, opb, m, n, k, &alpha, a, lda, stridea, b, ldb, strideb, &beta, c, ldc, stridec, num_batches)`
/pytorch/aten/src/ATen/native/cuda/Indexing.cu:699: indexSelectLargeIndex: block: [5,0,0], thread: [80,0,0] Assertion `srcIndex < srcSelectDimSize` failed.
Strangely, it happened after print 3 times total_loss in epoch 0. I think it may be due to the GPU memory? Therefore, I trained the 1K sample and it ran successfully without any problems. My GPU memory is 32GB. Isn't that enough?
Thanks for your help!
Hey, I am interested in your work, and I have some questions about the code.
if head_ent_id == self.vocas['entity'].unk_id:
head_ent_id = _i * 2
tail_ent_id = self.vocas['entity'].get_id(tail_ent)
if tail_ent_id == self.vocas['entity'].unk_id:
tail_ent_id = _i * 2 + 1
Hi Thy Thy,
Thanks for sharing this code!
I'm trying to the the March model. But got the error of `data/nyt/dict.features' not exist. Could you share more details about how it generated?
Besides, may I double-check the feature generation process with you? Following the README.md, I used the following commands to generate with *.lexicon and *.features for train/dev/test respectively.
python ure/preprocessing/feature_extractor.py --generate_lexicon --input_file data/nyt/train.txt --lexicon_file data/nyt/train.lexicon --output_file data/nyt/train.features --threshold 1
python ure/preprocessing/feature_extractor.py --generate_lexicon --input_file data/nyt/dev.txt.filtered --lexicon_file data/nyt/dev.lexicon --output_file data/nyt/dev.features --threshold 1
python ure/preprocessing/feature_extractor.py --generate_lexicon --input_file data/nyt/test.txt.filtered --lexicon_file data/nyt/test.lexicon --output_file data/nyt/test.features --threshold 1`
python ure/preprocessing/feature_extractor.py --input_file data/nyt/train.txt --lexicon_file data/nyt/train.lexicon --output_file data/nyt/train.features --threshold 1
python ure/preprocessing/feature_extractor.py --input_file data/nyt/dev.txt.filtered --lexicon_file data/nyt/dev.lexicon --output_file data/nyt/dev.features --threshold 1
python ure/preprocessing/feature_extractor.py --input_file data/nyt/test.txt.filtered --lexicon_file data/nyt/test.lexicon --output_file data/nyt/test.features --threshold 1
Is it the same process as you did?
Please let me if I missed something.
Much appreciated for your help!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.