Skip to content

Uma achiloc1#47

Open
utakbhate0943-dot wants to merge 3 commits into
mainfrom
uma-achievementlocation
Open

Uma achiloc1#47
utakbhate0943-dot wants to merge 3 commits into
mainfrom
uma-achievementlocation

Conversation

@utakbhate0943-dot
Copy link
Copy Markdown
Collaborator

No description provided.

@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 9, 2025

Deploy Preview for mewannajob ready!

Name Link
🔨 Latest commit aa5aabf
🔍 Latest deploy log https://app.netlify.com/projects/mewannajob/deploys/6938f66ddf1b5e0008c13891
😎 Deploy Preview https://deploy-preview-47--mewannajob.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors text extraction logic from script.js into separate modular files under web/model/parsing/, improving code organization and maintainability. The changes extract three major functions (extractLocation, extractEducation, and extractAchievements) into dedicated handler files that follow the IIFE pattern to expose functions globally.

Key Changes

  • Moved extractLocation, extractEducation, and extractAchievements functions from script.js to separate files in web/model/parsing/
  • Enhanced extractAchievements function with more comprehensive achievement detection including Latin honors, scholarships, fellowships, and competition awards
  • Completely rewrote extractLocation function with improved multi-country support (US and India) and more robust location parsing
  • Standardized code formatting with consistent 4-space indentation in date/time parsing functions

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
web/script.js Removed 403 lines of extraction functions and reformatted indentation for date parsing utilities
web/model/parsing/location_text_handler.js New file implementing enhanced location extraction with support for US/Indian states, cities, and postal codes
web/model/parsing/education_text_handler.js New file containing education level classification logic extracted from script.js
web/model/parsing/achievement_text_handler.js New file with significantly expanded achievement detection beyond the original Dean's/Chancellor's List
web/index.html Added script tags to load the three new text handler modules before script.js
Comments suppressed due to low confidence (1)

web/model/parsing/location_text_handler.js:4

  • Unused variable STATE_ABBR.
    const STATE_ABBR = [

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -0,0 +1,200 @@
// educationClassifier.js
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file comment says // educationClassifier.js but the actual filename is education_text_handler.js. Update the comment to match the filename for consistency.

Suggested change
// educationClassifier.js
// education_text_handler.js

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,55 @@
// achievementClassifier.js
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file comment says // achievementClassifier.js but the actual filename is achievement_text_handler.js. Update the comment to match the filename for consistency.

Suggested change
// achievementClassifier.js
// achievement_text_handler.js

Copilot uses AI. Check for mistakes.
Comment on lines +4 to +6
const STATE_ABBR = [
'AL', 'AK', 'AZ', 'AR', 'CA', 'CO', 'CT', 'DE', 'FL', 'GA', 'HI', 'ID', 'IL', 'IN', 'IA', 'KS', 'KY', 'LA', 'ME', 'MD', 'MA', 'MI', 'MN', 'MS', 'MO', 'MT', 'NE', 'NV', 'NH', 'NJ', 'NM', 'NY', 'NC', 'ND', 'OH', 'OK', 'OR', 'PA', 'RI', 'SC', 'SD', 'TN', 'TX', 'UT', 'VT', 'VA', 'WA', 'WV', 'WI', 'WY', 'DC'
];
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The STATE_ABBR constant is declared but never used in this file. The state abbreviations are already hardcoded in the regex pattern on line 26. Consider removing this unused constant or refactoring the findCityState function to use it for better maintainability.

Copilot uses AI. Check for mistakes.
Comment on lines +105 to +106
/\baa\b\b|\ba\.?\s*a\.?\b/,
/\bas\b\b|\ba\.?\s*s\.?\b/,
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The regex patterns have a duplicate word boundary \b\b at the beginning. This should be \b only. The first part should be /\baa\b|\ba\.?\s*a\.?\b/ and the second should be /\bas\b|\ba\.?\s*s\.?\b/.

Suggested change
/\baa\b\b|\ba\.?\s*a\.?\b/,
/\bas\b\b|\ba\.?\s*s\.?\b/,
/\baa\b|\ba\.?\s*a\.?\b/,
/\bas\b|\ba\.?\s*s\.?\b/,

Copilot uses AI. Check for mistakes.

if (
bachelorPositive.some(r => r.test(text)) &&
!bachelorNegative.some(r => r.test(text))
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing arrow function syntax. This should be !bachelorNegative.some(r => r.test(text)) instead of !bachelorNegative.some(r.test(text)). The current code will throw a runtime error because r.test is attempting to access a property on the callback parameter r directly instead of calling test as a method.

Copilot uses AI. Check for mistakes.
Comment thread web/index.html Outdated
Comment on lines 78 to 83
<!-- First load the classifier -->
<!-- PDF.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
<!-- Mammoth.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.6.0/mammoth.browser.min.js"></script>
<script src="model/data/skill_dict.js"></script>
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment "First load the classifier" is misleading because the scripts being loaded are text handlers/extractors, not classifiers. Additionally, it's placed before the PDF.js comment. Consider moving it to line 84 before the actual text handler scripts, or updating it to say "Load text extraction handlers" for clarity.

Suggested change
<!-- First load the classifier -->
<!-- PDF.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
<!-- Mammoth.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.6.0/mammoth.browser.min.js"></script>
<script src="model/data/skill_dict.js"></script>
<!-- PDF.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/pdf.js/3.11.174/pdf.min.js"></script>
<!-- Mammoth.js -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/mammoth/1.6.0/mammoth.browser.min.js"></script>
<script src="model/data/skill_dict.js"></script>
<!-- Load text extraction handlers -->

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,110 @@
// locationClassifier.js
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file comment says // locationClassifier.js but the actual filename is location_text_handler.js. Update the comment to match the filename for consistency.

Suggested change
// locationClassifier.js
// location_text_handler.js

Copilot uses AI. Check for mistakes.
@@ -0,0 +1,200 @@
// educationClassifier.js
(function (global) {
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this file from your git commits if you plan on merging this

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took your branch earlier and added mine, how should I do this?

@utakbhate0943-dot utakbhate0943-dot changed the title Uma achievementlocation Uma achiloc1 Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants