├── backend ├── data │ ├── .gitkeep │ ├── model.pkl │ ├── label_encoder.pkl │ └── stopwords.txt ├── blood_report_analyzer │ ├── __init__.py │ ├── main.py │ ├── ocr.py │ └── analyzer.py ├── nutrition_need_calculator │ ├── .gitkeep │ ├── diseases.py │ └── need_calculator.py ├── requirements.txt ├── workout_routine_recommender │ ├── .gitkeep │ ├── model.pkl │ ├── label_encoder.pkl │ └── recommender.py ├── application.properties ├── config.py ├── main.py ├── Dockerfile ├── medic │ └── main.py ├── routes │ └── main.py └── diet_plan_recommender │ ├── main.py │ └── stopwords.txt ├── frontend ├── fitness-web_old │ ├── src │ │ ├── App.css │ │ ├── index.css │ │ ├── setupTests.js │ │ ├── App.test.js │ │ ├── index.js │ │ ├── reportWebVitals.js │ │ ├── Components │ │ │ ├── Footer.css │ │ │ ├── results.css │ │ │ ├── profile.js │ │ │ ├── header.js │ │ │ ├── about.js │ │ │ ├── Header.css │ │ │ ├── footer.js │ │ │ ├── login.css │ │ │ ├── profile.css │ │ │ ├── about.css │ │ │ ├── results.js │ │ │ ├── homePage.css │ │ │ ├── login.js │ │ │ ├── signUp.js │ │ │ ├── homePage.js │ │ │ └── styles.css │ │ ├── App.js │ │ └── logo.svg │ ├── public │ │ ├── robots.txt │ │ ├── favicon.ico │ │ ├── logo192.png │ │ ├── logo512.png │ │ ├── manifest.json │ │ └── index.html │ ├── .gitignore │ ├── package.json │ └── README.md ├── README.md ├── package.json ├── Dockerfile ├── package-lock.json └── LICENSE ├── ml ├── exercise │ ├── model.pkl │ ├── label_encoder.pkl │ ├── test_model.ipynb │ ├── test.py │ └── workout_routine_recommender.ipynb ├── diet_plan_recommender │ ├── saved_model.pkl │ ├── recent_activity.csv │ ├── main.py │ ├── model_exploration.ipynb │ ├── user_Profiles.csv │ └── stopwords.txt └── blood report parsing │ └── test_ocr.py ├── docker-compose.yml ├── .gitignore ├── .github └── FUNDING.yml ├── README.md └── LICENSE /backend/data/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/App.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/index.css: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/blood_report_analyzer/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/nutrition_need_calculator/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /backend/requirements.txt: -------------------------------------------------------------------------------- 1 | fastapi==0.68.1 -------------------------------------------------------------------------------- /backend/workout_routine_recommender/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/README.md: -------------------------------------------------------------------------------- 1 | # FitnessWeb 2 | this is creating for fitness web page using react js 3 | -------------------------------------------------------------------------------- /frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "axios": "^1.6.0" 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /ml/exercise/model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/ml/exercise/model.pkl -------------------------------------------------------------------------------- /backend/data/model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/backend/data/model.pkl -------------------------------------------------------------------------------- /ml/exercise/label_encoder.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/ml/exercise/label_encoder.pkl -------------------------------------------------------------------------------- /backend/data/label_encoder.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/backend/data/label_encoder.pkl -------------------------------------------------------------------------------- /ml/diet_plan_recommender/saved_model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/ml/diet_plan_recommender/saved_model.pkl -------------------------------------------------------------------------------- /frontend/fitness-web_old/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/frontend/fitness-web_old/public/favicon.ico -------------------------------------------------------------------------------- /frontend/fitness-web_old/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/frontend/fitness-web_old/public/logo192.png -------------------------------------------------------------------------------- /frontend/fitness-web_old/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/frontend/fitness-web_old/public/logo512.png -------------------------------------------------------------------------------- /backend/workout_routine_recommender/model.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/backend/workout_routine_recommender/model.pkl -------------------------------------------------------------------------------- /backend/workout_routine_recommender/label_encoder.pkl: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/dilshankarunarathne/personalized-fitness-recommender-system/HEAD/backend/workout_routine_recommender/label_encoder.pkl -------------------------------------------------------------------------------- /backend/application.properties: -------------------------------------------------------------------------------- 1 | [data] 2 | dataset = backend/data/dataset.csv 3 | stopwords = backend/data/stopwords.txt 4 | 5 | [model] 6 | label_encoder = backend/data/label_encoder.pkl 7 | model = backend/data/model.pkl 8 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | services: 3 | frontend: 4 | build: ./frontend 5 | ports: 6 | - '3000:3000' 7 | depends_on: 8 | - backend 9 | backend: 10 | build: ./backend 11 | ports: 12 | - '8000:8000' -------------------------------------------------------------------------------- /backend/nutrition_need_calculator/diseases.py: -------------------------------------------------------------------------------- 1 | def get_diseases(blood_sugar_level, bmi): 2 | diseases = [] 3 | if blood_sugar_level is not None and blood_sugar_level > 140: 4 | diseases.append('diabeties') 5 | if bmi > 25: 6 | diseases.append('obesity') 7 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/App.test.js: -------------------------------------------------------------------------------- 1 | import { render, screen } from '@testing-library/react'; 2 | import App from './App'; 3 | 4 | test('renders learn react link', () => { 5 | render(); 6 | const linkElement = screen.getByText(/learn react/i); 7 | expect(linkElement).toBeInTheDocument(); 8 | }); 9 | -------------------------------------------------------------------------------- /backend/config.py: -------------------------------------------------------------------------------- 1 | import configparser 2 | 3 | config = configparser.RawConfigParser() 4 | config.read('backend/application.properties') 5 | 6 | 7 | def get(section: str, key: str): 8 | return config[section][key] 9 | 10 | # TODO remove this 11 | # print(config.sections()) 12 | # print(get('data', 'dataset')) 13 | -------------------------------------------------------------------------------- /backend/main.py: -------------------------------------------------------------------------------- 1 | from fastapi import FastAPI 2 | from fastapi.middleware.cors import CORSMiddleware 3 | 4 | from backend.routes import main 5 | 6 | app = FastAPI() 7 | 8 | app.add_middleware( 9 | CORSMiddleware, 10 | allow_origins=["*"], 11 | allow_credentials=True, 12 | allow_methods=["*"], 13 | allow_headers=["*"], 14 | ) 15 | 16 | app.include_router(main.router) 17 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import { BrowserRouter as Router } from 'react-router-dom'; 4 | import App from './App'; 5 | import './index.css'; 6 | 7 | ReactDOM.render( 8 | 9 | 10 | 11 | 12 | , 13 | document.getElementById('root') 14 | ); 15 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/reportWebVitals.js: -------------------------------------------------------------------------------- 1 | const reportWebVitals = onPerfEntry => { 2 | if (onPerfEntry && onPerfEntry instanceof Function) { 3 | import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { 4 | getCLS(onPerfEntry); 5 | getFID(onPerfEntry); 6 | getFCP(onPerfEntry); 7 | getLCP(onPerfEntry); 8 | getTTFB(onPerfEntry); 9 | }); 10 | } 11 | }; 12 | 13 | export default reportWebVitals; 14 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | node_modules 8 | 9 | # testing 10 | /coverage 11 | 12 | # production 13 | /build 14 | 15 | # misc 16 | .DS_Store 17 | .env.local 18 | .env.development.local 19 | .env.test.local 20 | .env.production.local 21 | 22 | npm-debug.log* 23 | yarn-debug.log* 24 | yarn-error.log* 25 | -------------------------------------------------------------------------------- /backend/blood_report_analyzer/main.py: -------------------------------------------------------------------------------- 1 | from backend.blood_report_analyzer.analyzer import process_sugar_report_text 2 | from backend.blood_report_analyzer.ocr import ocr_img_base64 3 | 4 | 5 | def analyze_blood_sugar_report(report_img_data): 6 | # TODO read base64 str image data 7 | # convert to text using ocr module 8 | img_txt = ocr_img_base64(report_img_data) 9 | 10 | # process text using analyzer module 11 | blood_sugar_level = process_sugar_report_text(img_txt) 12 | 13 | return blood_sugar_level 14 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /frontend/Dockerfile: -------------------------------------------------------------------------------- 1 | # Front-end Dockerfile 2 | # Use an official Node runtime as the base image 3 | FROM node:18 4 | 5 | # Set the working directory in the container to /app 6 | WORKDIR /fitness-web 7 | 8 | # Copy package.json and package-lock.json into the directory 9 | COPY package*.json ./ 10 | 11 | # Install any needed packages specified in package.json 12 | RUN npm install 13 | 14 | # Bundle app source inside Docker image (by copying from your local directory) 15 | COPY . . 16 | 17 | # Make port 3000 available to the world outside this container 18 | EXPOSE 3000 19 | 20 | # Run the app when the container launches 21 | CMD ["npm", "start"] -------------------------------------------------------------------------------- /backend/Dockerfile: -------------------------------------------------------------------------------- 1 | # Back-end Dockerfile 2 | # Use an official Python runtime as the base image 3 | FROM python:3.11 4 | 5 | # Set the working directory in the container to /app 6 | WORKDIR /app 7 | 8 | # Copy requirements.txt into the directory 9 | COPY requirements.txt ./ 10 | 11 | # Install any needed packages specified in requirements.txt 12 | RUN pip install --no-cache-dir -r requirements.txt 13 | 14 | # Bundle app source inside Docker image (by copying from your local directory) 15 | COPY . . 16 | 17 | # Make port 8000 available to the world outside this container 18 | EXPOSE 8000 19 | 20 | # Run the app when the container launches 21 | CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"] -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | !.mvn/wrapper/maven-wrapper.jar 3 | !**/src/main/**/target/ 4 | !**/src/test/**/target/ 5 | 6 | frontend/node_modules/ 7 | frontend/fitness-web/node_modules/ 8 | 9 | .idea 10 | .mvn 11 | 12 | ### IntelliJ IDEA ### 13 | .idea/modules.xml 14 | .idea/jarRepositories.xml 15 | .idea/compiler.xml 16 | .idea/libraries/ 17 | *.iws 18 | *.iml 19 | *.ipr 20 | 21 | ### Eclipse ### 22 | .apt_generated 23 | .classpath 24 | .factorypath 25 | .project 26 | .settings 27 | .springBeans 28 | .sts4-cache 29 | 30 | ### NetBeans ### 31 | /nbproject/private/ 32 | /nbbuild/ 33 | /dist/ 34 | /nbdist/ 35 | /.nb-gradle/ 36 | build/ 37 | !**/src/main/**/build/ 38 | !**/src/test/**/build/ 39 | 40 | ### VS Code ### 41 | .vscode/ 42 | 43 | ### Mac OS ### 44 | .DS_Store 45 | *.jpg 46 | *.pyc 47 | -------------------------------------------------------------------------------- /ml/exercise/test_model.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": null, 6 | "outputs": [], 7 | "source": [], 8 | "metadata": { 9 | "collapsed": false 10 | }, 11 | "id": "6bc7c40627a15755" 12 | } 13 | ], 14 | "metadata": { 15 | "kernelspec": { 16 | "display_name": "Python 3", 17 | "language": "python", 18 | "name": "python3" 19 | }, 20 | "language_info": { 21 | "codemirror_mode": { 22 | "name": "ipython", 23 | "version": 2 24 | }, 25 | "file_extension": ".py", 26 | "mimetype": "text/x-python", 27 | "name": "python", 28 | "nbconvert_exporter": "python", 29 | "pygments_lexer": "ipython2", 30 | "version": "2.7.6" 31 | } 32 | }, 33 | "nbformat": 4, 34 | "nbformat_minor": 5 35 | } 36 | -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] 4 | patreon: # Replace with a single Patreon username 5 | open_collective: # Replace with a single Open Collective username 6 | ko_fi: 'dilshankarunarathne' 7 | tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel 8 | community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry 9 | liberapay: # Replace with a single Liberapay username 10 | issuehunt: # Replace with a single IssueHunt username 11 | otechie: # Replace with a single Otechie username 12 | lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry 13 | custom: ['https://www.buymeacoffee.com/wmdilshan'] 14 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "fitness-web", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^5.17.0", 7 | "@testing-library/react": "^13.4.0", 8 | "@testing-library/user-event": "^13.5.0", 9 | "react": "^18.2.0", 10 | "react-auth-kit": "^3.0.0-alpha.34", 11 | "react-dom": "^18.2.0", 12 | "react-router-dom": "^5.3.4", 13 | "react-scripts": "5.0.1", 14 | "web-vitals": "^2.1.4" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": [ 24 | "react-app", 25 | "react-app/jest" 26 | ] 27 | }, 28 | "browserslist": { 29 | "production": [ 30 | ">0.2%", 31 | "not dead", 32 | "not op_mini all" 33 | ], 34 | "development": [ 35 | "last 1 chrome version", 36 | "last 1 firefox version", 37 | "last 1 safari version" 38 | ] 39 | }, 40 | "devDependencies": { 41 | "daisyui": "^3.9.4" 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/Footer.css: -------------------------------------------------------------------------------- 1 | /* Footer.css */ 2 | 3 | .bg-footer { 4 | background-color: #01d28e; 5 | color: #fff; 6 | 7 | text-align: center; 8 | } 9 | 10 | .footer-row { 11 | display: flex; 12 | justify-content: space-between; /* Display titles side by side with space in between */ 13 | background-color: #01d28e; 14 | } 15 | 16 | .tag { 17 | padding: 20px; 18 | background-color: #01d28e; /* Add padding around each title group */ 19 | } 20 | 21 | .footer-title { 22 | font-weight: bold; 23 | font-size: 20px; 24 | margin-bottom: 10px; 25 | background-color: #01d28e; 26 | color: #fff; 27 | } 28 | 29 | .link { 30 | display: block; 31 | text-decoration: none; 32 | color: #fff; 33 | 34 | background-color: #01d28e; 35 | } 36 | 37 | .link:hover { 38 | color: #FA7D19; 39 | } 40 | 41 | .text-center { 42 | text-align: center; 43 | background-color: #333; 44 | color: #fff; 45 | padding: 10px 0; 46 | 47 | } 48 | #bot{ 49 | background-color: #333; 50 | } 51 | #Se{ 52 | padding-left:5% ; 53 | } 54 | #Le{ 55 | padding-right: 5%; 56 | } 57 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/App.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Route, BrowserRouter as Router, Switch } from 'react-router-dom'; 3 | 4 | import About from './Components/about'; 5 | import Home from './Components/homePage'; 6 | import Profile from './Components/profile'; 7 | import Results from './Components/results'; 8 | //TODO these import also required for auth 9 | // import { AuthProvider } from 'react-auth-kit' 10 | // import RouteComponent from './routes'; 11 | 12 | function App() { 13 | //TODO when connecting api use these commentd block to authentication 14 | // 18 | // 19 | // 20 | return ( 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | ); 31 | } 32 | 33 | export default App; 34 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/results.css: -------------------------------------------------------------------------------- 1 | /* src/components/Home/Home.css */ 2 | 3 | .banner-container { 4 | background-color: rgb(255, 255, 255); 5 | background-repeat: no-repeat; 6 | background-position: center; 7 | background-size: cover; 8 | min-height: 60vh; 9 | height: 90vh; 10 | display: flex; 11 | justify-content: center; 12 | background-blend-mode: overlay; 13 | align-items: center; 14 | text-align: center; 15 | } 16 | .text-center{ 17 | background:white; 18 | } 19 | .text{ 20 | color: black; 21 | } 22 | #tx1,#tx2{ 23 | color: black; 24 | 25 | } 26 | 27 | /* styles.css */ 28 | 29 | /* Center the containers horizontally and vertically */ 30 | 31 | 32 | /* Style for the outer container */ 33 | .container { 34 | display: flex; 35 | } 36 | 37 | /* Style for the centered containers */ 38 | .centered-container { 39 | background-color: #f0f0f0; 40 | padding: 20px; 41 | border: 1px solid #ccc; 42 | margin: 10px; 43 | height: 600px; 44 | width: 800px; 45 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); 46 | 47 | } 48 | .textb input{ 49 | text-align: start; 50 | width: 100%; 51 | height: 100px; 52 | } 53 | 54 | 55 | 56 | 57 | 58 | 59 | -------------------------------------------------------------------------------- /backend/blood_report_analyzer/ocr.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import pytesseract 3 | import numpy as np 4 | import base64 5 | 6 | # from backend.config import get 7 | 8 | tessdata_dir_config = '--tessdata-dir "C:\\Program Files\\Tesseract-OCR\\tessdata"' 9 | pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe" 10 | 11 | # tessdata_dir_config = get('tesseract', 'dir') 12 | # pytesseract.pytesseract.tesseract_cmd = get('tesseract', 'cmd') 13 | 14 | 15 | def ocr_img(img_path) -> str: 16 | img = cv2.imread(img_path) 17 | gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) 18 | text = pytesseract.image_to_string(gray) 19 | return text.lower() 20 | 21 | 22 | def ocr_img_base64(img_data: str) -> str: 23 | # Decode the base64 string into bytes 24 | img_bytes = base64.b64decode(img_data) 25 | 26 | # Convert the bytes to a numpy array 27 | nparr = np.frombuffer(img_bytes, np.uint8) 28 | 29 | # Convert numpy array to image 30 | img = cv2.imdecode(nparr, cv2.IMREAD_COLOR) 31 | 32 | # Convert the image to grayscale 33 | gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) 34 | 35 | # Perform OCR on the grayscale image 36 | text = pytesseract.image_to_string(gray) 37 | 38 | return text.lower() 39 | -------------------------------------------------------------------------------- /backend/medic/main.py: -------------------------------------------------------------------------------- 1 | """ 2 | BMI Calculator 3 | -------------- 4 | This module contains the functions to calculate the BMI of a patient. 5 | 6 | Functions 7 | --------- 8 | calculate_bmi(weight, height) 9 | Calculates the BMI of a patient. 10 | """ 11 | 12 | 13 | def calculate_dream_weight(weight, bmi): 14 | """Calculates the dream weight of a patient. 15 | 16 | Parameters 17 | ---------- 18 | weight : int 19 | The weight of the patient in kilograms. 20 | bmi : float 21 | The BMI of the patient. 22 | 23 | Returns 24 | ------- 25 | int 26 | The dream weight of the patient. 27 | """ 28 | 29 | if bmi > 25: 30 | return weight * 0.95 31 | elif bmi < 18.5: 32 | return weight * 1.1 33 | else: 34 | return weight 35 | 36 | 37 | def calculate_bmi(weight, height): 38 | """Calculates the BMI of a patient. 39 | 40 | Parameters 41 | ---------- 42 | weight : int 43 | The weight of the patient in kilograms. 44 | height : int 45 | The height of the patient in centimeters. 46 | 47 | Returns 48 | ------- 49 | float 50 | The BMI of the patient. 51 | """ 52 | return weight / ((height / 100) ** 2) 53 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/profile.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import "./about.css"; 3 | import Header from "./header"; 4 | import Footer from "./footer"; 5 | 6 | const Profile = () => { 7 | const [mail] = useState("contact@yourwebsite.com"); 8 | const [name] = useState("Nidarshana"); 9 | return ( 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |

Profile

18 |

19 |
20 |

21 |
22 |

Email

23 |

24 |

{mail}

25 |
26 |

27 |
28 |

Name

29 |

30 |

{name}

31 |
32 |
33 |

34 |
35 | 36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 | ); 45 | }; 46 | 47 | export default Profile; 48 | -------------------------------------------------------------------------------- /backend/workout_routine_recommender/recommender.py: -------------------------------------------------------------------------------- 1 | import joblib 2 | import pandas as pd 3 | 4 | from backend.config import get 5 | 6 | model_path = get('model', 'model') 7 | label_encoder_path = get('model', 'label_encoder') 8 | 9 | # Define the categorical and numerical features 10 | cat_features = ['Gender'] 11 | num_features = ['Dream Weight', 'Actual Weight', 'Age', 'BMI'] 12 | 13 | # Load the model 14 | loaded_model = joblib.load(model_path) 15 | 16 | # Load the LabelEncoder 17 | loaded_le = joblib.load(label_encoder_path) 18 | 19 | 20 | def predict_workout_plan( 21 | gender: str, # 'Male' / 'Female' 22 | age: int, 23 | actual_weight: int, 24 | dream_weight: int, 25 | bmi: float 26 | ) -> str: 27 | # Define a new observation as a DataFrame 28 | # Replace 'Male' with the actual encoded value for the gender 29 | # data = ['Male', 25, 70, 45, 29] 30 | new_observation = pd.DataFrame([[gender, age, actual_weight, dream_weight, bmi]], 31 | # Gender, Age, Actual Weight, Dream Weight, BMI 32 | columns=cat_features + num_features) 33 | 34 | # Use the model to predict the exercise and intensity 35 | exercise_encoded, intensity, duration = loaded_model.predict(new_observation)[0] 36 | 37 | # Decode 'Exercise' back to its original form 38 | exercise = loaded_le.inverse_transform([int(exercise_encoded)])[0] 39 | 40 | return f"Predicted Exercise: {exercise}, Intensity: {intensity}, Duration: {duration}" 41 | -------------------------------------------------------------------------------- /ml/diet_plan_recommender/recent_activity.csv: -------------------------------------------------------------------------------- 1 | User_Id,Meal_Id,Rated,Liked,Searched,Purchased,Timestamp 2 | User_19,meal_id3,1,0,0,0,2020-03-01 12:03:24 3 | User_69,meal_id7,0,1,0,0,2020-03-04 00:20:24 4 | User_20,meal_id9,1,0,0,1,2020-03-05 14:31:10 5 | User_96,meal_id10,0,0,1,1,2020-03-05 22:33:26 6 | User_63,meal_id20,0,0,1,1,2020-03-07 06:42:30 7 | User_63,meal_id21,0,1,0,1,2020-03-07 14:44:46 8 | User_91,meal_id28,0,1,0,1,2020-03-09 10:57:14 9 | User_31,meal_id29,1,0,0,1,2020-03-09 16:58:56 10 | User_25,meal_id30,0,0,1,0,2020-03-10 01:01:12 11 | User_89,meal_id24,1,0,0,1,2020-03-12 21:20:28 12 | User_29,meal_id34,0,0,1,1,2020-03-17 11:51:38 13 | User_37,meal_id43,1,0,0,1,2020-03-17 17:53:20 14 | User_70,meal_id46,0,0,1,0,2020-03-18 07:57:18 15 | User_72,meal_id47,1,0,0,1,2020-03-18 13:59:00 16 | User_25,meal_id50,1,0,0,1,2020-03-18 20:00:42 17 | User_49,meal_id51,0,1,0,0,2020-03-19 16:06:22 18 | User_94,meal_id6,0,0,1,0,2020-03-21 04:16:34 19 | User_26,meal_id53,1,0,0,1,2020-03-21 12:18:50 20 | User_81,meal_id17,0,0,1,1,2020-03-21 18:20:32 21 | User_28,meal_id18,0,1,0,1,2020-03-21 20:21:06 22 | User_63,meal_id19,0,1,0,1,2020-03-22 20:27:54 23 | User_74,meal_id57,0,1,0,1,2020-03-23 10:31:52 24 | User_46,meal_id58,0,0,1,1,2020-03-23 12:32:26 25 | User_70,meal_id59,0,0,1,1,2020-03-23 20:34:42 26 | User_55,meal_id66,0,0,1,1,2020-03-25 06:44:20 27 | User_36,meal_id33,0,1,0,1,2020-03-26 04:50:34 28 | User_82,meal_id70,0,1,0,1,2020-03-26 10:52:16 29 | User_91,meal_id71,1,0,0,1,2020-03-28 03:03:36 30 | User_97,meal_id73,0,0,1,1,2020-03-29 03:10:24 31 | User_48,meal_id74,1,0,0,1,2020-03-29 05:10:58 32 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/header.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import './Header.css'; 4 | 5 | const Header = () => { 6 | const [active, setActive] = useState('nav__menu'); 7 | const [toggleIcon, setToggleIcon] = useState('nav__toggler'); 8 | 9 | const navToggle = () => { 10 | active === 'nav__menu' 11 | ? setActive('nav__menu nav__active') 12 | : setActive('nav__menu'); 13 | 14 | toggleIcon === 'nav__toggler' 15 | ? setToggleIcon('nav__toggler toggle') 16 | : setToggleIcon('nav__toggler'); 17 | }; 18 | 19 | return ( 20 | 51 | ); 52 | }; 53 | 54 | export default Header; 55 | -------------------------------------------------------------------------------- /backend/nutrition_need_calculator/need_calculator.py: -------------------------------------------------------------------------------- 1 | def calculate_caloric_needs(weight_kg, age_years, height_cm, gender): 2 | """ 3 | Calculate the Basal Metabolic Rate (BMR) using the Harris-Benedict Equation. 4 | This function assumes the user is moderately active. 5 | 6 | Parameters: 7 | weight_kg (float): Weight in kilograms 8 | age_years (int): Age in years 9 | height_cm (float): Height in centimeters 10 | gender (str): Gender of the user ("male" or "female") 11 | 12 | Returns: 13 | float: Estimated daily caloric needs 14 | """ 15 | 16 | # Harris-Benedict Equation 17 | if gender == "male": 18 | bmr = 88.362 + (13.397 * weight_kg) + (4.799 * height_cm) - (5.677 * age_years) 19 | else: 20 | bmr = 447.593 + (9.247 * weight_kg) + (3.098 * height_cm) - (4.330 * age_years) 21 | 22 | # Assuming moderate activity level 23 | return bmr * 1.55 24 | 25 | 26 | def get_dietary_need( 27 | weight_kg: int, height_cm: int, age: int, gender: str 28 | ): 29 | # Calculate caloric needs 30 | daily_calories = calculate_caloric_needs(weight_kg, age, height_cm, gender) 31 | 32 | # Dietary plan 33 | plan = "Based on your input, your estimated daily caloric needs are approximately {:.0f} calories.".format(daily_calories) 34 | plan += "A balanced diet for you might include:" 35 | plan += "- Carbohydrates: {:.0f}% of daily calories".format(daily_calories * 0.55 / 4) 36 | plan += "- Proteins: {:.0f} grams".format(weight_kg * 1.2) # Assuming 1.2g per kg of body weight 37 | plan += "- Fats: {:.0f} grams".format(daily_calories * 0.25 / 9) # 25% of daily calories from fats 38 | 39 | return plan 40 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/about.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './about.css'; 3 | import Header from './header'; 4 | import Footer from './footer'; 5 | 6 | 7 | const HomePage = () => { 8 | 9 | return ( 10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |

About Us

18 |

19 |

We are a team of dedicated individuals passionate about health and fitness. Our mission is to provide personalized fitness recommendations to help you achieve your wellness goals.

20 |

Founded in 2023, we have been working on creating a Personalized Fitness Recommender System that leverages the power of machine learning to offer tailored workout and diet plans to our users.

21 |
22 |

23 |
24 |

Our Mission

25 |

26 |

We are committed to helping you on your wellness journey. Our Personalized Fitness Recommender System is designed to create tailored workout and diet plans that fit your unique needs, motivating you to achieve your fitness goals.

27 |
28 |

29 |
30 |

Contact Us

31 |

32 |

If you have any questions or feedback, please don't hesitate to reach out to us. You can contact us at contact@yourwebsite.com.

33 |
34 |
35 | 36 | 37 |
38 |
39 |
40 |
41 |
42 | ); 43 | } 44 | 45 | export default HomePage; 46 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/Header.css: -------------------------------------------------------------------------------- 1 | *,*::after, *::before{ 2 | margin: 0; 3 | box-sizing: border-box; 4 | } 5 | html{ 6 | font-size: 62.5%; 7 | } 8 | body{ 9 | font-size: 1.6rem; 10 | } 11 | li{ 12 | list-style: none; 13 | } 14 | a{ 15 | text-decoration: none; 16 | color: white; 17 | } 18 | 19 | .nav{ 20 | display: flex; 21 | align-items: center; 22 | justify-content: space-around; 23 | height: 12vh; 24 | background:#01d28e ; 25 | } 26 | .nav__brand{ 27 | text-transform: uppercase; 28 | font-weight: bold; 29 | } 30 | .nav__menu{ 31 | display: flex; 32 | align-items: center; 33 | justify-content: space-around; 34 | gap: 3rem; 35 | } 36 | .nav__toggler div{ 37 | width: 2.5rem; 38 | height: 0.2rem; 39 | margin: 0.4rem; 40 | background: #fff; 41 | transition: 0.4s ease-in; 42 | } 43 | .nav__toggler{ 44 | cursor: pointer; 45 | display: none; 46 | } 47 | 48 | .close__button{ 49 | position: absolute; 50 | top: 0; 51 | right: 5; 52 | color: #fff; 53 | cursor: pointer; 54 | 55 | } 56 | 57 | @media screen and (max-width: 768px){ 58 | .nav__toggler{ 59 | display: block; 60 | } 61 | .nav__menu{ 62 | position: fixed; 63 | top:5.5vh; 64 | right: 0; 65 | width: 50%; 66 | height: 93vh; 67 | background:#01d28e ; 68 | flex-direction: column; 69 | transform: translateX(100%); 70 | 71 | } 72 | } 73 | /*nav acive class*/ 74 | .nav__active{ 75 | transform: translateX(0); 76 | transition: 2 ease; 77 | } 78 | /*Toggler Icon Animation */ 79 | .toggle.line1{ 80 | transform: rotate(-45deg) translate(-4px, 5px); 81 | } 82 | .toggle.line2{ 83 | opacity: 0; 84 | } 85 | .toggle.line3{ 86 | transform: rotate(45deg) translate(-4px, 5px); 87 | } 88 | 89 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 12 | 13 | 17 | 18 | 27 | React App 28 | 29 | 30 | 31 |
32 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/footer.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import './Footer.css'; 3 | 4 | const Footer = () => { 5 | return ( 6 |
7 | 37 |
38 |

Copyright © 2023 - All rights reserved by Fitness Web

39 |
40 |
41 | ); 42 | }; 43 | 44 | export default Footer; 45 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/login.css: -------------------------------------------------------------------------------- 1 | .app { 2 | font-family: sans-serif; 3 | display: flex; 4 | align-items: center; 5 | justify-content: center; 6 | flex-direction: column; 7 | gap: 20px; 8 | height: 100vh; 9 | font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif; 10 | background-color: #fff; 11 | } 12 | /*style for signup*/ 13 | input[type="text"], 14 | input[type="password"] { 15 | height: 25px; 16 | border: 1px solid rgba(0, 0, 0, 0.2); 17 | } 18 | 19 | input[type="submit"] { 20 | margin-top: 10px; 21 | cursor: pointer; 22 | font-size: 15px; 23 | background: #01d28e; 24 | border: 1px solid #01d28e; 25 | color: #fff; 26 | padding: 10px 20px; 27 | } 28 | 29 | input[type="submit"]:hover { 30 | background: #6cf0c2; 31 | } 32 | 33 | .button-container { 34 | display: flex; 35 | justify-content: center; 36 | padding: 20px; 37 | } 38 | 39 | .login-form { 40 | background-color: #f0f0f0; 41 | padding: 2rem; 42 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 43 | width: 60vw; 44 | height: auto; 45 | text-align: center; 46 | } 47 | 48 | .form { 49 | width: 80%; 50 | display: inline-block; 51 | align-content: center; 52 | margin: 0 auto; 53 | } 54 | 55 | .list-container { 56 | display: flex; 57 | } 58 | 59 | .formBox { 60 | margin: 0 auto; 61 | height: auto; 62 | } 63 | 64 | .error { 65 | color: red; 66 | font-size: 12px; 67 | } 68 | 69 | form { 70 | display: inline-block; 71 | display:flex; 72 | flex-direction: column; 73 | } 74 | 75 | .title { 76 | font-size: 45px; 77 | margin-bottom: 20px; 78 | } 79 | 80 | .input-container { 81 | gap: 8px; 82 | margin: 20px; 83 | padding-top: 20px; 84 | width: 80%; 85 | margin: 0 auto; 86 | align-self: center; 87 | } 88 | .rap { 89 | display: flex; 90 | flex-direction: column; 91 | justify-content: center; 92 | align-items: center; 93 | height: 400px; 94 | width: 100%; 95 | } 96 | .hed { 97 | padding: 1px; 98 | } -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/profile.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | .banner-container { 4 | background-color: rgb(255, 255, 255); 5 | background-repeat: no-repeat; 6 | background-position: center; 7 | background-size: cover; 8 | min-height: 60vh; 9 | height: 90vh; 10 | display: flex; 11 | justify-content: center; 12 | background-blend-mode: overlay; 13 | align-items: center; 14 | text-align: center; 15 | } 16 | .text-center{ 17 | background:white; 18 | } 19 | .text{ 20 | color: black; 21 | } 22 | #tx1,#tx2{ 23 | color: black; 24 | 25 | } 26 | 27 | 28 | 29 | 30 | 31 | /* Style for the outer container */ 32 | .container { 33 | display: flex; 34 | } 35 | 36 | /* Style for the centered containers */ 37 | .centered-container { 38 | background-color: #f0f0f0; 39 | padding: 20px; 40 | border: 1px solid #ccc; 41 | margin: 10px; 42 | height: 600px; 43 | width: 800px; 44 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); 45 | 46 | } 47 | .col h2{ 48 | font-size: 35px; 49 | } 50 | .col1 h4{ 51 | text-align: center; 52 | font-size: 20px; 53 | } 54 | .col2 { 55 | background-color: #f9f6f6eb; 56 | padding: 20px; 57 | border: 1px solid #ccccccf1; 58 | margin: 0 auto; 59 | height: 300px; 60 | width: 600px; 61 | text-align: center; 62 | } 63 | .col2 label { 64 | font-size: 20px; 65 | } 66 | .upper { 67 | height: 250px; 68 | text-align: center; 69 | 70 | 71 | }; 72 | 73 | .ucontainer { 74 | background-color: white; 75 | height: 200px; 76 | width: 70%; 77 | text-align: center; 78 | 79 | 80 | } 81 | .centered-container1 { 82 | background-color: #fff; 83 | padding: 20px; 84 | border: 1px solid #ccc; 85 | margin: 10px auto; 86 | height: auto; 87 | width: 70%; 88 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); 89 | display: flex; 90 | text-align: center; 91 | 92 | } 93 | .col1 { 94 | display: flex; 95 | justify-content: space-around; 96 | flex: 1; 97 | text-align: center; 98 | } 99 | .h2 h2{ 100 | text-align: start; 101 | } 102 | p{ 103 | font-size: 24px; 104 | } 105 | h2{ 106 | font-size: 18px; 107 | } 108 | 109 | 110 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/about.css: -------------------------------------------------------------------------------- 1 | 2 | 3 | .banner-container { 4 | background-color: rgb(255, 255, 255); 5 | background-repeat: no-repeat; 6 | background-position: center; 7 | background-size: cover; 8 | min-height: 60vh; 9 | height: 90vh; 10 | display: flex; 11 | justify-content: center; 12 | background-blend-mode: overlay; 13 | align-items: center; 14 | text-align: center; 15 | } 16 | .text-center{ 17 | background:white; 18 | } 19 | .text{ 20 | color: black; 21 | } 22 | #tx1,#tx2{ 23 | color: black; 24 | 25 | } 26 | 27 | 28 | 29 | 30 | 31 | /* Style for the outer container */ 32 | .container { 33 | display: flex; 34 | } 35 | 36 | /* Style for the centered containers */ 37 | .centered-container { 38 | background-color: #f0f0f0; 39 | padding: 20px; 40 | border: 1px solid #ccc; 41 | margin: 10px; 42 | height: 600px; 43 | width: 800px; 44 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); 45 | 46 | } 47 | .col h2{ 48 | font-size: 35px; 49 | } 50 | .col1 h4{ 51 | text-align: center; 52 | font-size: 20px; 53 | } 54 | .col2 { 55 | background-color: #f9f6f6eb; 56 | padding: 20px; 57 | border: 1px solid #ccccccf1; 58 | margin: 0 auto; 59 | height: 300px; 60 | width: 600px; 61 | text-align: center; 62 | } 63 | .col2 label { 64 | font-size: 20px; 65 | } 66 | .upper { 67 | height: 250px; 68 | text-align: center; 69 | 70 | 71 | }; 72 | 73 | .ucontainer { 74 | background-color: white; 75 | height: 200px; 76 | width: 70%; 77 | text-align: center; 78 | 79 | 80 | } 81 | .centered-container1 { 82 | background-color: #fff; 83 | padding: 20px; 84 | border: 1px solid #ccc; 85 | margin: 10px auto; 86 | height: auto; 87 | width: 70%; 88 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); 89 | display: flex; 90 | text-align: center; 91 | 92 | } 93 | .col1 { 94 | display: flex; 95 | justify-content: space-around; 96 | flex: 1; 97 | text-align: center; 98 | } 99 | .h2 h2{ 100 | text-align: start; 101 | } 102 | #contact p{ 103 | font-size: 22px; 104 | } 105 | #mission p{ 106 | font-size: 22px; 107 | } 108 | #about p{ 109 | font-size: 22px; 110 | } 111 | 112 | 113 | -------------------------------------------------------------------------------- /backend/blood_report_analyzer/analyzer.py: -------------------------------------------------------------------------------- 1 | import re 2 | import nltk 3 | 4 | 5 | def process_sugar_report_text(text): 6 | sentences = nltk.sent_tokenize(text) # Tokenize the text into sentences 7 | number_regex = r'\b\d{2,3}\b' # Define the regular expression for a number 8 | final_numbers = {} # number : priority 9 | 10 | for sentence in sentences: # Iterate over the sentences 11 | # Tokenize the sentence into words 12 | words = nltk.word_tokenize(sentence) 13 | for i in range(len(words)): 14 | # Check if the word is a 2 or 3 digit number 15 | if re.match(number_regex, words[i]): 16 | final_numbers[words[i]] = 1 # gives a priority as 1 17 | 18 | # Iterate over the keys of the final_numbers dictionary 19 | for number in final_numbers.keys(): 20 | # Find all occurrences of the number in the text 21 | occurrences = re.findall(r'\b' + number + r'\b', text) 22 | # The count of the number is the length of the occurrences list 23 | count = len(occurrences) 24 | # set the priority of the number, based on the count 25 | p = final_numbers[number] / count 26 | final_numbers[number] = p 27 | 28 | # Define the regular expression for a range 29 | range_regex = r'\b\d{2,3}\.\d{2}\b - \b\d{2,3}\.\d{2}\b' 30 | # Define the regular expression for a number in a range 31 | number_in_range_regex = r'\b\d{2,3}\.\d{2}\b' 32 | # Find all ranges in the text 33 | ranges = re.findall(range_regex, text) 34 | # Print the ranges 35 | for rang in ranges: 36 | # Find all numbers in the range 37 | numbers_in_range = re.findall(number_in_range_regex, rang) 38 | # reassign the priority of the numbers 39 | for number in numbers_in_range: 40 | p = final_numbers[number] / 2 41 | final_numbers[number] = p 42 | 43 | # Find the number with the highest priority 44 | # Initialize the number with the highest priority and its priority 45 | highest_priority_number = None 46 | highest_priority = 0 47 | 48 | # Iterate over the final_numbers dictionary 49 | for number, priority in final_numbers.items(): 50 | # If the priority of the current number is higher than the highest priority found so far 51 | if priority > highest_priority: 52 | # Update the highest priority and the number with the highest priority 53 | highest_priority = priority 54 | highest_priority_number = number 55 | 56 | return highest_priority_number 57 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/results.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import './homePage.css'; 3 | import Header from './header'; 4 | import Footer from './footer'; 5 | 6 | const Results = () => { 7 | const [textBoxValue, setTextBoxValue] = useState(''); 8 | const [name] = useState('Nidarshana'); 9 | const [bp] = useState('120/80'); 10 | const [sugar] = useState('200/120'); 11 | 12 | const handleTextBoxChange = (e) => { 13 | setTextBoxValue(e.target.value); 14 | }; 15 | 16 | return ( 17 |
18 |
19 |
20 |
21 |
22 |
23 |

Your Info :

24 |
25 |
26 |
27 |

{name }

28 |

29 |

{bp }

30 |

31 |

{sugar }

32 |

33 | 34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |

Meal Plan

44 |
45 |

46 |
47 | 55 |
56 |
57 |
58 |
59 |

Workout Routine

60 |
61 |

62 |
63 | 71 |
72 |
73 |
74 |
75 |
76 |
77 | ); 78 | } 79 | 80 | export default Results; 81 | -------------------------------------------------------------------------------- /backend/routes/main.py: -------------------------------------------------------------------------------- 1 | import cv2 2 | import numpy as np 3 | 4 | from fastapi import APIRouter, Form, UploadFile, File 5 | 6 | from backend.blood_report_analyzer.main import analyze_blood_sugar_report 7 | from backend.diet_plan_recommender.main import get_meal_plan 8 | from backend.nutrition_need_calculator.diseases import get_diseases 9 | from backend.nutrition_need_calculator.need_calculator import get_dietary_need 10 | from backend.medic.main import calculate_bmi, calculate_dream_weight 11 | from backend.workout_routine_recommender.recommender import predict_workout_plan 12 | 13 | router = APIRouter( 14 | prefix="/api", 15 | tags=["core"], 16 | responses={404: {"description": "The requested URL was not found"}}, 17 | ) 18 | 19 | 20 | @router.post("/") 21 | async def root( 22 | height: int = Form(...), 23 | weight: int = Form(...), 24 | age: int = Form(...), 25 | gender: str = Form(...), 26 | image: UploadFile = File(...), 27 | diseases_info: str = Form(None), 28 | ): 29 | print("data: ", ) 30 | bmi = calculate_bmi(weight, height) 31 | dream_weight = calculate_dream_weight(weight, bmi) 32 | 33 | if image and image.content_type != "image/jpeg": 34 | # return {300: {"description": "Only jpeg images are supported"}} # TODO fix this 35 | diseases = get_diseases(None, bmi) 36 | else: 37 | contents = await image.read() 38 | if contents: # Check if the image file is not empty 39 | nparray = np.fromstring(contents, np.uint8) 40 | img = cv2.imdecode(nparray, cv2.IMREAD_COLOR) 41 | 42 | blood_sugar_level = analyze_blood_sugar_report(img) 43 | diseases = get_diseases(blood_sugar_level, bmi) 44 | else: 45 | diseases = get_diseases(None, bmi) 46 | 47 | nutrition_need = get_dietary_need(weight, height, age, gender.lower()) # 'male' 'female' 48 | workout_plan = predict_workout_plan(gender, age, weight, dream_weight, bmi) # TODO gender - 'Male' 'Female' 49 | 50 | meal_plan = get_meal_plan(['low_sodium_diet', 'low_fat_diet'], diseases, ['calcium', 'vitamin_c'], ['non-veg'], 51 | 'i love indian') 52 | # ['low_sodium_diet','low_fat_diet'], ['diabeties'], ['calcium','vitamin_c'], ['non-veg'],'i love indian' 53 | 54 | if diseases_info is not None: 55 | workout_plan = "Not recommended until be validated by a doctor! " + workout_plan 56 | 57 | return { 58 | "need": nutrition_need, 59 | "workout_plan": workout_plan, 60 | "meal_plan": meal_plan, 61 | } 62 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/logo.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/homePage.css: -------------------------------------------------------------------------------- 1 | /* src/components/Home/Home.css */ 2 | 3 | .banner-container { 4 | background-color: rgb(255, 255, 255); 5 | background-repeat: no-repeat; 6 | background-position: center; 7 | background-size: cover; 8 | min-height: 60vh; 9 | height: 90vh; 10 | display: flex; 11 | justify-content: center; 12 | background-blend-mode: overlay; 13 | align-items: center; 14 | text-align: center; 15 | } 16 | .text-center{ 17 | background:white; 18 | } 19 | .text{ 20 | color: black; 21 | } 22 | #tx1,#tx2{ 23 | color: black; 24 | 25 | } 26 | 27 | /* styles.css */ 28 | 29 | /* Center the containers horizontally and vertically */ 30 | 31 | 32 | /* Style for the outer container */ 33 | .container { 34 | display: flex; 35 | } 36 | 37 | /* Style for the centered containers */ 38 | .centered-container { 39 | background-color: #f0f0f0; 40 | padding: 20px; 41 | border: 1px solid #ccc; 42 | margin: 10px; 43 | height: 600px; 44 | width: 800px; 45 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); 46 | 47 | } 48 | .col h2{ 49 | font-size: 35px; 50 | } 51 | .col1 h4{ 52 | text-align: center; 53 | font-size: 20px; 54 | } 55 | .col2 { 56 | background-color: transparent; /* Remove the background color */ 57 | padding: 20px; 58 | height: 300px; 59 | width: 600px; 60 | text-align: center; 61 | } 62 | .col2 label { 63 | font-size: 20px; 64 | } 65 | .upper { 66 | height: 250px; 67 | text-align: center; 68 | 69 | 70 | }; 71 | 72 | .ucontainer { 73 | background-color: white; 74 | height: 200px; 75 | width: 70%; 76 | text-align: center; 77 | 78 | 79 | } 80 | .centered-container1 { 81 | background-color: #fff; 82 | padding: 20px; 83 | border: 1px solid #ccc; 84 | margin: 10px auto; 85 | height: auto; 86 | width: 70%; 87 | box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.5); 88 | display: flex; 89 | text-align: center; 90 | 91 | } 92 | .col1 { 93 | display: flex; 94 | justify-content: space-around; 95 | flex: 1; 96 | text-align: center; 97 | } 98 | .h2 h2{ 99 | text-align: start; 100 | } 101 | .form-table { 102 | width: 100%; 103 | border-collapse: collapse; 104 | margin-top: 30px; 105 | } 106 | 107 | .form-table td { 108 | padding: 8px; 109 | text-align: left; 110 | vertical-align: top; 111 | } 112 | 113 | .form-table label { 114 | font-weight: bold; 115 | } 116 | #col2{ 117 | background-color: transparent; /* Remove the background color */ 118 | padding: 20px; 119 | /* Remove the border */ 120 | border: 0; 121 | height: 300px; 122 | width: 600px; 123 | text-align: center; 124 | } 125 | 126 | 127 | 128 | -------------------------------------------------------------------------------- /ml/exercise/test.py: -------------------------------------------------------------------------------- 1 | import pandas as pd 2 | from sklearn.model_selection import train_test_split 3 | from sklearn.preprocessing import LabelEncoder, OrdinalEncoder, Normalizer 4 | from sklearn.impute import SimpleImputer 5 | from sklearn.compose import ColumnTransformer 6 | from sklearn.pipeline import Pipeline 7 | from sklearn.ensemble import GradientBoostingRegressor 8 | from sklearn.multioutput import MultiOutputRegressor 9 | import joblib 10 | 11 | # Load the dataset 12 | df = pd.read_csv('dataset.csv') 13 | 14 | # Define the categorical and numerical features 15 | cat_features = ['Gender'] 16 | num_features = ['Dream Weight', 'Actual Weight', 'Age', 'BMI'] 17 | 18 | # Define the target variables 19 | output_features = ['Exercise', 'Exercise Intensity', 'Duration'] 20 | 21 | # Encode 'Exercise' column 22 | le = LabelEncoder() 23 | df['Exercise'] = le.fit_transform(df['Exercise']) 24 | 25 | # Split the dataset 26 | X_train, X_test, y_train, y_test = train_test_split( 27 | df[cat_features + num_features], 28 | df[output_features], 29 | test_size=0.33, 30 | random_state=42 31 | ) 32 | 33 | # Define the transformers 34 | numeric_transformer = Pipeline(steps=[ 35 | ('imputer', SimpleImputer(strategy='mean')), 36 | ('normalizer', Normalizer()) 37 | ]) 38 | 39 | categorical_transformer = Pipeline(steps=[ 40 | ('imputer', SimpleImputer(strategy='constant', fill_value='missing')), 41 | ('encoder', OrdinalEncoder()) 42 | ]) 43 | 44 | # Combine the transformers 45 | preprocessor = ColumnTransformer( 46 | transformers=[ 47 | ('numeric', numeric_transformer, num_features), 48 | ('categorical', categorical_transformer, cat_features) 49 | ] 50 | ) 51 | 52 | # Define the model 53 | model = MultiOutputRegressor(GradientBoostingRegressor()) 54 | 55 | # Define the pipeline 56 | pipeline = Pipeline(steps=[ 57 | ('preprocess', preprocessor), 58 | ('reg', model) 59 | ]) 60 | 61 | # Train the model 62 | pipeline.fit(X_train, y_train) 63 | 64 | # Save the model 65 | joblib.dump(pipeline, 'model.pkl') 66 | 67 | # Save the LabelEncoder 68 | joblib.dump(le, 'label_encoder.pkl') 69 | 70 | # Load the model 71 | loaded_model = joblib.load('model.pkl') 72 | 73 | # Load the LabelEncoder 74 | loaded_le = joblib.load('label_encoder.pkl') 75 | 76 | # Define a new observation as a DataFrame 77 | # Replace 'Male' with the actual encoded value for the gender 78 | new_observation = pd.DataFrame([['Male', 25, 70, 45, 29]], # Gender, Age, Actual Weight, Dream Weight, BMI 79 | columns=cat_features + num_features) 80 | 81 | # Use the model to predict the exercise and intensity 82 | exercise_encoded, intensity, duration = loaded_model.predict(new_observation)[0] 83 | 84 | # Decode 'Exercise' back to its original form 85 | exercise = loaded_le.inverse_transform([int(exercise_encoded)])[0] 86 | 87 | print(f"Predicted Exercise: {exercise}, Intensity: {intensity}, Duration: {duration}") 88 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 🏋️‍♀️ Fitness Recommender System 2 | 3 | **Your Personal Guide to a Healthier Life** 4 | 5 | This system helps you get **personalized workout and diet plans** based on your age, gender, and health information. It's like having your own fitness coach powered by smart technology! 6 | 7 | [![Version](https://img.shields.io/badge/version-1.0-brightgreen.svg)](https://pypi.org/project/ad-topic-recommender/) 8 | [![License](https://img.shields.io/badge/license-CC%20BY--NC--SA%204.0-blue.svg)](https://creativecommons.org/licenses/by-nc-sa/4.0/) 9 | 10 | 👉 **Check out the API on Postman**: [Postman Workspace](https://www.postman.com/karunarathne/workspace/fitness-recommender-system) 11 | 12 | --- 13 | 14 | ## 💡 What Is This? 15 | 16 | The **Fitness Recommender System** is a smart tool that creates **custom workout and diet plans** just for you. Whether you're trying to lose weight, build muscle, or eat better, this tool helps by understanding your body and needs. 17 | 18 | ### How It Works: 19 | 20 | * You give it your **age, gender, and health details** 21 | * It uses **machine learning** to create a fitness and diet plan tailored just for you 22 | * It keeps learning from your feedback to improve your recommendations 23 | 24 | --- 25 | 26 | ## 🎯 Why It Matters 27 | 28 | Many fitness apps give the same advice to everyone. But your body is unique. 29 | 30 | This system: 31 | 32 | * **Personalizes** your fitness journey 33 | * **Considers your health conditions** and goals 34 | * **Learns and improves** based on your feedback 35 | * Helps you **stay motivated** and **track progress** better 36 | 37 | It's designed to make staying healthy **easier, smarter, and more effective**. 38 | 39 | --- 40 | 41 | ## 🙌 How You Can Contribute 42 | 43 | Want to help improve this project? Awesome! 44 | Check out the **contribution guidelines** (link to be added) to learn how you can: 45 | 46 | * Report bugs 47 | * Suggest features 48 | * Improve the code or documentation 49 | 50 | All skill levels are welcome! 51 | 52 | --- 53 | 54 | ## 📄 License 55 | 56 | This project is shared under the 57 | **Creative Commons Attribution-NonCommercial-ShareAlike 4.0 License**. 58 | 59 | That means: 60 | 61 | * You can share and adapt it, **but not use it commercially** 62 | * You must give credit 63 | * You must share any changes you make under the same license 64 | 65 | [![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa] 66 | [![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa] 67 | 68 | [cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/ 69 | [cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png 70 | [cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg 71 | 72 | --- 73 | 74 | ## 📬 Contact 75 | 76 | Have questions or ideas? Reach out to the creator: 77 | 78 | * **Name:** Dilshan M. Karunarathne 79 | * **Email:** [ceo@altier.tech](mailto:ceo@altier.tech) 80 | * **Website:** [altier.tech](http://altier.tech) 81 | -------------------------------------------------------------------------------- /ml/blood report parsing/test_ocr.py: -------------------------------------------------------------------------------- 1 | import re 2 | import cv2 3 | import nltk 4 | import pytesseract 5 | 6 | tessdata_dir_config = '--tessdata-dir "C:\\Program Files\\Tesseract-OCR\\tessdata"' 7 | pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe" 8 | 9 | 10 | def ocr(img_path) -> str: 11 | img = cv2.imread(img_path) 12 | gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) 13 | text = pytesseract.image_to_string(gray) 14 | return text.lower() 15 | 16 | 17 | def process_text(text): 18 | sentences = nltk.sent_tokenize(text) # Tokenize the text into sentences 19 | number_regex = r'\b\d{2,3}\b' # Define the regular expression for a number 20 | final_numbers = {} # number : priority 21 | 22 | for sentence in sentences: # Iterate over the sentences 23 | # Tokenize the sentence into words 24 | words = nltk.word_tokenize(sentence) 25 | for i in range(len(words)): 26 | # Check if the word is a 2 or 3 digit number 27 | if re.match(number_regex, words[i]): 28 | final_numbers[words[i]] = 1 # gives a priority as 1 29 | 30 | # Iterate over the keys of the final_numbers dictionary 31 | for number in final_numbers.keys(): 32 | # Find all occurrences of the number in the text 33 | occurrences = re.findall(r'\b' + number + r'\b', text) 34 | # The count of the number is the length of the occurrences list 35 | count = len(occurrences) 36 | # set the priority of the number, based on the count 37 | p = final_numbers[number] / count 38 | final_numbers[number] = p 39 | 40 | # Define the regular expression for a range 41 | range_regex = r'\b\d{2,3}\.\d{2}\b - \b\d{2,3}\.\d{2}\b' 42 | # Define the regular expression for a number in a range 43 | number_in_range_regex = r'\b\d{2,3}\.\d{2}\b' 44 | # Find all ranges in the text 45 | ranges = re.findall(range_regex, text) 46 | # Print the ranges 47 | for rang in ranges: 48 | # Find all numbers in the range 49 | numbers_in_range = re.findall(number_in_range_regex, rang) 50 | # reassign the priority of the numbers 51 | for number in numbers_in_range: 52 | p = final_numbers[number] / 2 53 | final_numbers[number] = p 54 | 55 | # Find the number with the highest priority 56 | # Initialize the number with the highest priority and its priority 57 | highest_priority_number = None 58 | highest_priority = 0 59 | 60 | # Iterate over the final_numbers dictionary 61 | for number, priority in final_numbers.items(): 62 | # If the priority of the current number is higher than the highest priority found so far 63 | if priority > highest_priority: 64 | # Update the highest priority and the number with the highest priority 65 | highest_priority = priority 66 | highest_priority_number = number 67 | 68 | return highest_priority_number 69 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/login.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import './login.css'; 3 | import { withSignIn } from 'react-auth-kit' 4 | 5 | 6 | 7 | 8 | function Login() { 9 | // React States 10 | const [errorMessages, setErrorMessages] = useState({}); 11 | const [isSubmitted, setIsSubmitted] = useState(false); 12 | 13 | // User Login info 14 | const database = [ 15 | { 16 | username: "user1", 17 | password: "pass1", 18 | password1: "pass1" 19 | }, 20 | { 21 | username: "user2", 22 | password: "pass2", 23 | password1: "pass2" 24 | } 25 | ]; 26 | 27 | const errors = { 28 | uname: "invalid username", 29 | pass: "invalid password", 30 | pass1: "invalid password" 31 | }; 32 | 33 | const handleSubmit = (event) => { 34 | //Prevent page reload 35 | event.preventDefault(); 36 | 37 | var { uname, pass, pass1 } = document.forms[0]; 38 | 39 | // Find user login info 40 | const userData = database.find((user) => user.username === uname.value); 41 | 42 | // Compare user info 43 | if (userData) { 44 | if (userData.password !== pass.value && userData.password1 !== pass1.value) { 45 | // Invalid password 46 | setErrorMessages({ name: "pass", message: errors.pass }); 47 | 48 | } else { 49 | setIsSubmitted(true); 50 | } 51 | } else { 52 | // Username not found 53 | setErrorMessages({ name: "uname", message: errors.uname }); 54 | } 55 | }; 56 | 57 | // Generate JSX code for error message 58 | const renderErrorMessage = (name) => 59 | name === errorMessages.name && ( 60 |
{errorMessages.message}
61 | ); 62 | 63 | // JSX code for login form 64 | const renderForm = ( 65 |
66 | 67 |
68 |
69 | 70 | 71 | {renderErrorMessage("uname")} 72 |
73 |
74 | 75 | 76 | {renderErrorMessage("pass")} 77 |
78 | 79 |
80 | 81 |
82 |
83 | 84 |
85 | ); 86 | 87 | return ( 88 |
89 | 90 |
91 | {/*
92 |

Fitness Web

93 |
*/} 94 |
95 |
Login
96 | {isSubmitted ?
User is successfully Signed Up
: renderForm} 97 |
98 |
99 |
100 | ); 101 | } 102 | 103 | export default Login; -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/signUp.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from "react"; 2 | import './styles.css'; 3 | 4 | 5 | function SignUp() { 6 | // React States 7 | const [errorMessages, setErrorMessages] = useState({}); 8 | const [isSubmitted, setIsSubmitted] = useState(false); 9 | 10 | // User Login info 11 | const database = [ 12 | { 13 | username: "user1", 14 | password: "pass1", 15 | password1: "pass1" 16 | }, 17 | { 18 | username: "user2", 19 | password: "pass2", 20 | password1: "pass2" 21 | } 22 | ]; 23 | 24 | const errors = { 25 | uname: "invalid username", 26 | pass: "invalid password", 27 | pass1: "invalid password" 28 | }; 29 | 30 | const handleSubmit = (event) => { 31 | //Prevent page reload 32 | event.preventDefault(); 33 | 34 | var { uname, pass, pass1 } = document.forms[0]; 35 | 36 | // Find user login info 37 | const userData = database.find((user) => user.username === uname.value); 38 | 39 | // Compare user info 40 | if (userData) { 41 | if (userData.password !== pass.value && userData.password1 !== pass1.value) { 42 | // Invalid password 43 | setErrorMessages({ name: "pass", message: errors.pass }); 44 | 45 | } else { 46 | setIsSubmitted(true); 47 | } 48 | } else { 49 | // Username not found 50 | setErrorMessages({ name: "uname", message: errors.uname }); 51 | } 52 | }; 53 | 54 | // Generate JSX code for error message 55 | const renderErrorMessage = (name) => 56 | name === errorMessages.name && ( 57 |
{errorMessages.message}
58 | ); 59 | 60 | // JSX code for login form 61 | const renderForm = ( 62 |
63 | 64 |
65 |
66 | 67 | 68 | {renderErrorMessage("uname")} 69 |
70 |
71 | 72 | 73 | {renderErrorMessage("pass")} 74 |
75 |
76 | 77 | 78 | {renderErrorMessage("pass1")} 79 |
80 |
81 | 82 |
83 |
84 | 85 |
86 | ); 87 | 88 | return ( 89 |
90 | 91 |
92 |
93 |
SignUp
94 | {isSubmitted ?
User is successfully Signed Up
: renderForm} 95 |
96 |
97 |
98 | ); 99 | } 100 | 101 | export default SignUp; -------------------------------------------------------------------------------- /frontend/fitness-web_old/README.md: -------------------------------------------------------------------------------- 1 | # Getting Started with Create React App 2 | 3 | This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). 4 | 5 | ## Available Scripts 6 | 7 | In the project directory, you can run: 8 | 9 | ### `npm start` 10 | 11 | Runs the app in the development mode.\ 12 | Open [http://localhost:3000](http://localhost:3000) to view it in your browser. 13 | 14 | The page will reload when you make changes.\ 15 | You may also see any lint errors in the console. 16 | 17 | ### `npm test` 18 | 19 | Launches the test runner in the interactive watch mode.\ 20 | See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 21 | 22 | ### `npm run build` 23 | 24 | Builds the app for production to the `build` folder.\ 25 | It correctly bundles React in production mode and optimizes the build for the best performance. 26 | 27 | The build is minified and the filenames include the hashes.\ 28 | Your app is ready to be deployed! 29 | 30 | See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. 31 | 32 | ### `npm run eject` 33 | 34 | **Note: this is a one-way operation. Once you `eject`, you can't go back!** 35 | 36 | If you aren't satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project. 37 | 38 | Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you're on your own. 39 | 40 | You don't have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn't feel obligated to use this feature. However we understand that this tool wouldn't be useful if you couldn't customize it when you are ready for it. 41 | 42 | ## Learn More 43 | 44 | You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). 45 | 46 | To learn React, check out the [React documentation](https://reactjs.org/). 47 | 48 | ### Code Splitting 49 | 50 | This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) 51 | 52 | ### Analyzing the Bundle Size 53 | 54 | This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) 55 | 56 | ### Making a Progressive Web App 57 | 58 | This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) 59 | 60 | ### Advanced Configuration 61 | 62 | This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) 63 | 64 | ### Deployment 65 | 66 | This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) 67 | 68 | ### `npm run build` fails to minify 69 | 70 | This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) 71 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/homePage.js: -------------------------------------------------------------------------------- 1 | import React, { useState } from 'react'; 2 | import { useHistory } from 'react-router-dom'; // Import useHistory 3 | import './homePage.css'; 4 | import Header from './header'; 5 | import Footer from './footer'; 6 | import Results from './results'; 7 | 8 | const HomePage = () => { 9 | const [name] = useState('Nidarshana'); 10 | const [height, setHeight] = useState(''); 11 | const [weight, setWeight] = useState(''); 12 | const [file, setFile] = useState(null); 13 | // const [resultspage] = useState(Results); // You don't need this line 14 | 15 | const history = useHistory(); // Initialize useHistory 16 | 17 | const handleHeightChange = (e) => { 18 | setHeight(e.target.value); 19 | }; 20 | 21 | const handleWeightChange = (e) => { 22 | setWeight(e.target.value); 23 | }; 24 | 25 | const handleFileChange = (e) => { 26 | const selectedFile = e.target.files[0]; 27 | setFile(selectedFile); 28 | }; 29 | 30 | const handleSubmit = (e) => { 31 | e.preventDefault(); // Prevent form submission (for demonstration purposes) 32 | 33 | // Perform any necessary actions (e.g., form validation) 34 | if (!file) { 35 | alert("Please upload a file before submitting."); // Show a pop-up message 36 | return; // Don't proceed with the submission 37 | } 38 | // Then, navigate to the Results page 39 | history.push('/results'); 40 | }; 41 | 42 | return ( 43 |
44 |
45 |
46 |
47 |
48 |
49 |

Hello {name} 👋 ...

50 |
51 |

52 |
53 |

Enter your details here

54 |
55 |

56 |

57 |
58 |
59 | 60 | 61 | 62 | 65 | 68 | 69 |

70 | 71 | 74 | 77 | 78 |

79 | 80 | 83 | 86 | 87 | 88 |
63 | 64 | 66 | 67 |
72 | 73 | 75 | 76 |
81 | 82 | 84 | 85 |
89 |

90 | 91 |
92 |
93 |
94 |
95 |
96 |
97 |
98 | ); 99 | }; 100 | 101 | export default HomePage; 102 | -------------------------------------------------------------------------------- /frontend/fitness-web_old/src/Components/styles.css: -------------------------------------------------------------------------------- 1 | .app { 2 | font-family: sans-serif; 3 | display: flex; 4 | align-items: center; 5 | justify-content: center; 6 | flex-direction: column; 7 | gap: 20px; 8 | height: 100vh; 9 | font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif; 10 | background-color: #f8f9fd; 11 | } 12 | /*style for signup*/.app { 13 | font-family: sans-serif; 14 | display: flex; 15 | align-items: center; 16 | justify-content: center; 17 | flex-direction: column; 18 | gap: 20px; 19 | height: 100vh; 20 | font-family: Cambria, Cochin, Georgia, Times, "Times New Roman", serif; 21 | background-color: #fff; 22 | } 23 | /*style for signup*/ 24 | input[type="text"], 25 | input[type="password"] { 26 | height: 25px; 27 | border: 1px solid rgba(0, 0, 0, 0.2); 28 | } 29 | 30 | input[type="submit"] { 31 | margin-top: 10px; 32 | cursor: pointer; 33 | font-size: 15px; 34 | background: #01d28e; 35 | border: 1px solid #01d28e; 36 | color: #fff; 37 | padding: 10px 20px; 38 | } 39 | 40 | input[type="submit"]:hover { 41 | background: #6cf0c2; 42 | } 43 | 44 | .button-container { 45 | display: flex; 46 | justify-content: center; 47 | padding: 20px; 48 | } 49 | 50 | .login-form { 51 | background-color: #f0f0f0; 52 | padding: 2rem; 53 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 54 | width: 60vw; 55 | height: auto; 56 | text-align: center; 57 | } 58 | 59 | .form { 60 | width: 80%; 61 | display: inline-block; 62 | align-content: center; 63 | margin: 0 auto; 64 | } 65 | 66 | .list-container { 67 | display: flex; 68 | } 69 | 70 | .formBox { 71 | margin: 0 auto; 72 | height: auto; 73 | } 74 | 75 | .error { 76 | color: red; 77 | font-size: 12px; 78 | } 79 | 80 | form { 81 | display: inline-block; 82 | display:flex; 83 | flex-direction: column; 84 | } 85 | 86 | .title { 87 | font-size: 45px; 88 | margin-bottom: 20px; 89 | } 90 | 91 | .input-container { 92 | gap: 8px; 93 | margin: 20px; 94 | padding-top: 20px; 95 | width: 80%; 96 | margin: 0 auto; 97 | align-self: center; 98 | } 99 | .rap { 100 | display: flex; 101 | flex-direction: column; 102 | justify-content: center; 103 | align-items: center; 104 | height: 400px; 105 | width: 100%; 106 | } 107 | .hed { 108 | padding: 1px; 109 | } 110 | input[type="text"], 111 | input[type="password"] { 112 | height: 25px; 113 | border: 1px solid rgba(0, 0, 0, 0.2); 114 | } 115 | 116 | input[type="submit"] { 117 | margin-top: 10px; 118 | cursor: pointer; 119 | font-size: 15px; 120 | background: #01d28e; 121 | border: 1px solid #01d28e; 122 | color: #fff; 123 | padding: 10px 20px; 124 | } 125 | 126 | input[type="submit"]:hover { 127 | background: #6cf0c2; 128 | } 129 | 130 | .button-container { 131 | display: flex; 132 | justify-content: center; 133 | } 134 | 135 | .login-form { 136 | background-color: white; 137 | padding: 2rem; 138 | box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19); 139 | width: 800px; 140 | height: 600px;text-align: center; 141 | } 142 | 143 | .list-container { 144 | display: flex; 145 | } 146 | 147 | .error { 148 | color: red; 149 | font-size: 12px; 150 | } 151 | 152 | .title { 153 | font-size: 25px; 154 | margin-bottom: 20px; 155 | } 156 | 157 | .input-container { 158 | display: flex; 159 | flex-direction: column; 160 | gap: 8px; 161 | margin: 10px; 162 | } 163 | .rap { 164 | display: flex; 165 | flex-direction: column; 166 | justify-content: center; 167 | align-items: center; 168 | height: 500px; 169 | } -------------------------------------------------------------------------------- /frontend/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "FitnessWeb", 3 | "lockfileVersion": 3, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "axios": "^1.6.0" 9 | } 10 | }, 11 | "node_modules/asynckit": { 12 | "version": "0.4.0", 13 | "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", 14 | "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" 15 | }, 16 | "node_modules/axios": { 17 | "version": "1.6.0", 18 | "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.0.tgz", 19 | "integrity": "sha512-EZ1DYihju9pwVB+jg67ogm+Tmqc6JmhamRN6I4Zt8DfZu5lbcQGw3ozH9lFejSJgs/ibaef3A9PMXPLeefFGJg==", 20 | "dependencies": { 21 | "follow-redirects": "^1.15.0", 22 | "form-data": "^4.0.0", 23 | "proxy-from-env": "^1.1.0" 24 | } 25 | }, 26 | "node_modules/combined-stream": { 27 | "version": "1.0.8", 28 | "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", 29 | "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", 30 | "dependencies": { 31 | "delayed-stream": "~1.0.0" 32 | }, 33 | "engines": { 34 | "node": ">= 0.8" 35 | } 36 | }, 37 | "node_modules/delayed-stream": { 38 | "version": "1.0.0", 39 | "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", 40 | "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", 41 | "engines": { 42 | "node": ">=0.4.0" 43 | } 44 | }, 45 | "node_modules/follow-redirects": { 46 | "version": "1.15.3", 47 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", 48 | "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", 49 | "funding": [ 50 | { 51 | "type": "individual", 52 | "url": "https://github.com/sponsors/RubenVerborgh" 53 | } 54 | ], 55 | "engines": { 56 | "node": ">=4.0" 57 | }, 58 | "peerDependenciesMeta": { 59 | "debug": { 60 | "optional": true 61 | } 62 | } 63 | }, 64 | "node_modules/form-data": { 65 | "version": "4.0.0", 66 | "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 67 | "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 68 | "dependencies": { 69 | "asynckit": "^0.4.0", 70 | "combined-stream": "^1.0.8", 71 | "mime-types": "^2.1.12" 72 | }, 73 | "engines": { 74 | "node": ">= 6" 75 | } 76 | }, 77 | "node_modules/mime-db": { 78 | "version": "1.52.0", 79 | "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", 80 | "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", 81 | "engines": { 82 | "node": ">= 0.6" 83 | } 84 | }, 85 | "node_modules/mime-types": { 86 | "version": "2.1.35", 87 | "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", 88 | "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", 89 | "dependencies": { 90 | "mime-db": "1.52.0" 91 | }, 92 | "engines": { 93 | "node": ">= 0.6" 94 | } 95 | }, 96 | "node_modules/proxy-from-env": { 97 | "version": "1.1.0", 98 | "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", 99 | "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" 100 | } 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /ml/diet_plan_recommender/main.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | 3 | import pandas as pd 4 | from nltk.corpus import stopwords 5 | from sklearn.neighbors import NearestNeighbors 6 | 7 | warnings.filterwarnings('ignore') 8 | 9 | df = pd.read_csv('dataset.csv') 10 | 11 | 12 | class Recommender: 13 | 14 | def __init__(self): 15 | self.df = pd.read_csv('dataset.csv') 16 | 17 | def get_features(self): 18 | # getting dummies of dataset 19 | nutrient_dummies = self.df.Nutrient.str.get_dummies() 20 | disease_dummies = self.df.Disease.str.get_dummies(sep=' ') 21 | diet_dummies = self.df.Diet.str.get_dummies(sep=' ') 22 | feature_df = pd.concat([nutrient_dummies, disease_dummies, diet_dummies], axis=1) 23 | 24 | return feature_df 25 | 26 | def k_neighbor(self, inputs): 27 | feature_df = self.get_features() 28 | 29 | # initializing model with k=20 neighbors 30 | model = NearestNeighbors(n_neighbors=40, algorithm='ball_tree') 31 | 32 | # fitting model with dataset features 33 | model.fit(feature_df) 34 | 35 | df_results = pd.DataFrame(columns=list(self.df.columns)) 36 | 37 | # getting distance and indices for k nearest neighbor 38 | distnaces, indices = model.kneighbors(inputs) 39 | 40 | for i in list(indices): 41 | df_results = df_results._append(self.df.loc[i]) 42 | 43 | df_results = df_results.filter( 44 | ['Name', 'Nutrient', 'Veg_Non', 'Price', 'Review', 'Diet', 'Disease', 'description']) 45 | df_results = df_results.drop_duplicates(subset=['Name']) 46 | df_results = df_results.reset_index(drop=True) 47 | return df_results 48 | 49 | 50 | class Profile: 51 | df = pd.read_csv('dataset.csv') # static variable 52 | 53 | def __init__(self, diet, disease, Nutrient, food_type, favorite_food): 54 | self.diet = diet 55 | self.disease = disease 56 | self.nutrient = Nutrient 57 | self.type = food_type 58 | self.like = favorite_food 59 | self.df2 = pd.DataFrame(columns=list(Profile.df.columns)) 60 | self.df3 = pd.DataFrame(columns=list(Profile.df.columns)) 61 | self.df4 = pd.DataFrame(columns=list(Profile.df.columns)) 62 | self.df5 = pd.DataFrame(columns=list(Profile.df.columns)) 63 | self.df6 = pd.DataFrame(columns=list(Profile.df.columns)) 64 | 65 | def removestop(self, tokens): 66 | stop = set(stopwords.words('english')) 67 | file = open('stopwords.txt', 'r') 68 | l = list(file.read().split()) 69 | stop = list(stop) + l 70 | l = [token for token in tokens if token not in stop] 71 | return l 72 | 73 | def inputs(self, diet, disease, Nutrient, food_type, favorite_food): 74 | 75 | if Nutrient: 76 | self.df2 = Profile.df[Profile.df.Nutrient.isin(Nutrient)] 77 | self.df2 = self.df2.reset_index() 78 | 79 | if food_type: 80 | self.df2 = self.df2[self.df2.Veg_Non.isin(food_type)] 81 | self.df2 = self.df2.reset_index() 82 | 83 | if diet: 84 | for i in range(self.df2.shape[0]): 85 | l = str(self.df2.loc[i, 'Diet']).split() 86 | 87 | for d in diet: 88 | if d in l: 89 | self.df4 = self.df4._append(self.df2.loc[i]) 90 | 91 | if disease: 92 | for i in range(self.df2.shape[0]): 93 | l = str(self.df2.loc[i, 'Disease']).split() 94 | for d in disease: 95 | if d in l: 96 | self.df5 = self.df5._append(self.df2.loc[i]) 97 | 98 | if favorite_food: 99 | f = self.removestop(favorite_food.split()) 100 | for i in range(Profile.df.shape[0]): 101 | n = [j.lower() for j in str(Profile.df.loc[i, 'Name']).split()] 102 | for j in n: 103 | for k in f: 104 | if k == j: 105 | self.df6 = self.df6._append(Profile.df.loc[i]) 106 | for i in range(Profile.df.shape[0]): 107 | n = [j.lower() for j in str(Profile.df.loc[i, 'description']).split()] 108 | for j in n: 109 | for k in f: 110 | if k == j: 111 | self.df6 = self.df6._append(df.loc[i]) 112 | for i in range(Profile.df.shape[0]): 113 | n = [j.lower() for j in str(Profile.df.loc[i, 'catagory']).split()] 114 | for j in n: 115 | for k in f: 116 | if k == j: 117 | self.df6 = self.df6._append(Profile.df.loc[i]) 118 | 119 | return self.df2, self.df3, self.df4, self.df5, self.df6 120 | 121 | def get_profile(self): 122 | df2, df3, df4, df5, df6 = self.inputs(self.diet, self.disease, self.nutrient, self.type, self.like) 123 | 124 | df_merge = pd.concat([df2, df3, df4, df5, df6], axis=0).drop_duplicates(subset='Name') 125 | df_merge = df_merge.filter(['Name', 'Nutrient', 'Veg_Non', 'Price', 'Review', 'description']) 126 | print(df_merge.shape) 127 | 128 | return df_merge 129 | 130 | 131 | # ['low_sodium_diet','low_fat_diet'], ['diabeties'], ['calcium','vitamin_c'], ['non-veg'],'i love indian' 132 | def get_meal_plan(diet, disease, nutrient, food_type, favorite_food): 133 | ob = Profile(diet, disease, nutrient, food_type, favorite_food) 134 | profile = ob.get_profile() 135 | return profile 136 | -------------------------------------------------------------------------------- /backend/diet_plan_recommender/main.py: -------------------------------------------------------------------------------- 1 | import warnings 2 | 3 | import pandas as pd 4 | from nltk.corpus import stopwords 5 | from sklearn.neighbors import NearestNeighbors 6 | 7 | from backend.config import get 8 | 9 | warnings.filterwarnings('ignore') 10 | 11 | dataset_dir = get('data', 'dataset') 12 | stopwords_path = get('data', 'stopwords') 13 | 14 | df = pd.read_csv(dataset_dir) 15 | 16 | 17 | class Recommender: 18 | def __init__(self): 19 | self.df = pd.read_csv(dataset_dir) 20 | 21 | def get_features(self): 22 | # getting dummies of dataset 23 | nutrient_dummies = self.df.Nutrient.str.get_dummies() 24 | disease_dummies = self.df.Disease.str.get_dummies(sep=' ') 25 | diet_dummies = self.df.Diet.str.get_dummies(sep=' ') 26 | feature_df = pd.concat([nutrient_dummies, disease_dummies, diet_dummies], axis=1) 27 | 28 | return feature_df 29 | 30 | def k_neighbor(self, inputs): 31 | feature_df = self.get_features() 32 | 33 | # initializing model with k=20 neighbors 34 | model = NearestNeighbors(n_neighbors=40, algorithm='ball_tree') 35 | 36 | # fitting model with dataset features 37 | model.fit(feature_df) 38 | 39 | df_results = pd.DataFrame(columns=list(self.df.columns)) 40 | 41 | # getting distance and indices for k nearest neighbor 42 | distnaces, indices = model.kneighbors(inputs) 43 | 44 | for i in list(indices): 45 | df_results = df_results._append(self.df.loc[i]) 46 | 47 | df_results = df_results.filter( 48 | ['Name', 'Nutrient', 'Veg_Non', 'Price', 'Review', 'Diet', 'Disease', 'description']) 49 | df_results = df_results.drop_duplicates(subset=['Name']) 50 | df_results = df_results.reset_index(drop=True) 51 | return df_results 52 | 53 | 54 | class Profile: 55 | df = pd.read_csv(dataset_dir) # static variable 56 | 57 | def __init__(self, diet, disease, Nutrient, food_type, favorite_food): 58 | self.diet = diet 59 | self.disease = disease 60 | self.nutrient = Nutrient 61 | self.type = food_type 62 | self.like = favorite_food 63 | self.df2 = pd.DataFrame(columns=list(Profile.df.columns)) 64 | self.df3 = pd.DataFrame(columns=list(Profile.df.columns)) 65 | self.df4 = pd.DataFrame(columns=list(Profile.df.columns)) 66 | self.df5 = pd.DataFrame(columns=list(Profile.df.columns)) 67 | self.df6 = pd.DataFrame(columns=list(Profile.df.columns)) 68 | 69 | def removestop(self, tokens): 70 | stop = set(stopwords.words('english')) 71 | file = open(stopwords_path, 'r') 72 | l = list(file.read().split()) 73 | stop = list(stop) + l 74 | l = [token for token in tokens if token not in stop] 75 | return l 76 | 77 | def inputs(self, diet, disease, Nutrient, food_type, favorite_food): 78 | 79 | if Nutrient: 80 | self.df2 = Profile.df[Profile.df.Nutrient.isin(Nutrient)] 81 | self.df2 = self.df2.reset_index() 82 | 83 | if food_type: 84 | self.df2 = self.df2[self.df2.Veg_Non.isin(food_type)] 85 | self.df2 = self.df2.reset_index() 86 | 87 | if diet: 88 | for i in range(self.df2.shape[0]): 89 | l = str(self.df2.loc[i, 'Diet']).split() 90 | 91 | for d in diet: 92 | if d in l: 93 | self.df4 = self.df4._append(self.df2.loc[i]) 94 | 95 | if disease: 96 | for i in range(self.df2.shape[0]): 97 | l = str(self.df2.loc[i, 'Disease']).split() 98 | for d in disease: 99 | if d in l: 100 | self.df5 = self.df5._append(self.df2.loc[i]) 101 | 102 | if favorite_food: 103 | f = self.removestop(favorite_food.split()) 104 | for i in range(Profile.df.shape[0]): 105 | n = [j.lower() for j in str(Profile.df.loc[i, 'Name']).split()] 106 | for j in n: 107 | for k in f: 108 | if k == j: 109 | self.df6 = self.df6._append(Profile.df.loc[i]) 110 | for i in range(Profile.df.shape[0]): 111 | n = [j.lower() for j in str(Profile.df.loc[i, 'description']).split()] 112 | for j in n: 113 | for k in f: 114 | if k == j: 115 | self.df6 = self.df6._append(df.loc[i]) 116 | for i in range(Profile.df.shape[0]): 117 | n = [j.lower() for j in str(Profile.df.loc[i, 'catagory']).split()] 118 | for j in n: 119 | for k in f: 120 | if k == j: 121 | self.df6 = self.df6._append(Profile.df.loc[i]) 122 | 123 | return self.df2, self.df3, self.df4, self.df5, self.df6 124 | 125 | def get_profile(self): 126 | df2, df3, df4, df5, df6 = self.inputs(self.diet, self.disease, self.nutrient, self.type, self.like) 127 | 128 | df_merge = pd.concat([df2, df3, df4, df5, df6], axis=0).drop_duplicates(subset='Name') 129 | df_merge = df_merge.filter(['Name', 'Nutrient', 'Veg_Non', 'Price', 'Review', 'description']) 130 | print(df_merge.shape) 131 | 132 | return df_merge 133 | 134 | 135 | # ['low_sodium_diet','low_fat_diet'], ['diabeties'], ['calcium','vitamin_c'], ['non-veg'],'i love indian' 136 | def get_meal_plan(diet, disease, nutrient, food_type, favorite_food): 137 | ob = Profile(diet, disease, nutrient, food_type, favorite_food) 138 | profile = ob.get_profile() 139 | return profile 140 | -------------------------------------------------------------------------------- /frontend/LICENSE: -------------------------------------------------------------------------------- 1 | Creative Commons Legal Code 2 | 3 | CC0 1.0 Universal 4 | 5 | CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE 6 | LEGAL SERVICES. DISTRIBUTION OF THIS DOCUMENT DOES NOT CREATE AN 7 | ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS 8 | INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES 9 | REGARDING THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS 10 | PROVIDED HEREUNDER, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM 11 | THE USE OF THIS DOCUMENT OR THE INFORMATION OR WORKS PROVIDED 12 | HEREUNDER. 13 | 14 | Statement of Purpose 15 | 16 | The laws of most jurisdictions throughout the world automatically confer 17 | exclusive Copyright and Related Rights (defined below) upon the creator 18 | and subsequent owner(s) (each and all, an "owner") of an original work of 19 | authorship and/or a database (each, a "Work"). 20 | 21 | Certain owners wish to permanently relinquish those rights to a Work for 22 | the purpose of contributing to a commons of creative, cultural and 23 | scientific works ("Commons") that the public can reliably and without fear 24 | of later claims of infringement build upon, modify, incorporate in other 25 | works, reuse and redistribute as freely as possible in any form whatsoever 26 | and for any purposes, including without limitation commercial purposes. 27 | These owners may contribute to the Commons to promote the ideal of a free 28 | culture and the further production of creative, cultural and scientific 29 | works, or to gain reputation or greater distribution for their Work in 30 | part through the use and efforts of others. 31 | 32 | For these and/or other purposes and motivations, and without any 33 | expectation of additional consideration or compensation, the person 34 | associating CC0 with a Work (the "Affirmer"), to the extent that he or she 35 | is an owner of Copyright and Related Rights in the Work, voluntarily 36 | elects to apply CC0 to the Work and publicly distribute the Work under its 37 | terms, with knowledge of his or her Copyright and Related Rights in the 38 | Work and the meaning and intended legal effect of CC0 on those rights. 39 | 40 | 1. Copyright and Related Rights. A Work made available under CC0 may be 41 | protected by copyright and related or neighboring rights ("Copyright and 42 | Related Rights"). Copyright and Related Rights include, but are not 43 | limited to, the following: 44 | 45 | i. the right to reproduce, adapt, distribute, perform, display, 46 | communicate, and translate a Work; 47 | ii. moral rights retained by the original author(s) and/or performer(s); 48 | iii. publicity and privacy rights pertaining to a person's image or 49 | likeness depicted in a Work; 50 | iv. rights protecting against unfair competition in regards to a Work, 51 | subject to the limitations in paragraph 4(a), below; 52 | v. rights protecting the extraction, dissemination, use and reuse of data 53 | in a Work; 54 | vi. database rights (such as those arising under Directive 96/9/EC of the 55 | European Parliament and of the Council of 11 March 1996 on the legal 56 | protection of databases, and under any national implementation 57 | thereof, including any amended or successor version of such 58 | directive); and 59 | vii. other similar, equivalent or corresponding rights throughout the 60 | world based on applicable law or treaty, and any national 61 | implementations thereof. 62 | 63 | 2. Waiver. To the greatest extent permitted by, but not in contravention 64 | of, applicable law, Affirmer hereby overtly, fully, permanently, 65 | irrevocably and unconditionally waives, abandons, and surrenders all of 66 | Affirmer's Copyright and Related Rights and associated claims and causes 67 | of action, whether now known or unknown (including existing as well as 68 | future claims and causes of action), in the Work (i) in all territories 69 | worldwide, (ii) for the maximum duration provided by applicable law or 70 | treaty (including future time extensions), (iii) in any current or future 71 | medium and for any number of copies, and (iv) for any purpose whatsoever, 72 | including without limitation commercial, advertising or promotional 73 | purposes (the "Waiver"). Affirmer makes the Waiver for the benefit of each 74 | member of the public at large and to the detriment of Affirmer's heirs and 75 | successors, fully intending that such Waiver shall not be subject to 76 | revocation, rescission, cancellation, termination, or any other legal or 77 | equitable action to disrupt the quiet enjoyment of the Work by the public 78 | as contemplated by Affirmer's express Statement of Purpose. 79 | 80 | 3. Public License Fallback. Should any part of the Waiver for any reason 81 | be judged legally invalid or ineffective under applicable law, then the 82 | Waiver shall be preserved to the maximum extent permitted taking into 83 | account Affirmer's express Statement of Purpose. In addition, to the 84 | extent the Waiver is so judged Affirmer hereby grants to each affected 85 | person a royalty-free, non transferable, non sublicensable, non exclusive, 86 | irrevocable and unconditional license to exercise Affirmer's Copyright and 87 | Related Rights in the Work (i) in all territories worldwide, (ii) for the 88 | maximum duration provided by applicable law or treaty (including future 89 | time extensions), (iii) in any current or future medium and for any number 90 | of copies, and (iv) for any purpose whatsoever, including without 91 | limitation commercial, advertising or promotional purposes (the 92 | "License"). The License shall be deemed effective as of the date CC0 was 93 | applied by Affirmer to the Work. Should any part of the License for any 94 | reason be judged legally invalid or ineffective under applicable law, such 95 | partial invalidity or ineffectiveness shall not invalidate the remainder 96 | of the License, and in such case Affirmer hereby affirms that he or she 97 | will not (i) exercise any of his or her remaining Copyright and Related 98 | Rights in the Work or (ii) assert any associated claims and causes of 99 | action with respect to the Work, in either case contrary to Affirmer's 100 | express Statement of Purpose. 101 | 102 | 4. Limitations and Disclaimers. 103 | 104 | a. No trademark or patent rights held by Affirmer are waived, abandoned, 105 | surrendered, licensed or otherwise affected by this document. 106 | b. Affirmer offers the Work as-is and makes no representations or 107 | warranties of any kind concerning the Work, express, implied, 108 | statutory or otherwise, including without limitation warranties of 109 | title, merchantability, fitness for a particular purpose, non 110 | infringement, or the absence of latent or other defects, accuracy, or 111 | the present or absence of errors, whether or not discoverable, all to 112 | the greatest extent permissible under applicable law. 113 | c. Affirmer disclaims responsibility for clearing rights of other persons 114 | that may apply to the Work or any use thereof, including without 115 | limitation any person's Copyright and Related Rights in the Work. 116 | Further, Affirmer disclaims responsibility for obtaining any necessary 117 | consents, permissions or other rights required for any use of the 118 | Work. 119 | d. Affirmer understands and acknowledges that Creative Commons is not a 120 | party to this document and has no duty or obligation with respect to 121 | this CC0 or use of the Work. 122 | -------------------------------------------------------------------------------- /ml/diet_plan_recommender/model_exploration.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 20, 6 | "outputs": [], 7 | "source": [ 8 | "import pandas as pd\n", 9 | "import numpy as np\n", 10 | "import sklearn\n", 11 | "from sklearn.neighbors import NearestNeighbors\n", 12 | "from collections import Counter\n", 13 | "\n", 14 | "import warnings\n", 15 | "warnings.filterwarnings('ignore')" 16 | ], 17 | "metadata": { 18 | "collapsed": false, 19 | "ExecuteTime": { 20 | "end_time": "2024-01-13T11:47:10.416474900Z", 21 | "start_time": "2024-01-13T11:47:10.414960800Z" 22 | } 23 | }, 24 | "id": "6de9ecd3ee6bc8eb" 25 | }, 26 | { 27 | "cell_type": "code", 28 | "execution_count": 24, 29 | "outputs": [], 30 | "source": [ 31 | "class Recommender:\n", 32 | " \n", 33 | " def __init__(self,profiles,recent_activity,dataset):\n", 34 | " self.df = dataset\n", 35 | " self.profiles = profiles\n", 36 | " self.recent_activity = recent_activity\n", 37 | " \n", 38 | " def get_features(self,dataframe):\n", 39 | " #getting dummies of dataset\n", 40 | " nutrient_dummies = dataframe.Nutrient.str.get_dummies()\n", 41 | " disease_dummies = dataframe.Disease.str.get_dummies(sep=' ')\n", 42 | " diet_dummies = dataframe.Diet.str.get_dummies(sep=' ')\n", 43 | " feature_df = pd.concat([nutrient_dummies,disease_dummies,diet_dummies],axis=1)\n", 44 | " \n", 45 | " return feature_df\n", 46 | " \n", 47 | " def find_neighbors(self,dataframe,features,k):\n", 48 | " features_df = self.get_features(dataframe)\n", 49 | " total_features = features_df.columns \n", 50 | " d = dict()\n", 51 | " for i in total_features:\n", 52 | " d[i]= 0\n", 53 | " for i in features:\n", 54 | " d[i] = 1\n", 55 | " final_input = list(d.values())\n", 56 | " \n", 57 | " similar_neighbors = self.k_neighbor([final_input],features_df,dataframe,k)\n", 58 | " return similar_neighbors\n", 59 | " \n", 60 | " def k_neighbor(self,inputs,feature_df,dataframe,k):\n", 61 | " \n", 62 | " #initializing model with k neighbors\n", 63 | " model = NearestNeighbors(n_neighbors=k,algorithm='ball_tree')\n", 64 | " \n", 65 | " # fitting model with dataset features\n", 66 | " model.fit(feature_df)\n", 67 | " \n", 68 | " df_results = pd.DataFrame(columns=list(dataframe.columns))\n", 69 | " \n", 70 | " # getting distance and indices for k nearest neighbor\n", 71 | " distnaces , indices = model.kneighbors(inputs)\n", 72 | "\n", 73 | " for i in list(indices):\n", 74 | " df_results = df_results._append(dataframe.loc[i])\n", 75 | "\n", 76 | " df_results = df_results.reset_index(drop=True)\n", 77 | " return df_results\n", 78 | " \n", 79 | " def user_based(self,features,user_id):\n", 80 | " \n", 81 | " similar_users = self.find_neighbors(self.profiles,features,10)\n", 82 | " users = list(similar_users.User_Id)\n", 83 | " \n", 84 | " results = self.recent_activity[self.recent_activity.User_Id.isin(users)] #taking acitivies\n", 85 | " \n", 86 | " results = results[results['User_Id']!=user_id] # selecting those which are not reviewed by user\n", 87 | " \n", 88 | " meals = list(results.Meal_Id.unique())\n", 89 | " \n", 90 | " results = self.df[self.df.Meal_Id.isin(meals)]\n", 91 | " \n", 92 | " results = results.filter(['Meal_Id','Name','Nutrient','Veg_Non','description','Price','Review'])\n", 93 | "\n", 94 | " results = results.drop_duplicates(subset=['Name'])\n", 95 | " results = results.reset_index(drop=True)\n", 96 | " return results\n", 97 | " \n", 98 | " def recent_activity_based(self,user_id):\n", 99 | " recent_df = self.recent_activity[self.recent_activity['User_Id']==user_id]\n", 100 | " meal_ids = list(recent_df.Meal_Id.unique())\n", 101 | " recent_data = self.df[self.df.Meal_Id.isin(meal_ids)][['Nutrient','catagory','Disease','Diet']].reset_index(drop=True)\n", 102 | "\n", 103 | " disease = []\n", 104 | " diet = []\n", 105 | " for i in range(recent_data.shape[0]):\n", 106 | " for j in recent_data.loc[i,'Disease'].split():\n", 107 | " disease.append(j)\n", 108 | " for i in range(recent_data.shape[0]):\n", 109 | " for j in recent_data.loc[i,'Diet'].split():\n", 110 | " diet.append(j)\n", 111 | " \n", 112 | " value_counts = recent_data.Nutrient.value_counts()\n", 113 | " m = recent_data.Nutrient.value_counts().mean()\n", 114 | " features = list(value_counts[recent_data.Nutrient.value_counts()>m].index)\n", 115 | " a = dict(Counter(disease))\n", 116 | " \n", 117 | " m = np.mean(list(a.values()))\n", 118 | " for i in a.items():\n", 119 | " if i[1]>m:\n", 120 | " features.append(i[0])\n", 121 | " a = dict(Counter(diet))\n", 122 | " m = np.mean(list(a.values()))\n", 123 | " for i in a.items():\n", 124 | " if i[1]>m:\n", 125 | " features.append(i[0])\n", 126 | " \n", 127 | " similar_neighbors = self.find_neighbors(self.df,features,10)\n", 128 | " return similar_neighbors.filter(['Meal_Id','Name','Nutrient','Veg_Non','description','Price','Review'])\n", 129 | " \n", 130 | " def recommend(self,user_id):\n", 131 | " #finding user's profile features by id\n", 132 | " profile = self.profiles[self.profiles['User_Id']==user_id]\n", 133 | " features = []\n", 134 | " features.append(profile['Nutrient'].values[0])\n", 135 | " features.extend(profile['Disease'].values[0].split())\n", 136 | " features.extend(profile['Diet'].values[0].split())\n", 137 | " df1 = self.user_based(features,user_id)\n", 138 | " \n", 139 | " df2 = self.recent_activity_based(user_id)\n", 140 | " df = pd.concat([df1,df2])\n", 141 | " \n", 142 | " df = df.drop_duplicates('description').reset_index(drop=True)\n", 143 | " return df" 144 | ], 145 | "metadata": { 146 | "collapsed": false, 147 | "ExecuteTime": { 148 | "end_time": "2024-01-13T11:48:02.958190700Z", 149 | "start_time": "2024-01-13T11:48:02.926463600Z" 150 | } 151 | }, 152 | "id": "32b6cf494ca41ba7" 153 | }, 154 | { 155 | "cell_type": "code", 156 | "execution_count": 25, 157 | "outputs": [ 158 | { 159 | "data": { 160 | "text/plain": " Meal_Id Name Nutrient \\\n0 meal_id30 couscous with ratatouille - tangy tomato sauce chloride \n1 meal_id50 belgian pork chop iron \n2 meal_id53 chocolate appo magnesium \n3 meal_id73 hot chocolate magnesium \n4 meal_id127 cajun spiced turkey wrapped with bacon vitamin_c \n5 meal_id223 veg summer rolls carbohydrates \n6 meal_id68 gajar halwa tart vitamin_d \n7 meal_id239 homemade gulab jamun vitamin_d \n8 meal_id86 roast turkey with cranberry sauce chloride \n9 meal_id187 tricolour pizza sodium \n10 meal_id36 spicy watermelon soup sodium \n11 meal_id26 almond pearls protien \n\n Veg_Non description Price \n0 veg for the cous cous:, plain couscous, extra virg... 220 \n1 veg pork chop, pink pepper corn, green pepper corn... 215 \n2 veg rice, coconut, baking powder, vanilla extract,... 340 \n3 veg milk, chocolate, cocoa powder, powdered sugar,... 205 \n4 non-veg turkey breast, cajun spice, spinach leaves (co... 555 \n5 veg rice paper sheets, iceberg lettuce, carrot, be... 545 \n6 veg white butter, breakfast sugar, milk full fat, ... 205 \n7 veg sugar, water, milk, cardamom seeds, saffron, c... 445 \n8 non-veg whole turkey, butter, onion, celery, crumbled ... 630 \n9 veg pizza base , pizza sauce, mozzarella cheese, b... 380 \n10 veg तरबूज, अदरक-लहसुन का पेस्ट, पुदीना, चिली फलेक्... 225 \n11 veg toasted almonds, blueberries, oats, corn flake... 550 ", 161 | "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
Meal_IdNameNutrientVeg_NondescriptionPrice
0meal_id30couscous with ratatouille - tangy tomato saucechloridevegfor the cous cous:, plain couscous, extra virg...220
1meal_id50belgian pork chopironvegpork chop, pink pepper corn, green pepper corn...215
2meal_id53chocolate appomagnesiumvegrice, coconut, baking powder, vanilla extract,...340
3meal_id73hot chocolatemagnesiumvegmilk, chocolate, cocoa powder, powdered sugar,...205
4meal_id127cajun spiced turkey wrapped with baconvitamin_cnon-vegturkey breast, cajun spice, spinach leaves (co...555
5meal_id223veg summer rollscarbohydratesvegrice paper sheets, iceberg lettuce, carrot, be...545
6meal_id68gajar halwa tartvitamin_dvegwhite butter, breakfast sugar, milk full fat, ...205
7meal_id239homemade gulab jamunvitamin_dvegsugar, water, milk, cardamom seeds, saffron, c...445
8meal_id86roast turkey with cranberry saucechloridenon-vegwhole turkey, butter, onion, celery, crumbled ...630
9meal_id187tricolour pizzasodiumvegpizza base , pizza sauce, mozzarella cheese, b...380
10meal_id36spicy watermelon soupsodiumvegतरबूज, अदरक-लहसुन का पेस्ट, पुदीना, चिली फलेक्...225
11meal_id26almond pearlsprotienvegtoasted almonds, blueberries, oats, corn flake...550
\n
" 162 | }, 163 | "execution_count": 25, 164 | "metadata": {}, 165 | "output_type": "execute_result" 166 | } 167 | ], 168 | "source": [ 169 | "user_id = 'User_71' # user id of current user\n", 170 | "\n", 171 | "profiles = pd.read_csv('user_Profiles.csv') # profiles of all users\n", 172 | "recent_activity = pd.read_csv('recent_activity.csv') # recent activities of current user (meals liked,rated,searched,Purchased)\n", 173 | "dataset = pd.read_csv('dataset.csv') # main dataset\n", 174 | "\n", 175 | "\n", 176 | "ob = Recommender(profiles,recent_activity,dataset)\n", 177 | "result = ob.recommend(user_id)\n", 178 | "result" 179 | ], 180 | "metadata": { 181 | "collapsed": false, 182 | "ExecuteTime": { 183 | "end_time": "2024-01-13T11:48:04.150355100Z", 184 | "start_time": "2024-01-13T11:48:04.052945200Z" 185 | } 186 | }, 187 | "id": "da5bcc43e19d5d60" 188 | }, 189 | { 190 | "cell_type": "code", 191 | "execution_count": null, 192 | "outputs": [], 193 | "source": [], 194 | "metadata": { 195 | "collapsed": false 196 | }, 197 | "id": "78824e3b9b2fdd4e" 198 | } 199 | ], 200 | "metadata": { 201 | "kernelspec": { 202 | "display_name": "Python 3", 203 | "language": "python", 204 | "name": "python3" 205 | }, 206 | "language_info": { 207 | "codemirror_mode": { 208 | "name": "ipython", 209 | "version": 2 210 | }, 211 | "file_extension": ".py", 212 | "mimetype": "text/x-python", 213 | "name": "python", 214 | "nbconvert_exporter": "python", 215 | "pygments_lexer": "ipython2", 216 | "version": "2.7.6" 217 | } 218 | }, 219 | "nbformat": 4, 220 | "nbformat_minor": 5 221 | } 222 | -------------------------------------------------------------------------------- /ml/diet_plan_recommender/user_Profiles.csv: -------------------------------------------------------------------------------- 1 | User_Id,Veg_Non,Nutrient,Disease,Diet 2 | User_1,non-veg,chloride, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 3 | User_2,veg,chloride, goitre, high_fiber_diet vegan_diet 4 | User_3,veg,magnesium, cancer hypertension goitre heart_disease scurvy, high_fiber_diet ketogenic_diet high_protien_diet 5 | User_4,veg,vitamin_e, cancer kidney_disease obesity anemia heart_disease diabeties, high_fiber_diet ketogenic_diet gluten_free_diet low_sodium_diet omni_diet vegan_diet alkaline_diet 6 | User_5,non-veg,vitamin_c, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 7 | User_6,veg,magnesium, goitre, high_fiber_diet low_sodium_diet low_fat_diet high_protien_diet 8 | User_7,non-veg,potassium, cancer anemia obesity kidney_disease pregnancy, high_protien_diet high_fiber_diet ketogenic_diet type_o_diet low_fat_diet low_sodium_diet omni_diet vegan_diet dash_diet 9 | User_8,non-veg,chloride, anemia kidney_disease goitre rickets diabeties pregnancy, type_a_diet high_protien_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 10 | User_9,veg,iron, hypertension, high_fiber_diet gluten_free_diet vegan_diet low_fat_diet 11 | User_10,veg,fiber, obesity goitre hypertension, high_protien_diet high_fiber_diet ketogenic_diet low_fat_diet low_sodium_diet 12 | User_11,veg,selenium, hypertension, high_fiber_diet ketogenic_diet low_fat_diet vegan_diet alkaline_diet 13 | User_13,veg,fiber, kidney_disease obesity goitre hypertension diabeties, high_protien_diet high_fiber_diet ketogenic_diet low_fat_diet low_sodium_diet alkaline_diet dash_diet 14 | User_14,veg,calcium, kidney_disease goitre hypertension, high_protien_diet high_fiber_diet ketogenic_diet gluten_free_diet low_fat_diet low_sodium_diet vegan_diet alkaline_diet 15 | User_15,veg,vitamin_c, scurvy goitre anemia kidney_disease, high_fiber_diet dash_diet ketogenic_diet type_a_diet 16 | User_16,veg,magnesium, obesity diabeties anemia, high_protien_diet high_fiber_diet ketogenic_diet vegan_diet alkaline_diet dash_diet 17 | User_17,veg,vitamin_e, cancer kidney_disease obesity anemia heart_disease diabeties, high_fiber_diet ketogenic_diet gluten_free_diet low_sodium_diet omni_diet vegan_diet alkaline_diet dash_diet 18 | User_18,veg,calcium, goitre hypertension, high_protien_diet ketogenic_diet gluten_free_diet low_fat_diet vegan_diet 19 | User_19,veg,calcium, obesity cancer hypertension, high_protien_diet ketogenic_diet gluten_free_diet low_fat_diet vegan_diet alkaline_diet 20 | User_20,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 21 | User_21,veg,magnesium, scurvy, high_fiber_diet high_protien_diet 22 | User_22,veg,carbohydrates, obesity diabeties anemia kidney_disease, dash_diet ketogenic_diet vegan_diet high_protien_diet 23 | User_23,veg,protien, hypertension, gluten_free_diet 24 | User_24,veg,vitamin_e, cancer kidney_disease obesity anemia heart_disease diabeties, high_fiber_diet ketogenic_diet gluten_free_diet low_sodium_diet omni_diet vegan_diet alkaline_diet dash_diet 25 | User_25,veg,calcium, goitre, ketogenic_diet low_fat_diet vegan_diet high_protien_diet 26 | User_26,veg,iron, hypertension, high_fiber_diet gluten_free_diet vegan_diet low_fat_diet 27 | User_27,non-veg,vitamin_a, cancer kidney_disease obesity hypertension anemia goitre heart_disease diabeties rickets pregnancy, high_protien_diet ketogenic_diet low_carb_diet low_fat_diet vegan_diet alkaline_diet dash_diet 28 | User_28,non-veg,calcium, hypertension obesity anemia goitre heart_disease diabeties rickets pregnancy, ketogenic_diet low_fat_diet vegan_diet high_protien_diet 29 | User_29,veg,selenium, diabeties hypertension, high_fiber_diet ketogenic_diet low_fat_diet vegan_diet alkaline_diet dash_diet 30 | User_30,veg,magnesium, hypertension heart_disease, high_fiber_diet ketogenic_diet high_protien_diet 31 | User_31,veg,iron, scurvy rickets eye_disease heart_disease, high_fiber_diet ketogenic_diet low_fat_diet vegan_diet hormone_diet 32 | User_32,veg,calcium, hypertension, high_protien_diet ketogenic_diet gluten_free_diet low_fat_diet vegan_diet 33 | User_33,veg,chloride, kidney_disease hypertension anemia goitre heart_disease diabeties scurvy pregnancy, high_fiber_diet hormone_diet dash_diet alkaline_diet 34 | User_34,veg,carbohydrates, cancer kidney_disease obesity anemia diabeties scurvy pregnancy, high_protien_diet ketogenic_diet vegan_diet alkaline_diet dash_diet 35 | User_35,veg,fiber, kidney_disease obesity hypertension goitre heart_disease scurvy, high_protien_diet high_fiber_diet ketogenic_diet gluten_free_diet low_fat_diet low_sodium_diet vegan_diet 36 | User_36,veg,protien, hypertension, dash_diet ketogenic_diet vegan_diet high_protien_diet 37 | User_37,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 38 | User_38,veg,carbohydrates, cancer kidney_disease obesity hypertension goitre heart_disease diabeties pregnancy, high_protien_diet high_fiber_diet ketogenic_diet gluten_free_diet low_fat_diet vegan_diet hormone_diet dash_diet 39 | User_39,non-veg,fiber, kidney_disease obesity hypertension anemia goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet ketogenic_diet low_carb_diet low_fat_diet low_sodium_diet vegan_diet hormone_diet 40 | User_40,non-veg,iron, kidney_disease hypertension anemia goitre rickets scurvy pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet alkaline_diet hormone_diet 41 | User_41,veg,fiber, obesity goitre hypertension, high_protien_diet high_fiber_diet ketogenic_diet low_fat_diet low_sodium_diet 42 | User_42,veg,manganese, pregnancy anemia kidney_disease, high_fiber_diet ketogenic_diet low_fat_diet vegan_diet hormone_diet 43 | User_43,veg,selenium, diabeties hypertension, high_fiber_diet ketogenic_diet low_fat_diet vegan_diet alkaline_diet dash_diet 44 | User_44,veg,vitamin_c, scurvy diabeties pregnancy, high_protien_diet ketogenic_diet vegan_diet alkaline_diet dash_diet 45 | User_45,non-veg,potassium, cancer anemia obesity kidney_disease goitre pregnancy, high_protien_diet high_fiber_diet ketogenic_diet type_o_diet low_fat_diet low_sodium_diet omni_diet vegan_diet dash_diet 46 | User_46,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 47 | User_47,veg,carbohydrates, diabeties goitre, high_protien_diet high_fiber_diet low_fat_diet low_sodium_diet alkaline_diet 48 | User_48,veg,magnesium, hypertension heart_disease, high_fiber_diet ketogenic_diet high_protien_diet 49 | User_49,veg,fiber, obesity diabeties goitre hypertension, high_protien_diet high_fiber_diet ketogenic_diet low_fat_diet low_sodium_diet alkaline_diet dash_diet 50 | User_50,veg,carbohydrates, diabeties goitre, high_protien_diet high_fiber_diet low_fat_diet low_sodium_diet alkaline_diet 51 | User_51,non-veg,vitamin_a, cancer kidney_disease obesity hypertension anemia goitre heart_disease diabeties rickets pregnancy, high_protien_diet high_fiber_diet ketogenic_diet low_carb_diet low_fat_diet vegan_diet alkaline_diet dash_diet 52 | User_52,veg,iron, cancer, high_fiber_diet low_fat_diet vegan_diet alkaline_diet hormone_diet 53 | User_53,non-veg,iron, goitre, high_fiber_diet vegan_diet low_fat_diet 54 | User_54,veg,magnesium, kidney_disease obesity hypertension anemia heart_disease rickets scurvy, high_protien_diet high_fiber_diet ketogenic_diet gluten_free_diet low_fat_diet omni_diet hormone_diet 55 | User_55,non-veg,vitamin_c, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 56 | User_56,non-veg,vitamin_a, cancer kidney_disease obesity hypertension anemia goitre heart_disease diabeties rickets pregnancy, high_protien_diet ketogenic_diet low_carb_diet low_fat_diet vegan_diet alkaline_diet dash_diet 57 | User_57,veg,sodium, obesity scurvy hypertension, high_fiber_diet ketogenic_diet gluten_free_diet paleo_diet alkaline_diet dash_diet 58 | User_58,non-veg,vitamin_a, cancer kidney_disease obesity hypertension anemia goitre heart_disease diabeties rickets pregnancy, high_protien_diet ketogenic_diet low_carb_diet low_fat_diet vegan_diet alkaline_diet dash_diet 59 | User_59,veg,selenium, hypertension, ketogenic_diet vegan_diet low_fat_diet 60 | User_60,non-veg,iron, cancer kidney_disease hypertension anemia goitre heart_disease diabeties rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet alkaline_diet hormone_diet dash_diet 61 | User_61,veg,phosphorus, obesity kidney_disease scurvy heart_disease, high_protien_diet high_fiber_diet gluten_free_diet low_fat_diet low_sodium_diet vegan_diet 62 | User_62,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 63 | User_63,veg,calcium, kidney_disease goitre hypertension, high_protien_diet high_fiber_diet ketogenic_diet gluten_free_diet low_fat_diet low_sodium_diet vegan_diet alkaline_diet 64 | User_64,veg,calcium, goitre hypertension, high_protien_diet ketogenic_diet gluten_free_diet low_fat_diet vegan_diet 65 | User_65,non-veg,calcium, kidney_disease anemia hypertension goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet ketogenic_diet gluten_free_diet low_carb_diet low_fat_diet low_sodium_diet vegan_diet hormone_diet 66 | User_66,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 67 | User_67,veg,iron, obesity diabeties goitre anemia, high_fiber_diet ketogenic_diet low_fat_diet low_sodium_diet vegan_diet dash_diet 68 | User_68,veg,magnesium, goitre, high_fiber_diet low_sodium_diet low_fat_diet high_protien_diet 69 | User_69,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 70 | User_70,veg,magnesium, hypertension heart_disease, high_fiber_diet ketogenic_diet high_protien_diet 71 | User_71,veg,iron, goitre pregnancy, high_protien_diet high_fiber_diet paleo_diet low_fat_diet vegan_diet 72 | User_72,veg,calcium, kidney_disease obesity hypertension goitre heart_disease scurvy pregnancy, high_protien_diet ketogenic_diet low_fat_diet low_sodium_diet omni_diet Mediterranean_diet vegan_diet dash_diet 73 | User_73,non-veg,magnesium, hypertension heart_disease, high_fiber_diet ketogenic_diet high_protien_diet 74 | User_74,veg,magnesium, hypertension heart_disease, high_fiber_diet ketogenic_diet high_protien_diet 75 | User_75,veg,carbohydrates, cancer kidney_disease obesity anemia diabeties scurvy pregnancy, high_protien_diet ketogenic_diet vegan_diet alkaline_diet dash_diet 76 | User_76,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 77 | User_77,veg,vitamin_a, kidney_disease hypertension goitre heart_disease scurvy pregnancy, high_protien_diet high_fiber_diet paleo_diet low_fat_diet low_sodium_diet Mediterranean_diet alkaline_diet dash_diet 78 | User_78,veg,calcium, hypertension, high_protien_diet ketogenic_diet gluten_free_diet low_fat_diet vegan_diet 79 | User_79,veg,sodium, obesity, alkaline_diet 80 | User_80,veg,magnesium, hypertension, high_protien_diet high_fiber_diet ketogenic_diet vegan_diet dash_diet 81 | User_81,veg,calcium, obesity eye_disease heart_disease, high_protien_diet high_fiber_diet ketogenic_diet paleo_diet low_fat_diet low_sodium_diet Mediterranean_diet vegan_diet alkaline_diet dash_diet 82 | User_82,non-veg,sodium, kidney_disease obesity goitre scurvy pregnancy, alkaline_diet 83 | User_83,veg,protien, hypertension, dash_diet gluten_free_diet high_protien_diet 84 | User_85,non-veg,potassium, cancer anemia obesity kidney_disease goitre pregnancy, high_protien_diet high_fiber_diet ketogenic_diet type_o_diet low_fat_diet low_sodium_diet omni_diet vegan_diet dash_diet 85 | User_86,veg,iron, kidney_disease hypertension anemia goitre heart_disease diabeties scurvy pregnancy, high_fiber_diet low_fat_diet vegan_diet alkaline_diet hormone_diet dash_diet 86 | User_87,veg,vitamin_c, scurvy goitre anemia kidney_disease, high_fiber_diet dash_diet ketogenic_diet type_a_diet 87 | User_88,veg,vitamin_a, goitre kidney_disease, high_protien_diet 88 | User_89,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 89 | User_90,veg,fiber, obesity goitre hypertension, high_protien_diet high_fiber_diet ketogenic_diet low_fat_diet low_sodium_diet 90 | User_91,non-veg,vitamin_a, cancer kidney_disease obesity hypertension anemia goitre heart_disease diabeties rickets pregnancy, high_protien_diet high_fiber_diet ketogenic_diet low_carb_diet low_fat_diet vegan_diet alkaline_diet dash_diet 91 | User_92,veg,calcium, goitre, high_protien_diet high_fiber_diet ketogenic_diet low_fat_diet vegan_diet 92 | User_93,veg,calcium, goitre hypertension, high_protien_diet ketogenic_diet gluten_free_diet low_fat_diet vegan_diet 93 | User_94,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet vegan_diet hormone_diet 94 | User_95,veg,calcium, obesity eye_disease, high_protien_diet ketogenic_diet low_fat_diet vegan_diet alkaline_diet dash_diet 95 | User_96,non-veg,iron, anemia kidney_disease goitre rickets pregnancy, type_a_diet high_protien_diet high_fiber_diet low_carb_diet low_fat_diet low_sodium_diet vegan_diet hormone_diet dash_diet 96 | User_97,veg,iron, goitre, high_fiber_diet low_sodium_diet vegan_diet low_fat_diet 97 | User_98,veg,selenium, hypertension, high_fiber_diet ketogenic_diet low_fat_diet vegan_diet alkaline_diet 98 | User_99,veg,chloride, goitre, high_fiber_diet vegan_diet 99 | User_100,veg,calcium, kidney_disease hypertension anemia goitre heart_disease diabeties scurvy pregnancy, high_protien_diet high_fiber_diet ketogenic_diet low_fat_diet vegan_diet alkaline_diet hormone_diet dash_diet 100 | -------------------------------------------------------------------------------- /backend/data/stopwords.txt: -------------------------------------------------------------------------------- 1 | a 2 | about 3 | above 4 | after 5 | again 6 | against 7 | all 8 | am 9 | an 10 | and 11 | any 12 | are 13 | aren't 14 | as 15 | at 16 | be 17 | because 18 | been 19 | before 20 | being 21 | below 22 | between 23 | both 24 | but 25 | by 26 | can't 27 | cannot 28 | could 29 | couldn't 30 | did 31 | didn't 32 | do 33 | does 34 | doesn't 35 | doing 36 | don't 37 | down 38 | during 39 | each 40 | few 41 | for 42 | from 43 | further 44 | had 45 | hadn't 46 | has 47 | hasn't 48 | have 49 | haven't 50 | having 51 | he 52 | he'd 53 | he'll 54 | he's 55 | her 56 | here 57 | here's 58 | hers 59 | herself 60 | him 61 | himself 62 | his 63 | how 64 | how's 65 | i 66 | i'd 67 | i'll 68 | i'm 69 | i've 70 | if 71 | in 72 | into 73 | is 74 | isn't 75 | it 76 | it's 77 | its 78 | itself 79 | let's 80 | me 81 | more 82 | most 83 | mustn't 84 | my 85 | myself 86 | no 87 | nor 88 | not 89 | of 90 | off 91 | on 92 | once 93 | only 94 | or 95 | other 96 | ought 97 | our 98 | ours 99 | ourselves 100 | out 101 | over 102 | own 103 | same 104 | shan't 105 | she 106 | she'd 107 | she'll 108 | she's 109 | should 110 | shouldn't 111 | so 112 | some 113 | such 114 | than 115 | that 116 | that's 117 | the 118 | their 119 | theirs 120 | them 121 | themselves 122 | then 123 | there 124 | there's 125 | these 126 | they 127 | they'd 128 | they'll 129 | they're 130 | they've 131 | this 132 | those 133 | through 134 | to 135 | too 136 | under 137 | until 138 | up 139 | very 140 | was 141 | wasn't 142 | we 143 | we'd 144 | we'll 145 | we're 146 | we've 147 | were 148 | weren't 149 | what 150 | what's 151 | when 152 | when's 153 | where 154 | where's 155 | which 156 | while 157 | who 158 | who's 159 | whom 160 | why 161 | why's 162 | with 163 | won't 164 | would 165 | wouldn't 166 | you 167 | you'd 168 | you'll 169 | you're 170 | you've 171 | your 172 | yours 173 | yourself 174 | yourselves 175 | I 176 | a 177 | about 178 | an 179 | are 180 | as 181 | at 182 | be 183 | by 184 | com 185 | for 186 | from 187 | how 188 | in 189 | is 190 | it 191 | of 192 | on 193 | or 194 | that 195 | the 196 | this 197 | to 198 | was 199 | what 200 | when 201 | where 202 | who 203 | will 204 | with 205 | the 206 | www 207 | a 208 | able 209 | about 210 | above 211 | abst 212 | accordance 213 | according 214 | accordingly 215 | across 216 | act 217 | actually 218 | added 219 | adj 220 | affected 221 | affecting 222 | affects 223 | after 224 | afterwards 225 | again 226 | against 227 | ah 228 | all 229 | almost 230 | alone 231 | along 232 | already 233 | also 234 | although 235 | always 236 | am 237 | among 238 | amongst 239 | an 240 | and 241 | announce 242 | another 243 | any 244 | anybody 245 | anyhow 246 | anymore 247 | anyone 248 | anything 249 | anyway 250 | anyways 251 | anywhere 252 | apparently 253 | approximately 254 | are 255 | aren 256 | arent 257 | arise 258 | around 259 | as 260 | aside 261 | ask 262 | asking 263 | at 264 | auth 265 | available 266 | away 267 | awfully 268 | b 269 | back 270 | be 271 | became 272 | because 273 | become 274 | becomes 275 | becoming 276 | been 277 | before 278 | beforehand 279 | begin 280 | beginning 281 | beginnings 282 | begins 283 | behind 284 | being 285 | believe 286 | below 287 | beside 288 | besides 289 | between 290 | beyond 291 | biol 292 | both 293 | brief 294 | briefly 295 | but 296 | by 297 | c 298 | ca 299 | came 300 | can 301 | cannot 302 | can't 303 | cause 304 | causes 305 | certain 306 | certainly 307 | co 308 | com 309 | come 310 | comes 311 | contain 312 | containing 313 | contains 314 | could 315 | couldnt 316 | d 317 | date 318 | did 319 | didn't 320 | different 321 | do 322 | does 323 | doesn't 324 | doing 325 | done 326 | don't 327 | down 328 | downwards 329 | due 330 | during 331 | e 332 | each 333 | ed 334 | edu 335 | effect 336 | eg 337 | eight 338 | eighty 339 | either 340 | else 341 | elsewhere 342 | end 343 | ending 344 | enough 345 | especially 346 | et 347 | et-al 348 | etc 349 | even 350 | ever 351 | every 352 | everybody 353 | everyone 354 | everything 355 | everywhere 356 | ex 357 | except 358 | f 359 | far 360 | few 361 | ff 362 | fifth 363 | first 364 | five 365 | fix 366 | followed 367 | following 368 | follows 369 | for 370 | former 371 | formerly 372 | forth 373 | found 374 | four 375 | from 376 | further 377 | furthermore 378 | g 379 | gave 380 | get 381 | gets 382 | getting 383 | give 384 | given 385 | gives 386 | giving 387 | go 388 | goes 389 | gone 390 | got 391 | gotten 392 | h 393 | had 394 | happens 395 | hardly 396 | has 397 | hasn't 398 | have 399 | haven't 400 | having 401 | he 402 | hed 403 | hence 404 | her 405 | here 406 | hereafter 407 | hereby 408 | herein 409 | heres 410 | hereupon 411 | hers 412 | herself 413 | hes 414 | hi 415 | hid 416 | him 417 | himself 418 | his 419 | hither 420 | home 421 | how 422 | howbeit 423 | however 424 | hundred 425 | i 426 | id 427 | ie 428 | if 429 | i'll 430 | im 431 | immediate 432 | immediately 433 | importance 434 | important 435 | in 436 | inc 437 | indeed 438 | index 439 | information 440 | instead 441 | into 442 | invention 443 | inward 444 | is 445 | isn't 446 | it 447 | itd 448 | it'll 449 | its 450 | itself 451 | i've 452 | j 453 | just 454 | k 455 | keep 456 | keeps 457 | kept 458 | kg 459 | km 460 | know 461 | known 462 | knows 463 | l 464 | largely 465 | last 466 | lately 467 | later 468 | latter 469 | latterly 470 | least 471 | less 472 | lest 473 | let 474 | lets 475 | like 476 | liked 477 | likely 478 | line 479 | little 480 | 'll 481 | look 482 | looking 483 | looks 484 | ltd 485 | m 486 | made 487 | mainly 488 | make 489 | makes 490 | many 491 | may 492 | maybe 493 | me 494 | mean 495 | means 496 | meantime 497 | meanwhile 498 | merely 499 | mg 500 | might 501 | million 502 | miss 503 | ml 504 | more 505 | moreover 506 | most 507 | mostly 508 | mr 509 | mrs 510 | much 511 | mug 512 | must 513 | my 514 | myself 515 | n 516 | na 517 | name 518 | namely 519 | nay 520 | nd 521 | near 522 | nearly 523 | necessarily 524 | necessary 525 | need 526 | needs 527 | neither 528 | never 529 | nevertheless 530 | new 531 | next 532 | nine 533 | ninety 534 | no 535 | nobody 536 | non 537 | none 538 | nonetheless 539 | noone 540 | nor 541 | normally 542 | nos 543 | not 544 | noted 545 | nothing 546 | now 547 | nowhere 548 | o 549 | obtain 550 | obtained 551 | obviously 552 | of 553 | off 554 | often 555 | oh 556 | ok 557 | okay 558 | old 559 | omitted 560 | on 561 | once 562 | one 563 | ones 564 | only 565 | onto 566 | or 567 | ord 568 | other 569 | others 570 | otherwise 571 | ought 572 | our 573 | ours 574 | ourselves 575 | out 576 | outside 577 | over 578 | overall 579 | owing 580 | own 581 | p 582 | page 583 | pages 584 | part 585 | particular 586 | particularly 587 | past 588 | per 589 | perhaps 590 | placed 591 | please 592 | plus 593 | poorly 594 | possible 595 | possibly 596 | potentially 597 | pp 598 | predominantly 599 | present 600 | previously 601 | primarily 602 | probably 603 | promptly 604 | proud 605 | provides 606 | put 607 | q 608 | que 609 | quickly 610 | quite 611 | qv 612 | r 613 | ran 614 | rather 615 | rd 616 | re 617 | readily 618 | really 619 | recent 620 | recently 621 | ref 622 | refs 623 | regarding 624 | regardless 625 | regards 626 | related 627 | relatively 628 | research 629 | respectively 630 | resulted 631 | resulting 632 | results 633 | right 634 | run 635 | s 636 | said 637 | same 638 | saw 639 | say 640 | saying 641 | says 642 | sec 643 | section 644 | see 645 | seeing 646 | seem 647 | seemed 648 | seeming 649 | seems 650 | seen 651 | self 652 | selves 653 | sent 654 | seven 655 | several 656 | shall 657 | she 658 | shed 659 | she'll 660 | shes 661 | should 662 | shouldn't 663 | show 664 | showed 665 | shown 666 | showns 667 | shows 668 | significant 669 | significantly 670 | similar 671 | similarly 672 | since 673 | six 674 | slightly 675 | so 676 | some 677 | somebody 678 | somehow 679 | someone 680 | somethan 681 | something 682 | sometime 683 | sometimes 684 | somewhat 685 | somewhere 686 | soon 687 | sorry 688 | specifically 689 | specified 690 | specify 691 | specifying 692 | still 693 | stop 694 | strongly 695 | sub 696 | substantially 697 | successfully 698 | such 699 | sufficiently 700 | suggest 701 | sup 702 | sure 703 | t 704 | take 705 | taken 706 | taking 707 | tell 708 | tends 709 | th 710 | than 711 | thank 712 | thanks 713 | thanx 714 | that 715 | that'll 716 | thats 717 | that've 718 | the 719 | their 720 | theirs 721 | them 722 | themselves 723 | then 724 | thence 725 | there 726 | thereafter 727 | thereby 728 | thered 729 | therefore 730 | therein 731 | there'll 732 | thereof 733 | therere 734 | theres 735 | thereto 736 | thereupon 737 | there've 738 | these 739 | they 740 | theyd 741 | they'll 742 | theyre 743 | they've 744 | think 745 | this 746 | those 747 | thou 748 | though 749 | thoughh 750 | thousand 751 | throug 752 | through 753 | throughout 754 | thru 755 | thus 756 | til 757 | tip 758 | to 759 | together 760 | too 761 | took 762 | toward 763 | towards 764 | tried 765 | tries 766 | truly 767 | try 768 | trying 769 | ts 770 | twice 771 | two 772 | u 773 | un 774 | under 775 | unfortunately 776 | unless 777 | unlike 778 | unlikely 779 | until 780 | unto 781 | up 782 | upon 783 | ups 784 | us 785 | use 786 | used 787 | useful 788 | usefully 789 | usefulness 790 | uses 791 | using 792 | usually 793 | v 794 | value 795 | various 796 | 've 797 | very 798 | via 799 | viz 800 | vol 801 | vols 802 | vs 803 | w 804 | want 805 | wants 806 | was 807 | wasnt 808 | way 809 | we 810 | wed 811 | welcome 812 | we'll 813 | went 814 | were 815 | werent 816 | we've 817 | what 818 | whatever 819 | what'll 820 | whats 821 | when 822 | whence 823 | whenever 824 | where 825 | whereafter 826 | whereas 827 | whereby 828 | wherein 829 | wheres 830 | whereupon 831 | wherever 832 | whether 833 | which 834 | while 835 | whim 836 | whither 837 | who 838 | whod 839 | whoever 840 | whole 841 | who'll 842 | whom 843 | whomever 844 | whos 845 | whose 846 | why 847 | widely 848 | willing 849 | wish 850 | with 851 | within 852 | without 853 | wont 854 | words 855 | world 856 | would 857 | wouldnt 858 | www 859 | x 860 | y 861 | yes 862 | yet 863 | you 864 | youd 865 | you'll 866 | your 867 | youre 868 | yours 869 | yourself 870 | yourselves 871 | you've 872 | z 873 | zero 874 | a's able about above according 875 | accordingly across actually after afterwards 876 | again against ain't all allow 877 | allows almost alone along already 878 | also although always am among 879 | amongst an and another any 880 | anybody anyhow anyone anything anyway 881 | anyways anywhere apart appear appreciate 882 | appropriate are aren't around as 883 | aside ask asking associated at 884 | available away awfully be became 885 | because become becomes becoming been 886 | before beforehand behind being believe 887 | below beside besides best better 888 | between beyond both brief but 889 | by c'mon c's came can 890 | can't cannot cant cause causes 891 | certain certainly changes clearly co 892 | com come comes concerning consequently 893 | consider considering contain containing contains 894 | corresponding could couldn't course currently 895 | definitely described despite did didn't 896 | different do does doesn't doing 897 | don't done down downwards during 898 | each edu eg eight either 899 | else elsewhere enough entirely especially 900 | et etc even ever every 901 | everybody everyone everything everywhere ex 902 | exactly example except far few 903 | fifth first five followed following 904 | follows for former formerly forth 905 | four from further furthermore get 906 | gets getting given gives go 907 | goes going gone got gotten 908 | greetings had hadn't happens hardly 909 | has hasn't have haven't having 910 | he he's hello help hence 911 | her here here's hereafter hereby 912 | herein hereupon hers herself hi 913 | him himself his hither hopefully 914 | how howbeit however i'd i'll 915 | i'm i've ie if ignored 916 | immediate in inasmuch inc indeed 917 | indicate indicated indicates inner insofar 918 | instead into inward is isn't 919 | it it'd it'll it's its 920 | itself just keep keeps kept 921 | know known knows last lately 922 | later latter latterly least less 923 | lest let let's like liked 924 | likely little look looking looks 925 | ltd mainly many may maybe 926 | me mean meanwhile merely might 927 | more moreover most mostly much 928 | must my myself name namely 929 | nd near nearly necessary need 930 | needs neither never nevertheless new 931 | next nine no nobody non 932 | none noone nor normally not 933 | nothing novel now nowhere obviously 934 | of off often oh ok 935 | okay old on once one 936 | ones only onto or other 937 | others otherwise ought our ours 938 | ourselves out outside over overall 939 | own particular particularly per perhaps 940 | placed please plus possible presumably 941 | probably provides que quite qv 942 | rather rd re really reasonably 943 | regarding regardless regards relatively respectively 944 | right said same saw say 945 | saying says second secondly see 946 | seeing seem seemed seeming seems 947 | seen self selves sensible sent 948 | serious seriously seven several shall 949 | she should shouldn't since six 950 | so some somebody somehow someone 951 | something sometime sometimes somewhat somewhere 952 | soon sorry specified specify specifying 953 | still sub such sup sure 954 | t's take taken tell tends 955 | th than thank thanks thanx 956 | that that's thats the their 957 | theirs them themselves then thence 958 | there there's thereafter thereby therefore 959 | therein theres thereupon these they 960 | they'd they'll they're they've think 961 | third this thorough thoroughly those 962 | though three through throughout thru 963 | thus to together too took 964 | toward towards tried tries truly 965 | try trying twice two un 966 | under unfortunately unless unlikely until 967 | unto up upon us use 968 | used useful uses using usually 969 | value various very via viz 970 | vs want wants was wasn't 971 | way we we'd we'll we're 972 | we've welcome well went were 973 | weren't what what's whatever when 974 | whence whenever where where's whereafter 975 | whereas whereby wherein whereupon wherever 976 | whether which while whither who 977 | who's whoever whole whom whose 978 | why will willing wish with 979 | within without won't wonder would 980 | wouldn't yes yet you you'd 981 | you'll you're you've your yours 982 | yourself yourselves zero -------------------------------------------------------------------------------- /ml/diet_plan_recommender/stopwords.txt: -------------------------------------------------------------------------------- 1 | a 2 | about 3 | above 4 | after 5 | again 6 | against 7 | all 8 | am 9 | an 10 | and 11 | any 12 | are 13 | aren't 14 | as 15 | at 16 | be 17 | because 18 | been 19 | before 20 | being 21 | below 22 | between 23 | both 24 | but 25 | by 26 | can't 27 | cannot 28 | could 29 | couldn't 30 | did 31 | didn't 32 | do 33 | does 34 | doesn't 35 | doing 36 | don't 37 | down 38 | during 39 | each 40 | few 41 | for 42 | from 43 | further 44 | had 45 | hadn't 46 | has 47 | hasn't 48 | have 49 | haven't 50 | having 51 | he 52 | he'd 53 | he'll 54 | he's 55 | her 56 | here 57 | here's 58 | hers 59 | herself 60 | him 61 | himself 62 | his 63 | how 64 | how's 65 | i 66 | i'd 67 | i'll 68 | i'm 69 | i've 70 | if 71 | in 72 | into 73 | is 74 | isn't 75 | it 76 | it's 77 | its 78 | itself 79 | let's 80 | me 81 | more 82 | most 83 | mustn't 84 | my 85 | myself 86 | no 87 | nor 88 | not 89 | of 90 | off 91 | on 92 | once 93 | only 94 | or 95 | other 96 | ought 97 | our 98 | ours 99 | ourselves 100 | out 101 | over 102 | own 103 | same 104 | shan't 105 | she 106 | she'd 107 | she'll 108 | she's 109 | should 110 | shouldn't 111 | so 112 | some 113 | such 114 | than 115 | that 116 | that's 117 | the 118 | their 119 | theirs 120 | them 121 | themselves 122 | then 123 | there 124 | there's 125 | these 126 | they 127 | they'd 128 | they'll 129 | they're 130 | they've 131 | this 132 | those 133 | through 134 | to 135 | too 136 | under 137 | until 138 | up 139 | very 140 | was 141 | wasn't 142 | we 143 | we'd 144 | we'll 145 | we're 146 | we've 147 | were 148 | weren't 149 | what 150 | what's 151 | when 152 | when's 153 | where 154 | where's 155 | which 156 | while 157 | who 158 | who's 159 | whom 160 | why 161 | why's 162 | with 163 | won't 164 | would 165 | wouldn't 166 | you 167 | you'd 168 | you'll 169 | you're 170 | you've 171 | your 172 | yours 173 | yourself 174 | yourselves 175 | I 176 | a 177 | about 178 | an 179 | are 180 | as 181 | at 182 | be 183 | by 184 | com 185 | for 186 | from 187 | how 188 | in 189 | is 190 | it 191 | of 192 | on 193 | or 194 | that 195 | the 196 | this 197 | to 198 | was 199 | what 200 | when 201 | where 202 | who 203 | will 204 | with 205 | the 206 | www 207 | a 208 | able 209 | about 210 | above 211 | abst 212 | accordance 213 | according 214 | accordingly 215 | across 216 | act 217 | actually 218 | added 219 | adj 220 | affected 221 | affecting 222 | affects 223 | after 224 | afterwards 225 | again 226 | against 227 | ah 228 | all 229 | almost 230 | alone 231 | along 232 | already 233 | also 234 | although 235 | always 236 | am 237 | among 238 | amongst 239 | an 240 | and 241 | announce 242 | another 243 | any 244 | anybody 245 | anyhow 246 | anymore 247 | anyone 248 | anything 249 | anyway 250 | anyways 251 | anywhere 252 | apparently 253 | approximately 254 | are 255 | aren 256 | arent 257 | arise 258 | around 259 | as 260 | aside 261 | ask 262 | asking 263 | at 264 | auth 265 | available 266 | away 267 | awfully 268 | b 269 | back 270 | be 271 | became 272 | because 273 | become 274 | becomes 275 | becoming 276 | been 277 | before 278 | beforehand 279 | begin 280 | beginning 281 | beginnings 282 | begins 283 | behind 284 | being 285 | believe 286 | below 287 | beside 288 | besides 289 | between 290 | beyond 291 | biol 292 | both 293 | brief 294 | briefly 295 | but 296 | by 297 | c 298 | ca 299 | came 300 | can 301 | cannot 302 | can't 303 | cause 304 | causes 305 | certain 306 | certainly 307 | co 308 | com 309 | come 310 | comes 311 | contain 312 | containing 313 | contains 314 | could 315 | couldnt 316 | d 317 | date 318 | did 319 | didn't 320 | different 321 | do 322 | does 323 | doesn't 324 | doing 325 | done 326 | don't 327 | down 328 | downwards 329 | due 330 | during 331 | e 332 | each 333 | ed 334 | edu 335 | effect 336 | eg 337 | eight 338 | eighty 339 | either 340 | else 341 | elsewhere 342 | end 343 | ending 344 | enough 345 | especially 346 | et 347 | et-al 348 | etc 349 | even 350 | ever 351 | every 352 | everybody 353 | everyone 354 | everything 355 | everywhere 356 | ex 357 | except 358 | f 359 | far 360 | few 361 | ff 362 | fifth 363 | first 364 | five 365 | fix 366 | followed 367 | following 368 | follows 369 | for 370 | former 371 | formerly 372 | forth 373 | found 374 | four 375 | from 376 | further 377 | furthermore 378 | g 379 | gave 380 | get 381 | gets 382 | getting 383 | give 384 | given 385 | gives 386 | giving 387 | go 388 | goes 389 | gone 390 | got 391 | gotten 392 | h 393 | had 394 | happens 395 | hardly 396 | has 397 | hasn't 398 | have 399 | haven't 400 | having 401 | he 402 | hed 403 | hence 404 | her 405 | here 406 | hereafter 407 | hereby 408 | herein 409 | heres 410 | hereupon 411 | hers 412 | herself 413 | hes 414 | hi 415 | hid 416 | him 417 | himself 418 | his 419 | hither 420 | home 421 | how 422 | howbeit 423 | however 424 | hundred 425 | i 426 | id 427 | ie 428 | if 429 | i'll 430 | im 431 | immediate 432 | immediately 433 | importance 434 | important 435 | in 436 | inc 437 | indeed 438 | index 439 | information 440 | instead 441 | into 442 | invention 443 | inward 444 | is 445 | isn't 446 | it 447 | itd 448 | it'll 449 | its 450 | itself 451 | i've 452 | j 453 | just 454 | k 455 | keep 456 | keeps 457 | kept 458 | kg 459 | km 460 | know 461 | known 462 | knows 463 | l 464 | largely 465 | last 466 | lately 467 | later 468 | latter 469 | latterly 470 | least 471 | less 472 | lest 473 | let 474 | lets 475 | like 476 | liked 477 | likely 478 | line 479 | little 480 | 'll 481 | look 482 | looking 483 | looks 484 | ltd 485 | m 486 | made 487 | mainly 488 | make 489 | makes 490 | many 491 | may 492 | maybe 493 | me 494 | mean 495 | means 496 | meantime 497 | meanwhile 498 | merely 499 | mg 500 | might 501 | million 502 | miss 503 | ml 504 | more 505 | moreover 506 | most 507 | mostly 508 | mr 509 | mrs 510 | much 511 | mug 512 | must 513 | my 514 | myself 515 | n 516 | na 517 | name 518 | namely 519 | nay 520 | nd 521 | near 522 | nearly 523 | necessarily 524 | necessary 525 | need 526 | needs 527 | neither 528 | never 529 | nevertheless 530 | new 531 | next 532 | nine 533 | ninety 534 | no 535 | nobody 536 | non 537 | none 538 | nonetheless 539 | noone 540 | nor 541 | normally 542 | nos 543 | not 544 | noted 545 | nothing 546 | now 547 | nowhere 548 | o 549 | obtain 550 | obtained 551 | obviously 552 | of 553 | off 554 | often 555 | oh 556 | ok 557 | okay 558 | old 559 | omitted 560 | on 561 | once 562 | one 563 | ones 564 | only 565 | onto 566 | or 567 | ord 568 | other 569 | others 570 | otherwise 571 | ought 572 | our 573 | ours 574 | ourselves 575 | out 576 | outside 577 | over 578 | overall 579 | owing 580 | own 581 | p 582 | page 583 | pages 584 | part 585 | particular 586 | particularly 587 | past 588 | per 589 | perhaps 590 | placed 591 | please 592 | plus 593 | poorly 594 | possible 595 | possibly 596 | potentially 597 | pp 598 | predominantly 599 | present 600 | previously 601 | primarily 602 | probably 603 | promptly 604 | proud 605 | provides 606 | put 607 | q 608 | que 609 | quickly 610 | quite 611 | qv 612 | r 613 | ran 614 | rather 615 | rd 616 | re 617 | readily 618 | really 619 | recent 620 | recently 621 | ref 622 | refs 623 | regarding 624 | regardless 625 | regards 626 | related 627 | relatively 628 | research 629 | respectively 630 | resulted 631 | resulting 632 | results 633 | right 634 | run 635 | s 636 | said 637 | same 638 | saw 639 | say 640 | saying 641 | says 642 | sec 643 | section 644 | see 645 | seeing 646 | seem 647 | seemed 648 | seeming 649 | seems 650 | seen 651 | self 652 | selves 653 | sent 654 | seven 655 | several 656 | shall 657 | she 658 | shed 659 | she'll 660 | shes 661 | should 662 | shouldn't 663 | show 664 | showed 665 | shown 666 | showns 667 | shows 668 | significant 669 | significantly 670 | similar 671 | similarly 672 | since 673 | six 674 | slightly 675 | so 676 | some 677 | somebody 678 | somehow 679 | someone 680 | somethan 681 | something 682 | sometime 683 | sometimes 684 | somewhat 685 | somewhere 686 | soon 687 | sorry 688 | specifically 689 | specified 690 | specify 691 | specifying 692 | still 693 | stop 694 | strongly 695 | sub 696 | substantially 697 | successfully 698 | such 699 | sufficiently 700 | suggest 701 | sup 702 | sure 703 | t 704 | take 705 | taken 706 | taking 707 | tell 708 | tends 709 | th 710 | than 711 | thank 712 | thanks 713 | thanx 714 | that 715 | that'll 716 | thats 717 | that've 718 | the 719 | their 720 | theirs 721 | them 722 | themselves 723 | then 724 | thence 725 | there 726 | thereafter 727 | thereby 728 | thered 729 | therefore 730 | therein 731 | there'll 732 | thereof 733 | therere 734 | theres 735 | thereto 736 | thereupon 737 | there've 738 | these 739 | they 740 | theyd 741 | they'll 742 | theyre 743 | they've 744 | think 745 | this 746 | those 747 | thou 748 | though 749 | thoughh 750 | thousand 751 | throug 752 | through 753 | throughout 754 | thru 755 | thus 756 | til 757 | tip 758 | to 759 | together 760 | too 761 | took 762 | toward 763 | towards 764 | tried 765 | tries 766 | truly 767 | try 768 | trying 769 | ts 770 | twice 771 | two 772 | u 773 | un 774 | under 775 | unfortunately 776 | unless 777 | unlike 778 | unlikely 779 | until 780 | unto 781 | up 782 | upon 783 | ups 784 | us 785 | use 786 | used 787 | useful 788 | usefully 789 | usefulness 790 | uses 791 | using 792 | usually 793 | v 794 | value 795 | various 796 | 've 797 | very 798 | via 799 | viz 800 | vol 801 | vols 802 | vs 803 | w 804 | want 805 | wants 806 | was 807 | wasnt 808 | way 809 | we 810 | wed 811 | welcome 812 | we'll 813 | went 814 | were 815 | werent 816 | we've 817 | what 818 | whatever 819 | what'll 820 | whats 821 | when 822 | whence 823 | whenever 824 | where 825 | whereafter 826 | whereas 827 | whereby 828 | wherein 829 | wheres 830 | whereupon 831 | wherever 832 | whether 833 | which 834 | while 835 | whim 836 | whither 837 | who 838 | whod 839 | whoever 840 | whole 841 | who'll 842 | whom 843 | whomever 844 | whos 845 | whose 846 | why 847 | widely 848 | willing 849 | wish 850 | with 851 | within 852 | without 853 | wont 854 | words 855 | world 856 | would 857 | wouldnt 858 | www 859 | x 860 | y 861 | yes 862 | yet 863 | you 864 | youd 865 | you'll 866 | your 867 | youre 868 | yours 869 | yourself 870 | yourselves 871 | you've 872 | z 873 | zero 874 | a's able about above according 875 | accordingly across actually after afterwards 876 | again against ain't all allow 877 | allows almost alone along already 878 | also although always am among 879 | amongst an and another any 880 | anybody anyhow anyone anything anyway 881 | anyways anywhere apart appear appreciate 882 | appropriate are aren't around as 883 | aside ask asking associated at 884 | available away awfully be became 885 | because become becomes becoming been 886 | before beforehand behind being believe 887 | below beside besides best better 888 | between beyond both brief but 889 | by c'mon c's came can 890 | can't cannot cant cause causes 891 | certain certainly changes clearly co 892 | com come comes concerning consequently 893 | consider considering contain containing contains 894 | corresponding could couldn't course currently 895 | definitely described despite did didn't 896 | different do does doesn't doing 897 | don't done down downwards during 898 | each edu eg eight either 899 | else elsewhere enough entirely especially 900 | et etc even ever every 901 | everybody everyone everything everywhere ex 902 | exactly example except far few 903 | fifth first five followed following 904 | follows for former formerly forth 905 | four from further furthermore get 906 | gets getting given gives go 907 | goes going gone got gotten 908 | greetings had hadn't happens hardly 909 | has hasn't have haven't having 910 | he he's hello help hence 911 | her here here's hereafter hereby 912 | herein hereupon hers herself hi 913 | him himself his hither hopefully 914 | how howbeit however i'd i'll 915 | i'm i've ie if ignored 916 | immediate in inasmuch inc indeed 917 | indicate indicated indicates inner insofar 918 | instead into inward is isn't 919 | it it'd it'll it's its 920 | itself just keep keeps kept 921 | know known knows last lately 922 | later latter latterly least less 923 | lest let let's like liked 924 | likely little look looking looks 925 | ltd mainly many may maybe 926 | me mean meanwhile merely might 927 | more moreover most mostly much 928 | must my myself name namely 929 | nd near nearly necessary need 930 | needs neither never nevertheless new 931 | next nine no nobody non 932 | none noone nor normally not 933 | nothing novel now nowhere obviously 934 | of off often oh ok 935 | okay old on once one 936 | ones only onto or other 937 | others otherwise ought our ours 938 | ourselves out outside over overall 939 | own particular particularly per perhaps 940 | placed please plus possible presumably 941 | probably provides que quite qv 942 | rather rd re really reasonably 943 | regarding regardless regards relatively respectively 944 | right said same saw say 945 | saying says second secondly see 946 | seeing seem seemed seeming seems 947 | seen self selves sensible sent 948 | serious seriously seven several shall 949 | she should shouldn't since six 950 | so some somebody somehow someone 951 | something sometime sometimes somewhat somewhere 952 | soon sorry specified specify specifying 953 | still sub such sup sure 954 | t's take taken tell tends 955 | th than thank thanks thanx 956 | that that's thats the their 957 | theirs them themselves then thence 958 | there there's thereafter thereby therefore 959 | therein theres thereupon these they 960 | they'd they'll they're they've think 961 | third this thorough thoroughly those 962 | though three through throughout thru 963 | thus to together too took 964 | toward towards tried tries truly 965 | try trying twice two un 966 | under unfortunately unless unlikely until 967 | unto up upon us use 968 | used useful uses using usually 969 | value various very via viz 970 | vs want wants was wasn't 971 | way we we'd we'll we're 972 | we've welcome well went were 973 | weren't what what's whatever when 974 | whence whenever where where's whereafter 975 | whereas whereby wherein whereupon wherever 976 | whether which while whither who 977 | who's whoever whole whom whose 978 | why will willing wish with 979 | within without won't wonder would 980 | wouldn't yes yet you you'd 981 | you'll you're you've your yours 982 | yourself yourselves zero -------------------------------------------------------------------------------- /backend/diet_plan_recommender/stopwords.txt: -------------------------------------------------------------------------------- 1 | a 2 | about 3 | above 4 | after 5 | again 6 | against 7 | all 8 | am 9 | an 10 | and 11 | any 12 | are 13 | aren't 14 | as 15 | at 16 | be 17 | because 18 | been 19 | before 20 | being 21 | below 22 | between 23 | both 24 | but 25 | by 26 | can't 27 | cannot 28 | could 29 | couldn't 30 | did 31 | didn't 32 | do 33 | does 34 | doesn't 35 | doing 36 | don't 37 | down 38 | during 39 | each 40 | few 41 | for 42 | from 43 | further 44 | had 45 | hadn't 46 | has 47 | hasn't 48 | have 49 | haven't 50 | having 51 | he 52 | he'd 53 | he'll 54 | he's 55 | her 56 | here 57 | here's 58 | hers 59 | herself 60 | him 61 | himself 62 | his 63 | how 64 | how's 65 | i 66 | i'd 67 | i'll 68 | i'm 69 | i've 70 | if 71 | in 72 | into 73 | is 74 | isn't 75 | it 76 | it's 77 | its 78 | itself 79 | let's 80 | me 81 | more 82 | most 83 | mustn't 84 | my 85 | myself 86 | no 87 | nor 88 | not 89 | of 90 | off 91 | on 92 | once 93 | only 94 | or 95 | other 96 | ought 97 | our 98 | ours 99 | ourselves 100 | out 101 | over 102 | own 103 | same 104 | shan't 105 | she 106 | she'd 107 | she'll 108 | she's 109 | should 110 | shouldn't 111 | so 112 | some 113 | such 114 | than 115 | that 116 | that's 117 | the 118 | their 119 | theirs 120 | them 121 | themselves 122 | then 123 | there 124 | there's 125 | these 126 | they 127 | they'd 128 | they'll 129 | they're 130 | they've 131 | this 132 | those 133 | through 134 | to 135 | too 136 | under 137 | until 138 | up 139 | very 140 | was 141 | wasn't 142 | we 143 | we'd 144 | we'll 145 | we're 146 | we've 147 | were 148 | weren't 149 | what 150 | what's 151 | when 152 | when's 153 | where 154 | where's 155 | which 156 | while 157 | who 158 | who's 159 | whom 160 | why 161 | why's 162 | with 163 | won't 164 | would 165 | wouldn't 166 | you 167 | you'd 168 | you'll 169 | you're 170 | you've 171 | your 172 | yours 173 | yourself 174 | yourselves 175 | I 176 | a 177 | about 178 | an 179 | are 180 | as 181 | at 182 | be 183 | by 184 | com 185 | for 186 | from 187 | how 188 | in 189 | is 190 | it 191 | of 192 | on 193 | or 194 | that 195 | the 196 | this 197 | to 198 | was 199 | what 200 | when 201 | where 202 | who 203 | will 204 | with 205 | the 206 | www 207 | a 208 | able 209 | about 210 | above 211 | abst 212 | accordance 213 | according 214 | accordingly 215 | across 216 | act 217 | actually 218 | added 219 | adj 220 | affected 221 | affecting 222 | affects 223 | after 224 | afterwards 225 | again 226 | against 227 | ah 228 | all 229 | almost 230 | alone 231 | along 232 | already 233 | also 234 | although 235 | always 236 | am 237 | among 238 | amongst 239 | an 240 | and 241 | announce 242 | another 243 | any 244 | anybody 245 | anyhow 246 | anymore 247 | anyone 248 | anything 249 | anyway 250 | anyways 251 | anywhere 252 | apparently 253 | approximately 254 | are 255 | aren 256 | arent 257 | arise 258 | around 259 | as 260 | aside 261 | ask 262 | asking 263 | at 264 | auth 265 | available 266 | away 267 | awfully 268 | b 269 | back 270 | be 271 | became 272 | because 273 | become 274 | becomes 275 | becoming 276 | been 277 | before 278 | beforehand 279 | begin 280 | beginning 281 | beginnings 282 | begins 283 | behind 284 | being 285 | believe 286 | below 287 | beside 288 | besides 289 | between 290 | beyond 291 | biol 292 | both 293 | brief 294 | briefly 295 | but 296 | by 297 | c 298 | ca 299 | came 300 | can 301 | cannot 302 | can't 303 | cause 304 | causes 305 | certain 306 | certainly 307 | co 308 | com 309 | come 310 | comes 311 | contain 312 | containing 313 | contains 314 | could 315 | couldnt 316 | d 317 | date 318 | did 319 | didn't 320 | different 321 | do 322 | does 323 | doesn't 324 | doing 325 | done 326 | don't 327 | down 328 | downwards 329 | due 330 | during 331 | e 332 | each 333 | ed 334 | edu 335 | effect 336 | eg 337 | eight 338 | eighty 339 | either 340 | else 341 | elsewhere 342 | end 343 | ending 344 | enough 345 | especially 346 | et 347 | et-al 348 | etc 349 | even 350 | ever 351 | every 352 | everybody 353 | everyone 354 | everything 355 | everywhere 356 | ex 357 | except 358 | f 359 | far 360 | few 361 | ff 362 | fifth 363 | first 364 | five 365 | fix 366 | followed 367 | following 368 | follows 369 | for 370 | former 371 | formerly 372 | forth 373 | found 374 | four 375 | from 376 | further 377 | furthermore 378 | g 379 | gave 380 | get 381 | gets 382 | getting 383 | give 384 | given 385 | gives 386 | giving 387 | go 388 | goes 389 | gone 390 | got 391 | gotten 392 | h 393 | had 394 | happens 395 | hardly 396 | has 397 | hasn't 398 | have 399 | haven't 400 | having 401 | he 402 | hed 403 | hence 404 | her 405 | here 406 | hereafter 407 | hereby 408 | herein 409 | heres 410 | hereupon 411 | hers 412 | herself 413 | hes 414 | hi 415 | hid 416 | him 417 | himself 418 | his 419 | hither 420 | home 421 | how 422 | howbeit 423 | however 424 | hundred 425 | i 426 | id 427 | ie 428 | if 429 | i'll 430 | im 431 | immediate 432 | immediately 433 | importance 434 | important 435 | in 436 | inc 437 | indeed 438 | index 439 | information 440 | instead 441 | into 442 | invention 443 | inward 444 | is 445 | isn't 446 | it 447 | itd 448 | it'll 449 | its 450 | itself 451 | i've 452 | j 453 | just 454 | k 455 | keep 456 | keeps 457 | kept 458 | kg 459 | km 460 | know 461 | known 462 | knows 463 | l 464 | largely 465 | last 466 | lately 467 | later 468 | latter 469 | latterly 470 | least 471 | less 472 | lest 473 | let 474 | lets 475 | like 476 | liked 477 | likely 478 | line 479 | little 480 | 'll 481 | look 482 | looking 483 | looks 484 | ltd 485 | m 486 | made 487 | mainly 488 | make 489 | makes 490 | many 491 | may 492 | maybe 493 | me 494 | mean 495 | means 496 | meantime 497 | meanwhile 498 | merely 499 | mg 500 | might 501 | million 502 | miss 503 | ml 504 | more 505 | moreover 506 | most 507 | mostly 508 | mr 509 | mrs 510 | much 511 | mug 512 | must 513 | my 514 | myself 515 | n 516 | na 517 | name 518 | namely 519 | nay 520 | nd 521 | near 522 | nearly 523 | necessarily 524 | necessary 525 | need 526 | needs 527 | neither 528 | never 529 | nevertheless 530 | new 531 | next 532 | nine 533 | ninety 534 | no 535 | nobody 536 | non 537 | none 538 | nonetheless 539 | noone 540 | nor 541 | normally 542 | nos 543 | not 544 | noted 545 | nothing 546 | now 547 | nowhere 548 | o 549 | obtain 550 | obtained 551 | obviously 552 | of 553 | off 554 | often 555 | oh 556 | ok 557 | okay 558 | old 559 | omitted 560 | on 561 | once 562 | one 563 | ones 564 | only 565 | onto 566 | or 567 | ord 568 | other 569 | others 570 | otherwise 571 | ought 572 | our 573 | ours 574 | ourselves 575 | out 576 | outside 577 | over 578 | overall 579 | owing 580 | own 581 | p 582 | page 583 | pages 584 | part 585 | particular 586 | particularly 587 | past 588 | per 589 | perhaps 590 | placed 591 | please 592 | plus 593 | poorly 594 | possible 595 | possibly 596 | potentially 597 | pp 598 | predominantly 599 | present 600 | previously 601 | primarily 602 | probably 603 | promptly 604 | proud 605 | provides 606 | put 607 | q 608 | que 609 | quickly 610 | quite 611 | qv 612 | r 613 | ran 614 | rather 615 | rd 616 | re 617 | readily 618 | really 619 | recent 620 | recently 621 | ref 622 | refs 623 | regarding 624 | regardless 625 | regards 626 | related 627 | relatively 628 | research 629 | respectively 630 | resulted 631 | resulting 632 | results 633 | right 634 | run 635 | s 636 | said 637 | same 638 | saw 639 | say 640 | saying 641 | says 642 | sec 643 | section 644 | see 645 | seeing 646 | seem 647 | seemed 648 | seeming 649 | seems 650 | seen 651 | self 652 | selves 653 | sent 654 | seven 655 | several 656 | shall 657 | she 658 | shed 659 | she'll 660 | shes 661 | should 662 | shouldn't 663 | show 664 | showed 665 | shown 666 | showns 667 | shows 668 | significant 669 | significantly 670 | similar 671 | similarly 672 | since 673 | six 674 | slightly 675 | so 676 | some 677 | somebody 678 | somehow 679 | someone 680 | somethan 681 | something 682 | sometime 683 | sometimes 684 | somewhat 685 | somewhere 686 | soon 687 | sorry 688 | specifically 689 | specified 690 | specify 691 | specifying 692 | still 693 | stop 694 | strongly 695 | sub 696 | substantially 697 | successfully 698 | such 699 | sufficiently 700 | suggest 701 | sup 702 | sure 703 | t 704 | take 705 | taken 706 | taking 707 | tell 708 | tends 709 | th 710 | than 711 | thank 712 | thanks 713 | thanx 714 | that 715 | that'll 716 | thats 717 | that've 718 | the 719 | their 720 | theirs 721 | them 722 | themselves 723 | then 724 | thence 725 | there 726 | thereafter 727 | thereby 728 | thered 729 | therefore 730 | therein 731 | there'll 732 | thereof 733 | therere 734 | theres 735 | thereto 736 | thereupon 737 | there've 738 | these 739 | they 740 | theyd 741 | they'll 742 | theyre 743 | they've 744 | think 745 | this 746 | those 747 | thou 748 | though 749 | thoughh 750 | thousand 751 | throug 752 | through 753 | throughout 754 | thru 755 | thus 756 | til 757 | tip 758 | to 759 | together 760 | too 761 | took 762 | toward 763 | towards 764 | tried 765 | tries 766 | truly 767 | try 768 | trying 769 | ts 770 | twice 771 | two 772 | u 773 | un 774 | under 775 | unfortunately 776 | unless 777 | unlike 778 | unlikely 779 | until 780 | unto 781 | up 782 | upon 783 | ups 784 | us 785 | use 786 | used 787 | useful 788 | usefully 789 | usefulness 790 | uses 791 | using 792 | usually 793 | v 794 | value 795 | various 796 | 've 797 | very 798 | via 799 | viz 800 | vol 801 | vols 802 | vs 803 | w 804 | want 805 | wants 806 | was 807 | wasnt 808 | way 809 | we 810 | wed 811 | welcome 812 | we'll 813 | went 814 | were 815 | werent 816 | we've 817 | what 818 | whatever 819 | what'll 820 | whats 821 | when 822 | whence 823 | whenever 824 | where 825 | whereafter 826 | whereas 827 | whereby 828 | wherein 829 | wheres 830 | whereupon 831 | wherever 832 | whether 833 | which 834 | while 835 | whim 836 | whither 837 | who 838 | whod 839 | whoever 840 | whole 841 | who'll 842 | whom 843 | whomever 844 | whos 845 | whose 846 | why 847 | widely 848 | willing 849 | wish 850 | with 851 | within 852 | without 853 | wont 854 | words 855 | world 856 | would 857 | wouldnt 858 | www 859 | x 860 | y 861 | yes 862 | yet 863 | you 864 | youd 865 | you'll 866 | your 867 | youre 868 | yours 869 | yourself 870 | yourselves 871 | you've 872 | z 873 | zero 874 | a's able about above according 875 | accordingly across actually after afterwards 876 | again against ain't all allow 877 | allows almost alone along already 878 | also although always am among 879 | amongst an and another any 880 | anybody anyhow anyone anything anyway 881 | anyways anywhere apart appear appreciate 882 | appropriate are aren't around as 883 | aside ask asking associated at 884 | available away awfully be became 885 | because become becomes becoming been 886 | before beforehand behind being believe 887 | below beside besides best better 888 | between beyond both brief but 889 | by c'mon c's came can 890 | can't cannot cant cause causes 891 | certain certainly changes clearly co 892 | com come comes concerning consequently 893 | consider considering contain containing contains 894 | corresponding could couldn't course currently 895 | definitely described despite did didn't 896 | different do does doesn't doing 897 | don't done down downwards during 898 | each edu eg eight either 899 | else elsewhere enough entirely especially 900 | et etc even ever every 901 | everybody everyone everything everywhere ex 902 | exactly example except far few 903 | fifth first five followed following 904 | follows for former formerly forth 905 | four from further furthermore get 906 | gets getting given gives go 907 | goes going gone got gotten 908 | greetings had hadn't happens hardly 909 | has hasn't have haven't having 910 | he he's hello help hence 911 | her here here's hereafter hereby 912 | herein hereupon hers herself hi 913 | him himself his hither hopefully 914 | how howbeit however i'd i'll 915 | i'm i've ie if ignored 916 | immediate in inasmuch inc indeed 917 | indicate indicated indicates inner insofar 918 | instead into inward is isn't 919 | it it'd it'll it's its 920 | itself just keep keeps kept 921 | know known knows last lately 922 | later latter latterly least less 923 | lest let let's like liked 924 | likely little look looking looks 925 | ltd mainly many may maybe 926 | me mean meanwhile merely might 927 | more moreover most mostly much 928 | must my myself name namely 929 | nd near nearly necessary need 930 | needs neither never nevertheless new 931 | next nine no nobody non 932 | none noone nor normally not 933 | nothing novel now nowhere obviously 934 | of off often oh ok 935 | okay old on once one 936 | ones only onto or other 937 | others otherwise ought our ours 938 | ourselves out outside over overall 939 | own particular particularly per perhaps 940 | placed please plus possible presumably 941 | probably provides que quite qv 942 | rather rd re really reasonably 943 | regarding regardless regards relatively respectively 944 | right said same saw say 945 | saying says second secondly see 946 | seeing seem seemed seeming seems 947 | seen self selves sensible sent 948 | serious seriously seven several shall 949 | she should shouldn't since six 950 | so some somebody somehow someone 951 | something sometime sometimes somewhat somewhere 952 | soon sorry specified specify specifying 953 | still sub such sup sure 954 | t's take taken tell tends 955 | th than thank thanks thanx 956 | that that's thats the their 957 | theirs them themselves then thence 958 | there there's thereafter thereby therefore 959 | therein theres thereupon these they 960 | they'd they'll they're they've think 961 | third this thorough thoroughly those 962 | though three through throughout thru 963 | thus to together too took 964 | toward towards tried tries truly 965 | try trying twice two un 966 | under unfortunately unless unlikely until 967 | unto up upon us use 968 | used useful uses using usually 969 | value various very via viz 970 | vs want wants was wasn't 971 | way we we'd we'll we're 972 | we've welcome well went were 973 | weren't what what's whatever when 974 | whence whenever where where's whereafter 975 | whereas whereby wherein whereupon wherever 976 | whether which while whither who 977 | who's whoever whole whom whose 978 | why will willing wish with 979 | within without won't wonder would 980 | wouldn't yes yet you you'd 981 | you'll you're you've your yours 982 | yourself yourselves zero -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Attribution-NonCommercial-ShareAlike 4.0 International 2 | 3 | ======================================================================= 4 | 5 | Creative Commons Corporation ("Creative Commons") is not a law firm and 6 | does not provide legal services or legal advice. Distribution of 7 | Creative Commons public licenses does not create a lawyer-client or 8 | other relationship. Creative Commons makes its licenses and related 9 | information available on an "as-is" basis. Creative Commons gives no 10 | warranties regarding its licenses, any material licensed under their 11 | terms and conditions, or any related information. Creative Commons 12 | disclaims all liability for damages resulting from their use to the 13 | fullest extent possible. 14 | 15 | Using Creative Commons Public Licenses 16 | 17 | Creative Commons public licenses provide a standard set of terms and 18 | conditions that creators and other rights holders may use to share 19 | original works of authorship and other material subject to copyright 20 | and certain other rights specified in the public license below. The 21 | following considerations are for informational purposes only, are not 22 | exhaustive, and do not form part of our licenses. 23 | 24 | Considerations for licensors: Our public licenses are 25 | intended for use by those authorized to give the public 26 | permission to use material in ways otherwise restricted by 27 | copyright and certain other rights. Our licenses are 28 | irrevocable. Licensors should read and understand the terms 29 | and conditions of the license they choose before applying it. 30 | Licensors should also secure all rights necessary before 31 | applying our licenses so that the public can reuse the 32 | material as expected. Licensors should clearly mark any 33 | material not subject to the license. This includes other CC- 34 | licensed material, or material used under an exception or 35 | limitation to copyright. More considerations for licensors: 36 | wiki.creativecommons.org/Considerations_for_licensors 37 | 38 | Considerations for the public: By using one of our public 39 | licenses, a licensor grants the public permission to use the 40 | licensed material under specified terms and conditions. If 41 | the licensor's permission is not necessary for any reason--for 42 | example, because of any applicable exception or limitation to 43 | copyright--then that use is not regulated by the license. Our 44 | licenses grant only permissions under copyright and certain 45 | other rights that a licensor has authority to grant. Use of 46 | the licensed material may still be restricted for other 47 | reasons, including because others have copyright or other 48 | rights in the material. A licensor may make special requests, 49 | such as asking that all changes be marked or described. 50 | Although not required by our licenses, you are encouraged to 51 | respect those requests where reasonable. More considerations 52 | for the public: 53 | wiki.creativecommons.org/Considerations_for_licensees 54 | 55 | ======================================================================= 56 | 57 | Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International 58 | Public License 59 | 60 | By exercising the Licensed Rights (defined below), You accept and agree 61 | to be bound by the terms and conditions of this Creative Commons 62 | Attribution-NonCommercial-ShareAlike 4.0 International Public License 63 | ("Public License"). To the extent this Public License may be 64 | interpreted as a contract, You are granted the Licensed Rights in 65 | consideration of Your acceptance of these terms and conditions, and the 66 | Licensor grants You such rights in consideration of benefits the 67 | Licensor receives from making the Licensed Material available under 68 | these terms and conditions. 69 | 70 | 71 | Section 1 -- Definitions. 72 | 73 | a. Adapted Material means material subject to Copyright and Similar 74 | Rights that is derived from or based upon the Licensed Material 75 | and in which the Licensed Material is translated, altered, 76 | arranged, transformed, or otherwise modified in a manner requiring 77 | permission under the Copyright and Similar Rights held by the 78 | Licensor. For purposes of this Public License, where the Licensed 79 | Material is a musical work, performance, or sound recording, 80 | Adapted Material is always produced where the Licensed Material is 81 | synched in timed relation with a moving image. 82 | 83 | b. Adapter's License means the license You apply to Your Copyright 84 | and Similar Rights in Your contributions to Adapted Material in 85 | accordance with the terms and conditions of this Public License. 86 | 87 | c. BY-NC-SA Compatible License means a license listed at 88 | creativecommons.org/compatiblelicenses, approved by Creative 89 | Commons as essentially the equivalent of this Public License. 90 | 91 | d. Copyright and Similar Rights means copyright and/or similar rights 92 | closely related to copyright including, without limitation, 93 | performance, broadcast, sound recording, and Sui Generis Database 94 | Rights, without regard to how the rights are labeled or 95 | categorized. For purposes of this Public License, the rights 96 | specified in Section 2(b)(1)-(2) are not Copyright and Similar 97 | Rights. 98 | 99 | e. Effective Technological Measures means those measures that, in the 100 | absence of proper authority, may not be circumvented under laws 101 | fulfilling obligations under Article 11 of the WIPO Copyright 102 | Treaty adopted on December 20, 1996, and/or similar international 103 | agreements. 104 | 105 | f. Exceptions and Limitations means fair use, fair dealing, and/or 106 | any other exception or limitation to Copyright and Similar Rights 107 | that applies to Your use of the Licensed Material. 108 | 109 | g. License Elements means the license attributes listed in the name 110 | of a Creative Commons Public License. The License Elements of this 111 | Public License are Attribution, NonCommercial, and ShareAlike. 112 | 113 | h. Licensed Material means the artistic or literary work, database, 114 | or other material to which the Licensor applied this Public 115 | License. 116 | 117 | i. Licensed Rights means the rights granted to You subject to the 118 | terms and conditions of this Public License, which are limited to 119 | all Copyright and Similar Rights that apply to Your use of the 120 | Licensed Material and that the Licensor has authority to license. 121 | 122 | j. Licensor means the individual(s) or entity(ies) granting rights 123 | under this Public License. 124 | 125 | k. NonCommercial means not primarily intended for or directed towards 126 | commercial advantage or monetary compensation. For purposes of 127 | this Public License, the exchange of the Licensed Material for 128 | other material subject to Copyright and Similar Rights by digital 129 | file-sharing or similar means is NonCommercial provided there is 130 | no payment of monetary compensation in connection with the 131 | exchange. 132 | 133 | l. Share means to provide material to the public by any means or 134 | process that requires permission under the Licensed Rights, such 135 | as reproduction, public display, public performance, distribution, 136 | dissemination, communication, or importation, and to make material 137 | available to the public including in ways that members of the 138 | public may access the material from a place and at a time 139 | individually chosen by them. 140 | 141 | m. Sui Generis Database Rights means rights other than copyright 142 | resulting from Directive 96/9/EC of the European Parliament and of 143 | the Council of 11 March 1996 on the legal protection of databases, 144 | as amended and/or succeeded, as well as other essentially 145 | equivalent rights anywhere in the world. 146 | 147 | n. You means the individual or entity exercising the Licensed Rights 148 | under this Public License. Your has a corresponding meaning. 149 | 150 | 151 | Section 2 -- Scope. 152 | 153 | a. License grant. 154 | 155 | 1. Subject to the terms and conditions of this Public License, 156 | the Licensor hereby grants You a worldwide, royalty-free, 157 | non-sublicensable, non-exclusive, irrevocable license to 158 | exercise the Licensed Rights in the Licensed Material to: 159 | 160 | a. reproduce and Share the Licensed Material, in whole or 161 | in part, for NonCommercial purposes only; and 162 | 163 | b. produce, reproduce, and Share Adapted Material for 164 | NonCommercial purposes only. 165 | 166 | 2. Exceptions and Limitations. For the avoidance of doubt, where 167 | Exceptions and Limitations apply to Your use, this Public 168 | License does not apply, and You do not need to comply with 169 | its terms and conditions. 170 | 171 | 3. Term. The term of this Public License is specified in Section 172 | 6(a). 173 | 174 | 4. Media and formats; technical modifications allowed. The 175 | Licensor authorizes You to exercise the Licensed Rights in 176 | all media and formats whether now known or hereafter created, 177 | and to make technical modifications necessary to do so. The 178 | Licensor waives and/or agrees not to assert any right or 179 | authority to forbid You from making technical modifications 180 | necessary to exercise the Licensed Rights, including 181 | technical modifications necessary to circumvent Effective 182 | Technological Measures. For purposes of this Public License, 183 | simply making modifications authorized by this Section 2(a) 184 | (4) never produces Adapted Material. 185 | 186 | 5. Downstream recipients. 187 | 188 | a. Offer from the Licensor -- Licensed Material. Every 189 | recipient of the Licensed Material automatically 190 | receives an offer from the Licensor to exercise the 191 | Licensed Rights under the terms and conditions of this 192 | Public License. 193 | 194 | b. Additional offer from the Licensor -- Adapted Material. 195 | Every recipient of Adapted Material from You 196 | automatically receives an offer from the Licensor to 197 | exercise the Licensed Rights in the Adapted Material 198 | under the conditions of the Adapter's License You apply. 199 | 200 | c. No downstream restrictions. You may not offer or impose 201 | any additional or different terms or conditions on, or 202 | apply any Effective Technological Measures to, the 203 | Licensed Material if doing so restricts exercise of the 204 | Licensed Rights by any recipient of the Licensed 205 | Material. 206 | 207 | 6. No endorsement. Nothing in this Public License constitutes or 208 | may be construed as permission to assert or imply that You 209 | are, or that Your use of the Licensed Material is, connected 210 | with, or sponsored, endorsed, or granted official status by, 211 | the Licensor or others designated to receive attribution as 212 | provided in Section 3(a)(1)(A)(i). 213 | 214 | b. Other rights. 215 | 216 | 1. Moral rights, such as the right of integrity, are not 217 | licensed under this Public License, nor are publicity, 218 | privacy, and/or other similar personality rights; however, to 219 | the extent possible, the Licensor waives and/or agrees not to 220 | assert any such rights held by the Licensor to the limited 221 | extent necessary to allow You to exercise the Licensed 222 | Rights, but not otherwise. 223 | 224 | 2. Patent and trademark rights are not licensed under this 225 | Public License. 226 | 227 | 3. To the extent possible, the Licensor waives any right to 228 | collect royalties from You for the exercise of the Licensed 229 | Rights, whether directly or through a collecting society 230 | under any voluntary or waivable statutory or compulsory 231 | licensing scheme. In all other cases the Licensor expressly 232 | reserves any right to collect such royalties, including when 233 | the Licensed Material is used other than for NonCommercial 234 | purposes. 235 | 236 | 237 | Section 3 -- License Conditions. 238 | 239 | Your exercise of the Licensed Rights is expressly made subject to the 240 | following conditions. 241 | 242 | a. Attribution. 243 | 244 | 1. If You Share the Licensed Material (including in modified 245 | form), You must: 246 | 247 | a. retain the following if it is supplied by the Licensor 248 | with the Licensed Material: 249 | 250 | i. identification of the creator(s) of the Licensed 251 | Material and any others designated to receive 252 | attribution, in any reasonable manner requested by 253 | the Licensor (including by pseudonym if 254 | designated); 255 | 256 | ii. a copyright notice; 257 | 258 | iii. a notice that refers to this Public License; 259 | 260 | iv. a notice that refers to the disclaimer of 261 | warranties; 262 | 263 | v. a URI or hyperlink to the Licensed Material to the 264 | extent reasonably practicable; 265 | 266 | b. indicate if You modified the Licensed Material and 267 | retain an indication of any previous modifications; and 268 | 269 | c. indicate the Licensed Material is licensed under this 270 | Public License, and include the text of, or the URI or 271 | hyperlink to, this Public License. 272 | 273 | 2. You may satisfy the conditions in Section 3(a)(1) in any 274 | reasonable manner based on the medium, means, and context in 275 | which You Share the Licensed Material. For example, it may be 276 | reasonable to satisfy the conditions by providing a URI or 277 | hyperlink to a resource that includes the required 278 | information. 279 | 3. If requested by the Licensor, You must remove any of the 280 | information required by Section 3(a)(1)(A) to the extent 281 | reasonably practicable. 282 | 283 | b. ShareAlike. 284 | 285 | In addition to the conditions in Section 3(a), if You Share 286 | Adapted Material You produce, the following conditions also apply. 287 | 288 | 1. The Adapter's License You apply must be a Creative Commons 289 | license with the same License Elements, this version or 290 | later, or a BY-NC-SA Compatible License. 291 | 292 | 2. You must include the text of, or the URI or hyperlink to, the 293 | Adapter's License You apply. You may satisfy this condition 294 | in any reasonable manner based on the medium, means, and 295 | context in which You Share Adapted Material. 296 | 297 | 3. You may not offer or impose any additional or different terms 298 | or conditions on, or apply any Effective Technological 299 | Measures to, Adapted Material that restrict exercise of the 300 | rights granted under the Adapter's License You apply. 301 | 302 | 303 | Section 4 -- Sui Generis Database Rights. 304 | 305 | Where the Licensed Rights include Sui Generis Database Rights that 306 | apply to Your use of the Licensed Material: 307 | 308 | a. for the avoidance of doubt, Section 2(a)(1) grants You the right 309 | to extract, reuse, reproduce, and Share all or a substantial 310 | portion of the contents of the database for NonCommercial purposes 311 | only; 312 | 313 | b. if You include all or a substantial portion of the database 314 | contents in a database in which You have Sui Generis Database 315 | Rights, then the database in which You have Sui Generis Database 316 | Rights (but not its individual contents) is Adapted Material, 317 | including for purposes of Section 3(b); and 318 | 319 | c. You must comply with the conditions in Section 3(a) if You Share 320 | all or a substantial portion of the contents of the database. 321 | 322 | For the avoidance of doubt, this Section 4 supplements and does not 323 | replace Your obligations under this Public License where the Licensed 324 | Rights include other Copyright and Similar Rights. 325 | 326 | 327 | Section 5 -- Disclaimer of Warranties and Limitation of Liability. 328 | 329 | a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE 330 | EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS 331 | AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF 332 | ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS, 333 | IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION, 334 | WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR 335 | PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS, 336 | ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT 337 | KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT 338 | ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU. 339 | 340 | b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE 341 | TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION, 342 | NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT, 343 | INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES, 344 | COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR 345 | USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN 346 | ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR 347 | DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR 348 | IN PART, THIS LIMITATION MAY NOT APPLY TO YOU. 349 | 350 | c. The disclaimer of warranties and limitation of liability provided 351 | above shall be interpreted in a manner that, to the extent 352 | possible, most closely approximates an absolute disclaimer and 353 | waiver of all liability. 354 | 355 | 356 | Section 6 -- Term and Termination. 357 | 358 | a. This Public License applies for the term of the Copyright and 359 | Similar Rights licensed here. However, if You fail to comply with 360 | this Public License, then Your rights under this Public License 361 | terminate automatically. 362 | 363 | b. Where Your right to use the Licensed Material has terminated under 364 | Section 6(a), it reinstates: 365 | 366 | 1. automatically as of the date the violation is cured, provided 367 | it is cured within 30 days of Your discovery of the 368 | violation; or 369 | 370 | 2. upon express reinstatement by the Licensor. 371 | 372 | For the avoidance of doubt, this Section 6(b) does not affect any 373 | right the Licensor may have to seek remedies for Your violations 374 | of this Public License. 375 | 376 | c. For the avoidance of doubt, the Licensor may also offer the 377 | Licensed Material under separate terms or conditions or stop 378 | distributing the Licensed Material at any time; however, doing so 379 | will not terminate this Public License. 380 | 381 | d. Sections 1, 5, 6, 7, and 8 survive termination of this Public 382 | License. 383 | 384 | 385 | Section 7 -- Other Terms and Conditions. 386 | 387 | a. The Licensor shall not be bound by any additional or different 388 | terms or conditions communicated by You unless expressly agreed. 389 | 390 | b. Any arrangements, understandings, or agreements regarding the 391 | Licensed Material not stated herein are separate from and 392 | independent of the terms and conditions of this Public License. 393 | 394 | 395 | Section 8 -- Interpretation. 396 | 397 | a. For the avoidance of doubt, this Public License does not, and 398 | shall not be interpreted to, reduce, limit, restrict, or impose 399 | conditions on any use of the Licensed Material that could lawfully 400 | be made without permission under this Public License. 401 | 402 | b. To the extent possible, if any provision of this Public License is 403 | deemed unenforceable, it shall be automatically reformed to the 404 | minimum extent necessary to make it enforceable. If the provision 405 | cannot be reformed, it shall be severed from this Public License 406 | without affecting the enforceability of the remaining terms and 407 | conditions. 408 | 409 | c. No term or condition of this Public License will be waived and no 410 | failure to comply consented to unless expressly agreed to by the 411 | Licensor. 412 | 413 | d. Nothing in this Public License constitutes or may be interpreted 414 | as a limitation upon, or waiver of, any privileges and immunities 415 | that apply to the Licensor or You, including from the legal 416 | processes of any jurisdiction or authority. 417 | 418 | ======================================================================= 419 | 420 | Creative Commons is not a party to its public 421 | licenses. Notwithstanding, Creative Commons may elect to apply one of 422 | its public licenses to material it publishes and in those instances 423 | will be considered the “Licensor.” The text of the Creative Commons 424 | public licenses is dedicated to the public domain under the CC0 Public 425 | Domain Dedication. Except for the limited purpose of indicating that 426 | material is shared under a Creative Commons public license or as 427 | otherwise permitted by the Creative Commons policies published at 428 | creativecommons.org/policies, Creative Commons does not authorize the 429 | use of the trademark "Creative Commons" or any other trademark or logo 430 | of Creative Commons without its prior written consent including, 431 | without limitation, in connection with any unauthorized modifications 432 | to any of its public licenses or any other arrangements, 433 | understandings, or agreements concerning use of licensed material. For 434 | the avoidance of doubt, this paragraph does not form part of the 435 | public licenses. 436 | 437 | Creative Commons may be contacted at creativecommons.org. 438 | -------------------------------------------------------------------------------- /ml/exercise/workout_routine_recommender.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 15, 6 | "id": "initial_id", 7 | "metadata": { 8 | "collapsed": true, 9 | "ExecuteTime": { 10 | "end_time": "2024-01-12T22:08:01.859980800Z", 11 | "start_time": "2024-01-12T22:08:01.851515700Z" 12 | } 13 | }, 14 | "outputs": [], 15 | "source": [ 16 | "import pandas as pd\n", 17 | "from sklearn.model_selection import train_test_split\n", 18 | "from sklearn.preprocessing import LabelEncoder, OrdinalEncoder, Normalizer\n", 19 | "from sklearn.impute import SimpleImputer\n", 20 | "from sklearn.compose import ColumnTransformer\n", 21 | "from sklearn.pipeline import Pipeline\n", 22 | "from sklearn.ensemble import GradientBoostingRegressor\n", 23 | "from sklearn.multioutput import MultiOutputRegressor\n", 24 | "import joblib" 25 | ] 26 | }, 27 | { 28 | "cell_type": "code", 29 | "execution_count": 16, 30 | "outputs": [], 31 | "source": [ 32 | "# Load the dataset\n", 33 | "df = pd.read_csv('dataset.csv')" 34 | ], 35 | "metadata": { 36 | "collapsed": false, 37 | "ExecuteTime": { 38 | "end_time": "2024-01-12T22:08:05.294095300Z", 39 | "start_time": "2024-01-12T22:08:05.282419Z" 40 | } 41 | }, 42 | "id": "93114aa64176de8d" 43 | }, 44 | { 45 | "cell_type": "code", 46 | "execution_count": 17, 47 | "outputs": [], 48 | "source": [ 49 | "# Define the categorical and numerical features\n", 50 | "cat_features = ['Gender', 'Weather Conditions']\n", 51 | "num_features = ['Dream Weight', 'Actual Weight', 'Age', 'BMI']" 52 | ], 53 | "metadata": { 54 | "collapsed": false, 55 | "ExecuteTime": { 56 | "end_time": "2024-01-12T22:08:05.910606600Z", 57 | "start_time": "2024-01-12T22:08:05.906503800Z" 58 | } 59 | }, 60 | "id": "dd15f6eb700119b6" 61 | }, 62 | { 63 | "cell_type": "code", 64 | "execution_count": 18, 65 | "outputs": [], 66 | "source": [ 67 | "# Define the target variables\n", 68 | "output_features = ['Exercise', 'Exercise Intensity', 'Duration']" 69 | ], 70 | "metadata": { 71 | "collapsed": false, 72 | "ExecuteTime": { 73 | "end_time": "2024-01-12T22:08:06.404263400Z", 74 | "start_time": "2024-01-12T22:08:06.402310900Z" 75 | } 76 | }, 77 | "id": "497e2c1c55cd5e87" 78 | }, 79 | { 80 | "cell_type": "code", 81 | "execution_count": 19, 82 | "outputs": [], 83 | "source": [ 84 | "# Encode 'Exercise' column\n", 85 | "le = LabelEncoder()\n", 86 | "df['Exercise'] = le.fit_transform(df['Exercise'])" 87 | ], 88 | "metadata": { 89 | "collapsed": false, 90 | "ExecuteTime": { 91 | "end_time": "2024-01-12T22:08:07.049690800Z", 92 | "start_time": "2024-01-12T22:08:07.042981600Z" 93 | } 94 | }, 95 | "id": "a0ff88a643c9826a" 96 | }, 97 | { 98 | "cell_type": "code", 99 | "execution_count": 20, 100 | "outputs": [], 101 | "source": [ 102 | "# Split the dataset\n", 103 | "X_train, X_test, y_train, y_test = train_test_split(\n", 104 | " df[cat_features + num_features],\n", 105 | " df[output_features],\n", 106 | " test_size=0.33,\n", 107 | " random_state=42\n", 108 | ")" 109 | ], 110 | "metadata": { 111 | "collapsed": false, 112 | "ExecuteTime": { 113 | "end_time": "2024-01-12T22:08:07.750966200Z", 114 | "start_time": "2024-01-12T22:08:07.746700500Z" 115 | } 116 | }, 117 | "id": "f8f44d4205f4c3d4" 118 | }, 119 | { 120 | "cell_type": "code", 121 | "execution_count": 21, 122 | "outputs": [], 123 | "source": [ 124 | "# Define the transformers\n", 125 | "numeric_transformer = Pipeline(steps=[\n", 126 | " ('imputer', SimpleImputer(strategy='mean')),\n", 127 | " ('normalizer', Normalizer())\n", 128 | "])" 129 | ], 130 | "metadata": { 131 | "collapsed": false, 132 | "ExecuteTime": { 133 | "end_time": "2024-01-12T22:08:08.553939100Z", 134 | "start_time": "2024-01-12T22:08:08.545049900Z" 135 | } 136 | }, 137 | "id": "1ec9775b398de84f" 138 | }, 139 | { 140 | "cell_type": "code", 141 | "execution_count": 22, 142 | "outputs": [], 143 | "source": [ 144 | "categorical_transformer = Pipeline(steps=[\n", 145 | " ('imputer', SimpleImputer(strategy='constant')),\n", 146 | " ('encoder', OrdinalEncoder())\n", 147 | "])" 148 | ], 149 | "metadata": { 150 | "collapsed": false, 151 | "ExecuteTime": { 152 | "end_time": "2024-01-12T22:08:09.145424100Z", 153 | "start_time": "2024-01-12T22:08:09.145424100Z" 154 | } 155 | }, 156 | "id": "567cfc98767e7fd3" 157 | }, 158 | { 159 | "cell_type": "code", 160 | "execution_count": 23, 161 | "outputs": [], 162 | "source": [ 163 | "# Combine the transformers\n", 164 | "preprocessor = ColumnTransformer(\n", 165 | " transformers=[\n", 166 | " ('numeric', numeric_transformer, num_features),\n", 167 | " ('categorical', categorical_transformer, cat_features)\n", 168 | " ]\n", 169 | ")" 170 | ], 171 | "metadata": { 172 | "collapsed": false, 173 | "ExecuteTime": { 174 | "end_time": "2024-01-12T22:08:09.754576800Z", 175 | "start_time": "2024-01-12T22:08:09.751609400Z" 176 | } 177 | }, 178 | "id": "944cdc930532e9bf" 179 | }, 180 | { 181 | "cell_type": "code", 182 | "execution_count": 24, 183 | "outputs": [], 184 | "source": [ 185 | "# Define the model\n", 186 | "model = MultiOutputRegressor(GradientBoostingRegressor())" 187 | ], 188 | "metadata": { 189 | "collapsed": false, 190 | "ExecuteTime": { 191 | "end_time": "2024-01-12T22:08:10.333899700Z", 192 | "start_time": "2024-01-12T22:08:10.329782300Z" 193 | } 194 | }, 195 | "id": "3e80d811ed3b7b40" 196 | }, 197 | { 198 | "cell_type": "code", 199 | "execution_count": 25, 200 | "outputs": [], 201 | "source": [ 202 | "# Define the pipeline\n", 203 | "pipeline = Pipeline(steps=[\n", 204 | " ('preprocess', preprocessor),\n", 205 | " ('reg', model)\n", 206 | "])" 207 | ], 208 | "metadata": { 209 | "collapsed": false, 210 | "ExecuteTime": { 211 | "end_time": "2024-01-12T22:08:10.987270300Z", 212 | "start_time": "2024-01-12T22:08:10.984794300Z" 213 | } 214 | }, 215 | "id": "7b62534e159d751f" 216 | }, 217 | { 218 | "cell_type": "code", 219 | "execution_count": 26, 220 | "outputs": [ 221 | { 222 | "data": { 223 | "text/plain": "Pipeline(steps=[('preprocess',\n ColumnTransformer(transformers=[('numeric',\n Pipeline(steps=[('imputer',\n SimpleImputer()),\n ('normalizer',\n Normalizer())]),\n ['Dream Weight',\n 'Actual Weight', 'Age',\n 'BMI']),\n ('categorical',\n Pipeline(steps=[('imputer',\n SimpleImputer(strategy='constant')),\n ('encoder',\n OrdinalEncoder())]),\n ['Gender',\n 'Weather Conditions'])])),\n ('reg',\n MultiOutputRegressor(estimator=GradientBoostingRegressor()))])", 224 | "text/html": "
Pipeline(steps=[('preprocess',\n                 ColumnTransformer(transformers=[('numeric',\n                                                  Pipeline(steps=[('imputer',\n                                                                   SimpleImputer()),\n                                                                  ('normalizer',\n                                                                   Normalizer())]),\n                                                  ['Dream Weight',\n                                                   'Actual Weight', 'Age',\n                                                   'BMI']),\n                                                 ('categorical',\n                                                  Pipeline(steps=[('imputer',\n                                                                   SimpleImputer(strategy='constant')),\n                                                                  ('encoder',\n                                                                   OrdinalEncoder())]),\n                                                  ['Gender',\n                                                   'Weather Conditions'])])),\n                ('reg',\n                 MultiOutputRegressor(estimator=GradientBoostingRegressor()))])
In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
" 225 | }, 226 | "execution_count": 26, 227 | "metadata": {}, 228 | "output_type": "execute_result" 229 | } 230 | ], 231 | "source": [ 232 | "# Train the model\n", 233 | "pipeline.fit(X_train, y_train)" 234 | ], 235 | "metadata": { 236 | "collapsed": false, 237 | "ExecuteTime": { 238 | "end_time": "2024-01-12T22:08:14.975061Z", 239 | "start_time": "2024-01-12T22:08:12.112379700Z" 240 | } 241 | }, 242 | "id": "3700e95a54b275f5" 243 | }, 244 | { 245 | "cell_type": "code", 246 | "execution_count": 27, 247 | "outputs": [ 248 | { 249 | "data": { 250 | "text/plain": "['model.pkl']" 251 | }, 252 | "execution_count": 27, 253 | "metadata": {}, 254 | "output_type": "execute_result" 255 | } 256 | ], 257 | "source": [ 258 | "# Save the model\n", 259 | "joblib.dump(pipeline, 'model.pkl')" 260 | ], 261 | "metadata": { 262 | "collapsed": false, 263 | "ExecuteTime": { 264 | "end_time": "2024-01-12T22:08:20.051002900Z", 265 | "start_time": "2024-01-12T22:08:20.031691200Z" 266 | } 267 | }, 268 | "id": "9f3157e358e43057" 269 | }, 270 | { 271 | "cell_type": "code", 272 | "execution_count": 28, 273 | "outputs": [ 274 | { 275 | "data": { 276 | "text/plain": "['label_encoder.pkl']" 277 | }, 278 | "execution_count": 28, 279 | "metadata": {}, 280 | "output_type": "execute_result" 281 | } 282 | ], 283 | "source": [ 284 | "# Save the LabelEncoder\n", 285 | "joblib.dump(le, 'label_encoder.pkl')" 286 | ], 287 | "metadata": { 288 | "collapsed": false, 289 | "ExecuteTime": { 290 | "end_time": "2024-01-12T22:08:27.964736400Z", 291 | "start_time": "2024-01-12T22:08:27.957780400Z" 292 | } 293 | }, 294 | "id": "6e7bfe91c239e915" 295 | }, 296 | { 297 | "cell_type": "code", 298 | "execution_count": null, 299 | "outputs": [], 300 | "source": [], 301 | "metadata": { 302 | "collapsed": false 303 | }, 304 | "id": "7c425b27214ebfc7" 305 | } 306 | ], 307 | "metadata": { 308 | "kernelspec": { 309 | "display_name": "Python 3", 310 | "language": "python", 311 | "name": "python3" 312 | }, 313 | "language_info": { 314 | "codemirror_mode": { 315 | "name": "ipython", 316 | "version": 2 317 | }, 318 | "file_extension": ".py", 319 | "mimetype": "text/x-python", 320 | "name": "python", 321 | "nbconvert_exporter": "python", 322 | "pygments_lexer": "ipython2", 323 | "version": "2.7.6" 324 | } 325 | }, 326 | "nbformat": 4, 327 | "nbformat_minor": 5 328 | } 329 | --------------------------------------------------------------------------------