Skip to content

feat: add language detector#56

Open
saurabhhhcodes wants to merge 1 commit into
Ruthwik000:mainfrom
saurabhhhcodes:feat/language-detector-19
Open

feat: add language detector#56
saurabhhhcodes wants to merge 1 commit into
Ruthwik000:mainfrom
saurabhhhcodes:feat/language-detector-19

Conversation

@saurabhhhcodes
Copy link
Copy Markdown

Summary

  • add a dependency-free detectLanguage() helper for prompt/content inputs
  • detect common code and content languages with regex and keyword signals
  • scan bounded input only and return unknown for low-signal text
  • export the detector and result type from the package entrypoint
  • add focused detector tests

Validation

  • npm ci
  • npm run build
  • node tests/language-detector.test.js
  • node tests/cross-provider.test.js
  • git diff --check

Closes #19

@saurabhhhcodes
Copy link
Copy Markdown
Author

Quick review/scoring follow-up: this PR is clean from my side and has no checks configured in the repo.

Validation already run:

  • npm ci
  • npm run build
  • node tests/language-detector.test.js
  • node tests/cross-provider.test.js
  • git diff --check

Could you please review when you get a chance and add the appropriate GSSoC labels before merge? The linked issue is #19 and the PR currently has no visible scoring labels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[GSSoC'26] Implement Language Detector

1 participant