-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
62 lines (50 loc) · 1.54 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
##
#
##
SHELL:=/bin/bash
all: install embedding
clean:
rm -f embedding/*.zip
rm -f embedding/*.gz
install:
@echo installing requirements
pip install cython
pip install -r requirements.txt
update:
@echo updating requirements
pip install -U -r requirements.txt
forcedupdate:
@echo updating requirements
pip install --force-reinstall -U --upgrade-strategy eager -r requirements.txt
package:
@echo packaging lttc
@tar -czvf lttc.tar.gz \
Makefile \
README.md \
LICENSE \
requirements.txt \
lttc.py \
data.py \
modules.py \
embedding.py \
utils.py \
data/SMSSpamCollection/*/*/*.txt
packagemodels:
@echo packaging lttc default models
@tar -czvf lttc-models.tar.gz \
savedmodels/SMSSpamCollection_default
reinstall: clean install
embedding: embedding/cc.de.300.bin embedding/wiki.simple.bin
embedding/wiki.simple.bin:
@read -n 1 -e -p "Download simple wikipedia fasttext embedding? [y/n]: " answer && [ ! "$${answer}" = "y" ] && echo "skipping..." || ( \
mkdir -p embedding && cd embedding && \
wget https://dl.fbaipublicfiles.com/fasttext/vectors-wiki/wiki.simple.zip -O wiki.simple.zip && \
unzip wiki.simple.zip wiki.simple.bin && \
rm wiki.simple.zip && \
cd .. ; )
embedding/cc.de.300.bin:
@read -n 1 -e -p "Download German CC fasttext embedding? [y/n]: " answer && [ ! "$${answer}" = "y" ] && echo "skipping..." || ( \
mkdir -p embedding && cd embedding && \
wget https://dl.fbaipublicfiles.com/fasttext/vectors-crawl/cc.de.300.bin.gz -O cc.de.300.bin.gz && \
gunzip cc.de.300.bin.gz && \
cd .. ; )