An ESA implementation in python.
Project description
Get the required resources
scp -r webis@webislab40.medien.uni-weimar.de:/home/weci2587/projects/args-topic-modeling/resources .
To run the ESA-script with all terms run:
For normal ESA:
./esa-all-terms.py --similarity cos
--matrix-path <path_to_resources>/resources/esa-plain/<debatepedia|strategic-intelligence|wikipedia>.mat
--model-path <path_to_resources>/resources/esa-w2v/GoogleNews-vectors-negative300.bin
--model-vocab <path_to_resources>/resources/esa-w2v/w2v-vocab.p
--input-path <path_to_input_file>
--output-path <path_to_output_file>
For word2vec-ESA:
./esa-all-terms.py --similarity max
--matrix-path <path_to_resources>/resources/esa-w2v/<debatepedia|strategic-intelligence|wikipedia>.mat
--model-path <path_to_resources>/resources/esa-w2v/GoogleNews-vectors-negative300.bin
--model-vocab <path_to_resources>/resources/esa-w2v/w2v-vocab.p
--input-path <path_to_input_file>
--output-path <path_to_output_file>
To run the word2vec-ESA with reduced terms run:
./esa-top-n-terms.py -n <number_of_terms>
--corpus-path <path_to_resources>/resources/corpora/<debatepedia|strategic-intelligence|wikipedia>.csv
--model-path <path_to_resources>/resources/esa-w2v/GoogleNews-vectors-negative300.bin
--model-vocab <path_to_resources>/resources/esa-w2v/w2v-vocab.p
--input-path <path_to_input_file>
--output-path <path_to_output_file>
The input document must be a csv file with "|" as the separator and must contain the column "document", which is used as the input text for the ESA.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Close
Hashes for argument_esa_model-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9c1ca324a63f30e6b743cd01e6f9f6d573f2d8c215424ce4fa2cb9b36bfdf52 |
|
MD5 | 6e377801d5fede52434f4ad5b9e1bca7 |
|
BLAKE2b-256 | e166150a403136b8c0819348b8d511cab0ca798217e6f743daf3e426ad822eaf |
Close
Hashes for argument_esa_model-0.0.9-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f88fb170e82f33d398b117fcb48f8cc0c916bec5761778aeec307ea394065b5 |
|
MD5 | 67aa2322fa0c17a5400913fc913b49aa |
|
BLAKE2b-256 | 90e9bc3a11eff68028eac1c9d68b13aa7bcb4d64385ea2a09c8ee8d0aa5bcfe9 |