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 Distribution
Close
Hashes for sklearn_esa-0.0.9.linux-x86_64.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | af36de217288338dc2141abac4e09a52386ddd76e233d963cb918248574977ba |
|
MD5 | 38bbc2f8bfffb51bab79e6d58fb4d11a |
|
BLAKE2b-256 | 509aaee51ed3c53fc0e85976290997f7691e3b2ea68790625c26a29c487354f6 |
Close
Hashes for sklearn_esa-0.0.9-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 513bc3613557e69771afc8012177d19a69582d685f53174ea5d5c76d418a49db |
|
MD5 | b2dd5cbad82bfbec69fb32098e185227 |
|
BLAKE2b-256 | 89df2a9e2d5e57a0788b978f90352f22ebb5b3a04c9411fdf92120c0f3b5ec2d |