Spaces:
Sleeping
Sleeping
File size: 1,042 Bytes
fe45c80 | 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 | import os
# UI --------------------------------------------------------------------------
langs = ["es", "en"]
models = ["SVM", "NB", "LR", "SWEM", "MLP", "RNN", "LSTM"]
cwd = os.getcwd()
models_en_dir = os.path.join(cwd, "models", "en")
models_es_dir = os.path.join(cwd, "models", "es")
# Embeddings -----------------------------------------------------------------
embeddings_path = {
"es": os.path.join(models_es_dir, "embeddings.bin"),
"en": os.path.join(models_en_dir, "embeddings.bin"),
}
AVG_POOLING = "aver"
MAX_POOLING = "max"
LABEL_TO_INDEX = {"NEGATIVE": 0, "NEUTRAL": 1, "POSITIVE": 2}
INDEX_TO_LABEL = {0: "NEGATIVE", 1: "NEUTRAL", 2: "POSITIVE"}
langs_dir = {
"es": os.path.join("models", "es", "classifiers"),
"en": os.path.join("models", "en", "classifiers"),
}
models_name = {
"SVM": "svm_sentiment.pkl",
"NB": "nb_sentiment.pkl",
"LR": "lr_sentiment.pkl",
"SWEM": "swem_sentiment.pkl",
"MLP": "mlp_sentiment.pt",
"RNN": "rnn_sentiment.pt",
"LSTM": "lstm_sentiment.pt",
}
|