├── .github ├── ISSUE_TEMPLATE │ └── feature_request.md ├── PULL_REQUEST_TEMPLATE.md └── workflows │ └── backendCI.yml ├── README.md ├── backend ├── .gitignore ├── Dockerfile ├── README.md ├── airflow │ ├── dags │ │ └── training_pipeline.py │ └── module │ │ ├── load_data.py │ │ └── train_model.py ├── app │ ├── bert_retrieval.py │ ├── bm25_retrieval.py │ ├── filter.py │ ├── generate.py │ ├── main.py │ └── search.py ├── requirements.txt ├── router │ └── router.py └── tests │ ├── test_filter.py │ ├── test_generate.py │ ├── test_retrieval.py │ └── test_search.py ├── data_pipeline ├── .gitignore ├── README.md ├── crawler.py ├── generate │ ├── backup_prompts.py │ ├── generate_bard.py │ ├── generate_gpt.py │ ├── parse.py │ └── prompts.pkl ├── preprocessor.py ├── preprocessor_v2.py ├── qa_crawler.py ├── requirements.txt ├── spellchecker.py └── utils.py ├── frontend ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public │ ├── index.html │ ├── lawbot.ico │ ├── lawbot.png │ ├── manifest.json │ └── robots.txt ├── src │ ├── App.js │ ├── asset │ │ ├── lawbot.png │ │ └── spinner.gif │ ├── components │ │ ├── ChattingSideBar.js │ │ ├── Header.js │ │ ├── Loader.js │ │ ├── SimilarPrecedent.js │ │ ├── SimilarPrecedentComponents │ │ │ └── PrecedentCard.js │ │ └── TypingAnimation.js │ ├── index.css │ ├── index.js │ └── reportWebVitals.js └── tailwind.config.js ├── model ├── .gitignore ├── BERT │ ├── inference │ │ ├── inference.py │ │ └── utils.py │ ├── make_vector_dataset │ │ └── preprocessing_law_data.py │ └── preprocessing.py ├── Filter │ ├── data_preprocessing.py │ ├── dataloader.py │ ├── infer.py │ ├── train.py │ └── utils.py ├── LLM │ ├── evaluation │ │ ├── data_preprocessing.py │ │ ├── dialogue_evaluation.py │ │ ├── eval_data_alpaca │ │ │ └── dataset_val.csv │ │ ├── eval_data_legal │ │ │ ├── easy_law_val.csv │ │ │ └── legal_QA_val.csv │ │ ├── evaluate_mertrics.py │ │ ├── petf_ppl.py │ │ └── ppl.py │ ├── inference │ │ └── infer.py │ └── train │ │ ├── data_preprocessing.py │ │ ├── load_model.py │ │ ├── train.py │ │ └── utils.py ├── README.md ├── Retrieval │ ├── bert_retrieval │ │ ├── data_preprocessing.py │ │ └── inference.py │ └── bm25_retrieval │ │ ├── data_preprocessing.py │ │ ├── read_json.py │ │ ├── retrieval.py │ │ ├── retrieval_bm25.py │ │ └── retrieval_main.py └── requirements.txt └── prototype ├── .gitignore ├── README.md ├── package-lock.json ├── package.json ├── public ├── index.html ├── lawbot.ico ├── lawbot.png ├── manifest.json └── robots.txt ├── src ├── App.js ├── asset │ └── lawbot.png ├── components │ ├── ChattingSideBar.js │ ├── Header.js │ ├── SimilarPrecedent.js │ └── SimilarPrecedentComponents │ │ └── PrecedentCard.js ├── index.css ├── index.js └── reportWebVitals.js └── tailwind.config.js /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "[FEAT]" 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | ## Background 11 | - 12 | 13 | ## Todo 14 | - [ ] Todo 1 15 | - [ ] Todo 2 16 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Overview 2 | - 3 | 4 | ## Change Log 5 | - 6 | 7 | ## Further information 8 | - 9 | 10 | ## To Reviewer 11 | - 12 | 13 | ## Issue Tags 14 | - Closed | Fixed: # 15 | - See also : # 16 | -------------------------------------------------------------------------------- /.github/workflows/backendCI.yml: -------------------------------------------------------------------------------- 1 | # This workflow will install Python dependencies, run tests and lint with a single version of Python 2 | # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python 3 | 4 | name: CI for backend 5 | 6 | on: 7 | push: 8 | paths: "backend/**" 9 | branches: [ "develop" ] 10 | pull_request: 11 | paths: "backend/**" 12 | branches: [ "develop" ] 13 | 14 | jobs: 15 | CI: 16 | runs-on: self-hosted 17 | env: 18 | working-directory: /opt/ml/level3_nlp_finalproject-nlp-08 19 | 20 | steps: 21 | - name: Update Code 22 | run: git pull 23 | working-directory: ${{ env.working-directory }} 24 | 25 | - name: install dependencies 26 | run: | 27 | source final_project/bin/activate 28 | pip install -r requirements.txt 29 | working-directory: "${{ env.working-directory }}/backend" 30 | 31 | - name: Test with pytest 32 | run: | 33 | source final_project/bin/activate 34 | pytest 35 | working-directory: "${{ env.working-directory }}/backend" 36 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 | 3 |
사건 이름 : {precedent.case_name}
6 |사건 번호 : {precedent.case_number}
7 |사건 분류 : {precedent.case_type}
8 |관련 법 조항 :{precedent.ref_article}
9 | 10 | Read more 11 | 14 | 15 |사건 케이스 : {precedent.case_name}
6 |사건 번호 : {precedent.case_number}
7 |사건 분류 : {precedent.case_type}
8 |관련 법 조항 :{precedent.ref_article}
9 | 10 | Read more 11 | 14 | 15 |