Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create data extract model #40

Open
wants to merge 314 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
314 commits
Select commit Hold shift + click to select a range
893a258
Create data labeling
ChamsolPark Apr 5, 2024
0f1d5f5
Merge pull request #2 from kookmin-sw/master
mine0697782 Apr 8, 2024
78854c8
node용 gitignore 추가
mine0697782 Apr 8, 2024
1bd90ff
gitignore 파일 충돌 수정
mine0697782 Apr 8, 2024
cc2ccbf
ejs templete 코드 에러수정, 임시화면 구동
mine0697782 Apr 8, 2024
eb96bbe
Merge pull request #9 from mine0697782/master
mine0697782 Apr 8, 2024
ebb9a41
모델추가
Maxwithjude Apr 17, 2024
75218f9
Create requirements.txt
mmoossun Apr 19, 2024
c47f7c3
Create src
mmoossun Apr 19, 2024
d19bbc4
Delete Data Extract/src
mmoossun Apr 19, 2024
0b86232
Delete Data Extract/requirements.txt
mmoossun Apr 19, 2024
889a367
Create requirements.txt
mmoossun Apr 19, 2024
70b2174
Create __init__.py
mmoossun Apr 19, 2024
bae906e
Create main.py
mmoossun Apr 19, 2024
c350e6c
Create model.py
mmoossun Apr 19, 2024
ff778f6
Create utilities.py
mmoossun Apr 19, 2024
376a647
Merge pull request #12 from mmoossun/master
mmoossun Apr 19, 2024
78f9a49
Create data_processing.py
mmoossun Apr 19, 2024
dbcb6ad
Update main.py
mmoossun Apr 19, 2024
fb82d6f
Update requirements.txt
mmoossun Apr 19, 2024
f29b795
Update main.py
mmoossun Apr 19, 2024
743602f
Update main.py
mmoossun Apr 19, 2024
8f1bf52
Update main.py
mmoossun Apr 19, 2024
99e91ca
Merge pull request #13 from mmoossun/master
mmoossun Apr 19, 2024
7c6c56a
Update main.py
mmoossun Apr 19, 2024
6074b04
Merge pull request #14 from mmoossun/master
mmoossun Apr 19, 2024
0ca88cf
모델 수정
Maxwithjude Apr 19, 2024
990e006
구조 변경
Maxwithjude Apr 20, 2024
82a78cd
env 파일 삭제
Maxwithjude Apr 20, 2024
f1d802b
Merge pull request #15 from Maxwithjude/master
mine0697782 Apr 20, 2024
f20eb55
Delete src/.env
mine0697782 Apr 20, 2024
67f5ed7
라우팅 추가
Maxwithjude Apr 30, 2024
e1e9ef5
Merge pull request #16 from Maxwithjude/master
Maxwithjude Apr 30, 2024
1dd608d
라우팅 설정 시작
Maxwithjude Apr 30, 2024
802cc8e
라우터, 컨트롤러 수정 및 작업자 add 기능 추가
Maxwithjude Apr 30, 2024
ba267b3
Merge pull request #17 from Maxwithjude/master
Maxwithjude Apr 30, 2024
f656dcd
이름부터 주민번호까지 양식 작성
Maxwithjude Apr 30, 2024
6625d76
작업자 추가 시 작성 양식 완성
Maxwithjude Apr 30, 2024
1072313
Merge pull request #18 from Maxwithjude/master
Maxwithjude Apr 30, 2024
dae9887
각 컨트롤러에 모델, 몽구스 연결
Maxwithjude May 1, 2024
db32acd
몽구스 employees 테이블 생성 확인
Maxwithjude May 1, 2024
fb3621c
몽고db로 작업자 추가한 데이터 넘어가는 것 확인
Maxwithjude May 1, 2024
837215e
Merge pull request #19 from Maxwithjude/master
Maxwithjude May 1, 2024
3861385
GET /employee/addemployee 404문제 해결
Maxwithjude May 1, 2024
e83d4a3
flash 패키지 변경
Maxwithjude May 1, 2024
4fee45e
Merge pull request #20 from Maxwithjude/master
Maxwithjude May 1, 2024
9dbe27e
Merge pull request #4 from kookmin-sw/master
mine0697782 May 2, 2024
de7c973
화면 내 작업자 추가 성공 메시지 구현 및 작업자 테이블 작업 시작
Maxwithjude May 2, 2024
336763c
Merge pull request #21 from Maxwithjude/master
Maxwithjude May 2, 2024
41a86e1
worksites 모델 현장명, 끝나는시간, 그 외 주석 추가
mine0697782 May 2, 2024
1729d1b
worksite 모델 채용된 인원 필드 수정, 레퍼런스참조
mine0697782 May 2, 2024
c8812db
Career (경력) 모델 추가
mine0697782 May 2, 2024
b5caf04
Merge pull request #22 from mine0697782/master
mine0697782 May 2, 2024
44f6978
작업자 페이지 정보 테이블 구현
Maxwithjude May 2, 2024
d23c55d
작업자 테이블 정보 구현
Maxwithjude May 2, 2024
3e4dfc3
Merge pull request #23 from Maxwithjude/master
Maxwithjude May 2, 2024
ef8ef0a
Employee, Worksite 테스트용 데이터 생성 파일 추가, gitignore 내용 추가
mine0697782 May 2, 2024
162fdc6
Merge pull request #5 from kookmin-sw/master
mine0697782 May 2, 2024
da499d3
Merge pull request #24 from mine0697782/master
mine0697782 May 2, 2024
caa270c
employee 목록 제한 삭제
mine0697782 May 2, 2024
880f884
메인 레이아웃 container 추가(좌우 여백 추가)
mine0697782 May 2, 2024
f44b11e
현장 목록 조회 기능 추가(임시)
mine0697782 May 2, 2024
013cacb
Merge pull request #25 from mine0697782/master
mine0697782 May 2, 2024
54504b8
작업자 추가 시 메인화면으로 넘어가는 것 수정(경로수정)
Maxwithjude May 3, 2024
581d80a
Update employeeController.js
Maxwithjude May 3, 2024
453803b
충돌 수정
Maxwithjude May 3, 2024
5f0e0bf
충돌 수정1
Maxwithjude May 3, 2024
7d1be64
Merge pull request #26 from Maxwithjude/master
Maxwithjude May 3, 2024
1739732
Merge pull request #1 from kookmin-sw/master
Maxwithjude May 3, 2024
9a11904
Merge pull request #6 from kookmin-sw/master
mine0697782 May 3, 2024
4525dc8
morgan 오류수정, 메인 레이아웃 main.css 주석
mine0697782 May 3, 2024
da0c181
Merge pull request #27 from mine0697782/master
mine0697782 May 3, 2024
67ca959
Merge pull request #2 from kookmin-sw/master
Maxwithjude May 3, 2024
1bc8fed
addWorksite ejs 추가 및 기능 구현
mine0697782 May 3, 2024
2b5dff6
근무지 추가 시 알림 메시지 오타 수정
mine0697782 May 3, 2024
3e0f98b
main.css 주석처리
mine0697782 May 3, 2024
f816199
home 하이퍼링크 dashboard로 수정
mine0697782 May 3, 2024
7c13195
Merge pull request #28 from mine0697782/master
mine0697782 May 3, 2024
ae9891b
Merge pull request #3 from kookmin-sw/master
Maxwithjude May 3, 2024
bc83e1c
작업자 페이지 하단 페이지 바 추가
Maxwithjude May 4, 2024
db873b2
Merge pull request #29 from Maxwithjude/master
Maxwithjude May 4, 2024
a573b62
작업자 보기 페이지 구성 완료
Maxwithjude May 6, 2024
75f3dbe
Merge pull request #4 from kookmin-sw/master
Maxwithjude May 6, 2024
0cfb2e1
Merge pull request #30 from Maxwithjude/master
Maxwithjude May 6, 2024
184399a
아이콘 수정
Maxwithjude May 7, 2024
9c2ab73
현장 상세정보 조회 페이지 추가, 더미데이터 인부 랜덤 배정 기능 추가
mine0697782 May 7, 2024
9a92148
Merge pull request #7 from kookmin-sw/master
mine0697782 May 7, 2024
96696b8
아이콘 수정 및 수정, 삭제 기능 완성
Maxwithjude May 7, 2024
79bbd8a
Merge branch 'master' of https://github.com/Maxwithjude/capstone-2024…
Maxwithjude May 7, 2024
7ef81a8
Merge pull request #5 from kookmin-sw/master
Maxwithjude May 7, 2024
f504788
현장 추가 시 유저id 입력되도록 수정
mine0697782 May 7, 2024
427f07c
아이콘 수정 업데이트, 삭제 기능 완성, userid추가 확인
Maxwithjude May 7, 2024
6f48b42
Merge branch 'master' of https://github.com/Maxwithjude/capstone-2024…
Maxwithjude May 7, 2024
a3403ee
Merge pull request #31 from Maxwithjude/master
Maxwithjude May 7, 2024
f8988ec
Merge pull request #32 from mine0697782/master
mine0697782 May 7, 2024
b2eb240
Merge pull request #8 from kookmin-sw/master
mine0697782 May 7, 2024
17c8d92
Merge pull request #6 from kookmin-sw/master
Maxwithjude May 7, 2024
0f4070d
moment 추가, 현장 목록 시간 포맷 변경
mine0697782 May 7, 2024
bd45930
현장 상세 페이지에 시간 포맷 추가
mine0697782 May 7, 2024
f52de05
Merge pull request #33 from mine0697782/master
mine0697782 May 7, 2024
2f4aa15
현장 상세 페이지에 현장정보, 인원수 표시 레이아웃 수정
mine0697782 May 7, 2024
dcb51be
db 모델에 userID required 추가, 경력 더미데이터 추가
mine0697782 May 7, 2024
fb024a3
employee 상세 페이지에서 경력 불러오는 코드 추가 (주석처리함)
mine0697782 May 7, 2024
3572fda
Merge pull request #34 from mine0697782/master
mine0697782 May 7, 2024
bb9cadf
Merge pull request #35 from Maxwithjude/master
Maxwithjude May 8, 2024
1350bcc
Merge pull request #7 from kookmin-sw/master
Maxwithjude May 8, 2024
dcf5b68
현장 상세 페이지에 모달 임시추가, 정보 보여주는 양식 수정
mine0697782 May 8, 2024
a11d0bf
나이 계산 모듈 추가, employee 조회 시 모듈 전달 코드 추가
mine0697782 May 8, 2024
fdb8486
Merge pull request #36 from mine0697782/master
mine0697782 May 8, 2024
aa9a866
현장 상세페이지 나이 계산 추가
mine0697782 May 8, 2024
e4c5a7a
현장에서 인원 채용하는 페이지 추가(기능미구현), 라우트 및 컨트롤러 수정
mine0697782 May 8, 2024
4de0b94
Merge pull request #8 from kookmin-sw/master
Maxwithjude May 8, 2024
e7c4d84
작업자 검색 기능 완성
Maxwithjude May 8, 2024
ee52727
Merge branch 'master' of https://github.com/Maxwithjude/capstone-2024…
Maxwithjude May 8, 2024
6d5ca89
Merge pull request #37 from Maxwithjude/master
Maxwithjude May 8, 2024
ec6bedd
이미지 1삭제
Maxwithjude May 9, 2024
6ee2483
Merge pull request #9 from kookmin-sw/master
Maxwithjude May 9, 2024
607d8bb
Merge pull request #38 from Maxwithjude/master
Maxwithjude May 9, 2024
8d55384
mongoDB에 데이터 넣는 코드 추가
mmoossun May 9, 2024
2adca82
mongoDB에 데이터 넣는 코드 추가
mmoossun May 9, 2024
63c80e3
Create README.md
mmoossun May 9, 2024
60411ac
Update README.md
mmoossun May 9, 2024
7478e43
Delete package.json
mmoossun May 9, 2024
790fe38
Update README.md
Maxwithjude May 10, 2024
1ba2ab6
제3자가 npm install하기 편하게 몽고 버전 관리
Maxwithjude May 10, 2024
02069ce
Merge branch 'master' of https://github.com/Maxwithjude/capstone-2024…
Maxwithjude May 10, 2024
0259637
Merge pull request #39 from Maxwithjude/master
Maxwithjude May 10, 2024
847e503
현장에서 근로자 추가 기능 구현
mine0697782 May 10, 2024
341cee7
code update
mmoossun May 10, 2024
2f68b66
Merge pull request #9 from kookmin-sw/master
mine0697782 May 10, 2024
079fd9f
Merge pull request #40 from mine0697782/master
mine0697782 May 10, 2024
cc957db
Create README.md
mmoossun May 10, 2024
df11476
code update
mmoossun May 10, 2024
fcba3e9
Delete DataExtract/src/__pycache__ directory
mmoossun May 10, 2024
4c88bfc
Delete DataExtract/README.md
mmoossun May 10, 2024
533bc79
Merge pull request #1 from kookmin-sw/master
mmoossun May 10, 2024
c97eed4
Merge pull request #10 from kookmin-sw/master
Maxwithjude May 11, 2024
4c1891e
gitignore 업데이트
mine0697782 May 11, 2024
c52aed3
worksite 라우트 url 수정, 규칙 통일
mine0697782 May 11, 2024
d7dde8d
worksite add-post 라우트 수정 / edit, delete 라우트 추가
mine0697782 May 11, 2024
8691d8f
현장 관련 모든 페이지에 추가,삭제 버튼 및 모달 추가
mine0697782 May 11, 2024
eb46b29
현장목록 수정일이 현재시간으로만 나오는 현상 수정
mine0697782 May 11, 2024
a3f1b15
현장 삭제 기능 추가
mine0697782 May 11, 2024
27342e5
현장 업데이트 기능 구현
mine0697782 May 11, 2024
bede247
현장별 채용한 근무자 삭제 기능 구현
mine0697782 May 12, 2024
a576b94
age update
mmoossun May 13, 2024
e2ab092
age update
mmoossun May 13, 2024
45b2163
Merge pull request #41 from mmoossun/master
mmoossun May 13, 2024
84ea778
footer 하단에 고정되도록 수정
mine0697782 May 13, 2024
4d0380e
현장 추가 및 수정 화면에 datepicker 추가, 근무시간 버그 수정
mine0697782 May 14, 2024
facfbd4
현장 설명 저장 안되는 현상 수정
mine0697782 May 14, 2024
ab34904
현장 정렬 기능 임시구현
mine0697782 May 14, 2024
39cc4a1
Merge pull request #10 from kookmin-sw/master
mine0697782 May 15, 2024
da01b72
Merge pull request #42 from mine0697782/master
mine0697782 May 15, 2024
513a968
근무자 검색 url 수정 (/search -> /employee/search)
mine0697782 May 15, 2024
972ab34
현장 컨트롤러 근무자 추가 시 리디렉트 경로 수정
mine0697782 May 15, 2024
b0657b5
현장상세페이지에서 노트 표시 추가
mine0697782 May 15, 2024
4db4a2a
현장 추가 페이지 우측 상단 텍스트 제거
mine0697782 May 15, 2024
a6ca8e7
현장목록 리스트아이템 onclick 활성화 / 검색 form 추가 (기능미구현)
mine0697782 May 15, 2024
1066a98
Merge branch 'master' of https://github.com/mine0697782/capstone-2024…
mine0697782 May 15, 2024
088942a
react-native 프로젝트 추가를 위한 gitignore 업데이트
mine0697782 May 15, 2024
1b6cd05
react-native 프로젝트 생성
mine0697782 May 15, 2024
6f9fcf2
Create Recommendation_model
ChamsolPark May 17, 2024
0ed1118
Create __init__
ChamsolPark May 17, 2024
726b224
Add Get_Label.ipynb to Recommendation_Model/__init__
ChamsolPark May 17, 2024
219dca3
Add pre_train.ipynb to Recommendation_Model
ChamsolPark May 17, 2024
cff9deb
Add downstream_train.ipynb to Recommendation_Model
ChamsolPark May 17, 2024
1ef1669
Add pre_train.ipynb to Recommendation_Model
ChamsolPark May 17, 2024
a407f61
Add predict to Recommendation_Model
ChamsolPark May 17, 2024
ef2461a
Add recommendation to Recommendation_Model
ChamsolPark May 17, 2024
f249042
Merge pull request #11 from kookmin-sw/master
Maxwithjude May 17, 2024
66ecac7
Merge pull request #43 from Maxwithjude/master
Maxwithjude May 17, 2024
80ad7ce
Merge pull request #12 from kookmin-sw/master
Maxwithjude May 17, 2024
efbd355
Merge pull request #44 from mine0697782/master
mine0697782 May 17, 2024
46b7a73
Merge pull request #11 from kookmin-sw/master
mine0697782 May 17, 2024
5130e8b
Merge pull request #13 from kookmin-sw/master
Maxwithjude May 17, 2024
a348d77
Merge pull request #45 from Maxwithjude/master
Maxwithjude May 17, 2024
fdbca55
현장 검색 url 및 라우트 추가 (기능미구현), 목록에서 업데이트날짜 표시 제거
mine0697782 May 17, 2024
d639e9d
Merge branch 'master' of https://github.com/mine0697782/capstone-2024…
mine0697782 May 17, 2024
a46afa3
채용 페이지에 현장설명 추가
mine0697782 May 17, 2024
d76e939
정산 임시
Maxwithjude May 17, 2024
c316b96
현장 상세페이지 문자 전송 모달 레이아웃만 추가(전송기능미구현)
mine0697782 May 17, 2024
7d4845d
정산 페이지 완료
Maxwithjude May 17, 2024
bdbb544
Merge branch 'master' into master
mine0697782 May 17, 2024
bb24306
Merge pull request #12 from kookmin-sw/master
mine0697782 May 17, 2024
b91f994
worksite controller 중괄호 닫기 수정
mine0697782 May 17, 2024
5090bdf
Merge pull request #1 from kookmin-sw/master
Maxwithjude May 17, 2024
262274f
정산 페이지 임시구현
mine0697782 May 17, 2024
a6ef749
Add pre_train.ipynb to Recommendation_Model
ChamsolPark May 18, 2024
14a7471
Add 디비 스트링 주소 좌표로 변환
ChamsolPark May 18, 2024
7dec4ba
Update README.md
ChamsolPark May 19, 2024
43b7de5
Update README.md
ChamsolPark May 19, 2024
3356e80
현장 목록 우측 버튼 제거, 높이 조정
mine0697782 May 19, 2024
286268f
리액트네이티브 프로젝트 삭제
mine0697782 May 19, 2024
7714618
리액트 네이티브 프로젝트 재생성
mine0697782 May 19, 2024
93c2c6c
네이티브 패키지 설치
mine0697782 May 19, 2024
524c943
네이티브 패키지 추가(타입스크립트)
mine0697782 May 19, 2024
deeaddc
Merge branch 'kookmin-sw:master' into master
ChamsolPark May 20, 2024
9268261
Add 디비 스트링 주소 좌표로 변환
ChamsolPark May 20, 2024
7d8ec4a
rollback
ChamsolPark May 20, 2024
00686ac
update
ChamsolPark May 20, 2024
dc15fa7
update
ChamsolPark May 20, 2024
36b1bd5
Update README.md
ChamsolPark May 20, 2024
07d4c09
Update README.md
Maxwithjude May 21, 2024
2706d8f
Career 모델 수정(마감 이후 처리 필드추가)
mine0697782 May 22, 2024
0c330ca
Update README.md
mmoossun May 22, 2024
44da3d6
현장 검색 기능 완성
mine0697782 May 22, 2024
b5e05eb
모바일 프로젝트 삭제
mine0697782 May 22, 2024
c5f5940
데이터 추출 알고리즘 수정
mmoossun May 22, 2024
a48eeaf
Merge pull request #46 from mmoossun/master
mmoossun May 22, 2024
cc22d5d
경력 인식 알고리즘 수정
mmoossun May 23, 2024
3fe3ab6
Merge pull request #47 from mmoossun/master
mmoossun May 23, 2024
13834bb
update
ChamsolPark May 23, 2024
94e210e
Merge branch 'kookmin-sw:master' into master
ChamsolPark May 23, 2024
ea3550d
utils 폴더 추가 및 나이 계산 모듈 위치 변경 / DBseed용 랜덤생성파일 추가
mine0697782 May 23, 2024
b817108
worksite 모델 및 더미데이터 생성 파일 수정
mine0697782 May 23, 2024
e104b99
utils 생성으로 인한 import 경로변경
mine0697782 May 23, 2024
451d471
Merge pull request #48 from mine0697782/master
mine0697782 May 23, 2024
40e56a8
근무자별 근무기록 조회 및 리뷰 수정 기능 추가
mine0697782 May 23, 2024
c174486
리뷰 수정 모달에 현장 바로가기 추가
mine0697782 May 23, 2024
157fceb
Merge pull request #49 from mine0697782/master
mine0697782 May 23, 2024
f500dbe
Merge branch 'kookmin-sw:master' into master
ChamsolPark May 23, 2024
b445ad8
update
ChamsolPark May 23, 2024
608e8c8
update
ChamsolPark May 23, 2024
cc3a54b
update
ChamsolPark May 23, 2024
60bbb4c
데이터 전처리 강화
mmoossun May 24, 2024
7ab197e
Merge pull request #50 from mmoossun/master
mmoossun May 24, 2024
5a41a9f
데이터 추출용 웹 서버 구현
mmoossun May 24, 2024
45967b5
Merge pull request #51 from mmoossun/master
mmoossun May 24, 2024
a900adb
update
ChamsolPark May 24, 2024
2c8f4f4
Merge branch 'kookmin-sw:master' into master
ChamsolPark May 24, 2024
b62457c
Merge pull request #52 from ChamsolPark/master
ChamsolPark May 24, 2024
8d0be0d
Merge pull request #2 from kookmin-sw/master
Maxwithjude May 24, 2024
4a80764
Merge pull request #53 from Maxwithjude/master
Maxwithjude May 24, 2024
3840d5d
Update README.md
Maxwithjude May 24, 2024
6ddb202
허깅페이스 모델 배포 추가 README.md
ChamsolPark May 24, 2024
0ce864e
Update README.md
ChamsolPark May 24, 2024
f332167
오타수정 README.md
ChamsolPark May 24, 2024
4993403
모듈화 및 db 연결개선
ChamsolPark May 29, 2024
ac96519
Merge remote-tracking branch 'origin/master'
ChamsolPark May 29, 2024
fc98e82
모듈화 및 db 연결개선
ChamsolPark May 29, 2024
ac7b51f
모듈화 및 db 연결개선
ChamsolPark May 29, 2024
2e3fd56
모듈화 및 db 연결개선
ChamsolPark May 29, 2024
b692b7e
Merge pull request #54 from ChamsolPark/master
ChamsolPark May 29, 2024
5eafa98
모듈화 및 db 연결개선
ChamsolPark May 29, 2024
0ac6ce2
모듈화 및 db 연결완료
ChamsolPark May 30, 2024
7337c58
Merge pull request #55 from ChamsolPark/master
ChamsolPark May 30, 2024
4060d08
모듈화 및 db 연결완료
ChamsolPark May 30, 2024
3624f63
Merge pull request #56 from ChamsolPark/master
ChamsolPark May 30, 2024
67829c5
DB 코드 수정
mmoossun May 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update
  • Loading branch information
ChamsolPark committed May 23, 2024
commit cc3a54bb13f1320f7da092c011a88b483a870d33
30 changes: 30 additions & 0 deletions RecommendationSystem/src/career.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#career

from datetime import datetime
from bson import ObjectId
from config.db import get_collection

class Career:
def __init__(self, employee, worksite, done, pay, review, score):
self.employee = ObjectId(employee)
self.worksite = ObjectId(worksite)
self.done = done
self.pay = pay
self.review = review
self.score = score

def to_dict(self):
return {
'employee': self.employee,
'worksite': self.worksite,
'done': self.done,
'pay': self.pay,
'review': self.review,
'score': self.score
}

# career에서는 review 데이터 가져오고 score값 저장할 것임.




39 changes: 2 additions & 37 deletions RecommendationSystem/src/employee.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# employee.py
#employee

from datetime import datetime
from bson import ObjectId
@@ -30,39 +30,4 @@ def to_dict(self):
'updatedAt': self.updated_at
}

class EmployeeRepository:
"""
Employee 데이터를 관리하는 저장소 클래스.
"""
def __init__(self):
self.collection = get_collection('ExtractedEntities')

def insert(self, employee: Employee):
"""
새로운 Employee를 삽입합니다.
"""
self.collection.insert_one(employee.to_dict())

def find_all(self):
"""
모든 Employee 데이터를 반환합니다.
"""
return list(self.collection.find())

def find_by_name(self, name):
"""
이름으로 Employee 데이터를 찾습니다.
"""
return list(self.collection.find({'name': name}))

def update(self, employee_id, updated_fields):
"""
주어진 Employee ID의 데이터를 업데이트합니다.
"""
self.collection.update_one({'_id': ObjectId(employee_id)}, {'$set': updated_fields})

def delete(self, employee_id):
"""
주어진 Employee ID의 데이터를 삭제합니다.
"""
self.collection.delete_one({'_id': ObjectId(employee_id)})
# sex, user, local
28 changes: 14 additions & 14 deletions RecommendationSystem/src/recommendation_scoring.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
#rec_sys
from geopy.distance import geodesic
import torch
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import numpy as np
import numpy as np
import pandas as pd
import torch
from sklearn.metrics import accuracy_score
from model import load_model_and_tokenizer, predict_entities
from data_processing import find_career_status, find_phone_number, extract_and_combine_entities
from datasets import load_dataset
from config.db import connect_db, get_collection
from employee import Employee, EmployeeRepository


#db
from config.db import connect_db, get_collection
from employee import Employee
from career import Career
from worksite import Worksite
from pymongo import MongoClient

# MongoDB 데이터베이스 연결
db = connect_db()
collection = get_collection('Scoring') # 원하는 컬렉션 이름을 지정
@@ -25,15 +25,13 @@
tokenizer_roberta = AutoTokenizer.from_pretrained("klue/roberta-large")
tokenizer_electra = AutoTokenizer.from_pretrained("monologg/koelectra-base-v3-discriminator")

# 로드할 RoBERTa 모델 경로
roberta_model_path = "/content/drive/MyDrive/robust_model/roberta_model"
# 로드할 Electra 모델 경로
electra_model_path = "/content/drive/MyDrive/robust_model/electra_model"

# 저장된 모델 로드
model_roberta = AutoModelForSequenceClassification.from_pretrained(roberta_model_path)
model_electra = AutoModelForSequenceClassification.from_pretrained(electra_model_path)
model_roberta = AutoModelForSequenceClassification.from_pretrained("Chamsol/klue-roberta-sentiment-classification")
model_electra = AutoModelForSequenceClassification.from_pretrained("Chamsol/koelctra-sentiment-classification")


#score
def calculate_distance(point1, point2):
# 두 지점 사이의 거리를 계산하는 함수
distance_to_station = geodesic(point1, point2).kilometers
@@ -53,6 +51,7 @@ def label_to_value(label):
else:
return 0

#predict
def logits_to_probs(logits):
return torch.nn.functional.softmax(logits, dim=1)

@@ -90,6 +89,7 @@ def predict_with_ensemble_modified(texts, roberta_model, koelectra_model, tokeni

return final_labels

#stringtolocal
def get_coordinates_worksites(address):
# 주소에 따른 좌표 정보를 저장하는 딕셔너리
coordinates_worksites = {
50 changes: 50 additions & 0 deletions RecommendationSystem/src/worksite.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#worksite

from datetime import datetime
from bson import ObjectId
from config.db import get_collection

class Worksite:
def __init__(self, user, name, address, local, salary, worktype, date, end, nopr, wanted, sent, sendmessage, recieved, denied, hired, worksitenote, createdAt, updateAt):
self.user = ObjectId(user)
self.name = name
self.address = address
self.local = local
self.salary = salary
self.worktype = worktype
self.date = date
self.end = end
self.nopr = nopr
self.wanted = wanted(employee)
self.sent = ObjectId(employee)
self.sendmessage = sendmessage
self.recieved = recieved
self.denied = ObjectId(employee)
self.hired = ObjectId(employee)
self.worksitenote = worksitenote
self.createdAt = createdAt
self.updateAt = updateAt

def to_dict(self):
return {
'user': self.user,
'name': self.name,
'address': self.address,
'local': self.local,
'salary': self.salary,
'worktype': self.worktype,
'date': self.date,
'end': self.end,
'nopr': self.nopr,
'wanted': self.wanted,
'sent': self.sent,
'sendmessage': self.sendmessage,
'recieved': self.recieved,
'denied': self.denied,
'hired': self.hired,
'worksitenote': self.worksitenote,
'createdAt': self.createdAt,
'updateAt': self.updateAt
}

# hired는 지원후 수락인원, local,