Commit b355fbd8 authored by Almouhannad Hafez's avatar Almouhannad Hafez

Change folder architecture

parent 4a19d3ea
This diff is collapsed.
This diff is collapsed.
......@@ -17,9 +17,7 @@
"from sklearn.utils import shuffle\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"import contractions\n",
"\n",
"from constants import CONSTANTS"
"import contractions"
]
},
{
......@@ -27,6 +25,21 @@
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"df = pd.read_csv(CONSTANTS.DATASET_PATH)"
]
......@@ -40,7 +53,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
......@@ -49,7 +62,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [
{
......@@ -122,7 +135,7 @@
"4 4 Psoriasis My nails have small dents or pits in them, and..."
]
},
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
......@@ -140,7 +153,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [
{
......@@ -207,7 +220,7 @@
"4 My nails have small dents or pits in them, and... Psoriasis"
]
},
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
......@@ -228,7 +241,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [
{
......@@ -258,7 +271,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [
{
......@@ -292,7 +305,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"outputs": [
{
......@@ -359,7 +372,7 @@
"4 I've been quite exhausted and ill. My throat h... Common Cold"
]
},
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
......@@ -379,7 +392,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [
{
......@@ -440,7 +453,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"outputs": [
{
......@@ -507,7 +520,7 @@
"4 i've been quite exhausted and ill. my throat h... common cold"
]
},
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
......@@ -528,7 +541,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [
{
......@@ -595,7 +608,7 @@
"4 i have been quite exhausted and ill. my throat... common cold"
]
},
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
......@@ -614,7 +627,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [
{
......@@ -634,7 +647,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"outputs": [],
"source": [
......
......@@ -28,9 +28,22 @@
"\n",
"from tabulate import tabulate\n",
"\n",
"import pandas as pd\n",
"\n",
"from constants import CONSTANTS"
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
......@@ -42,7 +55,7 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
......@@ -56,7 +69,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"metadata": {},
"outputs": [],
"source": [
......@@ -70,7 +83,7 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": 5,
"metadata": {},
"outputs": [],
"source": [
......@@ -98,7 +111,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": 6,
"metadata": {},
"outputs": [],
"source": [
......@@ -109,7 +122,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 7,
"metadata": {},
"outputs": [],
"source": [
......@@ -127,7 +140,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
......@@ -144,7 +157,7 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": 9,
"metadata": {},
"outputs": [],
"source": [
......@@ -170,7 +183,7 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": 10,
"metadata": {},
"outputs": [
{
......@@ -241,7 +254,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 11,
"metadata": {},
"outputs": [],
"source": [
......@@ -261,7 +274,7 @@
},
{
"cell_type": "code",
"execution_count": 11,
"execution_count": 12,
"metadata": {},
"outputs": [],
"source": [
......@@ -318,7 +331,7 @@
},
{
"cell_type": "code",
"execution_count": 12,
"execution_count": 13,
"metadata": {},
"outputs": [
{
......@@ -349,7 +362,7 @@
},
{
"cell_type": "code",
"execution_count": 13,
"execution_count": 14,
"metadata": {},
"outputs": [
{
......@@ -377,7 +390,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"outputs": [
{
......@@ -793,7 +806,7 @@
"MultinomialNB(alpha=0.1)"
]
},
"execution_count": 14,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
......@@ -806,7 +819,7 @@
},
{
"cell_type": "code",
"execution_count": 15,
"execution_count": 16,
"metadata": {},
"outputs": [
{
......@@ -844,7 +857,7 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": 17,
"metadata": {},
"outputs": [
{
......
......@@ -42,9 +42,22 @@
"\n",
"from tabulate import tabulate\n",
"\n",
"import pandas as pd\n",
"\n",
"from constants import CONSTANTS"
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
......
......@@ -30,9 +30,22 @@
"\n",
"from tabulate import tabulate\n",
"\n",
"import pandas as pd\n",
"\n",
"from constants import CONSTANTS"
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
......
......@@ -25,9 +25,22 @@
"\n",
"from tabulate import tabulate\n",
"\n",
"import pandas as pd\n",
"\n",
"from constants import CONSTANTS\n"
"import pandas as pd"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
......
......@@ -17,9 +17,22 @@
"\n",
"from ollama import Client\n",
"\n",
"import re\n",
"\n",
"from constants import CONSTANTS"
"import re"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
......
......@@ -26,9 +26,22 @@
"\n",
"import stanza\n",
"\n",
"import pickle # Module to store python objects\n",
"\n",
"from constants import CONSTANTS"
"import pickle # Module to store python objects"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
......
......@@ -27,9 +27,22 @@
"from sklearn.model_selection import train_test_split\n",
"from sklearn.metrics import accuracy_score, classification_report\n",
"\n",
"from tabulate import tabulate\n",
"\n",
"from constants import CONSTANTS"
"from tabulate import tabulate"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"import os\n",
"parent_dir = os.path.abspath('..')\n",
"sys.path.append(parent_dir)\n",
"from constants import CONSTANTS\n",
"%load_ext autoreload\n",
"%autoreload 2"
]
},
{
......
class CONSTANTS:
DATASET_PATH = 'data/Symptom2Disease.csv'
TRAIN_SET_PATH = 'data/Preprocessed_Symptom2Disease_Train.csv'
TEST_SET_PATH = 'data/Preprocessed_Symptom2Disease_Test.csv'
AUGMENTED_DATASET_PATH = 'data/augmented_Symptom2Disease.csv'
AUGMENTED_TRAIN_SET_PATH = 'data/augmented_Preprocessed_Symptom2Disease_Train.csv'
AUGMENTED_TEST_SET_PATH = 'data/augmented_Preprocessed_Symptom2Disease_Test.csv'
DATASET_PATH = '../data/Symptom2Disease.csv'
TRAIN_SET_PATH = '../data/Preprocessed_Symptom2Disease_Train.csv'
TEST_SET_PATH = '../data/Preprocessed_Symptom2Disease_Test.csv'
AUGMENTED_DATASET_PATH = '../data/augmented_Symptom2Disease.csv'
AUGMENTED_TRAIN_SET_PATH = '../data/augmented_Preprocessed_Symptom2Disease_Train.csv'
AUGMENTED_TEST_SET_PATH = '../data/augmented_Preprocessed_Symptom2Disease_Test.csv'
LEMMATIZED_TEXTS_OBJECT_PATH = 'stanza/lemmatized_texts.pkl'
DEP_PARSED_TEXTS_OBJECT_PATH = 'stanza/dep_parsed_texts.pkl'
\ No newline at end of file
LEMMATIZED_TEXTS_OBJECT_PATH = '../stanza/lemmatized_texts.pkl'
DEP_PARSED_TEXTS_OBJECT_PATH = '../stanza/dep_parsed_texts.pkl'
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment