Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
N
NLP-Project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
almohanad.hafez
NLP-Project
Commits
b355fbd8
Commit
b355fbd8
authored
Nov 22, 2024
by
Almouhannad Hafez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change folder architecture
parent
4a19d3ea
Changes
11
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1535 additions
and
1418 deletions
+1535
-1418
1.1.Dataset_Overview.ipynb
1.1.Dataset_Overview.ipynb
+0
-1354
1.1.Dataset_Overview.ipynb
1/1.1.Dataset_Overview.ipynb
+1367
-0
1.2.Data_Preprocessing.ipynb
1/1.2.Data_Preprocessing.ipynb
+32
-19
2.Stemmer.ipynb
2/2.Stemmer.ipynb
+32
-19
3.1.Lemmatizer.ipynb
3/3.1.Lemmatizer.ipynb
+16
-3
3.2.POS_Tagging_Filter.ipynb
3/3.2.POS_Tagging_Filter.ipynb
+16
-3
3.3.N-Grams.ipynb
3/3.3.N-Grams.ipynb
+16
-3
4.Data_augmentation.ipynb
4/4.Data_augmentation.ipynb
+16
-3
5.0.Process_texts_stanza.ipynb
5/5.0.Process_texts_stanza.ipynb
+16
-3
5.1.Dep_parsing_classifier.ipynb
5/5.1.Dep_parsing_classifier.ipynb
+16
-3
constants.py
constants.py
+8
-8
No files found.
1.1.Dataset_Overview.ipynb
deleted
100644 → 0
View file @
4a19d3ea
This diff is collapsed.
Click to expand it.
1/1.1.Dataset_Overview.ipynb
0 → 100644
View file @
b355fbd8
This diff is collapsed.
Click to expand it.
1.2.Data_Preprocessing.ipynb
→
1
/1
.2.Data_Preprocessing.ipynb
View file @
b355fbd8
...
@@ -17,9 +17,7 @@
...
@@ -17,9 +17,7 @@
"from sklearn.utils import shuffle\n",
"from sklearn.utils import shuffle\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.model_selection import train_test_split\n",
"\n",
"\n",
"import contractions\n",
"import contractions"
"\n",
"from constants import CONSTANTS"
]
]
},
},
{
{
...
@@ -27,6 +25,21 @@
...
@@ -27,6 +25,21 @@
"execution_count": 2,
"execution_count": 2,
"metadata": {},
"metadata": {},
"outputs": [],
"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": [
"source": [
"df = pd.read_csv(CONSTANTS.DATASET_PATH)"
"df = pd.read_csv(CONSTANTS.DATASET_PATH)"
]
]
...
@@ -40,7 +53,7 @@
...
@@ -40,7 +53,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
3
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -49,7 +62,7 @@
...
@@ -49,7 +62,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
4
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -122,7 +135,7 @@
...
@@ -122,7 +135,7 @@
"4 4 Psoriasis My nails have small dents or pits in them, and..."
"4 4 Psoriasis My nails have small dents or pits in them, and..."
]
]
},
},
"execution_count":
4
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -140,7 +153,7 @@
...
@@ -140,7 +153,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
5
,
"execution_count":
6
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -207,7 +220,7 @@
...
@@ -207,7 +220,7 @@
"4 My nails have small dents or pits in them, and... Psoriasis"
"4 My nails have small dents or pits in them, and... Psoriasis"
]
]
},
},
"execution_count":
5
,
"execution_count":
6
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -228,7 +241,7 @@
...
@@ -228,7 +241,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
6
,
"execution_count":
7
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -258,7 +271,7 @@
...
@@ -258,7 +271,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
7
,
"execution_count":
8
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -292,7 +305,7 @@
...
@@ -292,7 +305,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
8
,
"execution_count":
9
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -359,7 +372,7 @@
...
@@ -359,7 +372,7 @@
"4 I've been quite exhausted and ill. My throat h... Common Cold"
"4 I've been quite exhausted and ill. My throat h... Common Cold"
]
]
},
},
"execution_count":
8
,
"execution_count":
9
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -379,7 +392,7 @@
...
@@ -379,7 +392,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
9
,
"execution_count":
10
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -440,7 +453,7 @@
...
@@ -440,7 +453,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
0
,
"execution_count": 1
1
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -507,7 +520,7 @@
...
@@ -507,7 +520,7 @@
"4 i've been quite exhausted and ill. my throat h... common cold"
"4 i've been quite exhausted and ill. my throat h... common cold"
]
]
},
},
"execution_count": 1
0
,
"execution_count": 1
1
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -528,7 +541,7 @@
...
@@ -528,7 +541,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
1
,
"execution_count": 1
2
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -595,7 +608,7 @@
...
@@ -595,7 +608,7 @@
"4 i have been quite exhausted and ill. my throat... common cold"
"4 i have been quite exhausted and ill. my throat... common cold"
]
]
},
},
"execution_count": 1
1
,
"execution_count": 1
2
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -614,7 +627,7 @@
...
@@ -614,7 +627,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
2
,
"execution_count": 1
3
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -634,7 +647,7 @@
...
@@ -634,7 +647,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
3
,
"execution_count": 1
4
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
...
2.Stemmer.ipynb
→
2
/2
.Stemmer.ipynb
View file @
b355fbd8
...
@@ -28,9 +28,22 @@
...
@@ -28,9 +28,22 @@
"\n",
"\n",
"from tabulate import tabulate\n",
"from tabulate import tabulate\n",
"\n",
"\n",
"import pandas as pd\n",
"import pandas as pd"
"\n",
]
"from constants import CONSTANTS"
},
{
"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 @@
...
@@ -42,7 +55,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
2
,
"execution_count":
3
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -56,7 +69,7 @@
...
@@ -56,7 +69,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
3
,
"execution_count":
4
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -70,7 +83,7 @@
...
@@ -70,7 +83,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
4
,
"execution_count":
5
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -98,7 +111,7 @@
...
@@ -98,7 +111,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
5
,
"execution_count":
6
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -109,7 +122,7 @@
...
@@ -109,7 +122,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
6
,
"execution_count":
7
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -127,7 +140,7 @@
...
@@ -127,7 +140,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
7
,
"execution_count":
8
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -144,7 +157,7 @@
...
@@ -144,7 +157,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
8
,
"execution_count":
9
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -170,7 +183,7 @@
...
@@ -170,7 +183,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count":
9
,
"execution_count":
10
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -241,7 +254,7 @@
...
@@ -241,7 +254,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
0
,
"execution_count": 1
1
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -261,7 +274,7 @@
...
@@ -261,7 +274,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
1
,
"execution_count": 1
2
,
"metadata": {},
"metadata": {},
"outputs": [],
"outputs": [],
"source": [
"source": [
...
@@ -318,7 +331,7 @@
...
@@ -318,7 +331,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
2
,
"execution_count": 1
3
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -349,7 +362,7 @@
...
@@ -349,7 +362,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
3
,
"execution_count": 1
4
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -377,7 +390,7 @@
...
@@ -377,7 +390,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
4
,
"execution_count": 1
5
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -793,7 +806,7 @@
...
@@ -793,7 +806,7 @@
"MultinomialNB(alpha=0.1)"
"MultinomialNB(alpha=0.1)"
]
]
},
},
"execution_count": 1
4
,
"execution_count": 1
5
,
"metadata": {},
"metadata": {},
"output_type": "execute_result"
"output_type": "execute_result"
}
}
...
@@ -806,7 +819,7 @@
...
@@ -806,7 +819,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
5
,
"execution_count": 1
6
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
@@ -844,7 +857,7 @@
...
@@ -844,7 +857,7 @@
},
},
{
{
"cell_type": "code",
"cell_type": "code",
"execution_count": 1
6
,
"execution_count": 1
7
,
"metadata": {},
"metadata": {},
"outputs": [
"outputs": [
{
{
...
...
3.1.Lemmatizer.ipynb
→
3
/3
.1.Lemmatizer.ipynb
View file @
b355fbd8
...
@@ -42,9 +42,22 @@
...
@@ -42,9 +42,22 @@
"\n",
"\n",
"from tabulate import tabulate\n",
"from tabulate import tabulate\n",
"\n",
"\n",
"import pandas as pd\n",
"import pandas as pd"
"\n",
]
"from constants import CONSTANTS"
},
{
"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"
]
]
},
},
{
{
...
...
3.2.POS_Tagging_Filter.ipynb
→
3
/3
.2.POS_Tagging_Filter.ipynb
View file @
b355fbd8
...
@@ -30,9 +30,22 @@
...
@@ -30,9 +30,22 @@
"\n",
"\n",
"from tabulate import tabulate\n",
"from tabulate import tabulate\n",
"\n",
"\n",
"import pandas as pd\n",
"import pandas as pd"
"\n",
]
"from constants import CONSTANTS"
},
{
"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"
]
]
},
},
{
{
...
...
3.3.N-Grams.ipynb
→
3
/3
.3.N-Grams.ipynb
View file @
b355fbd8
...
@@ -25,9 +25,22 @@
...
@@ -25,9 +25,22 @@
"\n",
"\n",
"from tabulate import tabulate\n",
"from tabulate import tabulate\n",
"\n",
"\n",
"import pandas as pd\n",
"import pandas as pd"
"\n",
]
"from constants import CONSTANTS\n"
},
{
"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"
]
]
},
},
{
{
...
...
4.Data_augmentation.ipynb
→
4
/4
.Data_augmentation.ipynb
View file @
b355fbd8
...
@@ -17,9 +17,22 @@
...
@@ -17,9 +17,22 @@
"\n",
"\n",
"from ollama import Client\n",
"from ollama import Client\n",
"\n",
"\n",
"import re\n",
"import re"
"\n",
]
"from constants import CONSTANTS"
},
{
"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"
]
]
},
},
{
{
...
...
5.0.Process_texts_stanza.ipynb
→
5
/5
.0.Process_texts_stanza.ipynb
View file @
b355fbd8
...
@@ -26,9 +26,22 @@
...
@@ -26,9 +26,22 @@
"\n",
"\n",
"import stanza\n",
"import stanza\n",
"\n",
"\n",
"import pickle # Module to store python objects\n",
"import pickle # Module to store python objects"
"\n",
]
"from constants import CONSTANTS"
},
{
"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"
]
]
},
},
{
{
...
...
5.1.Dep_parsing_classifier.ipynb
→
5
/5
.1.Dep_parsing_classifier.ipynb
View file @
b355fbd8
...
@@ -27,9 +27,22 @@
...
@@ -27,9 +27,22 @@
"from sklearn.model_selection import train_test_split\n",
"from sklearn.model_selection import train_test_split\n",
"from sklearn.metrics import accuracy_score, classification_report\n",
"from sklearn.metrics import accuracy_score, classification_report\n",
"\n",
"\n",
"from tabulate import tabulate\n",
"from tabulate import tabulate"
"\n",
]
"from constants import CONSTANTS"
},
{
"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"
]
]
},
},
{
{
...
...
constants.py
View file @
b355fbd8
class
CONSTANTS
:
class
CONSTANTS
:
DATASET_PATH
=
'data/Symptom2Disease.csv'
DATASET_PATH
=
'
../
data/Symptom2Disease.csv'
TRAIN_SET_PATH
=
'data/Preprocessed_Symptom2Disease_Train.csv'
TRAIN_SET_PATH
=
'
../
data/Preprocessed_Symptom2Disease_Train.csv'
TEST_SET_PATH
=
'data/Preprocessed_Symptom2Disease_Test.csv'
TEST_SET_PATH
=
'
../
data/Preprocessed_Symptom2Disease_Test.csv'
AUGMENTED_DATASET_PATH
=
'data/augmented_Symptom2Disease.csv'
AUGMENTED_DATASET_PATH
=
'
../
data/augmented_Symptom2Disease.csv'
AUGMENTED_TRAIN_SET_PATH
=
'data/augmented_Preprocessed_Symptom2Disease_Train.csv'
AUGMENTED_TRAIN_SET_PATH
=
'
../
data/augmented_Preprocessed_Symptom2Disease_Train.csv'
AUGMENTED_TEST_SET_PATH
=
'data/augmented_Preprocessed_Symptom2Disease_Test.csv'
AUGMENTED_TEST_SET_PATH
=
'
../
data/augmented_Preprocessed_Symptom2Disease_Test.csv'
LEMMATIZED_TEXTS_OBJECT_PATH
=
'stanza/lemmatized_texts.pkl'
LEMMATIZED_TEXTS_OBJECT_PATH
=
'../stanza/lemmatized_texts.pkl'
DEP_PARSED_TEXTS_OBJECT_PATH
=
'stanza/dep_parsed_texts.pkl'
DEP_PARSED_TEXTS_OBJECT_PATH
=
'../stanza/dep_parsed_texts.pkl'
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment